All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Hans Montero <hjm2133@columbia.edu>
Cc: linux-fsdevel@vger.kernel.org, Tal Zussman <tz2294@columbia.edu>,
	Xijiao Li <xl2950@columbia.edu>,
	OS-TA <cucs4118-tas@googlegroups.com>
Subject: Re: Question about `generic_write_checks()` FIXME comment
Date: Thu, 30 Dec 2021 13:59:02 +0000	[thread overview]
Message-ID: <Yc27JtY8WwsE00Hs@zeniv-ca.linux.org.uk> (raw)
In-Reply-To: <CAMqPytVSCD+6ER+uXa-SrXQCpY-U-34G1jWmprR1Zgag+wBqTA@mail.gmail.com>

On Thu, Dec 30, 2021 at 03:07:25AM -0500, Hans Montero wrote:
 
> Furthermore, why doesn't VFS do the `O_APPEND` check itself instead of
> delegating the task to the filesystems? It seems like a universal check,
> especially given the following snippet on `O_APPEND` from the man page for
> open(2):
> 
>   APPEND
>       The file is opened in append mode. Before each write(2), the file offset
>       is positioned at the end of the file, as if with lseek(2).

Because we need to make sure that no other thread will grow the file between
the check and actual IO?  And exclusion might very well differ for different
filesystems.  Incidentally, what kind of semantics could you assign to
O_APPEND on a block device?  Other than "ignore it", that is...

  reply	other threads:[~2021-12-30 13:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-30  8:07 Question about `generic_write_checks()` FIXME comment Hans Montero
2021-12-30 13:59 ` Al Viro [this message]
2021-12-30 19:04 ` Theodore Ts'o
2021-12-30 20:06   ` Al Viro
2021-12-31  7:23     ` Tal Zussman

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=Yc27JtY8WwsE00Hs@zeniv-ca.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=cucs4118-tas@googlegroups.com \
    --cc=hjm2133@columbia.edu \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tz2294@columbia.edu \
    --cc=xl2950@columbia.edu \
    /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.