Whamcloud - gitweb
LU-10753 osd-zfs: initialize obj attr correctly 62/40062/4
authorLai Siyao <lai.siyao@whamcloud.com>
Thu, 24 Sep 2020 16:05:15 +0000 (00:05 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 19 Oct 2020 03:13:44 +0000 (03:13 +0000)
commitcf395c2507e80717e7468456e9959d432b6accc8
treea3d8b10cff85e26b10e553c58027c4cc90bc1d46
parent4a4794364eb05f7f6cb4600af986951353d034f4
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.

Test-Parameters: testlist=sanity env=ONLY=300,ONLY_REPEAT=100

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I64816b66a0b3c7aa50e62680d5251141697a8e0f
Reviewed-on: https://review.whamcloud.com/40062
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Olaf Faaland-LLNL <faaland1@llnl.gov>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdd/mdd_permission.c
lustre/osd-zfs/osd_object.c