Whamcloud - gitweb
LU-14124 target: set OBD_MD_FLGRANT in read's reply
authorVladimir Saveliev <c17830@cray.com>
Wed, 20 Oct 2021 10:32:11 +0000 (13:32 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 9 Mar 2022 17:38:15 +0000 (17:38 +0000)
commit97fcda3a53dc5347d545637b7a2a0c17fdaa37fd
treef21159e550bdefcb72192580775ebf5f91e7cebe
parent70ae98f0bd0bcfd1cf84bc31a347f402c9be4175
LU-14124 target: set OBD_MD_FLGRANT in read's reply

If tgt_grant_shrink() decides to not shrink grants - a client is
supposed to restore its cl_grant_avail in osc_update_grant(). In case
of read OBD_MD_FLGRANT is not set on reply's body->oa.o_valid, so
osc_update_grant() misses the cl_grant_avail update. As result server
keeps thinking that client has a lot of grants while a client thinks
that it is missing grants badly. That may lead to performance
degradation.

A test to illustrate the issue is included.

Lustre-change: https://review.whamcloud.com/43375
Lustre-commit: 4894683342d77964daeded9fbc608fc46aa479ee

Change-Id: Ibe7ce0af5701226c8be3ae3f9ad57c354791fa0f
HPE-bug-id: LUS-9943
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/46468
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/target/tgt_handler.c
lustre/tests/sanity.sh