Whamcloud - gitweb
fs/lustre-release.git
7 years agoLU-1946 mount: Print more helpful message on EBUSY
Prakash Surya [Thu, 13 Sep 2012 23:45:01 +0000 (16:45 -0700)]
LU-1946 mount: Print more helpful message on EBUSY

If the mount function returns EBUSY, there is a chance that the
backend filesystem is mounted through the Posix layer. Specifically,
when using a ZFS backend EBUSY will be returned in this use case. As an
aid the to end user, this patch prints a message intended to help the
user diagnose and fix the issue.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: I7bacbb74c1e76efbbea60f76049a9356d601d246
Reviewed-on: http://review.whamcloud.com/3997
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1688 test: fix the problem in test_58 of recovery_small
Hongchao Zhang [Sat, 4 Aug 2012 10:21:12 +0000 (18:21 +0800)]
LU-1688 test: fix the problem in test_58 of recovery_small

in test_58 of recovery_small, the 'df' command could trigger
the eviction caused by the above 'drop_bl_callback', then
the fail of 'df' could be not thought as the fail of th test,

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: I226a3d4772d033182ded28caacbecdc44c7af8c4
Reviewed-on: http://review.whamcloud.com/3506
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jay J Lan <jay.j.lan@nasa.gov>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1304 mdd: do not use ma internally
Alex Zhuravlev [Wed, 12 Sep 2012 17:34:17 +0000 (21:34 +0400)]
LU-1304 mdd: do not use ma internally

this is the first step to prepare mdd for LOD
and removing LOV management from MDD

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I65a6f6bc867ff3107eb6fb927da60ace304754af
Reviewed-on: http://review.whamcloud.com/4032
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1304 mdd: changes related to acl
Alex Zhuravlev [Tue, 4 Sep 2012 15:20:22 +0000 (19:20 +0400)]
LU-1304 mdd: changes related to acl

ACL/i_mode consistency in maintained within MDD,
so that ACLs functionality do not depend on
OSD indirectly. required for ZFS backend.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I8f20e21734097ee2d962cc487265d6e1d9b3b805
Reviewed-on: http://review.whamcloud.com/3866
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
7 years agoLU-1783 tests: skip directory atime update test in SLES11 SP1
Bob Glossman [Thu, 20 Sep 2012 18:36:24 +0000 (11:36 -0700)]
LU-1783 tests: skip directory atime update test in SLES11 SP1

Since this failure is seen only in SP1 which is already out of support,
skipping the subtest for this sles version.

Test-Parameters: clientdistro=sl11

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I9f996b1e9955052b46ad7e3310e21f118bfa77cf
Reviewed-on: http://review.whamcloud.com/4062
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1941 tests: disable FIEMAP tests for ZFS
Andreas Dilger [Sat, 15 Sep 2012 02:07:35 +0000 (20:07 -0600)]
LU-1941 tests: disable FIEMAP tests for ZFS

Until the FIEMAP support for ZFS is implemented, skip the filefrag
FIEMAP sanity tests.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I3b1ee73bae61a71792fa8c281182e649a4261f05
Reviewed-on: http://review.whamcloud.com/3998
Tested-by: Hudson
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1976 io: check index node before recycle empty leaf
Fan Yong [Thu, 20 Sep 2012 15:45:19 +0000 (23:45 +0800)]
LU-1976 io: check index node before recycle empty leaf

There may be multiple threads trying to shrink the same OI index
node to recycle different empty OI leaf nodes concurrently, and
someone may enlarged or split the index node before the threads
shrinking the index node to recycle the empty OI leaf nodes.
These concurrent OI index node modifications will change leaf
node position in the index node. So before shrinking the index
node, we need to check and adjust related frame pointer to avoid
to shrink the index node improperly as to crash the memory.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I26063407f6c52f3e51ddb40e6c27aaa5cf63ec2b
Reviewed-on: http://review.whamcloud.com/4061
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1304 mdd: remove partial operations
Alex Zhuravlev [Mon, 3 Sep 2012 15:23:10 +0000 (19:23 +0400)]
LU-1304 mdd: remove partial operations

DNE is implementing this by different means

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ieed255381672646277af370989416fd1421d29fb
Reviewed-on: http://review.whamcloud.com/3865
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1850 test: remount client if replay-vbr fails
sarah [Thu, 20 Sep 2012 20:26:35 +0000 (13:26 -0700)]
LU-1850 test: remount client if replay-vbr fails

Remount client lustre if checkstat fails to make sure
the following tests running in a healthy environment

Change-Id: I764e83ee31d8cc19d79632e805a6e75225e67adf
Signed-off-by: sarah <sarah@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4063
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1581 build: remove false ldiskfs dependencies
Andreas Dilger [Mon, 20 Aug 2012 06:25:01 +0000 (00:25 -0600)]
LU-1581 build: remove false ldiskfs dependencies

Remove unnecessary use of ldiskfs and other headers by MDD code.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I89f56ea35444a4d36dd461df223250a061e3557a
Reviewed-on: http://review.whamcloud.com/3719
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1491 tests: check Lustre version in conf-sanity test 62
Yu Jian [Tue, 18 Sep 2012 03:36:27 +0000 (11:36 +0800)]
LU-1491 tests: check Lustre version in conf-sanity test 62

We need to check Lustre version to make sure the test for
new fixup/feature does not run on unsupported Lustre version.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I57f76444c13433c972067d41735e52f3d8e9e440
Reviewed-on: http://review.whamcloud.com/4018
Tested-by: Hudson
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1896 tests: check Lustre version in sanity test 154
Yu Jian [Tue, 18 Sep 2012 04:05:31 +0000 (12:05 +0800)]
LU-1896 tests: check Lustre version in sanity test 154

We need to check Lustre version to make sure the test for
new fixup/feature does not run on unsupported Lustre version.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I63f9c2de6f76fda4758d0c92ee924d9b22570ff6
Reviewed-on: http://review.whamcloud.com/4019
Tested-by: Hudson
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1820 ptlrpc: fix req reference to export
Alexander.Boyko [Tue, 4 Sep 2012 09:30:06 +0000 (13:30 +0400)]
LU-1820 ptlrpc: fix req reference to export

(genops.c:766:class_export_destroy())
ASSERTION(cfs_list_empty(&exp->exp_hp_rpcs)) failed

ptlrpc_server_handle_req_in() call ptlrpc_server_request_add()
and hp request can be added to export->exp_hp_rpcs, but reference
increase at ptlrpc_server_handle_request(). If class_disconnect() and
class_export_destroy() occures before ptlrpc_server_handle_request()
we got ASSERTION.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: Andriy Skulysh <andrew_skulysh@xyratex.com>
Xyratex-bug-id: MRP-649
Change-Id: I3d312c28481143b557d7987501c975c7e287885e
Reviewed-on: http://review.whamcloud.com/3855
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1999 tests: disable recovery-small/106
Alex Zhuravlev [Fri, 21 Sep 2012 06:15:50 +0000 (10:15 +0400)]
LU-1999 tests: disable recovery-small/106

