Revert "LU-3333 ptlrpc: Protect request buffer changing"

It turns out that sec_null message format is is not double wrapped
like sec_plain and sec_gss cases. As such a conversion from rq_buf
to rq_msg is different in those cases.
The older way of doing in-place locking seems to be the way to go
here I think.

This reverts commit b2bb3b247d1dc75e25f1b5c14a333905909b5e70.

Change-Id: Icd84a696aafed17a275d0576dad639b929618190
Reviewed-on: http://review.whamcloud.com/10052
Tested-by: Jenkins
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4351 tests: skip loop test in SLES11 clients

Avoid known failure in test 54c due to SLES specific
incompatible implementation flaw in kernel loop devices.

Test-Parameters: clientdistro=sles11sp3 testlist=sanity
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ia8b33f71ad77418f35db4e4640489d1ba4d3add1
Reviewed-on: http://review.whamcloud.com/9955
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4808 tests: sanity cleanup to work on Xeon Phi

* Made the test_74c robust to different platforms.
* Fix an issue with values more than 2^32 (for example 9.36473e+09).
* Fix an integer comparison in case of empty variable.
* Check for tools presents (rsync and getfattr).
* Check for CLIENTONLY mode.
* Remove "-x" options from grep (it's not always supported).
* Coding style cleanup.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I53671f9a6ca2efa0a8f3e5634bfe4d6e8d204078
Reviewed-on: http://review.whamcloud.com/9766
Tested-by: Jenkins
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4855 fld: refer to MDT0 for fld lookup in some cases

It is possible that when fld client is trying to lookup seq
on one of MDT, but the connection between the client and the MDT
is not being initialized yet, especially during striped dir creation,
because client will only send create req to the master MDT, then
master MDT will distribute the operation to all of other MDT, instead
of client distributing these requests, which will usually trigger
the connection.

In this case, we will send the fld request to MDT0, since it has
all of location information.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I577ada2a782ecbdc863d05e8d007c0914a1e7837
Reviewed-on: http://review.whamcloud.com/9877
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4388 io: pass fsync() range through RPC/IO stack

The Linux VFS and Lustre OST_SYNC RPC are both capable of specifying
fsync() on a sub-extent of the file {start, end} instead of the full
file.  This allows less than the full amount of data to be flushed,
reducing or possibly eliminating the work needed before the syscall
can return.

However, the handling of sub-extent of the file for fsync was lost
with the move to CLIO on the client and OSD API on the server.  They
were ignoring the passed {start, end} and using {0, OBD_OBJECT_EOF}
instead.

Return the ability to pass a sub-extent for fsync() from the client,
to the specific stripes/OSTs that need the sync operation, and pass
it down to the OSD.  The ZFS OSD doesn't handle this yet, but there
is room for improvement in a separate patch.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Id2c3ab7ab5283cdeece6b4986ab2dfbfb03ebbe5
Reviewed-on: http://review.whamcloud.com/8626
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4862 doc: Update lctl man page for LFSCK phase 2

Update the lctl man page with functionality and options
added by LFSCK phase 2. The lfsck_start and lfsck_stop
options are updated.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I535faf92feb40cd0a58c6532ef7ad2702213fdfb
Reviewed-on: http://review.whamcloud.com/9910
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-4563 Fix unsafe userspace access in many proc files

Also add a test to make sure no new ones are added in the future

Change-Id: I2fe7d2cea5daef21f4279ce813ca35f6d91f68dc
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/9059
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
LU-4802 tests: Create non-stripe dir for cross-MDT opration

Create non-stripe dir for cross-MDT link and rename

Change-Id: Ic4b6f836cae0242bdd98c9a39ae6c4f93f597cba
Signed-off-by: Wei Liu <wei3.liu@intel.com>
Reviewed-on: http://review.whamcloud.com/9889
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2675 mdd: remove dead code

Remove the declarations of several undefined mdd functions. Remove
several unused functions. Remove the file mdd_lov.c.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ife0d13ee414bd43c42389d9e58d9dd97344cb33c
Reviewed-on: http://review.whamcloud.com/8548
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4461 mdt: correct test in mdt_seq_fini_cli()

In mdt_seq_fini_cli() pass ss->ss_server_seq to seq_server_set_cli()
if it's *not* NULL.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I494219416b772a33838dd4fb9303d6b9519050f9
Reviewed-on: http://review.whamcloud.com/8786
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-4718 osp: clear oxe_ready on old oxe

In osp_xattr_get() and osp_declare_xattr_set() avoid NULL pointer
deferences in the error handling cases by clearing oxe_ready on the
old xattr cache entries.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I54f69e2d3e6570528e5a26bc9dd6e079a773a1a8
Reviewed-on: http://review.whamcloud.com/9672
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3963 libcfs: remove the last of cfs_atomic

With all cfs_atomic wrappers removed from lustre and libcfs
this patch removes the last bits of the cfs_atomic wrappers.

Change-Id: I8ede88fe45b7ddd82036b2f2a7907e4eb1604a5e
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/9902
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
LU-4442 tests: update version number in replay-vbr test 7g

Since the following patch was landed on Lustre b2_5 branch,
we need change Lustre version number 2.5.52 to 2.5.1 in
replay-vbr test_7g():

Lustre-commit: 1eb9dbad0db49a4fb36d52f4141386b29baaedaf
Lustre-change: http://review.whamcloud.com/9213

Test-Parameters: envdefinitions=SLOW=yes,ONLY=7 testlist=replay-vbr
Test-Parameters: envdefinitions=SLOW=yes,ONLY=7 \
ossjob=lustre-b2_5 mdsjob=lustre-b2_5 \
ossbuildno=42 mdsbuildno=42 testlist=replay-vbr

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I28a4b2de285c92cc3d5934a77ef792e11fc897ed
Reviewed-on: http://review.whamcloud.com/9986
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2675 liblustre: disable liblustre by default

liblustre is not used, nor is it tested, so don't build it by default.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ie2369d0163963d6e691b3787495b1b2155fe6111
Reviewed-on: http://review.whamcloud.com/9756
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
LU-4783 mgs: start params log during mgs initialization

Params log was introduced by LU-3155 to set parameters permanently
with lctl "set_param -P" instead of "conf_param". But in a newly
mounted filesystem, the log won't be created automatically until "lctl
set_param -P" is called. This causes that the other servers can't make
a local copy successfully during their setup, and the misleading
console error message "LustreError: 13a-8: Failed to get MGS log
params and no local copy." is printed.
This patch is to start params log during mgs intialization so that the
error message is quieted.
Also, test_76b is added to conf-sanity.sh to verify params log setup.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: Ifc3abc1e35ef20230a1be1cdf1c4cc8f57b2788e
Reviewed-on: http://review.whamcloud.com/9737
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4669 type: change "%Lu" and "%Lx" to "LPU64” and "LPX64"

"%Lu" and "%Lx" are not supported by standard C. This patch
fixes these formats with "LPU64" and "LPX64".

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: Ic10346575161c55b299cce6576029c16d59fe60f
Reviewed-on: http://review.whamcloud.com/9921
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
LU-4669 type: change "%llx" to "LPX64”

This patch fixes the following compile errors by using "LPX64”:
error: format '%llx' expects type 'long long unsigned int',
       but argument 5 has type '__u64'
error: format '%#llx' expects type 'long long unsigned int',
       but argument 3 has type '__u64'

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: Ica703160923e5f2b987217d97e623fe16eb667ad
Reviewed-on: http://review.whamcloud.com/9811
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>