From 88d324be08a44364aea9ff73c362a5e4ed4aaf6e Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 1 Mar 2024 15:18:39 -0700 Subject: [PATCH] LU-13805 osd: Implement unaligned DIO connect flag Unupgraded ZFS servers may crash if they received unaligned DIO, so we need a compat flag and a test to recognize those servers. This patch extracts server-side logic from two master patches to improve interop testing, but does not implement client UDIO. Lustre-change: https://review.whamcloud.com/51126 Lustre-commit: 0e6e60b1233b08952c338b2c4f121ef749a99f8b Was-Change-Id: I5d6ee3fa5dca989c671417f35a981767ee55d6e2 Lustre-change: https://review.whamcloud.com/45616 Lustre-commit: 7194eb6431d2ef7245ef3b13394b60e220145187 Was-Change-Id: I7eeebf9a608f006c8095b95f0677adb99f19d640 Test-Parameters: trivial testlist=sanity env=ONLY=56 fstype=zfs Test-Parameters: testlist=sanity env=ONLY=56 clientbuildno=4505 clientjob=lustre-master clientdistro=el8.8 Signed-off-by: Patrick Farrell Signed-off-by: Andreas Dilger Change-Id: I8b987c00f741a884ba28c18309cc2f90baf4809a Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54239 Tested-by: jenkins Tested-by: Maloo --- lustre/include/uapi/linux/lustre/lustre_idl.h | 6 ++++-- lustre/osd-zfs/osd_io.c | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lustre/include/uapi/linux/lustre/lustre_idl.h b/lustre/include/uapi/linux/lustre/lustre_idl.h index 32a044a..242248c 100644 --- a/lustre/include/uapi/linux/lustre/lustre_idl.h +++ b/lustre/include/uapi/linux/lustre/lustre_idl.h @@ -941,7 +941,8 @@ struct ptlrpc_body_v2 { OBD_CONNECT2_PCCRO | \ OBD_CONNECT2_ATOMIC_OPEN_LOCK | \ OBD_CONNECT2_ENCRYPT_NAME | \ - OBD_CONNECT2_ENCRYPT_FID2PATH) + OBD_CONNECT2_ENCRYPT_FID2PATH | \ + OBD_CONNECT2_UNALIGNED_DIO) #define OST_CONNECT_SUPPORTED (OBD_CONNECT_SRVLOCK | OBD_CONNECT_GRANT | \ OBD_CONNECT_REQPORTAL | OBD_CONNECT_VERSION | \ @@ -965,7 +966,8 @@ struct ptlrpc_body_v2 { #define OST_CONNECT_SUPPORTED2 (OBD_CONNECT2_LOCKAHEAD | OBD_CONNECT2_INC_XID |\ OBD_CONNECT2_ENCRYPT | OBD_CONNECT2_LSEEK | \ OBD_CONNECT2_REPLAY_CREATE | \ - OBD_CONNECT2_COMPRESS) + OBD_CONNECT2_COMPRESS | \ + OBD_CONNECT2_UNALIGNED_DIO) #define ECHO_CONNECT_SUPPORTED (OBD_CONNECT_FID) #define ECHO_CONNECT_SUPPORTED2 0 diff --git a/lustre/osd-zfs/osd_io.c b/lustre/osd-zfs/osd_io.c index bdf6a60..fef6523 100644 --- a/lustre/osd-zfs/osd_io.c +++ b/lustre/osd-zfs/osd_io.c @@ -299,7 +299,6 @@ static int osd_bufs_put(const struct lu_env *env, struct dt_object *dt, static inline struct page *kmem_to_page(void *addr) { - LASSERT(!((unsigned long)addr & ~PAGE_MASK)); if (is_vmalloc_addr(addr)) return vmalloc_to_page(addr); else -- 1.8.3.1