LU-3126 osd: remove fld lookup during configuration

Remove fld lookup during configuration, so to avoid accessing
FLDB on MDT0 before MDT0 is setup.

1. add od_is_ost to check whether the FID is on OST, instead
of lookup in FLDB.

2. add oic_device in OI cache, so in OI cache lookup, it will
try to match device to avoid the ino of agent inode is being
retrieved from OI cache. Then osd_remote_fid, which will trigger
fld lookup, can be removed from osd index lookup.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I85649431f47ad8aa8bd1e46a7b074e15b080bb1d
Reviewed-on: http://review.whamcloud.com/7266
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3649 lfsck: release object reference when reset lfsck

When reset lfsck, related lfsck tracing file will be re-created,
but we forgot to release the object reference of the old tracing
file, then trigger LASSERT() when related device to be released.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I2f5dd9933e0870849d85d03909b2d7926d244029
Reviewed-on: http://review.whamcloud.com/7190
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
LU-3659 llog: missed dt_try_as_dir() in llog_osd_dir_get()

dt_try_as_dir() should be called in llog_osd_dir_get() to make sure
the do_index_ops being initialized.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I879c47bb59fbd28f3351f61e59cff2a6666e7d7a
Reviewed-on: http://review.whamcloud.com/7267
Tested-by: Hudson
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3718 mdt: HSM EXIST event not triggered at last rm/mv

After a rm or mv, if the target file is destroyed
(last unlink) and if there is an archive in the backend
a flags must be set in changelog event

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I92f3ea91d377ba8b3724aef43d4e7ba8b0a6f681
Reviewed-on: http://review.whamcloud.com/7260
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3783 ldlm: ldlm_flock_deadlock() ASSERTION( req != lock ) failed

Abort processing of flock blockers list
on reaching disconnected export

Change-Id: I8763dd246ef655fee6f926e49b00a7a54c720386
Xyratex-bug-id: MRP-1266
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-on: http://review.whamcloud.com/7392
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3587 changelogs: Account for changelog_ext_rec in CR_MAXSIZE

CR_MAXSIZE needs to account for an llog_changelog_rec that actually
contains a changelog_ext_rec structure rather than a changelog_rec.
With out doing so, a file size approaching the Linux kernel NAME_MAX
length that is renamed to a size also close to, or at, NAME_MAX will
exceed CR_MAXSIZE and trip an assertion.

Change-Id: I2d86955efcbd6d0fd28c87026a7720311b4f5598
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/6993
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3751 ost: disable OUT_PORTAL request handler on OST.

Disable OUT_PORTAL request handler on OST for now, otherwise
it will confuse the connect requests from another MDT, when
MDTs and OSTs are all in the same node.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ifcbfabaa52537e1664086e335b07a6f179b17f2d
Reviewed-on: http://review.whamcloud.com/7323
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Hudson
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-3671 mdd: sync perm for dir and perm reduction only

To mitigate performance impact for sync permission, do it for dir
and when permission is reduced only.

Remove extra sync permission check in mdd_xattr_set() because ACL
change is all handled in mdd_acl_set().

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I64fc720a380aafdaf858d83fbb85f29a1063e07f
Reviewed-on: http://review.whamcloud.com/7257
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
LU-3803 test: refine sanity test_161c

The test 161c is assume the $tdir will be in MDT0, but
actually $tdir(161d) left by 161a and 161b will be on
MDT1, which will make 161 fails, so delete $tdir before
testing 161c.

Add interop test condition.

Add more console output infomation.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Id40c63c3c81d32565e393850c4448c30e0d2e693
Reviewed-on: http://review.whamcloud.com/7439
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-3754 mdt: Enable data_version control

When LU-1333 was landed, all HSM infrastructure was not yet landed and
it was not possible to archived a file. As a consequence, the original
patch did not compare on-disk archived data version and current file
data version.
Now, everything required is there and we should enable this
verification.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: I9db86797b234d0f54c4c87bb84290b788f2d05bb
Reviewed-on: http://review.whamcloud.com/7329
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
LU-3027 clio: Do not shrink sublock at cancel

