From: tytso@mit.edu
To: Ext4 Developers List <linux-ext4@vger.kernel.org>
Cc: Jiaying Zhang <jiayingz@google.com>
Subject: Re: [PATCH v4 2/3] ext4: use ext4_get_block_write in buffer write
Date: Fri, 15 Jan 2010 21:17:12 -0500 [thread overview]
Message-ID: <20100116021712.GA25273@thunk.org> (raw)
In-Reply-To: <1263583812-21355-3-git-send-email-tytso@mit.edu>
On Fri, Jan 15, 2010 at 02:30:11PM -0500, Theodore Ts'o wrote:
> diff --git a/fs/ext4/ext4_jbd2.h b/fs/ext4/ext4_jbd2.h
> index 05eca81..dd58020 100644
> --- a/fs/ext4/ext4_jbd2.h
> +++ b/fs/ext4/ext4_jbd2.h
> @@ -304,4 +304,28 @@ static inline int ext4_should_writeback_data(struct inode *inode)
> return 0;
> }
>
> +/*
> + * This function controls whether or not we should try to go down the
> + * dioread_nolock code paths, which makes it safe to avoid taking
> + * i_mutex for direct I/O reads. This only works for extent-based
> + * files, and it doesn't work for nobh or if data journaling is
> + * enabled, since the dioread_nolock code uses b_private to pass
> + * information back to the I/O completion handler, and this conflicts
> + * with the jbd's use of b_private.
> + */
> +static inline int ext4_should_dioread_nolock(struct inode *inode)
> +{
> + if (!test_opt(inode->i_sb, DIOREAD_NOLOCK))
> + return 0;
> + if (test_opt(inode->i_sb, NOBH))
> + return 0;
> + if (!S_ISREG(inode->i_mode))
> + return 0;
> + if (EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL)
Oops, this was an embarassing typo. This should have been:
+ if (!(EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL))
Thanks to Jiaying for pointing this out.
- Ted
next prev parent reply other threads:[~2010-01-16 2:41 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-15 19:30 [PATCH v4 0/3] dioread_nolock patch Theodore Ts'o
2010-01-15 19:30 ` [PATCH v4 1/3] ext4: mechanical change on dio get_block code in prepare for it to be used by buffer write Theodore Ts'o
2010-01-17 14:36 ` Aneesh Kumar K. V
2010-01-17 16:19 ` Eric Sandeen
2010-01-17 16:42 ` Aneesh Kumar K. V
2010-01-18 3:57 ` tytso
2010-01-15 19:30 ` [PATCH v4 2/3] ext4: use ext4_get_block_write in " Theodore Ts'o
2010-01-16 2:17 ` tytso [this message]
2010-01-17 14:21 ` Aneesh Kumar K. V
2010-01-18 5:25 ` Jiaying Zhang
2010-01-15 19:30 ` [PATCH v4 3/3] ext4: Use direct_IO_no_locking in ext4 dio read Theodore Ts'o
2010-01-17 14:19 ` Aneesh Kumar K. V
2010-01-15 19:39 ` [PATCH v4 0/3] dioread_nolock patch Ric Wheeler
2010-01-15 19:52 ` Eric Sandeen
2010-01-15 20:15 ` tytso
2010-01-15 20:17 ` Eric Sandeen
2010-01-15 21:47 ` Michael Rubin
2010-01-22 20:47 ` Valerie Aurora
2010-02-20 0:56 ` Michael Rubin
2010-02-23 0:36 ` Andreas Dilger
2010-02-16 21:07 ` Darrick J. Wong
2010-02-17 19:34 ` Jiaying Zhang
2010-02-19 21:25 ` Darrick J. Wong
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=20100116021712.GA25273@thunk.org \
--to=tytso@mit.edu \
--cc=jiayingz@google.com \
--cc=linux-ext4@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;
as well as URLs for NNTP newsgroup(s).