till 1999 is fixed

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I9e8da67b8033f46925d152881e3f4449ad089e7f
Reviewed-on: http://review.whamcloud.com/4066
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Johann Lombardi <johann@whamcloud.com>
7 years agoLU-1756 kernel: cleanup lustre_compat25.h
Peng Tao [Thu, 16 Aug 2012 07:59:21 +0000 (15:59 +0800)]
LU-1756 kernel: cleanup lustre_compat25.h

1. SEEK_XXX is always defined
2. page_private exists since v2.6.15
3. Page_Uptodate should be replaced with PageUptodate
4. unused functions:
   ll_kernel_locked(), ll_redirty_page(), KDEVT_INIT()
   ll_path_lookup(), try_lock_page()

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I90af2e5c4678738752e0f4cade5d4302f3d1fac7
Reviewed-on: http://review.whamcloud.com/3685
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
7 years agoLU-1519 llite: Add a mount flag to clarify DAC handling
John L. Hammond [Fri, 15 Jun 2012 21:14:06 +0000 (16:14 -0500)]
LU-1519 llite: Add a mount flag to clarify DAC handling

Add a mount flag to control use of OBD_IOC_FID2PATH by processes
without CFS_CAP_DAC_READ_SEARCH.

Change-Id: Ibbca25ad511d80e245716d27fca4287979667db6
Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Reviewed-on: http://review.whamcloud.com/3104
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Keith Mannthey <keith@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1912 tests: check Lustre version in generate_db()
Yu Jian [Tue, 18 Sep 2012 05:23:58 +0000 (13:23 +0800)]
LU-1912 tests: check Lustre version in generate_db()

We need to check Lustre version to make sure the test for
new fixup does not run on unsupported Lustre version.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I6fe5f31dc0ab5ec32879fc0a08216365fee45176
Reviewed-on: http://review.whamcloud.com/4021
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1842 quota: lfs quota commands
Niu Yawei [Tue, 18 Sep 2012 07:01:27 +0000 (03:01 -0400)]
LU-1842 quota: lfs quota commands

- Removed 'lfs quotachown' & 'lfs quotainv';
- For 'lfs quotacheck', 'lfs quotaon' & 'lfs quotaoff', print
  proper message when -EOPNOTSUPP returned from 2.4 server;
- Updated man page for lfs quota commands;
- Removed quotainv from test_15 of s-q;

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I89e6d1e981640ab0f62e10bc5a91946c78644cc3
Reviewed-on: http://review.whamcloud.com/4022
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1907 build: avoid function resolution mistakes by Coverity
Sebastien Buisson [Wed, 12 Sep 2012 12:49:17 +0000 (14:49 +0200)]
LU-1907 build: avoid function resolution mistakes by Coverity

Remove function resolution mistakes made by Coverity version
6.0.3.
The .hs_keycmp function is incorrectly resolved by Coverity,
making the variable passed as its first 'key' parameter to
be considered of the wrong type. Data structures being of
different sizes, it ends up with this Coverity defect:
Out-of-bounds access (OVERRUN_STATIC)
Overrunning static array by passing it as an argument to a
function which indexes it at a higher byte position.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Ia64d90f2faed17981cc4b4eaa960a797ab056daf
Reviewed-on: http://review.whamcloud.com/3955
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith@whamcloud.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1789 protocol: add support for lightweight connection
Johann Lombardi [Mon, 10 Sep 2012 22:18:01 +0000 (00:18 +0200)]
LU-1789 protocol: add support for lightweight connection

A lightweight connection has the following uncommon properties:
- no entry is added to last_rcvd file, so no recovery is possible
- a lightweight connection can be set up while the target is in
  recovery, therefore it should be used use caution
- locks can still be acquired through this connection, although they
  won't be replayed.

We might also consider disabling pings in the future.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I2b2d1a28d0fd4ca278806cab6103f96fbd88a07d
Reviewed-on: http://review.whamcloud.com/3925
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1842 iam: store key & rec in LE order for quota IAM files
Niu Yawei [Fri, 14 Sep 2012 07:32:05 +0000 (03:32 -0400)]
LU-1842 iam: store key & rec in LE order for quota IAM files

Store quota keys and records in little endian format in iam index
files.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I391fb9c0b8ff67c3cc5f51abd31a0dbf92d7276c
Reviewed-on: http://review.whamcloud.com/3989
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1973 test: t-f to set LD_LIBRARY_PATH
Alex Zhuravlev [Tue, 18 Sep 2012 10:50:07 +0000 (14:50 +0400)]
LU-1973 test: t-f to set LD_LIBRARY_PATH

pointing to the directory with liblustreapi.so
so that utilities like ll_dirstripe_verify can
find the library.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I84bf61ed1b987687be79637c5ad126151e0c3aab
Reviewed-on: http://review.whamcloud.com/4027
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
7 years agoLU-1735 ptlrpc: cleanup jobid error message
Niu Yawei [Tue, 18 Sep 2012 09:19:51 +0000 (05:19 -0400)]
LU-1735 ptlrpc: cleanup jobid error message

In lustre_get_jobid(), -ENOENT error should be printed as D_INFO
but not D_ERROR.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I6c8133eca37cf00cf4510205e5b2012dccfd8073
Reviewed-on: http://review.whamcloud.com/4024
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1842 protocol: add support for OBD_IDX_READ
Johann Lombardi [Tue, 11 Sep 2012 22:04:00 +0000 (00:04 +0200)]
LU-1842 protocol: add support for OBD_IDX_READ

This patch defines a new RPC format (namely OBD_IDX_READ) which
allows to read the content of an index file via a bulk transfer.
It is simlilar to MDS_READPAGE except that it is not tied to a
specific key/record format (readdir relies on lu_dirent/lu_dirpage).
Like readdir, key/record pairs are stored in a container of a
fixed size (i.e. 4KB) regardless of the client & server page size.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I34071ca05a3bd4e6c01bfe4fc533ab79bdd98b3c
Reviewed-on: http://review.whamcloud.com/3942
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1304 osd: ->do_ah_init() to accept new object
Alex Zhuravlev [Wed, 12 Sep 2012 16:30:03 +0000 (20:30 +0400)]
LU-1304 osd: ->do_ah_init() to accept new object

being created so that OSD API implementation can
initialize some default values, etc.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: If4bda7626b4406f906a95df3704885c4531567ee
Reviewed-on: http://review.whamcloud.com/3959
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
7 years agoLU-1945 utils: fix ll_recover_lost_found_objs.
wangdi [Fri, 14 Sep 2012 19:39:17 +0000 (12:39 -0700)]
LU-1945 utils: fix ll_recover_lost_found_objs.

fix ll_recover_lost_found_objs for fid on OST.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I5f29629f5bbd490f7d853b5333f68b71f574e77c
Reviewed-on: http://review.whamcloud.com/4000
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1304 mdd: use slab for mdd objects
Alex Zhuravlev [Mon, 3 Sep 2012 15:15:43 +0000 (19:15 +0400)]
LU-1304 mdd: use slab for mdd objects

taken from orion

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I52c415a92e271732436182f61d861467d7514dc4
Reviewed-on: http://review.whamcloud.com/3864
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
7 years agoLU-1740 test: skip test for interop
Bob Glossman [Mon, 17 Sep 2012 15:41:05 +0000 (08:41 -0700)]
LU-1740 test: skip test for interop

Since 2.2 is missing a fix for getattr counters, skip a portion of
test 133b when the server is 2.2.  This will avoid an interop test failure.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I37a9b641fa85b4e7cd53512d9624d9b748d32da3
Reviewed-on: http://review.whamcloud.com/4011
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1540 tests: skip sanity test_17m on old MDS
Andreas Dilger [Sat, 15 Sep 2012 20:35:03 +0000 (14:35 -0600)]
LU-1540 tests: skip sanity test_17m on old MDS

Don't run sanity.sh test_17m() in interop mode for 2.2 MDSes (the
original LU-1540 fix was included in 2.1.3 and 2.2.94), since they
will not create symlinks correctly, and the e2fsck test will fail.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: If3da1f8bdf7243bac6c72a2733b488a6e69f2304
Reviewed-on: http://review.whamcloud.com/4004
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1842 quota: helper routines to manage FID_SEQ_QUOTA_GLB
Johann Lombardi [Tue, 11 Sep 2012 11:19:04 +0000 (13:19 +0200)]
LU-1842 quota: helper routines to manage FID_SEQ_QUOTA_GLB

The FID_SEQ_QUOTA_GLB sequence is used to produce FID for global
quota indexes. The 32-bit object ID is thus divided into 3 fields
containing:
- 16-bit pool identifier (aka pool_id)
- 8-bit quota type (aka LQUOTA_TYPE_{USR,GRP})
- 8-bit resource type (LQUOTA_RES_{MD,DT} for resp. inodes & blocks)

This static FID scheme allows slaves to enqueue global quota lock
directly on the right FID without requiring a first readdir or to
change the resource ID on the fly when the lock is granted.

This patch adds the helper routines to manipulate global index FIDs.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I145c1468db7fe0d2a0f198ac323b00913a815c3c
Reviewed-on: http://review.whamcloud.com/3937
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1842 quota: new quota RPC format
Niu Yawei [Thu, 13 Sep 2012 10:25:11 +0000 (06:25 -0400)]
LU-1842 quota: new quota RPC format

Define RPC formats for quota acquire/release:
- non-intent DQACQ;
- intent DQACQ (per-ID intent lock);
- intent CONNECT (global intent lock);

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ia6ec34326cd94274f2f0f42b89f11e52d0dc8317
Reviewed-on: http://review.whamcloud.com/3977
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1756 kernel: cleanup lustre_compat25.h
Peng Tao [Thu, 16 Aug 2012 07:59:21 +0000 (15:59 +0800)]
LU-1756 kernel: cleanup lustre_compat25.h

1. unused functions:
   ll_remove_suid(), labs()
2. abs() is always defined
3. use SLAB_DESTROY_BY_RCU directly
4. call sb_any_quota_loaded() directl

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Ic52e1a75f3d71887ae91f03a465112ab6c08c746
Reviewed-on: http://review.whamcloud.com/3688
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
7 years agoLU-1842 quota: zfs local enforcement
Niu Yawei [Tue, 11 Sep 2012 07:35:32 +0000 (03:35 -0400)]
LU-1842 quota: zfs local enforcement

Quota local enforcement for zfs osd.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I91d6698cc5a3f1eb42dd7fc9120f83b70d2a7a6f
Reviewed-on: http://review.whamcloud.com/3933
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1842 quota: ldiskfs local enforcement
Niu Yawei [Mon, 10 Sep 2012 06:30:34 +0000 (02:30 -0400)]
LU-1842 quota: ldiskfs local enforcement

Quota local enforcement for ldiskfs osd

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ica4c1ae74c4af5a913691e60c080cb431e273c3c
Reviewed-on: http://review.whamcloud.com/3915
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
7 years agoLU-1884 build: fix 'resource leak' errors
Sebastien Buisson [Tue, 11 Sep 2012 07:43:22 +0000 (09:43 +0200)]
LU-1884 build: fix 'resource leak' errors

Fix 'resource leak' defects found by Coverity version 6.0.3:
Resource leak (RESOURCE_LEAK)
Variable going out of scope leaks the storage it points to.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I6fe04d30c209d164ac8c741497c675a33ffcca6d
Reviewed-on: http://review.whamcloud.com/3934
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Keith Mannthey <keith@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1095 debug: quiet unnecessary console chatter
Andreas Dilger [Thu, 6 Sep 2012 19:55:41 +0000 (13:55 -0600)]
LU-1095 debug: quiet unnecessary console chatter

Quiet warning when configuring non-default CPT partitions, since this
will happen whenever the module parameter is changed.  Only complain
if the number of partitions is more than the number of cores, or if
it is more than 4x the recommended number.

Running racer.sh provokes a lot of messages from mdd_readdir(),
because it is doing "ls" in a directory that has been unlinked.
This is legal under POSIX and should not generate a console message.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I33afab093e9a03324a579244ce5177708735e7cc
Reviewed-on: http://review.whamcloud.com/3894
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1746 osd-zfs: fix LU_BUF_NULL in osd_xattr_list()
Minh Diep [Fri, 31 Aug 2012 15:33:39 +0000 (08:33 -0700)]
LU-1746 osd-zfs: fix LU_BUF_NULL in osd_xattr_list()

== sanity test 17k: symlinks: rsync with xattrs enabled
=========================== 17:49:09 (1344332949)
sending incremental file list
rsync: get_xattr_names: llistxattr(".",0) failed: Numerical
result out of range (34)
[...]

It happened like this:

  osd_sa_xattr_list()
  osd_xattr_list()
  ...
  mdt_getxattr_pack_reply()
  mdt_getxattr()

mdt_getxattr_pack_reply() passed LU_BUF_NULL as lu_buf to
learn how big the buffer should be.  osd_xattr_list() does
not support such queries with NULL buffers.

Test-Parameters: envdefinition=USE_OFD=yes,LOAD_MODULES_REMOTE=true
Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: I1aa63d9774770c14db2b332e634734cda3a160b6
Reviewed-on: http://review.whamcloud.com/3863
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
7 years agoLU-1747 osd-zfs: Return zero when deleting nonexistent EAS
Minh Diep [Fri, 31 Aug 2012 04:33:54 +0000 (21:33 -0700)]
LU-1747 osd-zfs: Return zero when deleting nonexistent EAS

sanity 103 with ZFS targets fails:

[22] $ strace -o /tmp/tmo.strace cp -rp h i -- failed
 ~                                     ? cp: preserving permissions
for `i/x': No such file or directory
 ~                                     ? cp: preserving permissions
for `i': No such file or directory

The ENOENTs came from osd-zfs's osd_xattr_del(), when MDD tried to
delete "system.posix_acl_access".

