Re: [PATCH v4 3/3] ext4: Use direct_IO_no_locking in ext4 dio read.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 15 Jan 2010 14:30:12 -0500, "Theodore Ts'o" <tytso@xxxxxxx> wrote:
> Signed-off-by: Jiaying Zhang <jiayingz@xxxxxxxxxx>
> Signed-off-by: "Theodore Ts'o" <tytso@xxxxxxx>
> ---
>  fs/ext4/inode.c |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)



This need a commit message explaining why we can use
direct_IO_no_locking now. 



> 
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 1f56484..ec0bbdd 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -3419,7 +3419,14 @@ 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 && ext4_should_dioread_nolock(inode))
> +		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))
> -- 
> 1.6.5.216.g5288a.dirty


-aneesh
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux