Whamcloud - gitweb
fs/lustre-release.git
11 years ago2.3.0-RC6 b2_3 2.3.0 2.3.0-RC6 v2_3_0 v2_3_0_0 v2_3_0_0_RC6 v2_3_0_RC6
Oleg Drokin [Sat, 20 Oct 2012 13:29:08 +0000 (09:29 -0400)]
2.3.0-RC6

Change-Id: I04b5639fe4380a7e689aac1effba376a70a7dacb

11 years agoLU-2179 osc: truncate partial page correctly
Jinshan Xiong [Fri, 19 Oct 2012 16:50:52 +0000 (09:50 -0700)]
LU-2179 osc: truncate partial page correctly

Debug patch for osc_extent_wait() is not good because it will hit
LBUG in case the OST is in recovery. In the new patch, it will wait
again after printing an error message.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I53b5d8e335b1d4a4e57abf2964c10d7cb1ef7783
Reviewed-on: http://review.whamcloud.com/4311
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoNew tag 2.3.0-rc5 2.3.0-RC5 v2_3_0_0_RC5 v2_3_0_RC5
Oleg Drokin [Fri, 19 Oct 2012 14:26:39 +0000 (10:26 -0400)]
New tag 2.3.0-rc5

Change-Id: Ie6a4d40d15e18cfb0805a47ce3979097aa80addc

11 years agoLU-2179 osc: truncate partial page correctly
Jinshan Xiong [Tue, 16 Oct 2012 19:35:40 +0000 (12:35 -0700)]
LU-2179 osc: truncate partial page correctly

Debug patch for osc_extent_wait() and don't wait for completion
of RPC it's not even sent in truncate.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I3bf3a5f9b3d1b552eee7e5eae33c8777847b942d
Reviewed-on: http://review.whamcloud.com/4295
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoNew tag 2.3.0-RC4 2.3.0-RC4 v2_3_0_0_RC4 v2_3_0_RC4
Oleg Drokin [Thu, 18 Oct 2012 02:50:25 +0000 (22:50 -0400)]
New tag 2.3.0-RC4

Change-Id: I560ae24f11119e7a06292b40a5918292ebe4c2fc
Signed-off-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2179 osc: truncate partial page correctly
Jinshan Xiong [Tue, 16 Oct 2012 19:35:40 +0000 (12:35 -0700)]
LU-2179 osc: truncate partial page correctly

If a partial page is being truncated, the corresponding osc extent
should be held until the truncate finished.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I4fde8b08754a50c86bb448aa5ac0e0ea8dba1d71
Reviewed-on: http://review.whamcloud.com/4281
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1749 llog: MDT should work if cancel llog failed with -ESTALE
Lai Siyao [Wed, 3 Oct 2012 05:14:12 +0000 (13:14 +0800)]
LU-1749 llog: MDT should work if cancel llog failed with -ESTALE

Cancel catlog may be stale, in this case MDT should continue to work.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I1934be855f9a1ad8d45750bd7e8330e81a888545
Reviewed-on: http://review.whamcloud.com/4163
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoNew tag 2.3.0-rc3 2.3.0-RC3 v2_3_0_0_RC3 v2_3_0_RC3
Oleg Drokin [Sat, 13 Oct 2012 19:34:31 +0000 (15:34 -0400)]
New tag 2.3.0-rc3

Change-Id: Idf690e5fa0aa618b07594b7fdf5eb1d66fc6af9c
Signed-off-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1833 util: don't update mtab if linked to /proc
Peng Tao [Wed, 5 Sep 2012 10:36:05 +0000 (18:36 +0800)]
LU-1833 util: don't update mtab if linked to /proc

Some distros may link /etc/mtab to /proc/mounts, or
/proc/self/mounts.  In such case, we don't need to
update mtab. Otherwise we false alart user with
"
mount.lustre: addmntent: Invalid argument:
"

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I2e3e213e4ee3bc177865c4ca7435a7eecd274b46
Reviewed-on: http://review.whamcloud.com/3881
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2163 lprocfs: fix jobstats initialization race
Andreas Dilger [Fri, 12 Oct 2012 21:23:13 +0000 (15:23 -0600)]
LU-2163 lprocfs: fix jobstats initialization race

