From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: avoid direct I/O write vs buffered I/O race
Date: Tue, 30 Aug 2011 16:29:24 +1000 [thread overview]
Message-ID: <20110830062924.GP3162@dastard> (raw)
In-Reply-To: <20110827144253.GA16381@infradead.org>
On Sat, Aug 27, 2011 at 10:42:53AM -0400, Christoph Hellwig wrote:
> Currently a buffered reader or writer can add pages to the pagecache
> while we are waiting for the iolock in xfs_file_dio_aio_write. Prevent
> this by re-checking mapping->nrpages after we got the iolock, and if
> nessecary upgrade the lock to exclusive mode. To simplify this a bit
> only take the ilock inside of xfs_file_aio_write_checks.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Looks sane. Pushing the ILOCK completely into
xfs_file_aio_write_checks() is a nice segregation of locking
responsibilities.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-08-30 6:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-27 14:42 [PATCH] xfs: avoid direct I/O write vs buffered I/O race Christoph Hellwig
2011-08-30 6:29 ` Dave Chinner [this message]
2011-09-12 18:43 ` Alex Elder
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=20110830062924.GP3162@dastard \
--to=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=xfs@oss.sgi.com \
/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.