[lustre-devel] [PATCH 19/20] lustre: mdc: update max_easize on reconnect

James Simmons jsimmons at infradead.org
Mon Oct 11 10:40:48 PDT 2021


From: Sergey Cheremencev <sergey.cheremencev at hpe.com>

If MDS was restarted to enable ea_inode, clients should get new
max_easize value. However, cl_max_mds_easize is not updated. This may
cause lfs getstripe to fail if file has huge stripe number
(2000 for example):

*** Error in `lfs': free(): invalid pointer: 0x0000000000de09d0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x81299)[0x7f0623c03299]
/lib64/libc.so.6(closedir+0xd)[0x7f0623c42ddd]
/lib/liblustreapi.so.1(+0xa557)[0x7f06248b5557]
/lib/liblustreapi.so.1(+0xad74)[0x7f06248b5d74]
lfs[0x4105b3]
/lib/liblustreapi.so.1(Parser_execarg+0x51)[0x7f06248c88e1]
lfs[0x40448e]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f0623ba4555]
lfs[0x4044fc]

HPE-bug-id: LUS-9478
WC-bug-id: https://jira.whamcloud.com/browse/LU-15040
Lustre-commit: 5f15be0edea5c2d31 ("LU-15040 mdc: update max_easize on reconnect")
Reviewed-on: https://es-gerrit.dev.cray.com/158100
Reviewed-by: Alexey Lyashkov <c17817 at cray.com>
Reviewed-by: Nikitas Angelinas <nangelinas at cray.com>
Tested-by: Elena Gryaznova <c17455 at cray.com>
Signed-off-by: Sergey Cheremencev <sergey.cheremencev at hpe.com>
Reviewed-on: https://review.whamcloud.com/45073
Reviewed-by: Patrick Farrell <pfarrell at whamcloud.com>
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 fs/lustre/mdc/mdc_request.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/lustre/mdc/mdc_request.c b/fs/lustre/mdc/mdc_request.c
index 8b94f6c..626f493 100644
--- a/fs/lustre/mdc/mdc_request.c
+++ b/fs/lustre/mdc/mdc_request.c
@@ -2720,6 +2720,7 @@ static int mdc_import_event(struct obd_device *obd, struct obd_import *imp,
 		if (OCD_HAS_FLAG(ocd, GRANT))
 			osc_init_grant(cli, ocd);
 
+		md_init_ea_size(obd->obd_self_export, ocd->ocd_max_easize, 0);
 		rc = obd_notify_observer(obd, obd, OBD_NOTIFY_OCD);
 		break;
 	}
-- 
1.8.3.1



More information about the lustre-devel mailing list