If two threads are racing to add the same jobid into the job stats
list in lprocfs_job_stats_log(), one thread will lose the race from
cfs_hash_findadd_unique() and enter the "if (job != job2)" case.  It
could fail LASSERT(!cfs_list_empty(&job->js_list)) depending whether
the other thread in "else" added "job2" to the list first or not.

Simply locking the check for cfs_list_empty(&job->js_list) is not
sufficient to fix the race.  There would need to be locking over the
whole cfs_hash_findadd_unique() and cfs_list_add() calls, but since
ojs_lock is global for the whole OST this may have performance costs.

Instead, just remove the LASSERT() entirely, since it provides no
value, and the "losing" thread can happily use the job_stat struct
immediately since it was fully initialized in job_alloc().

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Iecb17e2dc80621fd388295998df5708bcaabcab0
Reviewed-on: http://review.whamcloud.com/4263
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2142 scrub: reset completed scrub position if retrigger
Fan Yong [Thu, 11 Oct 2012 11:19:28 +0000 (19:19 +0800)]
LU-2142 scrub: reset completed scrub position if retrigger

If former OI scrub has been completed, and the user wants to run
the OI scrub again, then reset the OI scrub to make it to rescan
the device from the beginning.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I9b067f50df81461702c7f3db0eadd2bf3ebf5699
Reviewed-on: http://review.whamcloud.com/4252
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2144 utils: reset 'optind' to avoid segmentation fault
Fan Yong [Thu, 11 Oct 2012 11:18:16 +0000 (19:18 +0800)]
LU-2144 utils: reset 'optind' to avoid segmentation fault

Sometimes lfsck_{start,stop} commands may be called several
times under the same lctl shell. Under such case, the function
getopt_long() called inside the lfsck_start/lfsck_stop may be
confused, and cause segmentation fault. So reset the external
variable 'optind' by force to avoid the segmentation fault.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I90c13226101af34948e45959b55752123e77fc9f
Reviewed-on: http://review.whamcloud.com/4251
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLustre 2.3.0-RC2 2.3.0-RC2 v2_3_0_0_RC2 v2_3_0_RC2
Oleg Drokin [Tue, 9 Oct 2012 03:26:36 +0000 (23:26 -0400)]
Lustre 2.3.0-RC2

Change-Id: Ifd2f0dfbc6cd5f56a4ec29564c403e1b42279d9f

11 years agoLU-2041 oi: keep oi mapping cache consistency
Fan Yong [Mon, 8 Oct 2012 07:35:55 +0000 (15:35 +0800)]
LU-2041 oi: keep oi mapping cache consistency

Sometimes the local ID of the per RPC thread OI mappig cache may be
changed, but the FID of such OI mapping cache has not been updated,
which will cause the RPC thread finds some unexpected object with
the given FID, should be fixed.

Move osd_device::osd_scrub::os_no_scrub to osd_device::od_noscrub.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: Idbc46cd70b136b7ffc2528331d5593fbac725900
Reviewed-on: http://review.whamcloud.com/4207
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1951 mdd: fix for error handler of mdd_rename
Liang Zhen [Fri, 5 Oct 2012 12:16:19 +0000 (20:16 +0800)]
LU-1951 mdd: fix for error handler of mdd_rename

If mdd_rename() failed to unlink target file/dir, it will try to
revert everything including insert target file/dir back into target
directory, but it didn't restore nlink count of target, which will
leave a file/dir under target directory with wrong nlink number.

Another thing is fixed by this patch is, mdd_attr_check_set_internal()
didn't release mdd_write_lock() while jumping to error handler.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I18776a8415933a1ce125f91a96deb11436057ec9
Reviewed-on: http://review.whamcloud.com/4197
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1898 test: new tests 8[a,b,c,d,e] need 2.3 or later
Bob Glossman [Thu, 13 Sep 2012 21:34:02 +0000 (14:34 -0700)]
LU-1898 test: new tests 8[a,b,c,d,e] need 2.3 or later