Test-Parameters: envdefinitions=USE_OFD=yes,LOAD_MODULES_REMOTE=true
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I3736b1a89bec3174f7e0a6a848870adfa248d186
Reviewed-on: http://review.whamcloud.com/3833
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1905 build: Always create libcfs.a
James Simmons [Wed, 12 Sep 2012 11:40:48 +0000 (07:40 -0400)]
LU-1905 build: Always create libcfs.a

Lustre and LNET utilites have become dependent on libcfs.a but
one can easily disable libcfs.a from being built by disabling
liblustre creation. This patch have Lustre always build libcfs.a.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Id80f9baa16da238eca708409e0b5d5248e437c5a
Reviewed-on: http://review.whamcloud.com/3953
Tested-by: Hudson
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1856 build: fix 'out-of-bounds write' errors
Sebastien Buisson [Fri, 7 Sep 2012 11:52:56 +0000 (13:52 +0200)]
LU-1856 build: fix 'out-of-bounds write' errors

Fix 'out-of-bounds write' defects found by Coverity version 6.0.3:
Out-of-bounds write (OVERRUN_DYNAMIC or OVERRUN_STATIC)
Overrunning array at too high offset.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Idb2ed5f814bb0c4c9418cedffb8e01efae0f4bd7
Reviewed-on: http://review.whamcloud.com/3903
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Keith Mannthey <keith@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1854 ptlrpc: track culled request seq
Liang Zhen [Mon, 10 Sep 2012 07:50:51 +0000 (15:50 +0800)]
LU-1854 ptlrpc: track culled request seq

Ptlrpc service should track highest culled request-seq by storing
it in ptlrpc_servce_part::scp_hist_seq_culled, however, there is
a missed case in ptlrpc_server_drop_request(): if rq_reply_state of
the request is pre-allocated and it should be freed immediately,
ptlrpc_server_drop_request() will unlink the request from history
list w/o track sequence number, and it can be the reason of
hitting LASSERT while reading req_history.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I74ed9c7f00e77707628d628792bf9583c4bc4259
Reviewed-on: http://review.whamcloud.com/3916
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1301 lu: local objects library
Alex Zhuravlev [Thu, 6 Sep 2012 04:48:16 +0000 (08:48 +0400)]
LU-1301 lu: local objects library

set of functions working on top of OSD API to create/access
local objects by name.
the library maintains own top device to be able to work in
multi-service environment (mds + mgs).

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I26cc47b866bb0925be4f4419ac663a1d42520e02
Reviewed-on: http://review.whamcloud.com/3665
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
7 years agoLU-1919 mount: do not access vfs mnt directly
Alex Zhuravlev [Thu, 13 Sep 2012 16:24:20 +0000 (20:24 +0400)]
LU-1919 mount: do not access vfs mnt directly

from obd_mount.c - it's under OSD control now and at umount time
the structure can disappear with OSD, sooner then lustre umount
is completed.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I91bae528bc229cd4e0e191e61eae8a7854494c8f
Reviewed-on: http://review.whamcloud.com/3982
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1303 osp: code to update per-OST last_id in OSP
Mikhail Pershin [Wed, 12 Sep 2012 21:13:34 +0000 (01:13 +0400)]
LU-1303 osp: code to update per-OST last_id in OSP

Store and Update last_id - per OST counter of created objects.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Iedd84afceb692f1b545c6dfe8e035de184952b18
Reviewed-on: http://review.whamcloud.com/3961
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
7 years agoLU-1303 osp: Basic OSP device implementation
Mikhail Pershin [Wed, 12 Sep 2012 14:50:53 +0000 (18:50 +0400)]
LU-1303 osp: Basic OSP device implementation

Initial OSP code: osp_device, osp_object and structures

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I21ea3d0cdfe07634278d8e7fee9a7c3fef79f81e
Reviewed-on: http://review.whamcloud.com/3958
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
7 years agoLU-1881 mdd: cleanup partial modification
Fan Yong [Thu, 13 Sep 2012 14:42:38 +0000 (22:42 +0800)]
LU-1881 mdd: cleanup partial modification

Usually, the modification triggered by client will be split into
several sub-operations in MDD layer and processed one by one. If
some step failed, we should rollback the former sub-operation(s)
to avoid partial modification the target(s) in RAM or on disk.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I02559618d252f65cd3ae3b26bd186b77c9f42dcc
Reviewed-on: http://review.whamcloud.com/3981
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
7 years agoLU-1877 mdt: initialize lock and expiration
Alex Zhuravlev [Wed, 12 Sep 2012 03:53:15 +0000 (07:53 +0400)]
LU-1877 mdt: initialize lock and expiration

for statfs cache.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ief24f6a855c3ed14a7afc142921b9b249ab11604
Reviewed-on: http://review.whamcloud.com/3946
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1302 llog: llog test update and fixes
Mikhail Pershin [Wed, 29 Aug 2012 21:17:41 +0000 (01:17 +0400)]
LU-1302 llog: llog test update and fixes

- port llog_test fixed from Orion
- remove unneeded include files
- remove llog init/fini from lmv, it is not used
- add new test_7 for llog_test
- add unlink64 handling

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I4793bb02748f2aaab33d67d0f04c8767e7f5ffb9
Reviewed-on: http://review.whamcloud.com/3825
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1903 test: disable lfsck for ZFS tests
Minh Diep [Thu, 13 Sep 2012 03:14:28 +0000 (20:14 -0700)]
LU-1903 test: disable lfsck for ZFS tests

lfsck test does not apply to ZFS backend filesystem

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: If332b5335b1e444c94669a5e8b5899d896dfb18a
Reviewed-on: http://review.whamcloud.com/3963
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1842 ldlm: support for sending GL ASTs to multiple locks
Johann Lombardi [Thu, 6 Sep 2012 12:09:05 +0000 (14:09 +0200)]
LU-1842 ldlm: support for sending GL ASTs to multiple locks

Traditionally, a glimpse callback is sent to one single lock which
is the highest PW extent lock.
The new quota code uses glimpse callbacks in a different manner since
it can issue multiple glimpse ASTs to different slaves (as done for
blocking callbacks for instance) to notify those latters of the new
qunit value.

This patch modifies the glimpse callback path to use
ldlm_run_ast_work() to issue multiple glimpse ASTs in one shot (as
done currently for other lock callbacks).

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I972630fcf3158dd1d361392913f8086f1ebaa39f
Reviewed-on: http://review.whamcloud.com/3887
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1881 oi: not shrink the last entry in OI index node
Fan Yong [Tue, 11 Sep 2012 07:07:30 +0000 (15:07 +0800)]
LU-1881 oi: not shrink the last entry in OI index node

Shrinking OI index node to recycle idle leaf for the last entry
will cause subsequent lookup/insert ops to access invaild space.
So just keep the last entry there, which can be reused directly
by next new node.

Other fixes:

1) The recycled empty OI blocks should be recorded on divice and
be re-loaded after the device remounted. Then they can be reused
when needs new OI blocks.

2) Need not check iam_container::ic_idle_failed in iam_new_node().

