Whamcloud - gitweb
LU-10753 osd-zfs: initialize obj attr correctly 85/40585/3
authorLai Siyao <lai.siyao@whamcloud.com>
Thu, 24 Sep 2020 16:05:15 +0000 (00:05 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 4 Mar 2021 08:35:03 +0000 (08:35 +0000)
commit201efe7eea3f7d6fb6410db8b78d0c9187c274ce
tree84a87d7251d983879ce6ca161cd826ca402e9214
parentd0a53964f1bd7d8a21fc987df8d2f250b04f9ada
LU-10753 osd-zfs: initialize obj attr correctly

mdt_thread_info.mti_attr is used to initialize object attr in create,
currently it's copied to object.oo_attr directly, but some fields
in mti_attr may contain bogus data because it's not cleared in each
use, though la_valid is correctly set, but la_flags is used without
checking la_valid in __mdd_permission_internal().

Another minor fix in osd_create(): set size/nlink to zero since they
are set in valid.

Lustre-change: https://review.whamcloud.com/40062
Lustre-commit: cf395c2507e80717e7468456e9959d432b6accc8

Test-Parameters: testlist=sanity env=ONLY=300,ONLY_REPEAT=100
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I64816b66a0b3c7aa50e62680d5251141697a8e0f
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/40585
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/mdd/mdd_permission.c
lustre/osd-zfs/osd_object.c