From 5f15be0edea5c2d314f3509e119db6ccd4372892 Mon Sep 17 00:00:00 2001 From: Sergey Cheremencev Date: Wed, 11 Nov 2020 11:19:29 +0300 Subject: [PATCH] LU-15040 mdc: update max_easize on reconnect 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 Change-Id: If155a63e2f07536c6500b37b5e6191cb8b0d0607 Reviewed-on: https://es-gerrit.dev.cray.com/158100 Reviewed-by: Alexey Lyashkov Reviewed-by: Nikitas Angelinas Tested-by: Elena Gryaznova Signed-off-by: Sergey Cheremencev Reviewed-on: https://review.whamcloud.com/45073 Reviewed-by: Patrick Farrell Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/mdc/mdc_request.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index cea198f..112a834 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -2709,6 +2709,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