Whamcloud - gitweb
EX-9523 csdc: fix ofd_preprw_write() for sanity 819b test
authorArtem Blagodarenko <ablagodarenko@ddn.com>
Fri, 5 Apr 2024 13:03:56 +0000 (14:03 +0100)
committerAndreas Dilger <adilger@whamcloud.com>
Sun, 7 Apr 2024 19:17:16 +0000 (19:17 +0000)
commit80327de9d7812848a76263033a07823f51023093
tree151c356fa7094903b6e718185a3380e92213c633
parent8b23ceb4a652df2170c6dfe9f70ad83e5989b9c0
EX-9523 csdc: fix ofd_preprw_write() for sanity 819b test

Sanity 819b asserts:
tgt_brw_write()) ASSERTION( npages_local == npages_remote )

The test triggers fault inject in ofd_preprw_write():
if (OBD_FAIL_CHECK(OBD_FAIL_OST_2BIG_NIOBUF))
         rnb[i].rnb_len += PAGE_SIZE;

ofd_preprw_write() calculates npages_local taking in account
additional len from fault inject, BUT npages_remote is calulated
BEFORE the fault inject. So npages_remote was not adjusted.

To solve the problem it is enough to move range_to_page_count() call.

Signed-off-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Fixes: 217341228f ("EX-7601 tgt: add remote_pages for writes")
Change-Id: Ifd659985a78c7630049a17622aff2eb7f4525fb1
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54681
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/target/tgt_handler.c