[prev in list] [next in list] [prev in thread] [next in thread]
List: fuse-devel
Subject: Re: [fuse-devel] Accessing the underlying directory when
From: John Hendrikx <hjohn () xs4all ! nl>
Date: 2009-07-17 13:18:32
Message-ID: 4A607A28.9050601 () xs4all ! nl
[Download RAW message or body]
Miklos Szeredi wrote:
> On Thu, 16 Jul 2009, Mike Morrison wrote:
>
>> John Hendrikx <hjohn@xs4all.nl> writes:
>>
>>
>>> Hi all,
>>>
>>> How does one access the directory your Fuse filesystem was mounted on
>>> top of?
>>>
>>> For example, I would like to mount a thin layer on top of an existing
>>> directory (let's say /music). However, as soon as my fs is mounted
>>> and
>>> I do an ls, it results in an infinite (getattr) loop and I'm forced to
>>> umount -f the filesystem. This is not too surprising, but how do I
>>> avoid it?
>>>
>>> I seem to remember seeing this explained somewhere, but after googling
>>> and checking the archives of this list I couldn't find how this is
>>> done.
>>>
>>> Any help appreciated,
>>> --John
>>>
>> Perhaps I'm misunderstanding the question, but I've seen the
>> combination of:
>>
>> In main():
>> cwd = open(mountpoint, O_RDONLY);
>>
>> In FUSE init():
>> fchdir(cwd);
>> close(cwd);
>>
>> and from then out, use paths relative to mountpoint.
>>
>
>
> Yes, apparently that will work too. But this behavior is probably
> highly Linux specific, AFAIK there's no standard that says fchdir()
> does not follow mounts...
>
> Thanks,
> Miklos
>
>
Thanks for the help, what Mike posted was what I was looking for and
couldn't find again.
BTW, the fuse-devel mailinglist seems very bugged to me. I see these
messages, but they donot appear in the fuse mailinglist (it's cc'd but I
don't see them there). Also I had to prepend [fuse-devel] manually to
the subject to even get my message to show up on the list.
Others may have similar troubles as I donot think I did anything special
(I routinely monitor a dozen mailinglists, and only fuse-devel is giving
me troubles).
--John
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
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