Shrinking sublock at ldlm lock cancel time means whoever happened
to attach to this lock just before will reenqueue the wrong lock.

Test-Parameters: envdefinitions=SLOW=yes,ONLY=write_disjoint \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 testlist=parallel-scale

Change-Id: I8f2de683812621fb2f8d761cf2aceebc12868d75
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Jian Yu <jian.yu@intel.com>
Reviewed-on: http://review.whamcloud.com/7481
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
LU-3775 build: build error with gcc 4.7.0 20110509

Fixed the error: 'tgt' and 'nf' may be used uninitialized in
this function. Also fixed comparison signed and unsigned
indexes.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I733e3f6456ce2926dfc6f3c5e9ac8f860566c121
Reviewed-on: http://review.whamcloud.com/7382
Tested-by: Hudson
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3835 hsm: add missing braces to ct_copy_attr()

Add missing braces to ct_copy_attr() in lhsmtool_posix.c so that we
don't return a stale errno on success.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ia8ab377d8fd00d94666b15713f4e749d1330854a
Reviewed-on: http://review.whamcloud.com/7462
Tested-by: Hudson
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3842 hsm: handle NULL crh in hsm_cdt_request_completed()

In hsm_cdt_request_completed() if a restore handle could not be found,
don't dereference the NULL crh returned by hsm_restore_hdl_find().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I175f506d0acdecfef36352638bda2ada66d182db
Reviewed-on: http://review.whamcloud.com/7470
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3860 bug: fix kernel directory README.

The kernel patch README now points visitors to
http://lustre.opensfs.org/documentation/

Signed-off-by: Richard Henwood <richard.henwood@intel.com>
Change-Id: Ifbf3d71fc0c6f7ad99a09f19107ca99f5b445ce7
Reviewed-on: http://review.whamcloud.com/7499
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3097 build: fix 'missing break' errors

Fix 'missing break' issues found by Coverity version 6.5.1:
Missing break in switch (MISSING_BREAK)
This case is not terminated by a 'break' statement.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Ib96784433db5075bb6fb916024c1c217850f7eb6
Reviewed-on: http://review.whamcloud.com/7164
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3042 build: fix 'NULL pointer dereference' errors

Fix 'NULL pointer dereference' defects found by Coverity version
6.5.0:
Dereference after null check (FORWARD_NULL)
For instance, Passing null pointer to a function which dereferences
it.
Dereference before null check (REVERSE_INULL)
Null-checking variable suggests that it may be null, but it has
already been dereferenced on all paths leading to the check.
Dereference null return value (NULL_RETURNS)

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: Ie04698f49ec7804466962511e3035c00b14b3d8c
Reviewed-on: http://review.whamcloud.com/5868
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3832 clio: honor O_NOATIME

Add a ci_noatime bit to struct cl_io. In ll_io_init() set this bit if
O_NOATIME is set in f_flags. Ensure that this bit is propagated down
to lower layers. In osc_io_read_start() don't update atime if this bit
is set. Add sanity test 39n to check that passing O_NOATIME to open()
is honored.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I3e7ab1d777e897ce7840ad6b1b067a571fa2bff4
Reviewed-on: http://review.whamcloud.com/7442
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2904 llite: return compatible fsid for statfs

Lustre uses 64-bits inode number to identify object on client side.
When re-export Lustre via NFS, NFS will detect whether support fsid
via statfs(). For the non-support case, it will only recognizes and
packs low 32-bits inode number in nfs handle. Such handle cannot be
used to locate the object properly.
To avoid patch linux kernel, Lustre client should generate fsid and
return it via statfs() to up layer.

To be compatible with old Lustre client (NFS server), the fsid will
be generated from super_block::s_dev.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I56ffe1836a33c6436ed628f2aee3714cf4445dc9
Reviewed-on: http://review.whamcloud.com/7434
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3847 kernel: Kernel update [RHEL6.4 2.6.32-358.18.1.el6]

Kernel update [RHEL6.4 2.6.32-358.18.1.el6]

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Iba2692be9fa85c5bfe4a7c2c8152981c43b4defc
Reviewed-on: http://review.whamcloud.com/7514
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>