3) Clear iam_frame::at_shifted when iam_path_release().

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I46611c208563a943a0980110b2c416186e6d1249
Reviewed-on: http://review.whamcloud.com/3931
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1923 lov: verify stripe is on given device
Andreas Dilger [Thu, 13 Sep 2012 02:35:55 +0000 (20:35 -0600)]
LU-1923 lov: verify stripe is on given device

When restarting FIEMAP from a file with many extents, the first
supplied fiemap extent contains the offset of the previous last
extent found.  If this data is invalid, it may cause the LOV code
to acccess out-of-bounds array indices.

Verify data passed from userspace is within bounds.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I8e70e891b9f23c8f72aa78a4807369584ac2b04f
Reviewed-on: http://review.whamcloud.com/3962
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
7 years agoLU-1900 test: check for lustre version in sanity-scrub
Minh Diep [Wed, 12 Sep 2012 05:12:31 +0000 (22:12 -0700)]
LU-1900 test: check for lustre version in sanity-scrub

Since OI scrub only available on lustre 2.3.0, we need
to check if the mds runs at least 2.3.0

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I5ce0462a1deb5bddfec88177a75a1c17b69b5217
Reviewed-on: http://review.whamcloud.com/3947
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1799 o2iblnd: debug patch for o2iblnd
Liang Zhen [Wed, 29 Aug 2012 13:24:26 +0000 (21:24 +0800)]
LU-1799 o2iblnd: debug patch for o2iblnd

IBM reported kernel panic on their BGQ IO node when loading the
ptlrpc module with an o2ib network. The IB interface had an IPv4
and IPv6 address. Removing the IPv6 address avoided the crash.

I suspect rdma_bind_addr can't associate any RDMA device in this
case, this patch will check if there's attached IB device on cmid
even returned value is ZERO, it will also output more information.

Test-Parameters: nettypes=o2ib
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Id44110fcf56b199b1504ab4e6b0157d87bc2d270
Reviewed-on: http://review.whamcloud.com/3815
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1808 build: Lustre build does not support FC15.
yangsheng [Mon, 3 Sep 2012 19:41:30 +0000 (03:41 +0800)]
LU-1808 build: Lustre build does not support FC15.

Change lbuild to support for FC15 and calm down warning message.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I365f708f82c01b0f72aeffa3c09e46800ca770d5
Reviewed-on: http://review.whamcloud.com/3849
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Chris Gearing <chris.gearing@intel.com>
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1489 test: lfs data_version is not available prior to 2.3
Minh Diep [Wed, 12 Sep 2012 06:08:22 +0000 (23:08 -0700)]
LU-1489 test: lfs data_version is not available prior to 2.3

We need to check lustre version to make sure the test for
new feature does not run on unsupported version

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: Iae808413ba4965033d17d53977f647efc533eecc
Reviewed-on: http://review.whamcloud.com/3948
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1872 ptlrpc: cleanup jobstats in thread context
Niu Yawei [Wed, 12 Sep 2012 03:21:31 +0000 (23:21 -0400)]
LU-1872 ptlrpc: cleanup jobstats in thread context

Since cfs_hash function isn't safe in interrupt context, we should
move the jobstats cleanup work into each stats logging function.

If there are any activities, cleanup will be triggerred on logging
time, and the hash table will be shrinked automatically; If there
isn't any activity, the hash table will stop growing, and it can
be cleared manually.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I1c60e123f67c0ad3b959bbb330282cd07c63a28c
Reviewed-on: http://review.whamcloud.com/3945
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1301 mgs: remove compatibility code
Alex Zhuravlev [Thu, 9 Aug 2012 18:45:27 +0000 (22:45 +0400)]
LU-1301 mgs: remove compatibility code

which is inteded to support 1.6-originated profiles

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I64a74e1f139fb3d94e7d272febc31f0306d01bab
Reviewed-on: http://review.whamcloud.com/3671
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1301 mgs: improve error handling
Alex Zhuravlev [Thu, 9 Aug 2012 15:16:28 +0000 (19:16 +0400)]
LU-1301 mgs: improve error handling

taken as is from orion

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib26c5f519f686a77fa1057af214a4823d0c16359
Reviewed-on: http://review.whamcloud.com/3670
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1301 mgs: introduce mgs_thread_info
Alex Zhuravlev [Thu, 9 Aug 2012 13:17:47 +0000 (17:17 +0400)]
LU-1301 mgs: introduce mgs_thread_info

use it to save stack

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ibefb8a7adf5ac9c6b12212d27d890467c889e5d9
Reviewed-on: http://review.whamcloud.com/3669
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1644 recovery: to not check client version for mne swap
Jinshan Xiong [Fri, 7 Sep 2012 00:28:00 +0000 (17:28 -0700)]
LU-1644 recovery: to not check client version for mne swap

data->ocd_version in obd_connect_data can be overwritten by server
so that it'll be wrong if client is reconnected after server recovery.
Wrong clienv version caused wrong exp_need_mne_swab was set and then
has interop issue between 2.2 clients and 2.3 server.

In this patch, the following fixes are made:
1. do not check the client version on the MGS;
2. reset client version on each import connect;
3. client side fix will be removed after lustre 3.2

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: Ia2899d1b8385fd4799ca6fe260fc4c84444247cb
Reviewed-on: http://review.whamcloud.com/3897
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1869 build: gcc/ar utility can vary
Alex Zhuravlev [Mon, 10 Sep 2012 10:10:47 +0000 (14:10 +0400)]
LU-1869 build: gcc/ar utility can vary

- ar utility can vary depeding on build platform.
- do not call gcc directly, use $(CC)

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ia60752b40531886d805a095c9f571e565bcd0e88
Reviewed-on: http://review.whamcloud.com/3917
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liu Xuezhao <xuezhao.liu@emc.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1711 mount: use OSD API to export statfs data
Alex Zhuravlev [Wed, 15 Aug 2012 09:38:22 +0000 (13:38 +0400)]
LU-1711 mount: use OSD API to export statfs data

so that server mount points (like /mnt/ostXXX) show
valid data on any backend (ldiskfs, zfs)

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I6ad0546d7630769083e8aea69547a6bb3256784f
Reviewed-on: http://review.whamcloud.com/3652
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
7 years agoLU-1711 mount: lu_site is provided by OSD
Alex Zhuravlev [Wed, 8 Aug 2012 10:34:21 +0000 (14:34 +0400)]
LU-1711 mount: lu_site is provided by OSD

previously it was created by MDT, which is started after MGS.
so we relocate lu_site in OSD and now it's created before
any service like MDS/MGS.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I43312218c293df509064cc6a854074e652a6e691
Reviewed-on: http://review.whamcloud.com/3651
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
7 years agoLU-1711 mount: obd_mount to start osd
Alex Zhuravlev [Tue, 7 Aug 2012 09:56:48 +0000 (13:56 +0400)]
LU-1711 mount: obd_mount to start osd

