linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiaying Zhang <jiayingz@google.com>
To: linux-ext4@vger.kernel.org
Cc: tytso@mit.edu, mrubin@google.com, akpm@linux-foundation.org
Subject: Re: [PATCHv2 2/3] ext4: use direct_IO_no_locking in ext4 DIO read
Date: Tue, 12 Jan 2010 11:49:40 -0800	[thread overview]
Message-ID: <5df78e1d1001121149y94a3c82x5140b6deab0d7a0b@mail.gmail.com> (raw)
In-Reply-To: <20100112194210.C27AC6E85C@peat.mtv.corp.google.com>

Oops, this should be [PATCHv2 3/3].

Jiaying

On Tue, Jan 12, 2010 at 11:42 AM, Jiaying Zhang <jiayingz@google.com> wrote:
>
>    ext4: Use direct_IO_no_locking in ext4 dio read.
>
>    Signed-off-by: Jiaying Zhang <jiayingz@google.com>
>
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 9ee3550..44d2e19 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -3395,7 +3395,15 @@ static ssize_t ext4_ind_direct_IO(int rw, struct kiocb *iocb,
>        }
>
>  retry:
> -       ret = blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov,
> +       if (rw == READ && test_opt(inode->i_sb, DIOREAD_NOLOCK)
> +                       && (EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL))
> +               ret = blockdev_direct_IO_no_locking(rw, iocb, inode,
> +                                inode->i_sb->s_bdev, iov,
> +                                offset, nr_segs,
> +                                ext4_get_block, NULL);
> +       else
> +               ret = blockdev_direct_IO(rw, iocb, inode,
> +                                inode->i_sb->s_bdev, iov,
>                                 offset, nr_segs,
>                                 ext4_get_block, NULL);
>        if (ret == -ENOSPC && ext4_should_retry_alloc(inode->i_sb, &retries))
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2010-01-12 19:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-12 19:42 [PATCHv2 2/3] ext4: use direct_IO_no_locking in ext4 DIO read Jiaying Zhang
2010-01-12 19:49 ` Jiaying Zhang [this message]

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=5df78e1d1001121149y94a3c82x5140b6deab0d7a0b@mail.gmail.com \
    --to=jiayingz@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=mrubin@google.com \
    --cc=tytso@mit.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 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).