check lustre version to make sure tests do not run
on unsupported version

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I5b284af44a6132070b8e89659b7981844a74555e
Reviewed-on: http://review.whamcloud.com/3986
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1842 oi: handle failure cases for osd_oi_fini
Fan Yong [Mon, 8 Oct 2012 05:23:03 +0000 (13:23 +0800)]
LU-1842 oi: handle failure cases for osd_oi_fini

Sometimes the osd_oi_fini() may be called without osd_oi_init()
called firstly, or with osd_oi_init() failure. Under such cases,
the osd_device::od_oi_table may be invalid, so just skip related
OI cleanup.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I67156acbe235287e8fc98606b0449998ef6f9dd0
Reviewed-on: http://review.whamcloud.com/4218
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-2056 mdd: create transaction before lock object
Liang Zhen [Mon, 1 Oct 2012 16:10:35 +0000 (00:10 +0800)]
LU-2056 mdd: create transaction before lock object

OSD requires create transaction handle before lock the object,
however, mdd_close has a rare path can violate this rule.
This patch also did some code cleanup for mdd_close().

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I2610acdc7ac4bbf6f22a9714db96b08ee430a613
Reviewed-on: http://review.whamcloud.com/4152
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2040 tests: interop test failure on mds-survey
Bob Glossman [Fri, 28 Sep 2012 15:32:18 +0000 (08:32 -0700)]
LU-2040 tests: interop test failure on mds-survey

Add a version check to skip mds-survey in interop testing.
This is known to fail and should not block testing.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I4d1ef336cecf525d7df54816cb9731ec6c6edd91
Reviewed-on: http://review.whamcloud.com/4124
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
11 years agoLU-1870 utils: correctly handle mount of multipath devices
Gregoire Pichon [Mon, 10 Sep 2012 13:27:26 +0000 (15:27 +0200)]
LU-1870 utils: correctly handle mount of multipath devices

The mount.lustre command had lost the correct handling of multipath
devices. When one is specified, an entry is added into /etc/mtab
using the device name: /dev/mapper/mpathXX. This ensures unmount
works fine with such devices.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Change-Id: I9060be882af944967a8c4b6b1c4403ea9250ad55
Reviewed-on: http://review.whamcloud.com/3922
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-2024 tests: skip OI scrub tests until the tag 2.2.90
Fan Yong [Tue, 25 Sep 2012 08:46:19 +0000 (16:46 +0800)]
LU-2024 tests: skip OI scrub tests until the tag 2.2.90

Do not trigger OI scrub related tests on old releases.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I9a4289b03ee8e222329b69891bb901fff9fbc86d
Reviewed-on: http://review.whamcloud.com/4089
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 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>
11 years agoLU-1753 test: use large resend count for 118i in sanity
Hongchao Zhang [Fri, 21 Sep 2012 23:16:33 +0000 (07:16 +0800)]
LU-1753 test: use large resend count for 118i in sanity

