Whamcloud - gitweb
LU-11158 mdt: grow lvb buffer to hold layout 47/32847/11
authorBobi Jam <bobijam@whamcloud.com>
Thu, 19 Jul 2018 15:19:43 +0000 (23:19 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 29 Oct 2018 15:58:17 +0000 (15:58 +0000)
commite5abcf83c0575b8a79594c1eb9ea727739d91522
tree523a61868d52f23ac321b11ca83cc8a0e05aac61
parentbd596fbe449f4fbab18ed184ccce1e141928b116
LU-11158 mdt: grow lvb buffer to hold layout

Write intent RPC could generate a layout bigger than the initial
mdt_max_mdsize, so that the new layout cannot be returned to client,
this patch fix this issue by:

* fix a glitch in lod_use_defined_striping(), where v3 should be
  updated along v1.
* change lvbo_fill() return -ERANGE in this case, and stores in its
  @buflen parameter the needed buffer size
* in ldlm_handle_enqueue0(), when ldlm_lvbo_fill() detects -ERANGE,
  it grows the corresponding RMF_DLM_LVB buffer and retrives the
  layout to refill the buffer again.
* define a new MAX_MD_SIZE to hold a reasonal composite layout, and
  keeps old MAX_MD_SIZE as MAX_MD_SIZE_OLD.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I255b954195b3e64c3edd416c0cb209df0d9fc43a
Reviewed-on: https://review.whamcloud.com/32847
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_dlm.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/ldlm/ldlm_lockd.c
lustre/lod/lod_qos.c
lustre/mdc/mdc_locks.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_lvb.c
lustre/ofd/ofd_lvb.c
lustre/quota/qmt_lock.c
lustre/tests/replay-single.sh
lustre/tests/sanity-pfl.sh