Whamcloud - gitweb
LU-11158 mdt: grow lvb buffer to hold layout 49/34049/4
authorBobi Jam <bobijam@whamcloud.com>
Thu, 19 Jul 2018 15:19:43 +0000 (23:19 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 15 Feb 2019 01:28:35 +0000 (01:28 +0000)
commita1d1006a5e2bd7ba3dd9096107c456b353a3eeb0
treeda2b4fd6392c32cf8c83f0d01a036120afa2331c
parent97f895ea37468513987c2048b8b413be27b267b0
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.

lustre-review: https://review.whamcloud.com/32847
lustre-commit: e5abcf83c0575b8a79594c1eb9ea727739d91522

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I255b954195b3e64c3edd416c0cb209df0d9fc43a
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34049
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/lustre/lustre_idl.h
lustre/include/lustre_dlm.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