Whamcloud - gitweb
LU-14124 target: set OBD_MD_FLGRANT in read's reply 71/45471/2
authorVladimir Saveliev <c17830@cray.com>
Wed, 20 Oct 2021 10:32:11 +0000 (13:32 +0300)
committerOleg Drokin <green@whamcloud.com>
Sun, 14 Nov 2021 05:45:35 +0000 (05:45 +0000)
commit557d7d35e30b1f602104026ae0b024cee1abb494
tree3432190b85ecba9f4c6a9daa9af711a38a8cf71c
parentbc9a1a5192bf8c1e1c1d4e2e9171071e27223503
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

Test-Parameters: testlist=sanity
Change-Id: Ibe7ce0af5701226c8be3ae3f9ad57c354791fa0f
Signed-off-by: Vladimir Saveliev <vlaidimir.saveliev@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/45471
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/target/tgt_handler.c
lustre/tests/sanity.sh