... instead of mounting underlying ldiskfs directly.
so, now OSD can be any depending on osd= mount option.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Iab1ca6ca9f84ba6c708e05cd85c4de0a51d34de6
Reviewed-on: http://review.whamcloud.com/3650
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
7 years agoLU-1301 mgs: env and mgs_device to pass around
Alex Zhuravlev [Thu, 9 Aug 2012 10:51:46 +0000 (14:51 +0400)]
LU-1301 mgs: env and mgs_device to pass around

a trivial part of orion changes:
 - introduce mgs_device (old mgs_obd)
 - pass lu_env around

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I53d55c9f0a91c16c9eb65ab41d9660c3699bac45
Reviewed-on: http://review.whamcloud.com/3668
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
7 years agoLU-1823 mdd: Don't provide buffer for xattr when we just need size
Oleg Drokin [Mon, 10 Sep 2012 23:46:41 +0000 (19:46 -0400)]
LU-1823 mdd: Don't provide buffer for xattr when we just need size

mdd_declare_attr_set incorrectly passed uninitialized buffer to mdo_xattr_get
where as it is just interested in knowing if xattr exists at all.
The buffer happens to point to other people's data sometimes which leads
to random memory corruptions.

Change-Id: I28b477d385427292ad38455d495ab546f757c7d5
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/3928
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-521 lnet: Fix endian issue introduced by change 1338
Doug Oucharek [Tue, 4 Sep 2012 19:35:35 +0000 (12:35 -0700)]
LU-521 lnet: Fix endian issue introduced by change 1338

In change 1338 done for LU-521, an endian issue was introduced
when the magic number for the RPC header was swapped before
the body has been swapped. We use the magic number to
determine if the body needs swapping.

Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Change-Id: I0a64ca13dbdc04169d59a1bd531b4877e8736993
Reviewed-on: http://review.whamcloud.com/3831
Reviewed-by: Isaac Huang <he.huang@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1824 obdfilter: reset lnb[n].rc in filter_grant_check()
Yu Jian [Mon, 10 Sep 2012 04:02:31 +0000 (12:02 +0800)]
LU-1824 obdfilter: reset lnb[n].rc in filter_grant_check()

After patch http://review.whamcloud.com/3446 was committed,
filter_grant_check() would be called a second time if there
was no grant space for the write operation in the first time
it was called.

The issue was that all of the lnb[n].rc values were set to
-ENOSPC inside filter_grant_check() the first time it was
called, but at the second time, although there was some space
and the function returned 0 not -ENOSPC, the lnb[n].rc values
were not reset, all of them were still -ENOSPC, which caused
the assertion failure inside filter_commitrw_write().

This patch fixes the above issue.

Test-Parameters: envdefinitions=SLOW=yes testlist=obdfilter-survey
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Ia0ec57a7d329136b4e1f2f82a337c6cf43f7f66c
Reviewed-on: http://review.whamcloud.com/3913
Tested-by: Hudson
Reviewed-by: hongchao.zhang <hongchao.zhang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1813 osc: osc_lock_unuse() race
Jinshan Xiong [Thu, 6 Sep 2012 20:09:08 +0000 (13:09 -0700)]
LU-1813 osc: osc_lock_unuse() race

The lock may have been released by upper layer so the cl_unuse_try()
in osc_lock_upcall() will release the dlm lock instead of crashing.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: Ie1c3f8d2ba8b227e42d08b1631651c5834cbac25
Reviewed-on: http://review.whamcloud.com/3895
Tested-by: Hudson
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1821 build: fix build error about VLA at file scope
Peng Tao [Tue, 28 Aug 2012 17:44:37 +0000 (01:44 +0800)]
LU-1821 build: fix build error about VLA at file scope

Fix build error:
drivers/incore/fs_incore.c:340:54: error: variably modified
‘incore_dir_template’ at file scope [-Werror]

C99 does not allow VLA at file scope. Allocate incore_dir_template
dynamically to avoid build error with newer gcc(>4.6.3) that checks
this.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Icc81c649f58772e76e1cd3dcd42348a53a9a942b
Reviewed-on: http://review.whamcloud.com/3856
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1842 quota: define quota records for glb/slv indexes
Johann Lombardi [Thu, 6 Sep 2012 10:54:13 +0000 (12:54 +0200)]
LU-1842 quota: define quota records for glb/slv indexes

This patch defines lquota_glb_rec & lquota_slv_rec which are the
record which will be used with the global & slave index files.
It also introduces the global quota lu_context_key which will be used
by all quota-level handlers.
The lquota module init/exit function are now defined in lquota_lib.c
which calls the old quota init/exit function for the time being.
Finally, this patch also modifies lquotactl_slv() to collect
enforcement information.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I2b261bd8433a5e6bd64c2de2710bca32bf606122
Reviewed-on: http://review.whamcloud.com/3886
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
7 years agoLU-1302 llog: introduce llog_open
Mikhail Pershin [Tue, 21 Aug 2012 17:44:55 +0000 (21:44 +0400)]
LU-1302 llog: introduce llog_open

- llog_open is pair to llog_close. Llog handle is allocated inside
  llog_open while llog_free_handle is part of llog_close. Each llog
  even non-existent should be opened and closed.
- llog_exist() is added to API to check if llog file exists
- llog_cat_put is renamed to llog_cat_close with cleaning up empty
  llogs like llog_obd_origin_cleanup did.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I6360b4c089ec1dde50289563447eefd3dfa4365a
Reviewed-on: http://review.whamcloud.com/3740
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1818 quota: en/disable quota enforcement via conf_param
Niu Yawei [Tue, 4 Sep 2012 03:45:55 +0000 (11:45 +0800)]
LU-1818 quota: en/disable quota enforcement via conf_param

In the new quota architecture, quota is enabled/disabled
per-filesystem, by 'lctl conf_param':

lctl conf_param $FSNAME.quota.$POOLNAME=$VAL

$FSNAME  : filesystem name;
$POOLNAME: 'mdt' (for meta pool) or 'ost' (for data pool);
$VAL     : 'none' - disable both,
           'u'    - enable user quota,
           'g'    - enable group quota,
           'ug'   - enable both;

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I89ef9fc1a067981cf7caac29c8311b75054c91fe
Reviewed-on: http://review.whamcloud.com/3850
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1830 quota: fix ldiskfs quota accouning iterator
Niu Yawei [Wed, 5 Sep 2012 08:58:33 +0000 (16:58 +0800)]
LU-1830 quota: fix ldiskfs quota accouning iterator

There were defects in the ldiskfs quota accounting iterator:
- leaf blocks could be re-processed;
- entry index was updated incorrectly, so some entries could be
  skipped;

Fix the defect in osd_diskfs_read(), the 32bit 'size' could be
overflowed.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Icfd96fdaf38c57bc63a5fcfd1f96c02d0ddeb74d
Reviewed-on: http://review.whamcloud.com/3877
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1842 quota: quota identifier unification
Johann Lombardi [Thu, 6 Sep 2012 12:50:25 +0000 (14:50 +0200)]
LU-1842 quota: quota identifier unification

