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>