Whamcloud - gitweb
LU-13196 llite: Remove mutex on dio read 19/37419/6
authorPatrick Farrell <farr0186@gmail.com>
Tue, 4 Feb 2020 03:10:23 +0000 (22:10 -0500)
committerOleg Drokin <green@whamcloud.com>
Fri, 17 Jul 2020 19:29:37 +0000 (19:29 +0000)
DIO reads in Lustre are protected by Lustre range locking
and do not need the inode mutex.  This code was removed
in LU-1669, the range lock was added for DIO reads in
LU-6227, and then the mutex was accidentally re-introduced
in LU-6260.

Remove it again.

Test-Parameters: envdefinitions=ONLY=16 testlist=sanityn,sanityn,sanityn,sanityn,sanityn,sanityn,sanityn,sanityn
Fixes: 98883bd3e2cc ("LU-6260 llite: add support for direct IO api changes")
Signed-off-by: Patrick Farrell <farr0186@gmail.com>
Change-Id: I5b3570e83a4b4ff36d9a22bc6bd3be5d5f991924
Reviewed-on: https://review.whamcloud.com/37419
Reviewed-by: Wang Shilong <wshilong@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Tested-by: Shuichi Ihara <sihara@ddn.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/rw26.c

index 815ab13..8fd227e 100644 (file)
@@ -436,13 +436,6 @@ ll_direct_IO_impl(struct kiocb *iocb, struct iov_iter *iter, int rw)
        LASSERT(aio);
        LASSERT(aio->cda_iocb == iocb);
 
-       /* 0. Need locking between buffered and direct access. and race with
-        *    size changing by concurrent truncates and writes.
-        * 1. Need inode mutex to operate transient pages.
-        */
-       if (rw == READ)
-               inode_lock(inode);
-
        while (iov_iter_count(iter)) {
                struct ll_dio_pages pvec = { .ldp_aio = aio };
                struct page **pages;
@@ -513,9 +506,6 @@ out:
                result = -EIOCBQUEUED;
        }
 
-       if (rw == READ)
-               inode_unlock(inode);
-
        return result;
 }