From: Chris Mason <chris.mason@oracle.com>
To: Suparna Bhattacharya <suparna@in.ibm.com>
Cc: linux-fsdevel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH 4 of 8] Add flags to control direct IO helpers
Date: Wed, 7 Feb 2007 13:05:44 -0500 [thread overview]
Message-ID: <20070207180544.GC11967@think.oraclecorp.com> (raw)
In-Reply-To: <20070207170845.GA13893@in.ibm.com>
On Wed, Feb 07, 2007 at 10:38:45PM +0530, Suparna Bhattacharya wrote:
> > + * The flags parameter is a bitmask of:
> > + *
> > + * DIO_PLACEHOLDERS (use placeholder pages for locking)
> > + * DIO_CREATE (pass create=1 to get_block for filling holes or extending)
>
> A little more explanation about why these options are needed, and examples
> of when one would specify each of these options would be good.
I'll extend the comments in the patch, but for discussion here:
DIO_PLACEHOLDERS: placeholders are inserted into the page cache to
synchronize the DIO with buffered writes. From a locking point of view,
this is similar to inserting and locking pages in the address space
corresponding to the DIO.
placeholders guard against concurrent allocations and truncates during the DIO.
You don't need placeholders if truncates and allocations are are
impossible (for example, on a block device).
DIO_CREATE: placeholders make it possible for filesystems to safely fill
holes and extend the file via get_block during the DIO. If DIO_CREATE
is turned on, get_block will be called with create=1, allowing the FS to
allocate blocks during the DIO.
DIO_DROP_I_MUTEX: If the write is inside of i_size, i_mutex is dropped
during the DIO and taken again before returning.
-chris
next prev parent reply other threads:[~2007-02-07 18:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-07 0:32 [RFC PATCH 0 of 8] O_DIRECT locking rework Chris Mason
2007-02-07 0:32 ` [PATCH 1 of 8] Introduce a place holder page for the pagecache Chris Mason
2007-02-07 17:36 ` Zach Brown
2007-02-07 0:32 ` [PATCH 2 of 8] Change O_DIRECT to use placeholders instead of i_mutex/i_alloc_sem locking Chris Mason
2007-02-07 20:11 ` Zach Brown
2007-02-07 20:22 ` Chris Mason
2007-02-07 20:34 ` Zach Brown
2007-02-07 0:32 ` [PATCH 3 of 8] DIO: don't fall back to buffered writes Chris Mason
2007-02-07 0:32 ` [PATCH 4 of 8] Add flags to control direct IO helpers Chris Mason
2007-02-07 17:08 ` Suparna Bhattacharya
2007-02-07 18:05 ` Chris Mason [this message]
2007-02-08 4:03 ` Suparna Bhattacharya
2007-02-08 12:58 ` Chris Mason
2007-02-07 0:32 ` [PATCH 5 of 8] Make ext3 safe for the new DIO locking rules Chris Mason
2007-02-07 0:32 ` [PATCH 6 of 8] Make reiserfs safe for " Chris Mason
2007-02-07 0:32 ` [PATCH 7 of 8] Adapt XFS to the new blockdev_direct_IO calls Chris Mason
2007-02-07 0:32 ` [PATCH 8 of 8] Avoid too many boundary buffers in DIO Chris Mason
-- strict thread matches above, loose matches on Subject: below --
2006-12-22 1:45 [PATCH 0 of 8] O_DIRECT locking rework v5 Chris Mason
2006-12-22 1:59 ` [PATCH 4 of 8] Add flags to control direct IO helpers Chris Mason
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=20070207180544.GC11967@think.oraclecorp.com \
--to=chris.mason@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=suparna@in.ibm.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 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).