Whamcloud - gitweb
LU-11288 osc: re-check target versus available grant 26/33226/10
authorAlex Zhuravlev <bzzz@whamcloud.com>
Tue, 25 Sep 2018 06:48:06 +0000 (09:48 +0300)
committerOleg Drokin <green@whamcloud.com>
Mon, 29 Oct 2018 15:58:30 +0000 (15:58 +0000)
commitfcbd8c981239dc2be4bcf55e9a3e40b72d939700
tree4ea8033d3f5a4b65924085709b6ffd7cd573767f
parent205ba6381eb08a0d8cb23068514b7e80f96ec9a9
LU-11288 osc: re-check target versus available grant

- under the spinlock, otherwise it's possible that available
  grant has changed since target calculation and bytes to
  shrink go negative.
- tgt_grant_alloc() should avoid negative grants

Change-Id: I35613e4e840e172977c7b866fb429c40a7fefc8f
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/33226
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osc/osc_request.c
lustre/target/tgt_grant.c