Whamcloud - gitweb
LU-12212 mdt: fix SECCTX reply buffer handling 34/34734/9
authorMikhail Pershin <mpershin@whamcloud.com>
Mon, 22 Apr 2019 12:20:45 +0000 (15:20 +0300)
committerOleg Drokin <green@whamcloud.com>
Tue, 21 May 2019 05:10:32 +0000 (05:10 +0000)
commitcb61ed93f8563c26b6a6db396478fe54f8dc42cb
tree76493dcac538f5ae54c17dc8151339bf59c95070
parentcd8a5f533d9df8aef4976d1a4c741d0f3673dd05
LU-12212 mdt: fix SECCTX reply buffer handling

LU-9193 changes for inline SECCTX in reply may cause often
resends and reconnects in some loads, e.g. dbench runs.
That is caused by missed buffer shrink when SECCTX is not
used.

Patch fo the following:
- shrink SECCTX buffer if it is not used
- in mdt_getattr_name_lock() fill SECCTX buffer a bit earlier
  for simpler handling DoM size attributes, also move
  LDLM_LOCK_PUT() at the end of block to don't use 'lock'
  after LDLM_LOCK_PUT()

Fixes: fca35f74f9ec ("LU-9193 security: return security context for metadata ops")
Test-Parameters: clientselinux testlist=sanity envdefinitions=EXCEPT=103a
Test-Parameters: mdscount=2 mdtcount=4 clientselinux testlist=recovery-small,sanity-selinux
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I9beffd06f76c3bd8e826ba4ab0ce70ac3f57951c
Reviewed-on: https://review.whamcloud.com/34734
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_lib.c