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

List:       fuse-devel
Subject:    Re: [fuse-devel] Do fusemods have their own fuse_file_info::fh?
From:       Miklos Szeredi <miklos () szeredi ! hu>
Date:       2013-09-23 13:35:21
Message-ID: CAJfpegvApwWbRp9tiMQ6w40xJw=WB5GDD-9j6tHYg-tsHMteMQ () mail ! gmail ! com
[Download RAW message or body]

On Tue, Sep 3, 2013 at 11:06 AM, Goswin von Brederlow <goswin-v-b@web.de> wrote:
> On Fri, Aug 30, 2013 at 12:22:46PM +0200, Miklos Szeredi wrote:
>> On Thu, Aug 22, 2013 at 5:49 PM, Goswin von Brederlow <goswin-v-b@web.de> wrote:
>> >
>> > I imagine the following should work:
>> >
>> > - fuse_file_info::fh is the fusemod's own private data
>> > - on open the fuse_file_info::fh from the real filesystem (or other
>> >   modules) is passed back to the fusemod for encapsulation in the
>> >   fusemods private data.
>> > - the fusemod must register an un-encapsulate function. This is used
>> >   to restore the original fuse_file_info::fh for the real filesystem or
>> >   next module in the sack on unimplemented callbacks.
>> > - on callbacks the fusemod has to un-encapsulate the fuse_file_info::fh
>> >   (or should that use the registered un-encapsulate function automatically?
>> >
>> > Note: If no un-encapsulate function is registered then the fuse_file_info::fh
>> > must not be altered by the fusemod and is simply passed through.
>>
>> No need to register anything.  The fusemod can encapsulate the next
>> filesystem's fh in its own private data in ->open() and in all the
>> rest it can decapsulate it and set fi->fh before calling
>> fuse_fs_foo(..., fi).
>>
>> Thanks,
>> Miklos
>
> Then it has to implement every callback, including future ones, just to
> decapsulate the fh. The registering is ment for callbacks the module
> does not implement but the filesystem does.

There's no default pass-through behavior on module callbacks.  If an
operation is not implemented in a module, the behavior is the same as
if the operation was not implemented in the filesystem.

Thanks,
Miklos

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
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