From: Patrick Farrell Date: Mon, 20 Nov 2023 00:18:37 +0000 (-0500) Subject: EX-7601 ofd: round range locking X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=e8d1cfd5aa4a68d3830455356f50e0e6d8437d92;p=fs%2Flustre-release.git EX-7601 ofd: round range locking The range locking in OFD needs to be rounded for compressed chunks. Signed-off-by: Patrick Farrell Change-Id: I530d7f655a1c09033b1a3668c009072874ab1d18 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53178 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Artem Blagodarenko --- diff --git a/lustre/ofd/ofd_io.c b/lustre/ofd/ofd_io.c index bb16b64..4e8e5cc 100644 --- a/lustre/ofd/ofd_io.c +++ b/lustre/ofd/ofd_io.c @@ -918,10 +918,10 @@ static int ofd_preprw_write(const struct lu_env *env, struct obd_export *exp, * its bulk descriptor and the RPC will be dropped due to failed bulk * transfer, which is just fine. */ - range_lock_init(range, - rnb[0].rnb_offset, - rnb[obj->ioo_bufcnt - 1].rnb_offset + - rnb[obj->ioo_bufcnt - 1].rnb_len - 1); + /* round range lock for compression */ + if (chunk_size) + chunk_round(&begin, &end, chunk_size); + range_lock_init(range, begin, end - 1); range_lock(&fo->ofo_write_tree, range); ofd_info(env)->fti_range_locked = 1;