LU-4895 lfsck: not create object to repair dangling by default

If the OST-object which is referenced by some MDT-object does not
exist, the layout LFSCK should not create the lost OST-object by
default; otherwise related application(s) may miss to be aware of
the bad file.

The LFSCK will allow the administrator to specify how to handle
the dangling reference case via a new option "-c" when trigger
the LFSCK:

[-coff] or [--create_ostobj=off]:
Report the inconsistency via log, but keep the dangling reference
there without repairing. (by default)

-c[on] or --create_ostobj[=on]:
Create the lost OST-object.

Change syntax for dryrun:
[-noff] or [--dryrun=off]:
Disable dryrun mode. (by default)

-n[on] or --dryrun[=on]:
Enable dryrun mode.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I8fa1e5bbea63c7368e04052c88311a9ea0c6f969
Reviewed-on: http://review.whamcloud.com/9989
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4556 tests: speed up sanity-lfsck and sanity-scrub tests

1) drop unnecessary devices reformat.
2) drop unnecessary system stop/re-start.
3) replace 'sleep' with wait_update_facet to avoid idle wait.
4) drop unnecessary "-p" option for some "mkdir" cases.
5) replace "touch" with "createmany -m".
6) other code style changes and cleanup.

Test-Parameters: envdefinitions=SLOW=yes testlist=lfsck-performance
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I047c63b8793fa843fabe1a69b332c42f2f523f68
Reviewed-on: http://review.whamcloud.com/9704
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-992 doc: remove old kernels from lustre/ChangeLog

Remove the old and obsolete kernels from the current list of
kernel versions that Lustre works with, since this is confusing
to list kernels that are no longer supported at all.

Update kernel patch documentation to make it clear which patches
should be applied.

Update recommended e2fsprogs version to include "or newer".

Move ldiskfs README file to top-level directory.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ia4859b3b2bf5a8aa9faabeb43d554130143ebbe5
Reviewed-on: http://review.whamcloud.com/8186
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3227 tests: fix for acl test

acl permission test will failed by a wrong system
message. Change script to adapt this issue.
Combined with other small change for lprocfs.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I42d1e02c0f0990500b02085d60e2dc47f93f1bcc
Reviewed-on: http://review.whamcloud.com/10007
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4717 llite: suppress non active IO error message

Current CLIO does not support fadvise, suppress the error message.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Iab3133ecc08cf0890ab3aa55018565d3d9f96e07
Reviewed-on: http://review.whamcloud.com/9658
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4858 ofd: statfs small fixes

ofd_osd is valid in its life time because ofd is released before
osd, so it should never be cleared.

revive o_statfs for ofd_obd_ops which was mistakenly removed in
commit I5622e14bccacb809bca1c10499c23bcaf72e2a68.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I3cb6d82b71b3018b4fc9e885eb6533b064179238
Reviewed-on: http://review.whamcloud.com/10082
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
LU-2177 ldlm: flock completion fixes.

move checks for FAILED, DESTROYED flags under ldlm spinlock,
destroy flock atomically with the check it is not destroyed yet.

do not put the granted flock into the resource if this is
UNLOCK, TEST, or DEADLOCK'ed flock.

a set of flock tests which races reply completion for
new flock request/test flock/unlock with namespace cleanup
on eviction.

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Change-Id: I97fa040a26eda6c6728929d10b29c2316db663e3
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Andriy Skulysh <andriy_skulysh@xyratex.com>
Tested-by: Alexander Lezhoev <alexander_lezhoev@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Xyratex-bug-id: MRP-1588
Reviewed-on: http://review.whamcloud.com/10005
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4008 mdt: update mdt_getattr comments about EA sizing

After landing previous patches, some comments became out of date
This patch tries to rectify the situation and also adds some
additional explanations.

Change-Id: Ic3fb33ec60f7ae083ecae84cd207d2c10b95f965
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/10141
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
LU-20 kernel: remove rest of obsolete kernel patches

Remove several patches that have not been used in some time.
The bio_add_page patch addressed an performance issue with
SLES11 SP1 1.8 servers with direct IO. All platforms have
support for 64 bit quota so we can remove the patch to enable
it on old SLES11 platforms. We no longer need the function
security_inode_unlink exported since the fsfilt layer has now
been removed.

Change-Id: I6a2d324950ba8e51f3d7785016d9834f6b26aafd
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/9199
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>