Whamcloud - gitweb
LU-10776 osc: Do not request more than 2GiB grant 33/31533/2
authorPatrick Farrell <paf@cray.com>
Mon, 5 Mar 2018 16:24:32 +0000 (10:24 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 9 Apr 2018 19:49:18 +0000 (19:49 +0000)
commitc0246d8878097a618efa9296d90896ac2cc2e9e4
tree40d4c0b4a899d566c434f47e08f5c795aa225ca0
parent5f00d6f5fce28c7cee3b400601e265358e3cdc66
LU-10776 osc: Do not request more than 2GiB grant

The server enforces a grant limit of 2 GiB, which the
client must honor.  The existing client code combined with
16 MiB RPCs make it possible for the client to ask for
more than this limit.

Make this limit explicit, and also fix an overflow bug in
o_undirty calculation in osc_announce_cached.  (o_undirty
is a 32 bit value and 16 MiB*256 rpcs_in_flight = 4 GiB.
4 GiB + extra grant components overflows o_undirty.)

Cray-bug-id: LUS-5750
Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: Ifcb8a9ea7529eae4cd209dc72223ed039c6f6a0d
Reviewed-on: https://review.whamcloud.com/31533
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Andrew Perepechko <c17827@cray.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/osc/osc_request.c
lustre/target/tgt_grant.c