Disable the batch statahead for the old server that does not
support MDS_BATCH batch RPC.
Fixes:
4435d0121f ("LU-14139 statahead: batched statahead processing")
Test-Parameters: testlist=sanity serverjob=lustre-b_es6_0 serverbuildno=638 clientdistro=el9.3 serverdistro=el8.8 env=ONLY=123
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I79fba4204e0ed44e2bc9a4c4f2758d087f0e406b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55017
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
return (exp_connect_flags2(exp) & OBD_CONNECT2_UNALIGNED_DIO);
}
+static inline bool exp_connect_batch_rpc(struct obd_export *exp)
+{
+ return (exp_connect_flags2(exp) & OBD_CONNECT2_BATCH_RPC);
+}
+
enum {
/* archive_ids in array format */
KKUC_CT_DATA_ARRAY_MAGIC = 0x092013cea,
CDEBUG(D_READA, "statahead thread starting: sai %p, parent %pd\n",
sai, parent);
- sai->sai_max_batch_count = sbi->ll_sa_batch_max;
+ if (exp_connect_batch_rpc(sbi->ll_md_exp))
+ sai->sai_max_batch_count = sbi->ll_sa_batch_max;
+ else
+ sai->sai_max_batch_count = 0;
+
if (sai->sai_max_batch_count) {
bh = md_batch_create(ll_i2mdexp(dir), BATCH_FL_RDONLY,
sai->sai_max_batch_count);