Whamcloud - gitweb
LU-5296 lod: don't skip attr_set for osp objects 89/10989/4
authorNiu Yawei <yawei.niu@intel.com>
Fri, 4 Jul 2014 07:34:59 +0000 (03:34 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 10 Jul 2014 14:51:14 +0000 (14:51 +0000)
commit2d5a5e81660adbcd05f14a10bc6c246d6f108d10
treedafa684c5935e713091efc9dad4aecb0348c3309
parent446eb3dda264c24acdeeea3158bba55a16c8c5e1
LU-5296 lod: don't skip attr_set for osp objects

lod_attr_set() uses dt_object_exists() to check whether an osp
object (for OST object) is existing, which is incorrect for non-dir
object, and can lead to chown/chgrp being skipped on OST object.

The lsr_valid handling in osp_sync_add_rec() was got a problem in
commit 80f90fcde73e because it stored all of the passed attr flags
in struct llog_setattr64_rec, even though there are only fields for
storing the UID and GID.  Since the time stamps do not need to be
propagated to the OSTs (the MDT values are good enough), this is
not a problem.  Also, osp_sync_add_rec stored LA_UID/LA_GID flags
on disk, but they are not part of lustre_idl.h or lustre_disk.h and
are not guaranteed to be constant over time.  Instead, use the flags
OBD_MD_FLUID/OBD_MD_FLGID that are in lustre_idl.h.

Re-enable sanity-quota.sh test_34 so that this is actually tested.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I245e59141324b34071c9eb188dedbf615052f19d
Reviewed-on: http://review.whamcloud.com/10989
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lod/lod_object.c
lustre/osp/osp_sync.c
lustre/tests/sanity-quota.sh