Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 361391

Summary: sys-power/pm-utils-1.4.1-r1 remounts filesystems causing nested ecryptfs partitions (sys-fs/ecryptfs-utils-85) to unmount
Product: Gentoo Linux Reporter: Marek Rogalski <mafikpl>
Component: [OLD] Core systemAssignee: Freedesktop bugs <freedesktop-bugs>
Status: RESOLVED FIXED    
Severity: minor CC: matej
Priority: Normal Keywords: UPSTREAM
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

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