LU-4621 ofd: create same count of objects

when replaying the creation request (precreation) from OSP,
OFD should create the same count of objects as it created
when it processed the request initially, else it could cause
"-ENOENT" problem for the following replay requests coming
from the clients.

Change-Id: I64f61f82f6a662ccc564599468466549a55b55d0
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Test-Parameters: alwaysuploadlogs envdefinitions=SLOW=yes \
clientdistro=el6 ossdistro=el6 mdsdistro=el6 clientarch=x86_64 \
ossarch=x86_64 mdsarch=x86_64 \
clientcount=4 osscount=2 mdscount=2 \
austeroptions=-R failover=true iscsi=1 \
testlist=recovery-mds-scale
Reviewed-on: http://review.whamcloud.com/10626
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
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>
LU-5310 build: fix build error in Centos 7

Fix a code flaw added to master by recent commit
de2d5808bd2987f76d2486272e1a9c192ba277d4.
Causes a build failure in newer version gcc v4.8.2 used in Centos 7.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Icc0aa1994ece756cd70bc5d69101cbe1694f8df0
Reviewed-on: http://review.whamcloud.com/11035
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
LU-5317 build: fix build of Xeon Phi client RPMs

* disable DKMS build for Xeon Phi
* resolve issue with undefined reference to `libcfs_log_return'

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I383ca771fdd1d2cd22cc20a20d69b32af7e6e010
Reviewed-on: http://review.whamcloud.com/11044
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5266 ldlm: granting the same lock twice on recovery

ASSERTION( lock->l_granted_mode != lock->l_req_mode ) is hit
when resending LDLM_FL_REPLAY.

Don't add lock to waiting list as it is already added or granted.

Change-Id: Ib8e5d2c7588f6cacd1723529e70d29f63742caad
Xyratex-bug-id: MRP-1944
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-on: http://review.whamcloud.com/10903
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
LU-4971 ldlm: drop redundant ibits lock interoperability check

In very old release (older than Lustre-1.8), if the client talks with
the server that does not support ibits lock, then the client needs to
convert it as plain lock. Such interoperability check and convertion
is out of date for a long time. Drop it.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I635df2767ed3b859d93b7ff0680e30ef07d94747
Reviewed-on: http://review.whamcloud.com/11004
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>