This patch defines a generic lquota_id structure which is an union
of all the possible identifier types that can be used with quota,
this includes:
- 64-bit user ID
- 64-bit group ID
- a FID which can be used for per-directory quota in the future

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: Idead35f27ee9d07b9b25f39b791a1ad8778e0f2d
Reviewed-on: http://review.whamcloud.com/3888
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1581 mount: get rid of ldd in the kernel
Alex Zhuravlev [Wed, 1 Aug 2012 09:39:02 +0000 (13:39 +0400)]
LU-1581 mount: get rid of ldd in the kernel

all ldd parsing is now done outside of the kernel
by mount.lustre utility.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Iea6257b75f7573b6594c6bc7a2fa3a86b1c91700
Reviewed-on: http://review.whamcloud.com/3614
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1789 protocol: reserve connect flag for lightweight conn
Johann Lombardi [Mon, 27 Aug 2012 16:28:20 +0000 (18:28 +0200)]
LU-1789 protocol: reserve connect flag for lightweight conn

Reserve connection flag for lightweight connection support to avoid
conflicts. The main property of a lightweight connection is that
there is no entry in the last_rcvd file for this export, so no
recovery is possible. This type of connection will be used by quota
(between master & slave), FIDonOST and likely by other features in the
future.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I4367f5bfaef0207e7f307c4ea3d35e97ca99dc5b
Reviewed-on: http://review.whamcloud.com/3794
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-812 utils: remove obsolete jt_dbg_modules_2_4 code
Liu Xuezhao [Thu, 23 Aug 2012 08:20:15 +0000 (16:20 +0800)]
LU-812 utils: remove obsolete jt_dbg_modules_2_4 code

jt_dbg_modules_2_4 is for 2.4 kernel and it breaks "lctl modules"
for 3.x kernel.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: If2953c71707ae200a4095786150b1dee05547fff
Reviewed-on: http://review.whamcloud.com/3778
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-812 llite: O_LOV_DELAY_CREATE conflicts with FMODE_NONOTIFY
Liu Xuezhao [Sat, 25 Aug 2012 08:19:20 +0000 (16:19 +0800)]
LU-812 llite: O_LOV_DELAY_CREATE conflicts with FMODE_NONOTIFY

Kernel 2.6.36 introduces FMODE_NONOTIFY and defines it as 0x1000000
(commit 12ed2e36c98aec6c41559222e311f4aa15d254b6), this causes the
confliction with O_LOV_DELAY_CREATE which is now defined as octal
0100000000.
This confliction causes kernel remove this flag in build_open_flags,
then "lfs setstripe" a new file will fail with -EEXIST(stripe
already set).

This patch changes O_LOV_DELAY_CREATE to 0120000000(0x1400000)
to make it works for new kernel and compatible with old version
statically linked binary.

Another change is starting to build dynamic linked version of
liblustreapi.so.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I643d3734cfdc2f45099fc6be663a370c2dcc8ea3
Reviewed-on: http://review.whamcloud.com/3779
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Iurii Golovach <Iurii_Golovach@xyratex.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
7 years agoLU-1203 mdt: map old params to new ones by using an array
Yu Jian [Fri, 31 Aug 2012 11:02:30 +0000 (19:02 +0800)]
LU-1203 mdt: map old params to new ones by using an array

This patch improves mdt_process_config() to use an array for
mapping old params to new ones.

The patch also adds a common function class_find_old_param()
to check whether a proc param is an old one or not, and return
new one if it's an old one.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I122e4e83a3f4e84a3fdbd3fe6a69b7c1b5e08d3f
Reviewed-on: http://review.whamcloud.com/3836
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1816 scrub: OI scrub skips new created objects for once
Fan Yong [Mon, 3 Sep 2012 08:49:22 +0000 (16:49 +0800)]
LU-1816 scrub: OI scrub skips new created objects for once

For accelerating OI scrub, it will skip the objects which are new
created after the latest MDT mount and marked as I_LUSTRE_NOSCRUB.
But if the object with I_LUSTRE_NOSCRUB is used/cached in RAM for
very long time, then OI scrub has no chance to process it even if
there has been inconsistency happened until the MDT remount.

So as compromise, the OI scrub will skip the new created objects
for once only when the first accessing.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I560d7d851e3430326d24ec74154bb2a99f80b737
Reviewed-on: http://review.whamcloud.com/3848
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
7 years agoLU-1804 tests: skip OI scrub speed test under UP env
Fan Yong [Mon, 3 Sep 2012 02:57:32 +0000 (10:57 +0800)]
LU-1804 tests: skip OI scrub speed test under UP env

The OI scrub speed depends on CPU/RAM schedule. There may be more
schedule delay under UP environment. So skip related test cases.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: Iebc514857c6d88601598a7da58a340296655dcf1
Reviewed-on: http://review.whamcloud.com/3846
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1755 osc: solve a race between fsync and truncate
Jinshan Xiong [Thu, 16 Aug 2012 17:10:54 +0000 (10:10 -0700)]
LU-1755 osc: solve a race between fsync and truncate

If an OSC extent is being truncated when fsync is called, it will
have oe_fsync_wait set but no oe_urgent or oe_hp set. This causes
problem because when the extent changes OES_CACHE later, it won't
be written out immediately because urgent bit is not set.

This problem can be fixed by checking oe_fsync_wait bit and set urgent
bit correspondingly when changing osc extent's state from OES_TRUNC to
OES_CACHE at the end of truncate.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I755baac066375a92730b14de1c470c66baad5320
Reviewed-on: http://review.whamcloud.com/3699
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
7 years agoLU-1678 mdd: don't create LOV EA by going thru .lustre path
Bobi Jam [Thu, 26 Jul 2012 11:04:48 +0000 (13:04 +0200)]
LU-1678 mdd: don't create LOV EA by going thru .lustre path

When a file is created with O_LOV_DELAY_CREAT, we should not create
its LOV EA data by going through .lustre path.

Add a test to sanity.sh open by fid test suite (test_154).

Signed-off-by: jc lafoucriere <jacques-charles.lafoucriere@cea.fr>
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ib223da44d16bf3a541269d5cfb60826e43345493
Reviewed-on: http://review.whamcloud.com/3483
Tested-by: Hudson
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1779 tests: fix run_one_logged() to log SKIP status
Yu Jian [Wed, 29 Aug 2012 08:59:29 +0000 (16:59 +0800)]
LU-1779 tests: fix run_one_logged() to log SKIP status

In the current test framework, only those tests which are in the
$ALWAYS_EXCEPT list are logged with SKIP status, other skipped
tests are all logged with PASS status.

This patch fixes the above issue by setting the SKIP status in
pass() and logging the status in run_one_logged().

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Ia4e8f51040034abdec9c67aaf0a128b63baaa688
Reviewed-on: http://review.whamcloud.com/3810
Tested-by: Hudson
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1735 ptlrpc: cleanup jobid code
Andreas Dilger [Fri, 10 Aug 2012 22:24:00 +0000 (16:24 -0600)]
LU-1735 ptlrpc: cleanup jobid code

