Whamcloud - gitweb
LU-17297 grant: move tgt_grant_sanity_check() calls 71/53171/4
authorVladimir Saveliev <vladimir.saveliev@hpe.com>
Fri, 17 Nov 2023 15:30:06 +0000 (18:30 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 15 Feb 2024 07:07:33 +0000 (07:07 +0000)
commit9df01eee755bbac5bed560f365fab85c1b1164ae
tree2607a233767f8a1b6573032491929a472876b310
parent2740cf66c88e2d04126f7016cb1958ca976cd323
LU-17297 grant: move tgt_grant_sanity_check() calls

Call tgt_grant_sanity_check() in ofd_obd_disconnect() and in
mdt_obd_disconnect() after call to tgt_grant_discard().

Otherwise, sum of grants does not match to total grant counter which
is reported as LustreError:
    ofd_obd_disconnect: tot_granted 0 != fo_tot_granted 8388608

This is because on stale export eviction
class_disconnect_stale_exports() moves stale exports to separate list
but does not update obd's grant counters.

Test to illustrate the issue is included.

HPE-bug-id: LUS-11469
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: I0b4568b88a2fe7b50f4eac50b4b064d7afbc7a75
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53171
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/obd_support.h
lustre/mdt/mdt_handler.c
lustre/ofd/ofd_obd.c
lustre/ptlrpc/client.c
lustre/tests/recovery-small.sh