Re: fgetattr/fsetattr file operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Sun, Jun 7, 2009 at 6:59 PM, Jamie Lokier<jamie@xxxxxxxxxxxxx> wrote:
> No, but well written applications can and do assume this:
>
>    st1=stat(path)
>
>    ...time passes, maybe do some filesystem operations, talk on the network...
>
>    fd=open(path)
>    st2=fstat(fd)
>
>    if (st1!=st2)
>        abort or loop "Race happened, something changed under me..."
>
> -- Jamie
>

Well certainly applications can still make *that* assumption on this
file system, but generally, due to the special semantics of certain
types of file access (more specifically, when it comes to writing and
appending to files), it's expected that some applications may simply
not work with this FS. Applications utilizing this filesystem must be
aware of these cases, with the expectation that some can use them to
their advantage.

So far, the VFS interface (and by extension, the FUSE interface) has
managed to facilitate most of this functionality, but the missing
piece is in the metadata. To achieve the desired behavior, it is
necessary to associate a private set of metadata with an opened file
descriptor. And to do so requires access directly to private data
stored in the underlying file struct during the getattr operation when
the fstat(2) is called.

Cheers,
- Brian
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux