Whamcloud - gitweb
LU-8895 target: limit grant allocation 96/24096/4
authorVladimir Saveliev <c17830@cray.com>
Fri, 15 Dec 2017 09:33:17 +0000 (12:33 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 4 Jan 2018 02:48:47 +0000 (02:48 +0000)
commit82e494a36e9ea4f51ec163ab15beb9fdda7fa8d6
tree45d3882cdd4bf7c02df72e36513c877d28fd3531
parent44cb3a92d756728195409b368b3e89b1a78ef0ae
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.

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