From: "Michael K. Edwards" <medwards.linux@gmail.com>
To: "Alan Cox" <alan@lxorguk.ukuu.org.uk>
Cc: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: f_owner.lock and file->pos updates
Date: Wed, 7 Mar 2007 17:50:05 -0800 [thread overview]
Message-ID: <f2b55d220703071750h1a47c432ife7f39c575a4303c@mail.gmail.com> (raw)
In-Reply-To: <20070308004853.4f5a090c@lxorguk.ukuu.org.uk>
On 3/7/07, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> The right way IMHO would be to do the work that was done for pread/pwrite
> and implement preadv/pwritev. The moment you want to do atomic things
> with the file->f_pos instead of doing it with a local passed pos value it
> gets ugly.. why do you need to do it with f_pos ?
I didn't see any clean way to intersperse overwrites and appends to a
record-structured file without using vfs_llseek, which steps on f_pos.
Actually, we may already have a problem with append races in
sys_write/sys_writev. If it's possible for two threads to write() to
the same file in different threads (both intending to append), they
may wind up passing the same "pos" value into vfs_write(). Or does
fget_light/fput_light do some sort of locking that I'm not seeing?
Cheers,
- Michael
next prev parent reply other threads:[~2007-03-08 1:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-07 19:17 Michael K. Edwards
2007-03-08 0:48 ` Alan Cox
2007-03-08 1:50 ` Michael K. Edwards [this message]
2007-03-08 2:12 ` Michael K. Edwards
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=f2b55d220703071750h1a47c432ife7f39c575a4303c@mail.gmail.com \
--to=medwards.linux@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®