Details
-
Bug
-
Resolution: Fixed
-
Major
-
Lustre 2.7.0, Lustre 2.8.0
-
None
-
3
-
9223372036854775807
Description
The patch for ll_direct_(io/IO_26) we got from Al Viro is based on the 2.4-2.5 code, and reverts several of the changes made by LU-1669 to the direct IO path. It seems we took his version without noting that important changes had been made in that function.
The i_mutex, for example, no longer provides the expected protection.
Thankfully for older kernels we left the updated code alone, but the code we call for 3.16 kernels is definitely wrong and needs to be updated to match current Lustre. It seems we need to take more care when forward/side-porting from the upstream kernels.
Unfortunately, I won't be able to provide a patch for this. If correct direct IO behavior on 3.16 and newer kernels is important to someone, fixing it shouldn't be too hard - Just look at the code that follows:
#else /* !HAVE_DIRECTIO_ITER && !HAVE_IOV_ITER_RW */
in lustre/llite/rw26.c, and re-write the code above it to have the same approach to locking. Looking at the LU-6260 patch may help:
http://review.whamcloud.com/#/c/14665/9