From d663f78c430cb4b131e212cebd28efc7216819fa Mon Sep 17 00:00:00 2001 From: James Simmons Date: Tue, 23 Jul 2024 10:09:09 -0400 Subject: [PATCH] LU-18066 obdclass: reorder s1 string instead of options string Testing with client mounts with multiple MGS NIDs exposed a bug in that mount options could be lost. In this case user_xattr from our testing. The mistake was moving the s2 string into the wrong string; options; instead of s1. Fixes: 415fa27540 ("LU-9325 obdclass: use match_table for server mount options") Change-Id: I0a5e1511d558e4600a009b7e7820f68d399bcc21 Signed-off-by: James Simmons Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55839 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Alex Zhuravlev Reviewed-by: Chris Horn Reviewed-by: Maximilian Dilger Reviewed-by: Oleg Drokin --- lustre/obdclass/obd_mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c index a6dbb44..8e6ffc6 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c @@ -1664,7 +1664,7 @@ bad_string: */ len -= strlen(args->from) + 2; s2 = s1 + len; - memmove(options, s2, strlen(s2) + 1); + memmove(s1, s2, strlen(s2) + 1); opts += len; } } -- 1.8.3.1