Whamcloud - gitweb
LU-7015 ofd: Fix wanted grant calculation 16/16216/3
authorOleg Drokin <oleg.drokin@intel.com>
Sat, 5 Sep 2015 17:37:06 +0000 (10:37 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 10 Sep 2015 01:04:39 +0000 (01:04 +0000)
commit091988499717c729f8870b331ab3774b249d5818
tree2d2e73f63dfb16b0fa55911cebe41351230e2006
parentc0dafc483ccc7d0200adeec1a2b187644feed74a
LU-7015 ofd: Fix wanted grant calculation

When clients sends a "we want this much grant number", the value
is a total amount of space client wants including whatever it has.
So in order to properly reconcile this on the server we need
to substract what the client alreay has to see how much we grant back.
This will still overshoot some due to multiple RPCs in flight,
but at least it should not be as bad anymore.

Change-Id: I94cec016656b005891694dd70e6a7bab123cd690
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/16216
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/ofd/ofd_grant.c