Whamcloud - gitweb
LU-14124 target: set OBD_MD_FLGRANT in read's reply 75/43375/14
authorVladimir Saveliev <c17830@cray.com>
Wed, 20 Oct 2021 10:32:11 +0000 (13:32 +0300)
committerOleg Drokin <green@whamcloud.com>
Wed, 3 Nov 2021 02:37:56 +0000 (02:37 +0000)
commit4894683342d77964daeded9fbc608fc46aa479ee
treecf890551fa3c95a155d7439d4a1ebf3cb626b11b
parent01703bd2d523a86a3b0858515ca5993cef3c5303
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.

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