From: Brian Molnar <brian.molnar@gmail.com>
To: Andreas Dilger <adilger@sun.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>, linux-fsdevel@vger.kernel.org
Subject: Re: fgetattr/fsetattr file operation
Date: Thu, 4 Jun 2009 12:46:08 -0700 [thread overview]
Message-ID: <b7ee1e6e0906041246o371704d6qddc6539565e77eac@mail.gmail.com> (raw)
In-Reply-To: <20090604190424.GI9002@webber.adilger.int>
> On Thu, Jun 4, 2009 at 12:04 PM, Andreas Dilger <adilger@sun.com> wrote:
> This sounds very strange - different processes (or even the same
> process using different file handles) will see different results
> for fstat() which are yet different from stat(). I can't imagine
> that applications would like this at all.
Ya, no doubt a good deal of applications would get very confused if
they didn't know the difference. And it is not the goal of this FS to
support the use of general applications.
But, because a process has a 'private copy' of the file when it opens
it for write-mode (this being an intended feature of this
file-system), it's imperative that the application be given the
ability to access the data and metadata of the private copy as well as
the on-disk version. The on-disk file's metadata would be retrieved
via a path-based stat(2) (or by opening another instance of the file
read-only and fstat'ing the fd), and the private copy's metadata would
be retrieved via fstat(2).
> Maybe you should go back and explain why this behaviour is useful,
> before we burden the kernel with it.
Hardly a burden. It's an interface addition that is completely
optional to each filesystem. In Miklos' patch, if the fgetattr method
is not set in the file_operations struct, then the behavior is to
fallback to the original getattr function.
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
next prev parent reply other threads:[~2009-06-04 19:46 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 [this message]
2009-06-05 10:35 ` Miklos Szeredi
2009-06-08 1:59 ` Jamie Lokier
2009-06-08 22:26 ` Brian Molnar
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=b7ee1e6e0906041246o371704d6qddc6539565e77eac@mail.gmail.com \
--to=brian.molnar@gmail.com \
--cc=adilger@sun.com \
--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).