linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Molnar <brian.molnar@gmail.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	adilger@sun.com, linux-fsdevel@vger.kernel.org
Subject: Re: fgetattr/fsetattr file operation
Date: Mon, 8 Jun 2009 15:26:07 -0700	[thread overview]
Message-ID: <b7ee1e6e0906081526u6231df55j513cdd39f42b94ea@mail.gmail.com> (raw)
In-Reply-To: <20090608015943.GM15426@shareable.org>

> On Sun, Jun 7, 2009 at 6:59 PM, Jamie Lokier<jamie@shareable.org> 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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2009-06-08 22:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-03 17:32 fgetattr/fsetattr file operation Brian Molnar
2009-06-04 10:27 ` Miklos Szeredi
2009-06-04 17:42   ` Brian Molnar
2009-06-04 19:04     ` Andreas Dilger
2009-06-04 19:46       ` Brian Molnar
2009-06-05 10:35         ` Miklos Szeredi
2009-06-08  1:59           ` Jamie Lokier
2009-06-08 22:26             ` Brian Molnar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b7ee1e6e0906081526u6231df55j513cdd39f42b94ea@mail.gmail.com \
    --to=brian.molnar@gmail.com \
    --cc=adilger@sun.com \
    --cc=jamie@shareable.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).