Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 361391 - sys-power/pm-utils-1.4.1-r1 remounts filesystems causing nested ecryptfs partitions (sys-fs/ecryptfs-utils-85) to unmount
Summary: sys-power/pm-utils-1.4.1-r1 remounts filesystems causing nested ecryptfs part...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2011-03-30 21:45 UTC by Marek Rogalski
Modified: 2014-06-23 14:07 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Rogalski 2011-03-30 21:45:59 UTC
sys-power/pm-utils-1.4.1-r1 remounts filesystems with different commit option depending on battery or ac power. It causes nested ecryptfs partitions to unmount.

Reproducible: Sometimes

Steps to Reproduce:
1. Mount ecryptfs directory under ext4 filesystem
2. Change power source from AC to battery or vice-versa
Actual Results:  
Encrypted directory gets unmounted.

Expected Results:  
Ideally: the remount would succeed without encrypted partition being unmounted. It seems that it would require hacking pm-utils or ecryptfs...

Would be nice if it didn't remounted the filesystem with nested ecryptfs mounts.

Responsible file: /usr/lib/pm-utils/power.d/journal-commit
Quick fix: echo HOOK_BLACKLIST=journal-commit > /etc/pm/config.d/stop-remount
Comment 1 Matěj Laitl 2011-05-26 16:41:31 UTC
Isn't that more likely a bug of ecyptfs? E.g. shouldn't it rather survive remount of its parent filesystem? (I know nothing about ecryptfs, maybe it's on purpose, but general semantics are that filesystem remounts are transparent down the way)
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2014-06-23 14:07:13 UTC
pm-utils-1.4.1-r6:

+	# Punt hooks which have shown to not reduce, or even increase power usage
+	# (rm -f from debian rules)
+	rm -f "${ED}"/usr/$(get_libdir)/${PN}/power.d/{journal-commit,readahead}

As Debian removes these bad files in their 1.4.1-14 patchset, I've done same for Gentoo in 1.4.1-r6

No file -> No problem