Whamcloud - gitweb
LU-17525 llite: unaligned DIO zfs detection 95/55895/4
authorShaun Tancheff <shaun.tancheff@hpe.com>
Sat, 10 Aug 2024 02:12:21 +0000 (09:12 +0700)
committerOleg Drokin <green@whamcloud.com>
Fri, 16 Aug 2024 23:55:37 +0000 (23:55 +0000)
Update to the ZFS detection logic to be stable. If any
component of the I/O is ZFS treat the entire I/O as ZFS

HPE-bug-id: LUS-12175
Fixes: 07a1272233 ("LU-17525 llite: unaligned DIO interop page alignment")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ie9d5c8af373cec96855f81f5330e174ed71f370a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55895
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/llite/file.c
lustre/osc/osc_io.c

index 14d4815..8abd025 100644 (file)
@@ -1699,6 +1699,7 @@ void ll_io_init(struct cl_io *io, struct file *file, enum cl_io_type iot,
         * avaliable mirror for write.
         */
        io->ci_ndelay = !(iot == CIT_WRITE);
+       io->ci_target_is_zfs = 0;
        /* unaligned DIO has compat issues with some older servers, but we find
         * out if there are such servers while setting up the IO, so it starts
         * out allowed
index 296213f..b28ad18 100644 (file)
@@ -1351,7 +1351,8 @@ int osc_io_init(const struct lu_env *env,
        CL_IO_SLICE_CLEAN(oio, oi_cl);
        cl_io_slice_add(io, &oio->oi_cl, obj, &osc_io_ops);
 
-       cl_io_top(io)->ci_target_is_zfs = exp_connect_target_is_zfs(exp);
+       if (exp_connect_target_is_zfs(exp))
+               cl_io_top(io)->ci_target_is_zfs = 1;
        if (!exp_connect_unaligned_dio(exp))
                cl_io_top(io)->ci_allow_unaligned_dio = false;