Whamcloud - gitweb
LU-8895 target: limit grant allocation 07/32907/5
authorVladimir Saveliev <c17830@cray.com>
Fri, 15 Dec 2017 09:33:17 +0000 (12:33 +0300)
committerOleg Drokin <green@whamcloud.com>
Sat, 19 Jan 2019 06:29:19 +0000 (06:29 +0000)
commite800ee9409c4fae46e0d52f8d84a432a7f3ff428
tree81d7e3d73b5a41e4298b6a60acb76ce5a61d2ee2
parentce37c38691196075863eff6bb3ac9c6277e83f74
LU-8895 target: limit grant allocation

tgt_grant_alloc() is missing a check for amount of space already
granted to a client. If the client submits number of RPCs
simultaneously when the client's grant is below its max amount of
grants then the server may grant the client with amount of grants
substantially exceeding the amount of grants requested in one RPC. In
case of decent number of clients that may lead to ENOSPC long before
the lack of disk space is really achieved.

Limit grants given to a client to asked amount plus grants for 2 full
write RPCs.

A test to illustrate the issue is included.
The test needs to lower debug level so that dd provided sufficient I/O
throughput.

Lustre-change: https://review.whamcloud.com/24096
Lustre-commit: 82e494a36e9ea4f51ec163ab15beb9fdda7fa8d6

Signed-off-by: Vladimir Saveliev <c17830@cray.com>
Seagate-bug-id: MRP-4013
Change-Id: Ie6a8abbad28a06bc1d55ff2fd042b9664a29e9e4
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: https://review.whamcloud.com/32907
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/target/tgt_grant.c
lustre/tests/sanity.sh