[Gluster-devel] how does meta xlator work?

Anand Avati avati at gluster.org
Tue Aug 12 16:37:21 UTC 2014


On Mon, Aug 11, 2014 at 10:36 PM, Emmanuel Dreyfus <manu at netbsd.org> wrote:

> Anand Avati <avati at gluster.org> wrote:
>
> > If FUSE implements proper direct_io semantics (somewhat like how O_DIRECT
> > flag is handled) and allows the mode to be enabled by the FS in open_cbk,
> > then I guess such a special handling of 0-byte need not be necessary?
>
> Yes, this is how it should be done.
>
> While there I see there is a FUSE_FOPEN_KEEP_CACHE  and
> FUSE_FOPEN_NONSEEKABLE. I assume the later means seek should return an
> error (which one?), but what does the first one do?
>
> There is no real documentation about this aside from Linux kernel
> sources...


In Linux FUSE, an open() call automatically invalidates all pages of that
inode. However if FOPEN_KEEP_CACHE is set in open_cbk, the page cache is
kept intact (assuming mtime has not changed etc.)

See
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/fs/fuse/file.c#n207

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20140812/2f4309ce/attachment-0001.html>


More information about the Gluster-devel mailing list