[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fuse-devel
Subject:    Re: [fuse-devel] file system loop problem
From:       Hans Beckerus <hans.beckerus () gmail ! com>
Date:       2012-03-04 13:52:53
Message-ID: 4F5373B5.3000209 () gmail ! com
[Download RAW message or body]

On 2012-02-25 11:21, Nikolaus Rath wrote:
> Hans Beckerus<hans.beckerus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>  writes:
>> I have a slight issue with my FUSE file system when something like this
>> is done, a mount of /tmp/x on top of /tmp/x/y.
>> This results in a loop. But is there some standard pattern/strategy to
>> avoid this that I have overlooked, besides the obvious which is to
>> detect file system loops and raise an error at mount time?
>> I can see that bind mount handles this just fine, so my guess is I must
>> be doing something wrong :(
> I assume you are talking about the fuse example file system?
No, not really. It is a file system of my own ;) But the implementation 
is similar.

> You aren't doing something wrong, this fs is designed to mirror the
> existing file system hierarchy, including any mountpoints. If you want
> to avoid loops, mount it in a directory that is not included in the
> mirrored tree. Alternatively, you could extend the example to not mirror
> mountpoints by checking the st_rdev of the directories.
>
Good suggestion, I will try that. But, that would also mean I need to do 
a stat() call for each call to readdir() operation, right?
That will inflict some overhead I guess?


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
fuse-devel mailing list
fuse-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuse-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic