linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bug (?) with statvfs call on a subvolume
@ 2010-07-11 12:16 redneb
  0 siblings, 0 replies; only message in thread
From: redneb @ 2010-07-11 12:16 UTC (permalink / raw)
  To: linux-btrfs

I am trying to use EncFS in conjunction with btrfs and I ran into a 
weird situation which I think is caused by statvfs being called on a 
btrfs subvolume.


In particular, when I do something like the following:
        statvfs("/mnt/btrfs-volume/some-subvolume")
then all mounted FUSE file-systems receive a GETATTR request. This is 
strange because it happens to FUSE file-systems completely unrelated to 
/mnt/btrfs-volume.


This can cause serious problems with some FUSE file-systems such as 
EncFS.  For instance, suppose that you have an EncFS file-systems as 
follows:
        encfs /mnt/btrfs-volume/some-subvolume /home/user/private
Whenever you do statvfs("/home/user/private") then EncFS will internally 
call statvfs("/mnt/btrfs-volume/some-subvolume") but this in turn will 
cause the FUSE method getattr to be called. This cycle of dependencies 
results in a deadlock.


STEP TO REPRODUCE:
1. btrfs subvolume create /mnt/btrfs-volume/private
2. mkdir /home/user/private
3. encfs /mnt/btrfs-volume/private /home/user/private
4. [ do statvfs("/home/user/private") ]

In step 4, stavfs will never return and /home/user/private will become 
unresponsive.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-07-11 12:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-11 12:16 bug (?) with statvfs call on a subvolume redneb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).