in sanity.sh, the subtest 118i will fail if the resend count
of OSC is small for 'SLOW=no' case (it's 4, default is 10).

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: I3c49628ed259e7adbff4a100d482e693502bf99d
Reviewed-on: http://review.whamcloud.com/4071
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1867 tests: replay-single test_89: @@ FAIL: 4 blocks leaked
yangsheng [Sat, 29 Sep 2012 09:18:53 +0000 (17:18 +0800)]
LU-1867 tests: replay-single test_89: @@ FAIL: 4 blocks leaked

The config llog data will changed while OST remount. It may
impact 'df' output. So we should allow extra one block size
different(4k).

Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: I663685d55a5a31af48d541e08e9e97fed2b8e25c
Reviewed-on: http://review.whamcloud.com/4130
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-2053 crypto: Fix cfs_crypto_hash memleak
Oleg Drokin [Sat, 29 Sep 2012 20:15:40 +0000 (16:15 -0400)]
LU-2053 crypto: Fix cfs_crypto_hash memleak

Commit 353e3c2f8d9f195c0f87a16259f22b2f84de11d4 that introduced cryptoapi
support to Lustre is allocating a hdesc in cfs_crypto_hash_init and never
freeing it.
This function is called every time a checksum needs to be calculated,
so on every bulk RPC send or receive, so even though allocations are small,
they tend to still quickly consume all available memory with any significant
amount of IO.

Change-Id: Ic654c6102ea4306a81c1f7592c81cfb6e597f1f2
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4135
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com>
11 years agoLustre 2.3.0-RC1 2.3.0-RC1 v2_3_0_0_RC1 v2_3_0_RC1
Oleg Drokin [Sat, 22 Sep 2012 04:21:43 +0000 (00:21 -0400)]
Lustre 2.3.0-RC1

Change-Id: I568811eefd7f414f7a589de4278e2bdf2ff0ce0f
Signed-off-by: Oleg Drokin <green@whamcloud.com>
11 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>
11 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>
11 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>
11 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>
11 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>
11 years agoLU-1839 build: Update Whamcloud copyright messages to Intel
Keith Mannthey [Tue, 18 Sep 2012 02:23:32 +0000 (19:23 -0700)]
LU-1839 build: Update Whamcloud copyright messages to Intel

Mass update from new updatecw.sh tool plus two manual edits.
Part2/2

Signed-off-by: Keith Mannthey <keith@whamcloud.com>
Change-Id: I339f867d0032394ca1aaafd2e30f5f5aa392e1b6
Reviewed-on: http://review.whamcloud.com/4017
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1839 build: Update Whamcloud copyright messages to Intel
Keith Mannthey [Tue, 18 Sep 2012 02:23:14 +0000 (19:23 -0700)]
LU-1839 build: Update Whamcloud copyright messages to Intel

Mass update from new updatecw.sh tool plus two manual edits.
Part1/2

Signed-off-by: Keith Mannthey <keith@whamcloud.com>
Change-Id: Ia3031d7233bc524465e252f22c4013b8ecbf437c
Reviewed-on: http://review.whamcloud.com/4016
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1864 osd-zfs: Use the correct lu_site in arc_prune_func()
Li Wei [Fri, 14 Sep 2012 02:23:31 +0000 (10:23 +0800)]
LU-1864 osd-zfs: Use the correct lu_site in arc_prune_func()

arc_prune_func() purges osd_device::od_site.  While this is correct on
orion and master, b2_3 does not initialize or use osd_device::od_site
at all.  This patch changes arc_prune_func() to use the correct
lu_site from osd_device::...::ld_site, which points to
ofd_device::ofd_site.

Change-Id: I2344886fd9bd5f6166907489c772f93a717ed5ad
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/3988
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
11 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>
11 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>
11 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>
11 years agoLU-1757 brw: added OBD short io connect flag
Alexander.Boyko [Mon, 17 Sep 2012 09:26:01 +0000 (13:26 +0400)]
LU-1757 brw: added OBD short io connect flag

To prevent collisions with any future flags needed in features written
against this branch.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Change-Id: I797ca7d9ac66c4932d8b6e8a85ced9c271fda076
Reviewed-on: http://review.whamcloud.com/3890
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 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>
11 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>
11 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>
11 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>
11 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>
11 years agoNew tag 2.2.96 2.2.96 v2_2_96 v2_2_96_0
Oleg Drokin [Thu, 13 Sep 2012 18:40:47 +0000 (14:40 -0400)]
New tag 2.2.96

Change-Id: I89d3bbd5b1a5cc1fa04d7f36f509e3031eab3005
Signed-off-by: Oleg Drokin <green@whamcloud.com>
11 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>
11 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>
11 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>
11 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>
11 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>
11 years agoNew tag 2.2.95 2.2.95 v2_2_95 v2_2_95_0
Oleg Drokin [Thu, 13 Sep 2012 05:15:20 +0000 (01:15 -0400)]
New tag 2.2.95

Change-Id: I11727a711cc188952112c08ca1b9796a2d623d4d
Signed-off-by: Oleg Drokin <green@whamcloud.com>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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/3851
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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/3793
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 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>
11 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>
11 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>
11 years agoLU-1592 ldlm: protect obd_export:exp_imp_reverse's change
Bobi Jam [Thu, 16 Aug 2012 07:52:09 +0000 (15:52 +0800)]
LU-1592 ldlm: protect obd_export:exp_imp_reverse's change

* Protect obd_export::exp_imp_reverse from reconnect and destroy race.
* Add an assertion in class_import_put() to catch race in the first
  place.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: If0abf6717456931c567d8d41c1d20fe49452e959
Reviewed-on: http://review.whamcloud.com/3684
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1693 obdfilter: Set bi_rw before calling bio_add_page()
John L. Hammond [Tue, 31 Jul 2012 21:51:24 +0000 (16:51 -0500)]
LU-1693 obdfilter: Set bi_rw before calling bio_add_page()

In filter_do_bio() and osd_do_io() set bi_rw before calling
bio_add_page() so that the correct bio direction is used in
mgrge_bvec_fn().

Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Change-Id: Ife34d5d89337ea7fea41b5844fd724211b05c670
Reviewed-on: http://review.whamcloud.com/3501
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1518 mdd: Fixup mdd_{obf,dot_lustre}_obj_ops.
John L. Hammond [Wed, 13 Jun 2012 16:20:12 +0000 (11:20 -0500)]
LU-1518 mdd: Fixup mdd_{obf,dot_lustre}_obj_ops.

Define several missing md_object ops for .lustre/fid.  Unify
attribute handling for .lustre with that of normal md_objects.

Fixed several defects:
- use parent ops instead of child ops in mdo_create();
- skip version get for obf in mdt_obj_version_get();
- disable non-normal fid lookup in obf_lookup();

Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Signed-off-by: Bob Glossman <bogl@whamcloud.com>
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I89c5b37c822680b0ad1e23372e3e2be464f6a3d8
Reviewed-on: http://review.whamcloud.com/3726
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1512 oi: reuse idle OI blocks
Fan Yong [Thu, 23 Aug 2012 15:41:51 +0000 (23:41 +0800)]
LU-1512 oi: reuse idle OI blocks

With the system running, some OI blocks may become empty because
related files have been removed. Originally, these empty blocks
almost cannot be reused beause it always allocates new block for
new leaf or index node. Such space waste is an important reason
for the OI file size increasing quickly.

Now, when the non-released OI leaf node becomes empty, it will be
recycled into a per-OI based idle blocks pool, which is organized
as a series of tables. For each table, the on-disk format is:

+---------+---------+---------+---------+------+---------+-------+
|  magic  |  count  |  next   |  logic  |      |  logic  | free  |
|(16 bits)|(16 bits)|  table  |  blk #  | .... |  blk #  | space |
|         |         |(32 bits)|(32 bits)|      |(32 bits)|       |
+---------+---------+---------+---------+------+---------+-------+

The logic blk# for the first table is stored as "idle_blocks" in
the OI root node. In fact, there is padding field in the OI root
node after the "dx_countlimit". We will append the "idle_blocks"
just after the "dx_countlimit" to reuse part of the padding. So
it will not cause compatibility issues with old OI files.

Adjust the strategy for OI file block allocation: reuse empty block
in its idle blocks pool with priority; if such pool is empty, then
allocate new block from system volume.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I1bccc1cd9a4e1a16e4f51ac18e6b995ec85a0cf8
Reviewed-on: http://review.whamcloud.com/3153
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1786 build: Fix build for crc32 pclmulqdq
Alexander.Boyko [Tue, 28 Aug 2012 07:38:31 +0000 (11:38 +0400)]
LU-1786 build: Fix build for crc32 pclmulqdq

Old versions of gcc don`t know pextrd instruction. User mode
libcfs build had wrong dependency with ARCH variable defined.
PEXTRD marco was added for old gcc, wrong dependency was fixed.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Change-Id: I8821a1c25367f0f284a80192ed65d89808d1b2da
Reviewed-on: http://review.whamcloud.com/3801
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agonew tag 2.2.94 2.2.94 v2_2_94 v2_2_94_0
Oleg Drokin [Tue, 28 Aug 2012 00:40:22 +0000 (20:40 -0400)]
new tag 2.2.94

Change-Id: I082d01817b95c75ab8fd87a483620b0d25aabc7d
Signed-off-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1579 osd: reserve credits for set version
Niu Yawei [Fri, 29 Jun 2012 07:08:02 +0000 (03:08 -0400)]
LU-1579 osd: reserve credits for set version

In current osd_declare_xattr_set(), we assume that version change is
always accompanied with inode changes, so we don't reserve extra
credits for the setting verison.

However, in the new quota design, we may issue a sole version change
without any other updates. I think osd_declare_xattr_set() should not
make assumption on the caller's behavior and reserve at least 1 block
for version change.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I77a13173eea8007b5300155e0d726bd82ace8ede
Reviewed-on: http://review.whamcloud.com/3242
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
11 years agoLU-1769 ofd: Add a fault injection for EINPROGRESS
Minh Diep [Thu, 23 Aug 2012 14:42:40 +0000 (07:42 -0700)]
LU-1769 ofd: Add a fault injection for EINPROGRESS

Add OBD_FAIL_OST_DQACQ_NET case for fault injection
for EINPROGRESS

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I902a527af96af19b417e232d0e9d52c4b625e8eb
Reviewed-on: http://review.whamcloud.com/3763
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1661 tests: improve setup_posix_users()
Yu Jian [Fri, 24 Aug 2012 13:19:41 +0000 (21:19 +0800)]
LU-1661 tests: improve setup_posix_users()

This patch improves setup_posix_users() in posix.cfg to use
do_rpc_nodes to add groups and users on remote nodes,
so as to simplify add_group() and add_user() and make them
become common functions to be used by other test scripts.

Test-Parameters: clientdistro=el5 testlist=posix
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Ie07f32dffe7d7ae2037d92bab372977efff2e5fe
Reviewed-on: http://review.whamcloud.com/3770
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1716 ptlrpc: Race in updating of connection flags on client.
Andriy Skulysh [Sat, 25 Aug 2012 15:14:13 +0000 (18:14 +0300)]
LU-1716 ptlrpc: Race in updating of connection flags on client.

Update obd_connect_data before setting import to FULL state

Xyratex-bug-id: MRP-577
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com>
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Change-Id: I4818c65bcc2fb8ee847921924fa1ca2469f79b9f
Reviewed-on: http://review.whamcloud.com/3555
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1762 tests: get correct MMP update and check intervals
Yu Jian [Wed, 22 Aug 2012 04:04:44 +0000 (12:04 +0800)]
LU-1762 tests: get correct MMP update and check intervals

This patch fixes the get_mmp_update_interval() and
get_mmp_check_interval() in mmp.sh to get the correct
MMP update and check intervals from both the old and
new outputs of debugfs.

The patch also improves test_8() to increase the running
time of e2fsck to allow mount operation to be started
before e2fsck operation stops.

Test-Parameters: testlist=mmp
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I47a8759c97bf09a73a6bc4ed7a03ff0929c7127f
Reviewed-on: http://review.whamcloud.com/3743
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
11 years agoLU-1773 lov: lov_delete_raid0() need heed lov_fini_raid0()
Bobi Jam [Tue, 21 Aug 2012 02:42:51 +0000 (10:42 +0800)]
LU-1773 lov: lov_delete_raid0() need heed lov_fini_raid0()

Add a sanity test case and handle failure of lov_init_raid0()
correctly.

LU-1480 is also due to the failure of lov_init_raid0().

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: If900cb854846f778c74d0368d64cb7a9d5189406
Reviewed-on: http://review.whamcloud.com/3732
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>
11 years agoLU-1014 mountconf: MGS update timeout upon config update
James Simmons [Mon, 30 Jul 2012 12:03:44 +0000 (08:03 -0400)]
LU-1014 mountconf: MGS update timeout upon config update

MGS should update obd/ldlm_timeout upon MDS/OST config update. It
will be the largest value of all servers.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: Ia0786475fa5608e06f8c2606f87f98192a870df5
Reviewed-on: http://review.whamcloud.com/2881
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-657 obdfilter: fix bug in previous patch
Hongchao Zhang [Mon, 20 Aug 2012 07:40:48 +0000 (15:40 +0800)]
LU-657 obdfilter: fix bug in previous patch

in the merged patch http://review.whamcloud.com/#change,3446,
the usage of fsfilt_commit_wait is wrong, and it doesn't stop
the journal firstly.

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: I3a36edf7049466880c27c14bb7f99966aa75d4f1
Reviewed-on: http://review.whamcloud.com/3692
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>
11 years agoLU-1410 test: Allow sanity test 200 to work with one OST
Keith Mannthey [Tue, 21 Aug 2012 01:43:37 +0000 (18:43 -0700)]
LU-1410 test: Allow sanity test 200 to work with one OST

The sanity test is failing test 200 with one OST. When
the test adds machines to the pool it is not passing
valid arguments.

Changing first_ost=0 is allowing the test to run.

Signed-off-by:Keith Mannthey <keith@whamcloud.com>
Change-Id: I45aef14e7814f170024c71f904b888423d8f8c90
Reviewed-on: http://review.whamcloud.com/3730
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1721 ptlrpc: AT race in drop request
Liang Zhen [Wed, 8 Aug 2012 08:12:03 +0000 (16:12 +0800)]
LU-1721 ptlrpc: AT race in drop request

It's introduced in by commit 07b8db220e48782369f48d86213c5d404a628ded
which makes ptlrpc_server_drop_request() not to hold at_lock for
checking req::rq_at_linked.
This change might race with ptlrpc_at_check_timed() if:

1) thread-1: call ptlrpc_at_check_timed() and remove the request from
   paa_reqs_array, before it set req::rq_at_linked to zero...
2) thread-2: call ptlrpc_server_drop_request() to release the last
   refcount, and it found req::rq_at_linked is non-zero, so it
   entered the condition "if (req->rq_at_linked) {...}"
3) thread-1: set req::rq_at_linked to zero
4) thread-2: take at_lock, and hit the assetion
   LASSERT(!cfs_list_empty(&req->rq_timed_list)) because thread-1 has
   already removed req::rq_at_linked from paa_reqs_array in step 1)

This patch fixed this issue and did some code cleanup.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: If4469637a5f9d63c9253a9f4c4cac0bcd7f8b46e
Reviewed-on: http://review.whamcloud.com/3564
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1763 test: enable jobstats by default
Niu Yawei [Mon, 20 Aug 2012 05:52:11 +0000 (01:52 -0400)]
LU-1763 test: enable jobstats by default

Enable jobstats in the auto-test by default.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I03bd22b144f4372922c6dc67511d09a91d17b8e4
Reviewed-on: http://review.whamcloud.com/3718
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1735 ptlrpc: only set jobid if not already set
Andreas Dilger [Fri, 10 Aug 2012 22:24:00 +0000 (16:24 -0600)]
LU-1735 ptlrpc: only set jobid if not already set

The ptlrpc_set_add_req->lustre_get_jobid->cfs_access_process_vm()
callpath locks mm->mmap_sem to fetch environment variables, but if
this could deadlock in case of MMAP IO, which also holds mmap_sem.
If the mmap_sem is already held for write, just don't set the jobid.
This will make jobid stats inconsistent for mmap IO, but avoids a
lot of complexity or race conditions in the code otherwise.

If the caller already has fetched the jobid and saved it for this
inode in the OSC layer, so we don't need to fetch and reset the
pd_jobid field at all in this case.  This avoids doing extra work
to fetch the jobid if it is not needed, and avoids storing it
temporarily on the stack when it won't be used.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I22c3d5c1755c1d6aab666a769df38218b954650a
Reviewed-on: http://review.whamcloud.com/3604
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1754 kernel: Kernel update [RHEL 6.3 2.6.32-279.5.1.el6]
yangsheng [Thu, 16 Aug 2012 03:32:27 +0000 (11:32 +0800)]
LU-1754 kernel: Kernel update [RHEL 6.3 2.6.32-279.5.1.el6]

Update RHEL6.3 kernel to 2.6.32-279.5.1.el6.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I82ddff59f801fce2335583516470297a4664bedc
Reviewed-on: http://review.whamcloud.com/3683
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1644 mgs: swab nidtbl entries for 2.2 clients
Jinshan Xiong [Mon, 6 Aug 2012 23:30:24 +0000 (16:30 -0700)]
LU-1644 mgs: swab nidtbl entries for 2.2 clients

LU-1252 is missed in 2.2 release so it caused a problem that 2.2
clients always swab nidtbl entries even if the server and client
are using the same endian.  Conversely, 2.3 clients would not
swab the nidtbl entries but the 2.2 server would always swab.

To make it work, 2.3 adds a temporary OBD_CONNECT_MNE_SWAB flag,
which will cause the server to swab the nidtbl entries for 2.2
clients, and 2.3 clients will undo the swab done by 2.2 servers
if the MNE_SWAB flag is not set.  This avoids problems with only
checking the client/server version, in case the LU-1252 fix is
ever applied to a 2.2 client or server build.

This workaround is set to auto-expire for 2.5.50+ clients and
servers, which is a reasonable upper limit for interoperability
with old unpatched 2.2 clients in a mixed-endian environment.
This is enough for 2.2.0 clients/servers to work with the 2.5.x
feature releases, after which the OBD_CONNECT flag can be reused.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Id316f7e1c7ee2b2c1d1077e8c5dd916edca04d84
Reviewed-on: http://review.whamcloud.com/3548
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1581 utils: mkfs warn about missing --index
Andreas Dilger [Thu, 16 Aug 2012 22:17:10 +0000 (16:17 -0600)]
LU-1581 utils: mkfs warn about missing --index

Using the --index option to mkfs.lustre is standard practice, and is
documented as required in the Lustre manual.  Add a warning for mkfs
usage in the 2.3 release, so that users with formatting scripts/tools
can be notified of this change in advance of the hard requirement in
Lustre 2.4.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I1f481a334163af1033da5296f9e71fb3b4cee07e
Reviewed-on: http://review.whamcloud.com/3703
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1540 osd: add NUL terminator for long symlink
Bobi Jam [Wed, 8 Aug 2012 05:23:42 +0000 (13:23 +0800)]
LU-1540 osd: add NUL terminator for long symlink

Add NUL terminator for long symlink to ldiskfs inode on-disk data.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Id7ce7829ec9b4c8eb72cf257df046a5288a5eb7b
Reviewed-on: http://review.whamcloud.com/3560
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-957 scrub: disable OI Scrub for osd-zfs
Jinshan Xiong [Fri, 10 Aug 2012 03:59:02 +0000 (20:59 -0700)]
LU-957 scrub: disable OI Scrub for osd-zfs

ZFS is not supported by OI Scrub.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I7a2f90298f37edab870edf28008a1a140260c99b
Reviewed-on: http://review.whamcloud.com/3594
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1608 utils: require --fsname for mkfs.lustre
Andreas Dilger [Fri, 6 Jul 2012 19:41:46 +0000 (13:41 -0600)]
LU-1608 utils: require --fsname for mkfs.lustre

When formatting a filesystem, require that fsname is specified to
mkfs.lustre so that users have to think about this a bit.  In some
cases, two filesystems at the same site have used the same default
filesystem name, and this later caused problems when trying to mount
both filesystems on the same node.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I15a5ebb8d7d3afc6037587961e94dc66426bcf5d
Reviewed-on: http://review.whamcloud.com/3297
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1668 tests: fix for conf-sanity 53_a & 53_b
Liang Zhen [Fri, 10 Aug 2012 04:35:32 +0000 (12:35 +0800)]
LU-1668 tests: fix for conf-sanity 53_a & 53_b

conf-sanity 53_a & 53_b are using local cpt number as increment or
decrement of threads number which is wrong, they should use cpt
number from target server.

Test-Parameters: nettype=o2ib
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Ief25ecfefc291decd6e72067b1363942a5871f81
Reviewed-on: http://review.whamcloud.com/3595
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: James Simmons <uja.ornl@gmail.com>
11 years agoLU-1461 build: asm/cpufeature.h is only available on x86
Oleg Drokin [Wed, 1 Aug 2012 19:22:41 +0000 (15:22 -0400)]
LU-1461 build: asm/cpufeature.h is only available on x86

Only include it if ARCH_X86 is defined.

Change-Id: I6af260d6d753853c015885f33892b789948f1cff
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/3510
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com>