All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@sun.com>
To: Brian Molnar <brian.molnar@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>, linux-fsdevel@vger.kernel.org
Subject: Re: fgetattr/fsetattr file operation
Date: Thu, 04 Jun 2009 13:04:24 -0600	[thread overview]
Message-ID: <20090604190424.GI9002@webber.adilger.int> (raw)
In-Reply-To: <b7ee1e6e0906041042q44dbc1a6ge7b82dc0736bc6f5@mail.gmail.com>

On Jun 04, 2009  10:42 -0700, Brian Molnar wrote:
> > On Thu, Jun 4, 2009 at 3:27 AM, Miklos Szeredi <miklos@szeredi.hu> wrote:
> > Can you tell us a bit more about your use case, and how you worked
> > around the limitation?
> 
> In this FS, when a process opens a file for write mode access, it
> maintains its own private copy of the file until it comes time to
> close. Upon close, this private copy is "committed" and replaces the
> file on-disk. Meanwhile, while the file is open for writing (before
> close) the file on-disk remains untouched (both data and metadata).
> Thus, any metadata-changing operations that take place against the
> file descriptor must only be seen to the process(es) using that file
> descriptor. The intended behavior is that an fstat(2) against the file
> descriptor will return the attributes corresponding to the
> uncommitted, private copy and a path-based stat(2) will return the
> attributes of the file on-disk.

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.

> To achieve this behavior,

Maybe you should go back and explain why this behaviour is useful,
before we burden the kernel with it.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.


  reply	other threads:[~2009-06-04 19:04 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 [this message]
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

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=20090604190424.GI9002@webber.adilger.int \
    --to=adilger@sun.com \
    --cc=brian.molnar@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.