Some cleanups for the jobid code:
- if obd_jobid_var is too large, only print an error message once
- in linux cfs_get_environ():
-- cache strlen(key) since it doesn't change and is used often
-- remove unnecessary typecasts of void pointers
-- use "rc" instead of "ret"
-- balance ENTRY and RETURN/GOTO calls
- add cfs_get_environ() for liblustre and remove inline #ifdef
- use strcmp() to compare strings that are known NUL-terminated
- use strlcpy() to ensure NUL-terminated strings in target buffer
-- add strlcpy() wrapper for liblustre, it isn't in Glibc on RHEL5

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I22c3d5c1755c1d6aab666a769df38218b954cab0
Reviewed-on: http://review.whamcloud.com/3713
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1304 mdt: use slab for mdt_objects
Alex Zhuravlev [Thu, 16 Aug 2012 08:06:07 +0000 (12:06 +0400)]
LU-1304 mdt: use slab for mdt_objects

should save a bit of memory and cpu

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I13601aba3c2cdb5e7c0f4c3a45ff5fb6e428b38f
Reviewed-on: http://review.whamcloud.com/3781
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
7 years agoLU-1304 mdt: cache statfs in mdt_device
Alex Zhuravlev [Thu, 16 Aug 2012 07:17:21 +0000 (11:17 +0400)]
LU-1304 mdt: cache statfs in mdt_device

... and save few cycles

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib3727c7419cfdfa393a2c1c72770ef960b1d05e6
Reviewed-on: http://review.whamcloud.com/3780
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1425 build: make Lustre build ready for gcov
Artem Blagodarenko [Mon, 21 May 2012 13:49:38 +0000 (17:49 +0400)]
LU-1425 build: make Lustre build ready for gcov

gcov requires profiled code to be built with compiler options
-fprofile-arcs -ftest-coverage. To profile all project this
options should be passed during every source file compilation.
This option enable debug logging. No all Lustre parts are ready
for debug logging now.

To patch adds debug librarias where needed and resolve
linking conflicts. Do not influence when no
-fprofile-arcs -ftest-coverage compile options are
passed.

Xyratex-bug-id: MRP-526
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com>
Signed-off-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Change-Id: If5c1742f3263faf48c2c5d8457c1af36a29408d4
Reviewed-on: http://review.whamcloud.com/2844
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
7 years agoLU-1581 mount: kernel do not parse ldd
Alex Zhuravlev [Tue, 31 Jul 2012 11:42:29 +0000 (15:42 +0400)]
LU-1581 mount: kernel do not parse ldd

all ldd parsing is done by mount.lustre utility now.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ice15cf4fa8e411144713d0276d006f8cfe9c56f1
Reviewed-on: http://review.whamcloud.com/3613
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1337 build: add missing include dir
Peng Tao [Wed, 22 Aug 2012 07:32:15 +0000 (15:32 +0800)]
LU-1337 build: add missing include dir

arch/include/generated is added since kernel version v3.2.
while at it, also change "uname -m" in .m4 to $target_cpu,
because users may cross building.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Ib9aa526a9318e5c93b05cceba9fc8cdfbf9fef0a
Reviewed-on: http://review.whamcloud.com/3745
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
7 years agoLU-1302 llog: pass lu_env as parametr in llog functions
Mikhail Pershin [Thu, 16 Aug 2012 13:25:11 +0000 (17:25 +0400)]
LU-1302 llog: pass lu_env as parametr in llog functions

Add lu_env as paramenter in llog API functions and helpers

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I3c3c1878b7dec7059602a91790820b70f225ade5
Reviewed-on: http://review.whamcloud.com/3696
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1302 llog: pass lu_env to the llog callback
Mikhail Pershin [Wed, 15 Aug 2012 11:47:20 +0000 (15:47 +0400)]
LU-1302 llog: pass lu_env to the llog callback

- Pass lu_env to he llog callback.
- Move cat_cancel_cb() to llog_cat.c to be with all
  other catalog functions.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Iedbc7953b461ba52b52680d7d709d27c6581f934
Reviewed-on: http://review.whamcloud.com/3649
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1302 llog: add env to llog_process functions
Mikhail Pershin [Wed, 15 Aug 2012 03:58:18 +0000 (07:58 +0400)]
LU-1302 llog: add env to llog_process functions

Add lu_env to llog processing function.
Remove using flags and mark fork is needed by parameter.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Ie38b3da4090df35281e51ef196d91e3f96f95bdc
Reviewed-on: http://review.whamcloud.com/3644
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1788 osc: don't print error msg for EINPROGRESS resend
Johann Lombardi [Mon, 27 Aug 2012 16:02:38 +0000 (18:02 +0200)]
LU-1788 osc: don't print error msg for EINPROGRESS resend

Now that -EINPROGRESS can be legitimately returned during normal
operation (e.g. quota rebalancing in progress), we shouldn't print an
error message on the client each time the BRW is resent because of
-EINPROGRESS.

This patch also caps the resend delay for BRW to the current request
timeout.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: Ie7447602756b0721351c7c90cbfb40ad8e3bb720
Reviewed-on: http://review.whamcloud.com/3792
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
7 years agoLU-1798 test: check connect_flags for jobstats
Niu Yawei [Wed, 29 Aug 2012 02:45:16 +0000 (22:45 -0400)]
LU-1798 test: check connect_flags for jobstats

Check connect_flags before enabling jobstats in the t-f.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ib36575fe7d08b257a2a7dda86851806bf44d7a41
Reviewed-on: http://review.whamcloud.com/3806
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1772 lov: lock with lov lsm refcount taken may deadlock
Lai Siyao [Wed, 29 Aug 2012 03:38:37 +0000 (11:38 +0800)]
LU-1772 lov: lock with lov lsm refcount taken may deadlock

lov_io_init() and lov_lock_init() has taken lsm refcount, no need to
lock lo_type_guard otherwise it may lead to deadlock.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I3e953d41e181c3ef19f7bf8d92d9791753d4c58a
Reviewed-on: http://review.whamcloud.com/3807
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1795 lustre: remove LASSERT in dt_fiemap_get()
Minh Diep [Wed, 29 Aug 2012 15:52:27 +0000 (08:52 -0700)]
LU-1795 lustre: remove LASSERT in dt_fiemap_get()

dt_fiemap_get should return EOPNOTSUPP instead of
issuing a LASSERT when it's not supported on the
underlying filesystem

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I2cd5044472af3deeb77dbc54ced93f7e553586aa
Reviewed-on: http://review.whamcloud.com/3817
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1676 quota: missing vfs_dq_init() in write path
Niu Yawei [Thu, 26 Jul 2012 08:32:58 +0000 (04:32 -0400)]
LU-1676 quota: missing vfs_dq_init() in write path

Calling vfs_dq_init() in the osd_write_commit(), otherwise space
won't be accounted for the existing inode.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I9671ee9865449dd298139d7668ab17d3d58f8866
Reviewed-on: http://review.whamcloud.com/3476
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>