lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <5df78e1d0912151740m53995bcck3dd6e1b68684f73@mail.gmail.com>
Date:	Tue, 15 Dec 2009 17:40:54 -0800
From:	Jiaying Zhang <jiayingz@...gle.com>
To:	ext4 development <linux-ext4@...r.kernel.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Michael Rubin <mrubin@...gle.com>
Subject: [RFC PATCH 3/4] ext4: use direct_IO_no_locking in ext4 DIO read

ext4: use direct_IO_no_locking in ext4 dio read.

Signed-off-by: Jiaying Zhang <jiayingz@...gle.com>
---
 fs/ext4/inode.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Index: git-ext4/fs/ext4/inode.c
===================================================================
--- git-ext4.orig/fs/ext4/inode.c       2009-12-15 16:03:15.000000000 -0800
+++ git-ext4/fs/ext4/inode.c    2009-12-15 16:04:03.000000000 -0800
@@ -3580,7 +3580,15 @@ static ssize_t ext4_ind_direct_IO(int rw
       }

 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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