Whamcloud - gitweb
fs/lustre-release.git
8 years agoLU-911 osd: OI is implemented internally within OSD
Alex Zhuravlev [Mon, 12 Dec 2011 16:16:19 +0000 (19:16 +0300)]
LU-911 osd: OI is implemented internally within OSD

previously lu infrastructure was used and it was impossible
to initialize OI without MDD (which is the case of OST).
instead ldiskfs osd use ldiskfs directly.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Iaca243959dbb83bbbe81145b2ceaaa97f95be70c
Reviewed-on: http://review.whamcloud.com/1835
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-911 osd: zerocopy methods in ldiskfs osd
Alex Zhuravlev [Wed, 23 Nov 2011 07:55:07 +0000 (10:55 +0300)]
LU-911 osd: zerocopy methods in ldiskfs osd

add implementation for zerooopy methods to manipulate data:
grab/release buffers, prepare them for read/write, commit
modified buffers, truncate

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ied662c7c837bb25b71587b69096bc12fe002d115
Reviewed-on: http://review.whamcloud.com/1834
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-958 tests: debug_mb set incorrectly for smp or vm
Denis Kondratenko [Tue, 27 Mar 2012 07:47:51 +0000 (10:47 +0300)]
LU-958 tests: debug_mb set incorrectly for smp or vm

For cpus with number of cores or for some VMs,
number of possible CPUs in the system could
be greater than number of cpu reported by getconf.
Added check for maximum debug buffer size.
Added check that "possible" is exist, if not - use old method.

Xyratex-bug-id: MRP-219 incorrect settings for debug_mb
Signed-off-by: Denis Kondratenko <Denis_Kondratenko@xyratex.com>
Change-Id: I1ea367d1b956ae1009c4a501e0f02b6c9209a2f7
Reviewed-on: http://review.whamcloud.com/2377
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1225 utils: Change %llu to LPU64
Christopher J. Morrone [Fri, 16 Mar 2012 03:12:09 +0000 (20:12 -0700)]
LU-1225 utils: Change %llu to LPU64

%llu in printf should be LPU64 to allow compilation on ppc64.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: Ia0a6adf4220e19802164e6567f3d0c5a24875fe2
Reviewed-on: http://review.whamcloud.com/2338
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1092 ptlrpc: take export refcount during connect
Lai Siyao [Mon, 19 Mar 2012 08:41:54 +0000 (16:41 +0800)]
LU-1092 ptlrpc: take export refcount during connect

In the process of (re)connect,  a refcount of export should be taken,
otherwise disconnect of this export may be called, and it will put
the last refcount of this export and make access to this export
invalid.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: Iaf27e842ed516b8968c90bfce396609e39f52c85
Reviewed-on: http://review.whamcloud.com/2345
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-709 build: clean up four macros in lustre-core.m4
Peng Tao [Sun, 22 Jan 2012 23:58:14 +0000 (07:58 +0800)]
LU-709 build: clean up four macros in lustre-core.m4

1. truncate_inode_pages_range() was added since v2.6.15
2. HAVE_RELEASEPAGE_WITH_GFP is not used
3. HAVE_STATFS_NAMELEN is not used
4. HAVE_D_ADD_UNIQUE is not used

Signed-off-by: Peng Tao <peng_tao@emc.com>
Change-Id: I6864d0f18c14f5087b2d1a0c20fcf14f92d7246f
Reviewed-on: http://review.whamcloud.com/2313
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-911 osd: minor code reorganization
Alex Zhuravlev [Wed, 23 Nov 2011 07:48:03 +0000 (10:48 +0300)]
LU-911 osd: minor code reorganization

to make structures and helpers usable outside of osd_handler.c
in other files (within ldiskfs osd)

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I1b421a0a6ad148dea0e453d8b01942fe63cf1397
Reviewed-on: http://review.whamcloud.com/1833
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoLU-1218 proc: Recovery timer in proc always displays 0
yangsheng [Thu, 15 Mar 2012 16:18:29 +0000 (00:18 +0800)]
LU-1218 proc: Recovery timer in proc always displays 0

Calculate remain recovery time for proc display.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I50c14859c704c7e2bc60b66b3d70350648feebb6
Reviewed-on: http://review.whamcloud.com/2334
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1222 ldlm: Fix the race in AST sender vs multiple arriving RPCs
Oleg Drokin [Tue, 20 Mar 2012 03:43:37 +0000 (23:43 -0400)]
LU-1222 ldlm: Fix the race in AST sender vs multiple arriving RPCs

LU-1046 tried to close this race, but still left a bit of a window open.
Basically when two last RPCs arrive one of them is declared as "last"
and it is the one that would release "rpc" part of the arg refcount.
The problem is the "non last" rpc might actually finish processing later.

To combat this every RPC will now hold its own arg reference.

Change-Id: I0d1e69dc6ea37224422d4c7822bb1e6b9417585b
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2350
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
8 years agoLU-1081 fid: define special FID for BFL
wangdi [Wed, 22 Feb 2012 18:44:35 +0000 (10:44 -0800)]
LU-1081 fid: define special FID for BFL

The sequence of LUSTRE_BFL_FID is in conflict with
FID_SEQ_OST_MDT1, so reserve a new sequence for this FID.

Also it defines a new FID sequence(FID_SEQ_SPECIAL) for
later special purpose.

Move some special dot_lustre oid to lustre_idl.h, so avoid
oid conflict in future.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I556b31c706cc04c610c909f83e59f0cb9a821535
Reviewed-on: http://review.whamcloud.com/2180
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-981 llite: fix loop back device writeback
Jinshan Xiong [Wed, 25 Jan 2012 07:13:26 +0000 (23:13 -0800)]
LU-981 llite: fix loop back device writeback

In vvp_mmap_locks(), we should distinguish if the write is from
loopback device, and to not try to find mmap region in this case.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I4409e460b77576e07e279200ccc69f62cc48ad0f
Reviewed-on: http://review.whamcloud.com/2010
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1212 ptlrpc: ptlrpc_grow_req_bufs is racy
Liang Zhen [Wed, 14 Mar 2012 04:41:08 +0000 (12:41 +0800)]
LU-1212 ptlrpc: ptlrpc_grow_req_bufs is racy

multiple ptlrpc service threads can enter ptlrpc_grow_req_bufs()
the same time if they found "low_water" in ptlrpc_check_rqbd_pool(),
each of these threads will allocate ptlrpc_service::srv_nbuf_per_group
request buffers and could consume all memory.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I83d6fe53a0f86691ae7e2afb3d75fb8677f58688
Reviewed-on: http://review.whamcloud.com/2308
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
8 years agoLU-1206: mdt: Fix error handling in mdt_mfd_open
Oleg Drokin [Thu, 15 Mar 2012 00:56:02 +0000 (20:56 -0400)]
LU-1206: mdt: Fix error handling in mdt_mfd_open

In mdt_mfd_open if the mo_open() call failed or we could not allocate
mfd, we also need to undo write/exec reference count in order to
not mess up with subsequent exec/write accesses.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Change-Id: I3bd98bd68368b48f2afaa7bb450d3a9947c992ac
Reviewed-on: http://review.whamcloud.com/2300
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-827 lov: Implement a per file data_version.
Aurelien Degremont [Tue, 10 Jan 2012 14:27:33 +0000 (15:27 +0100)]
LU-827 lov: Implement a per file data_version.

This patch extends getattr RPC to also send in its reply a data
version for the file content.  This only tracks data object changes.
This does not track chown/chmod on OST object.  This value is intended
to be only compared for equality.  A new call in liblustreapi is
available and through 'lfs data_version'.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I5d748e096b11627c05f86ef6f3f6906bce120893
Reviewed-on: http://review.whamcloud.com/1671
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1070 agl: update lock state when AGL upcall
Fan Yong [Mon, 20 Feb 2012 10:37:36 +0000 (18:37 +0800)]
LU-1070 agl: update lock state when AGL upcall

The AGL RPC sponsor may exits the cl_lock processing without
wait() called before related OSC lock upcall(). So when AGL
upcall(), it needs to update the cl_lock state according to
the enqueue result through the general cl_lock API wait().

Originally, it is done in "lov_lock_unuse()" against toplock.
But osc_lock upcall() is against sublock. So the sublock state
may be un-updated and inconsistent with the low layer osc_lock
state, then causes the sublock cannot be cached.

On the other hand, cl_lock::cll_descr::cld_enq_flags should not be
changed during unuse() for passing parameter, as the replacement,
it can be done through cl_lock::cll_flags.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I4bc4c0ef0b93d5e0c2e59304158a35c57635ad70
Reviewed-on: http://review.whamcloud.com/2099
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-734 tests: add sub-tests into recovery-*-scale tests
Yu Jian [Wed, 7 Mar 2012 14:45:27 +0000 (22:45 +0800)]
LU-734 tests: add sub-tests into recovery-*-scale tests

This patch adds sub-tests into the recovery-*-scale tests
so that test results and logs could be gathered properly
and uploaded to Maloo.

The patch also does some cleanup works on the test scripts
and moves some common functions into test-framework.sh.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I2c23b641e62a56882171982b8a3157ba023ea36c
Reviewed-on: http://review.whamcloud.com/2265
Tested-by: Hudson
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-969 debug: reduce stack usage
Hongchao Zhang [Mon, 12 Mar 2012 08:11:47 +0000 (16:11 +0800)]
LU-969 debug: reduce stack usage

1, libcfs_debug_vmsg2 to accept libcfs_debug_msg_data struture
   to replace SUBSYSTEM, __FILE__, __FUNCTION__, __LINE__ and
   cdls on the stack

2, CDEBUG, DEBUG_CAPA use static libcfs_debug_msg_data

3, remove the local variable in RETURN/GOTO/__CHECK_STACK

4, reduce stack in recovery thread by moving lu_env,
   ptlrpc_thread to heap.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: I4a66d18d956ea4526ac85794d17305bde67f5634
Reviewed-on: http://review.whamcloud.com/2162
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1082 test: create test for mds-survey
Minh Diep [Mon, 12 Mar 2012 17:17:19 +0000 (10:17 -0700)]
LU-1082 test: create test for mds-survey

Create a mds-survey.sh test with two test cases
1. test without stripe count
2. test with stripe count
Create test_224[a|b] for quick run on metadata survey

Notice, we remove all clients before testing
because the real client and echo_client share
the same client object memory

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I453ac34d8b6019e109be5d89d482300d31571f93
Reviewed-on: http://review.whamcloud.com/2156
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1198 idl: move FID VER to DLM resource name[1]
Andreas Dilger [Thu, 8 Mar 2012 07:29:09 +0000 (15:29 +0800)]
LU-1198 idl: move FID VER to DLM resource name[1]

Until Lustre 1.8.7/2.1.1 the FID version was packed into name[2].

However, this leaves very little room in the LDLM resource name
for other uses.  The upcoming quota code needs to store another
FID into the LDLM resource to allow directory tree quotas, and
managed by the DLM.

The 32-bit VER, which is currently always 0, is moved into the high
bits of name[1] along with the 32-bit OID, to avoid consuming the
name[2] field.  Since future use of the FID version (including
snapshots, pools, etc) will need changes on the client side anyway,
there will never be non-zero VER on an existing client.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: If1e500cfb277dfc25bc056bb0c5763e48e7dccdf
Reviewed-on: http://review.whamcloud.com/2271
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1190 test: Test failure on sanity, subtest test_51c.
yangsheng [Thu, 8 Mar 2012 03:08:45 +0000 (11:08 +0800)]
LU-1190 test: Test failure on sanity, subtest test_51c.

Since LU-993 already add test_51ba for rmdir test, So remove test_51c.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: Ib517f83964a877b687a332c7e1ff7a74c79836b6
Reviewed-on: http://review.whamcloud.com/2269
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-734 tests: save recovery-*-scale debug logs into $LOGDIR
Yu Jian [Mon, 5 Mar 2012 08:08:53 +0000 (16:08 +0800)]
LU-734 tests: save recovery-*-scale debug logs into $LOGDIR

This patch changes the specific debug log names of
recovery-*-scale tests and saves them into $LOGDIR.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Id1ad7dd3dde41bd49a53986945d15d80f91718e5
Reviewed-on: http://review.whamcloud.com/2261
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1195 llite: error handling for statahead/AGL start failure
Fan Yong [Thu, 8 Mar 2012 02:47:07 +0000 (10:47 +0800)]
LU-1195 llite: error handling for statahead/AGL start failure

Statahead/AGL status will be checked when release ll_statahead_info.
But if some reasons cause statahead/AGL cannot be started, then the
status are undefined. So need proper error handling for such failure
cases.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I4dec58862ad425c19e9c6284b7183b8bcaa449f6
Reviewed-on: http://review.whamcloud.com/2268
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1155 obdecho: Oops if target device can not be found.
wangdi [Thu, 1 Mar 2012 00:32:23 +0000 (16:32 -0800)]
LU-1155 obdecho: Oops if target device can not be found.

Missing setting error value if target device can not be found,
which will cause Oops in some cases.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I5fc7cd376c8c7c276739692c7234ae142b4f6e23
Reviewed-on: http://review.whamcloud.com/2229
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoMaster is now for upcoming 2.3.0 release 2.2.50 v2_2_50_0
Oleg Drokin [Tue, 6 Mar 2012 07:54:03 +0000 (02:54 -0500)]
Master is now for upcoming 2.3.0 release

Updates changelog and lustre version.
New tag 2.2.50

Signed-off-by: Oleg Drokin <green@whamcloud.com>
Change-Id: I8bbe086bbc8a579749eb7554b902dd83ca5670d0

8 years agoLU-445 lnet: Send timestamps with LNet counters
Wally Wang [Wed, 22 Jun 2011 17:53:03 +0000 (10:53 -0700)]
LU-445 lnet: Send timestamps with LNet counters

We use a millisecond timer on a per-session basis. Each node then
sends the milliseconds since session start over with the LNet
counters. With 32bits and millisecond resolution, this should
allow ~49 days of session age before the timers would wrap.

This will change the wire attribute and not backward compatible.

Change-Id: I0dc6498d187ccc900b86d21b0460e1d419770033
Signed-off-by: Wally Wang <wang@cray.com>
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1000
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: <bruce.korb@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
8 years agoLU-1128 ldlm: return -1 for server pool shrinker
Niu Yawei [Fri, 24 Feb 2012 05:21:51 +0000 (21:21 -0800)]
LU-1128 ldlm: return -1 for server pool shrinker

For ldlm server pool shrinker, we just use it to decrease SLV,
but never reclaim any memory directly, so it should always return
-1 to inform the kernel to break the shrink loop.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I17f51ac84eb0b8c70b2cee9ac7eeca34647c1990
Reviewed-on: http://review.whamcloud.com/2184
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-983 llite: align readahead to 1M after ra_max adjustment
wangdi [Fri, 20 Jan 2012 20:30:37 +0000 (12:30 -0800)]
LU-983 llite: align readahead to 1M after ra_max adjustment

1. Align the readahead pages only if ria_start != 0, otherwise
   the readahead pages will be cut to zero.
2. Add test_101e to verify small reads for small size files.
   Add test_101f to verify max_read_ahead_whole_mb.
3. Port 101c from b1_8

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: Ia22434a5d546aa1154f6067c7db84743c4ff5a96
Reviewed-on: http://review.whamcloud.com/1998
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-164 test: Update testframework to restart sessions at next suite
Chris Gearing [Mon, 27 Feb 2012 10:59:26 +0000 (10:59 +0000)]
LU-164 test: Update testframework to restart sessions at next suite

Update the test framework so that it can append to yaml files rather
than begin a new series and allow auster to begin at a selected
test_suite.

auster has a new switch '-S suite-name' which allows the caller to
start a test group part way through.

The idea behind all of this is that a test session that fails at a
test suite can be restarted at the next suite.

Signed-off-by: Chris Gearing <chris@whamcloud.com>
Change-Id: Ieaa987874d69fa8c33c3af92957e99607a8a7be7
Reviewed-on: http://review.whamcloud.com/414
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Robert Read <rread@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
8 years agoLU-1163 llite: never try to invalidate a dirty page
Jinshan Xiong [Fri, 2 Mar 2012 05:46:18 +0000 (21:46 -0800)]
LU-1163 llite: never try to invalidate a dirty page

When ll_page_mkwrite() detects page's covering lock is being canceled,
it should write the page back before invalidating it. Otherwise, it
will cause data corruption.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I345728daacf50edc154cd434dea392410f8cc782
Reviewed-on: http://review.whamcloud.com/2243
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
8 years agoLU-459 tests: quiet spurious console/test messages
Andreas Dilger [Wed, 25 Jan 2012 23:52:52 +0000 (16:52 -0700)]
LU-459 tests: quiet spurious console/test messages

Quiet a number of frequent and useless messages printed to the test
output and/or the console.  These distract from understanding what
is happening in the test and provide little, if any, value.

The "acl" mount option on the client has been deprecated since 1.8.0,
since it was added in mid-1.6, and is driven by the MDS config only.

Use textual debug/subsystem flags instead of numeric flags.  This has
been possible through all of 1.8, but is deprecated in 2.x so that
we can move to a more sophisticated debug mechanism in the future.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I81bed13c22465dc179e19f5a6714b732d68c500c
Reviewed-on: http://review.whamcloud.com/2015
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1145 test: add Test-Parameters tag for autotest
Andreas Dilger [Wed, 22 Feb 2012 11:47:28 +0000 (04:47 -0700)]
LU-1145 test: add Test-Parameters tag for autotest

Allow Test-Parameters line to specify extra tests that should be run
to properly validate a change made to code or a regression test.

The Test-Parameters line can be quite long, depending on the number
of parameters specified.  A single set of test parameters can be
split over multiple lines by escaping the linefeed, though the
individual lines should still be kept below the 70-character limit.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I65e1d41ad0f487df3753f25d9111ade9a0af08b1
Reviewed-on: http://review.whamcloud.com/2176
Reviewed-by: <bruce.korb@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Chris Gearing <chris@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1039 ptlrpc: handle bulk IO errors correctly.
Alexey Lyashkov [Thu, 26 Jan 2012 12:39:12 +0000 (16:39 +0400)]
LU-1039 ptlrpc: handle bulk IO errors correctly.

don't panic on incorrect bulk transfer,
correctly handle a bulk request reorder.

LustreError: 12927:0:(client.c:1696:ptlrpc_check_set()) LBUG
Pid: 12927, comm: ptlrpcd-brw

Call Trace:
[<ffffffffa083c865>] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
[<ffffffffa083cea5>] lbug_with_loc+0x75/0xe0 [libcfs]
[<ffffffffa0e2edd6>] ptlrpc_check_set+0x1a66/0x1b90 [ptlrpc]
[<ffffffffa0e61006>] ? ptlrpcd_check+0x46/0x290 [ptlrpc]
[<ffffffffa0e61006>] ? ptlrpcd_check+0x46/0x290 [ptlrpc]
[<ffffffffa0e611b8>] ptlrpcd_check+0x1f8/0x290 [ptlrpc]
[<ffffffffa0e6157b>] ptlrpcd+0x32b/0x3b0 [ptlrpc]
[<ffffffff81056388>] ? finish_task_switch+0x48/0x110
[<ffffffff8105f500>] ? default_wake_function+0x0/0x20
[<ffffffffa0e61250>] ? ptlrpcd+0x0/0x3b0 [ptlrpc]
[<ffffffff8100c2ca>] child_rip+0xa/0x20
[<ffffffff81500b70>] ? _spin_unlock_irq+0x30/0x40
[<ffffffff8100bc10>] ? restore_args+0x0/0x30
[<ffffffffa0e61250>] ? ptlrpcd+0x0/0x3b0 [ptlrpc]
[<ffffffff8100c2c0>] ? child_rip+0x0/0x20

Xyratex-bug-id: MRP-303
Change-Id: Ibb19c33e92dbecf5d029c7e6c567f65fb764f444
Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2023
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
8 years agoLU-335 ldiskfs: SuSE 11 SP1 update for Lustre 2.X
James Simmons [Thu, 16 Feb 2012 14:39:29 +0000 (09:39 -0500)]
LU-335 ldiskfs: SuSE 11 SP1 update for Lustre 2.X

The ext4 code difference between SuSE and RHEL6 is very small.
Because of to this ldiskfs support for SuSE servers is mostly
based the RHEL6 ldisk work. Recently Lustre support migrated
to RHEL6.2 support which required the SuSE port to be updated.
This patch provides this update which works for the SuSE
2.6.32.45 kernel as well as remove some no longer needed
ldsiskfs patches for older SuSE releases.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ia6763e8a35698018bc84c95564ec9ea63d5f2c33
Reviewed-on: http://review.whamcloud.com/2138
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1146 build: batch update copyright messages
Andreas Dilger [Fri, 2 Mar 2012 02:30:30 +0000 (19:30 -0700)]
LU-1146 build: batch update copyright messages

Update copyright messages for all files modified by Whamcloud.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I9654b780c6e4726d369e2a893f7e210d4078819b
Reviewed-on: http://review.whamcloud.com/2242
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-991 llite: cleanup md_readpage interface
wangdi [Tue, 24 Jan 2012 08:08:46 +0000 (00:08 -0800)]
LU-991 llite: cleanup md_readpage interface

Use md_op_data to transfer the parameters of readpage on client
metadata stack.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I103a555094e678711aa2f2e5d73ec848a452aed0
Reviewed-on: http://review.whamcloud.com/2001
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>
8 years agoLU-1019 ptlrpc: fix ptlrpcd transfer message
Andreas Dilger [Sat, 25 Feb 2012 01:17:55 +0000 (18:17 -0700)]
LU-1019 ptlrpc: fix ptlrpcd transfer message

Fix the debug message when transferring requests between ptlrpcd
threads to correctly identify the source and target thread index.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I330deb92a2ae0c9134dbf24ee6074e0cf9803d31
Reviewed-on: http://review.whamcloud.com/2195
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-949 test: improve sanity test_42e
Niu Yawei [Wed, 21 Dec 2011 04:33:12 +0000 (20:33 -0800)]
LU-949 test: improve sanity test_42e

The sanity test_42e should check that the RPCs with less than 16 pages
are not more than 15%, instead of checking the 16-page RPCs are more
than 85%, because the pages could be merged into even larger(> 16 pages)
RPCs.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I603f9d278b55cd850d66466050745ecb80e2ff02
Reviewed-on: http://review.whamcloud.com/1897
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
8 years agoLU-433 ldiskfs: fix up patch comment for 2.2
Andreas Dilger [Wed, 26 Oct 2011 07:37:59 +0000 (01:37 -0600)]
LU-433 ldiskfs: fix up patch comment for 2.2

The LU-433 patch wasn't landed until 2.2, so this patch is at least
needed to make 2.1->2.2 transition easier.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ia213ae92a8fe21f5153e22b588ff66c8f67439f2
Reviewed-on: http://review.whamcloud.com/1604
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1133 tests: sanity-quota 33 fixes
Andrew Perepechko [Fri, 24 Feb 2012 11:27:51 +0000 (15:27 +0400)]
LU-1133 tests: sanity-quota 33 fixes

sanity-quota test 33 must wait for removal completion
before verifying quota usage correctness

Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Change-Id: Ia9994a41b734a19c0711c201c3b54a38480c33fd
Xyratex-bug-id: MRP-378
Reviewed-by: Alexander Zarochentsev <azarochentsev@xyratex.com>
Reviewed-on: http://review.whamcloud.com/2186
Tested-by: Hudson
Reviewed-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-958 tests: debug_mb set incorrectly for smp or vm
Denis Kondratenko [Fri, 10 Feb 2012 10:54:45 +0000 (12:54 +0200)]
LU-958 tests: debug_mb set incorrectly for smp or vm

For cpus with number of cores or for some VMs,
number of possible CPUs in the system could
be greater than number of cpu reported by getconf.
Added check for maximum debug buffer size.

Xyratex-bug-id: MRP-219 incorrect settings for debug_mb

Reviewed-by: Andrew Perepechko <Andrew_Perepechko@xyratex.com>
Reviewed-by: Alexey Lyashko <Alexey_Lyashko@xyratex.com>
Signed-off-by: Denis Kondratenko <Denis_Kondratenko@xyratex.com>
Change-Id: I7001af7b1c88d5be056734d7d73a0263cca01627
Reviewed-on: http://review.whamcloud.com/1912
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1014 mountconf: MGS should process parameter config
Lai Siyao [Thu, 23 Feb 2012 08:23:25 +0000 (16:23 +0800)]
LU-1014 mountconf: MGS should process parameter config

MGS doesn't have llog config of its own, but it should process
<profile>-params config which is global parameters for the whole
system.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I62147dfff17f28c537d75652b49ed3582b0fa64c
Reviewed-on: http://review.whamcloud.com/2139
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-482 test: sync new fs before first replay test
Andreas Dilger [Tue, 28 Feb 2012 21:15:35 +0000 (14:15 -0700)]
LU-482 test: sync new fs before first replay test

LVM lacks barrier support for kernel < 2.6.33, so we need to send an
explicit sync and sleep to avoid the replay_barrier call in the first
test being run from discarding blocks from just-formatted filesystems.
Otherwise this incorrectly causes just-written metadata to be lost by
the block layer by the dev-read-only failover test code.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I69fc64298603ad75a4fcda09edde5bc7ded00c1e
Reviewed-on: http://review.whamcloud.com/2223
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-78 o2iblnd: kiblnd_check_conns can deadlock
Liang Zhen [Tue, 21 Feb 2012 04:40:25 +0000 (12:40 +0800)]
LU-78 o2iblnd: kiblnd_check_conns can deadlock

kiblnd_check_conns() called kiblnd_check_sends() with hold of global
rwlock, it's wrong because kiblnd_check_sends() could do many things:
 - call lnet_finalize() which is not safe with hold of spinlock
 - call kiblnd_close_conn() which requires to write_lock the same
   global lock
 - kiblnd_check_sends() might need to allocate NOOP message

It can be fixed by moving call of kiblnd_check_sends out from spinlock
This patch is from the fix of Bug 20288, with some small changes.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Icc9fedc70ecb25b0c41ebaf6d80c971f8281c9c6
Reviewed-on: http://review.whamcloud.com/2166
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1125 recovery: initial recovery thread's watchdog
Bobi Jam [Wed, 22 Feb 2012 06:30:41 +0000 (14:30 +0800)]
LU-1125 recovery: initial recovery thread's watchdog

Recovery thread does not have watchdog attached, correctly initialize
it.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I6993c39bbf18f47e9ccd965a5d2ba1919cfb7736
Reviewed-on: http://review.whamcloud.com/2174
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1109 llite: do splice read stripe by stripe
Jinshan Xiong [Thu, 23 Feb 2012 19:57:54 +0000 (11:57 -0800)]
LU-1109 llite: do splice read stripe by stripe

If nfsd is reading an across stripe buffer, and if the first stripe
happens to be 64KB(PIPE_BUFFERS*PAGE_SIZE), then first read will
occupy all pipe buffers and this makes nfsd stuck if it reads the
next stripe immediately.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I13cb54b37f738ee3c081dff1929630ea523b77fd
Reviewed-on: http://review.whamcloud.com/2182
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>
8 years agoLU-1132 protocol: reserve connect flags for new features
Johann Lombardi [Wed, 13 Jul 2011 23:05:32 +0000 (01:05 +0200)]
LU-1132 protocol: reserve connect flags for new features

This patch reserves connect flags for several outstanding features:
* OBD_CONNECT_GRANT_PARAM for grant additional parameters to consume
grant more intelligently on the client side.
* OBD_CONNECT_JOBSTATS to pass a job id in ptlrpc_body.
* OBD_CONNECT_EINPROGRESS for clients that can deal with EINPROGRESS
on write.

This patch also reserves fields for the per-file data_version patch
from LU-827.

Change-Id: Icb55435bca443b4c2106e7eec9b368f94d1be08c
Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1090
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1069 mdc: Avoid doing permission check again.
yangsheng [Wed, 15 Feb 2012 05:57:50 +0000 (13:57 +0800)]
LU-1069 mdc: Avoid doing permission check again.

inode_setattr() replaced by simple_setattr(). The latter
will invoke inode_change_ok(). It causes a -EPERM error when
we want to update inode timestamps.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I29c58d7027df1bf94db58df82e5214fd12ea5c87
Reviewed-on: http://review.whamcloud.com/2145
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>
8 years agoLU-1098 debug: lower debug message level
Bobi Jam [Tue, 21 Feb 2012 01:23:11 +0000 (09:23 +0800)]
LU-1098 debug: lower debug message level

File info read and unlink race is normal, we'd lower the debug message
level since a lot of unnecessary unmasked messages will be generated
if mdt_object_find() cannot find those deleted objects.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I7630e6a1456ffb435c8e67cc626bf38547b840d0
Reviewed-on: http://review.whamcloud.com/2165
Tested-by: Hudson
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-719 ldiskfs: fix error message rate-limiting logic in kmmpd
Nikitas Angelinas [Tue, 14 Feb 2012 09:07:54 +0000 (09:07 +0000)]
LU-719 ldiskfs: fix error message rate-limiting logic in kmmpd

Current logic would print an error message only once, and then
'failed_writes' would stay at 1. Rework the loop to increment
'failed_writes' and print the error message every
s_mmp_update_interval * 60 seconds, as intended according to the
comment.

Signed-off-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Change-Id: I0c8d90927bd618542026ab5fc70cf12b85898dc3
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Xyratex-bug-id: MRP-222
Reviewed-on: http://review.whamcloud.com/1420
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoLU-1028 tests: re-enable sanityn.sh test_16 (fsx)
Andreas Dilger [Tue, 24 Jan 2012 20:22:08 +0000 (13:22 -0700)]
LU-1028 tests: re-enable sanityn.sh test_16 (fsx)

The sanityn.sh version of fsx in test_16 provides useful test
coverage because it is running an IO load that is doing unaligned
file access from multiple clients (mountpoints) and also verifying
data correctness.  This has exposed several bugs in the orion branch,
and should also be enabled by default for all landings on master.

A longer version of the test is run in sanity-benchmark.sh for
better test coverage.  Check that fsx completes successfully,
otherwise it may fail without reporting an error to the test
framework.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I26dd91cacc2596f6e84f4c32362befa1e339cab0
Reviewed-on: http://review.whamcloud.com/2007
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1120 kernel: kernel update [RHEL6.2 2.6.32-220.4.2]
yangsheng [Sun, 19 Feb 2012 13:14:00 +0000 (21:14 +0800)]
LU-1120 kernel: kernel update [RHEL6.2 2.6.32-220.4.2]

Update RHEL6.2 kernel to 2.6.32-220.4.2.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: If4d63c32776452fcb615b8ed196cc3f037b07dfa
Reviewed-on: http://review.whamcloud.com/2163
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-819 utils: Fix lfs getstripe -M
wangdi [Fri, 4 Nov 2011 06:00:05 +0000 (23:00 -0700)]
LU-819 utils: Fix lfs getstripe -M

1. Fix lfs getstripe -M problem: some typo in llapi_file_fget_mdtidx.
2. Add lfs find -mdt and lfs mdts.
3. Add sanity test to check lfs getstripe -M and lfs find -mdt.

Signed-off-by: wangdi <di.wang@whamcloud.com>
Change-Id: I3b327d33c49009149dbed23728416efecb67691c
Reviewed-on: http://review.whamcloud.com/1646
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1051 osd: reserve less credits for llog unlink
Niu Yawei [Mon, 6 Feb 2012 06:02:07 +0000 (22:02 -0800)]
LU-1051 osd: reserve less credits for llog unlink

Reserve less credits for the llog write and catalog header udpate.
Since we can't get the llog inode in osd declare function, we use
a temporary solution: hack the 'size' parameter to indicate a llog
write or catalog header udpate.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ic5df00a878cdbf64a44b22b684e2c6b2dff83b07
Reviewed-on: http://review.whamcloud.com/2100
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoTag 2.1.56 2.1.56 v2_1_56_0
Oleg Drokin [Sat, 18 Feb 2012 05:44:13 +0000 (00:44 -0500)]
Tag 2.1.56

Change-Id: I87d5cf42ad646a393fde8743b7153251820c3719
Signed-off-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1084 ptlrpc: Change CWARNs to CDEBUGs
Christopher J. Morrone [Sat, 11 Feb 2012 01:34:32 +0000 (17:34 -0800)]
LU-1084 ptlrpc: Change CWARNs to CDEBUGs

These messages should not appear on the console.  A sysadmin
will have no idea what to make of most of them.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: I58bbc1eca9f5082d08cee6c5a95793c0f64ef370
Reviewed-on: http://review.whamcloud.com/2135
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-633 iokit: mds-survey script for MD echo client test
Minh Diep [Wed, 7 Dec 2011 00:38:54 +0000 (16:38 -0800)]
LU-633 iokit: mds-survey script for MD echo client test

Create a mds-survey script to run echo client for MDS

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I425438aa294d8d4360c28f686296ff7f26f847ea
Reviewed-on: http://review.whamcloud.com/1969
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
8 years agoLU-1054 kernel: Kernel update [RHEL6.2 2.6.32-220.4.1.el6]
yangsheng [Tue, 31 Jan 2012 01:25:07 +0000 (09:25 +0800)]
LU-1054 kernel: Kernel update [RHEL6.2 2.6.32-220.4.1.el6]

Update RHEL6.2 kernel to 2.6.32-220.4.1.el6.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: Ife086ef0a8c521373434b02ff4e49dab85b9627c
Reviewed-on: http://review.whamcloud.com/2058
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1050 o2iblnd: fix checking order of rdma_create_id() argument
Shuichi Ihara [Mon, 13 Feb 2012 16:47:38 +0000 (01:47 +0900)]
LU-1050 o2iblnd: fix checking order of rdma_create_id() argument

Replace rdma_create_id() with rdma_destroy_id() in
openib gen2 test and four argument check moves to
the back of openib test.

Signed-off-by: Shuichi Ihara <sihara@ddn.com>
Change-Id: I0782183f15f58647291518a4222610601083c369
Reviewed-on: http://review.whamcloud.com/2097
Tested-by: Hudson
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-1028 osc: fix grant checking on the osc side
Jinshan Xiong [Sat, 28 Jan 2012 22:43:47 +0000 (14:43 -0800)]
LU-1028 osc: fix grant checking on the osc side

If there is no available grant on the client side, but exists dirty
pages, we should issue BRW rpc and wait for more grants.

Another changes is about lost_grant: if dirty pages were truncated,
grants will be returned to client, instead of the target having
allocated them.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I50791554807dddfafafcd2b8d228958ebfa3ac16
Reviewed-on: http://review.whamcloud.com/2037
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1075 tests: auster detect directory as script name
Minh Diep [Mon, 6 Feb 2012 23:02:56 +0000 (15:02 -0800)]
LU-1075 tests: auster detect directory as script name

Auster should use -f or detect the existing of
script name rather use -e which will treat directory
same as script
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: Idba7b5a25cd48a513e9db885fb7399deff62827f
Reviewed-on: http://review.whamcloud.com/2104
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-427 test: Test failure on test suite lfsck
yangsheng [Thu, 4 Aug 2011 03:36:23 +0000 (11:36 +0800)]
LU-427 test: Test failure on test suite lfsck

- Reset $MDSDB & $OSTDB in generate_db(). Else they will
  stale if user redefine $SHARED_DIRECTORY.
- Add a function check_shared_dir() to ensure
  $SHARED_DIRECTORY is shared among tests nodes.

Change-Id: Idf2a3d75e46c4cf768419adfea627511c24c495c
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1180
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-883 ldiskfs: drop unused diagnostic information
Fan Yong [Tue, 31 Jan 2012 07:26:31 +0000 (15:26 +0800)]
LU-883 ldiskfs: drop unused diagnostic information

The debug informatin was introduced for diagnosing readonly
issues for bug 16680. It is unused any longer and makes the
console output some noisy. So drop.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: If950654d6517f317809bb0de1446e2377a524c77
Reviewed-on: http://review.whamcloud.com/2068
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-971 mdt: fix open resent issue with last_xid
Mikhail Pershin [Mon, 9 Jan 2012 13:46:10 +0000 (17:46 +0400)]
LU-971 mdt: fix open resent issue with last_xid

req_xid_is_last() compares xid with one in client data,
but in master it is not updated in case of open without create.
Patch updates export lcd with last xid, transno and rc for open
requests.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I9e769fecc1e93c7a556d4b9eeadc80a70369e901
Reviewed-on: http://review.whamcloud.com/1930
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1049 script: lc_net doesn't parse output correctly
Minh Diep [Tue, 31 Jan 2012 00:39:43 +0000 (16:39 -0800)]
LU-1049 script: lc_net doesn't parse output correctly

Port the second fix from bz=23234
The output of ping contains two ip addresses. The regex
matching picks up both addresses. The fix is to add
-m 1 to stop at the first match
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: Ie145e710844d80587bf6826822c8db941a4a3bae
Reviewed-on: http://review.whamcloud.com/2057
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-601 mdd: cleanup error messages and code style
Andreas Dilger [Wed, 9 Nov 2011 20:06:30 +0000 (13:06 -0700)]
LU-601 mdd: cleanup error messages and code style

While looking at LU-601, I added comment blocks for several of
the functions in the PENDING directory cleanup path, along with
fixes to the code style and error messages.  No functional changes
should be introduced by this code change.

The error message that was formerly printed by the 1.8 MDS in
mds_unlink_orphan() and checked by replay-single.sh test_37 no
longer exists in the 2.x MDS code.  Re-add a message if there
is an error cleaning up directory orphans, and change test_37
to match the resulting error message (similar to the 1.8 code).

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ic97843e49643041513f3b2fc6a40f2be63ffddca
Reviewed-on: http://review.whamcloud.com/1679
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>
8 years agoLU-1091 fix the tag matching code in configure
Brian J. Murrell [Fri, 10 Feb 2012 20:27:04 +0000 (15:27 -0500)]
LU-1091 fix the tag matching code in configure

Signed-off-by: Brian J. Murrell <brian@whamcloud.com>
Change-Id: I24dd4d0929364a2012afe725586626328ea584c0
Reviewed-on: http://review.whamcloud.com/2131
Reviewed-by: Minh Diep <mdiep@whamcloud.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>
8 years agoLU-1095 mgs: remove message from console
Christopher J. Morrone [Fri, 10 Feb 2012 23:24:06 +0000 (15:24 -0800)]
LU-1095 mgs: remove message from console

There is no good reason for a sysadmin to see this message
on the console.  Most of the time this will be a fluke
due to the vagarities of lnet networks (server decides
client is disconnected, but client doesn't know that yet,
messages arriving out of order, etc.).

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: I0c18734f82a9c89a5e940ce4e2c602614e89ce26
Reviewed-on: http://review.whamcloud.com/2133
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-709 build: LC_XATTR_ACL & LC_POSIX_ACL_XATTR_H cleanup
yangsheng [Tue, 6 Dec 2011 21:24:59 +0000 (05:24 +0800)]
LU-709 build: LC_XATTR_ACL & LC_POSIX_ACL_XATTR_H cleanup

xattr_acl.h removed since 2.6.13 and posix_acl_xattr.h
exist since 2.6.11. So just use posix_acl_xattr.h for now.
And removed relate codes.

Change-Id: Ibefd4db87fa79ec9ee6365d48c83abd0dda0e063
Signed-off-by: yangsheng <ys@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1916
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>
8 years agoLU-1077 distribute missing file in build/autoconf
Brian J. Murrell [Tue, 7 Feb 2012 22:15:53 +0000 (17:15 -0500)]
LU-1077 distribute missing file in build/autoconf

In landing 0d5cf708f60c1ed9233fd12f4326851ab412ef6a for ticket
LU-723 a defect was introduced where
build/autoconf/lustre-build-ldiskfs.m4 is missing from the
distribution tarball.

Signed-off-by: Brian J. Murrell <brian@whamcloud.com>
Change-Id: I34a1d7ad20229fb531eb4e76182647e708b300d4
Reviewed-on: http://review.whamcloud.com/2115
Tested-by: Hudson
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1029 build: build ofed 1.5.4 with qlgc_vnic failed
Minh Diep [Tue, 7 Feb 2012 15:53:09 +0000 (07:53 -0800)]
LU-1029 build: build ofed 1.5.4 with qlgc_vnic failed

Ofed failed to include proper header files to support
qlgc_vnic. Since we are not using ib on vnic in the lab,
we'll remove it

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: Ibce110b44940fda5f13abab890f3e9176f55b9d2
Reviewed-on: http://review.whamcloud.com/2110
Tested-by: Hudson
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Michael MacDonald <mjmac@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-915 tests: MKFSOPTS fix for test suite
James Simmons [Thu, 12 Jan 2012 15:00:06 +0000 (10:00 -0500)]
LU-915 tests: MKFSOPTS fix for test suite

While testing LU-80 I had to provide my own MKFSOPT string
for the mkfsoptions in local.sh. In the conf-sanity test
the MKFSOPT provided were totally replaced by a new MKFSOPT
that contained only lazy_itable_init. This prevented me from
running any conf-sanity test bacause I couldn't format the
MDS. This patch instead appends lazy_itable_init to the
mkfsoptions string if it already exist.

Change-Id: If30d2a692431dcdb3631fc9c1e77da5ff2792881
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/1830
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoRevert "LU-1013 obdclass: lu_object_find miss to unlink object from LRU"
Oleg Drokin [Wed, 15 Feb 2012 18:41:03 +0000 (13:41 -0500)]
Revert "LU-1013 obdclass: lu_object_find miss to unlink object from LRU"

Reverting because in fact it overlaps with LU-1017

This reverts commit b9ccecd1453c5c76fe135048c39f149c241650c6.

Signed-off-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-966 mdd: revert commit and use original patch
Mikhail Pershin [Wed, 15 Feb 2012 08:39:53 +0000 (12:39 +0400)]
LU-966 mdd: revert commit and use original patch

Use original patch which replaces LASSERT with CERROR in MDD,
because checking object exists in MDT ruins VBR recovery.
It happens too early but VBR should check that too before reply
to the client.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: If31586c9d1cc86c4c8059a7227c231acdc82a0f1
Reviewed-on: http://review.whamcloud.com/2148
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Yu Jian <yujian@whamcloud.com>
8 years agoLU-889 recovery: rework extend_recovery_timer()
Jinshan Xiong [Wed, 25 Jan 2012 06:15:59 +0000 (22:15 -0800)]
LU-889 recovery: rework extend_recovery_timer()

Commit 8da33c6cc5192303fcd18f45892e1f115004e662 is buggy where
the time used to rearm the timer is wrong. In this patch, I
will reset all changes and use the same scheme as 2.1 release.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: Icd887687262644e1a1cfffd6f34eacc5bc418f84
Reviewed-on: http://review.whamcloud.com/1722
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1059 clio: to not try to discard freeing pages
Jinshan Xiong [Tue, 31 Jan 2012 21:30:21 +0000 (13:30 -0800)]
LU-1059 clio: to not try to discard freeing pages

This is a bug imported in LU-948. We should check if we have owned
the page successfully before trying to discard it.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I30631be98f1fcc1b98abe727c8c6984b918bfffd
Reviewed-on: http://review.whamcloud.com/2073
Reviewed-by: James Simmons <uja.ornl@gmail.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>
8 years agoLU-969 debug: reduce stack usage
Hongchao Zhang [Thu, 5 Jan 2012 21:28:51 +0000 (05:28 +0800)]
LU-969 debug: reduce stack usage

in ptlrpc_main, move struct lu_env to heap to save stack
in mdt_open.c, declare functions non-static to prevent inlining

Change-Id: I73c703c79b0539dc40036a5f9b131507adaff662
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2070
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoLU-1042 obdfilter: initialize new object timestamp
Andreas Dilger [Fri, 27 Jan 2012 21:12:06 +0000 (14:12 -0700)]
LU-1042 obdfilter: initialize new object timestamp

Initialize newly-created objects with a/m/ctime = 0, so that however
clients modify the timestamp it will be updated the first time.  The
fsfilt_ext3_setattr() code will special case ctime = 0 for new files
and reset them to the ext4 s_mkfs_time stored in the superblock.

In LU-221 (commit 414251797ed178eec5d431e1f5aa4a889d2b159f) the
timestamps were initialized to (INT_MIN + 24 * 3600) (1901-12-14),
but the use of unsigned on-disk timestamps caused these negative
numbers to be transformed into large positive numbers (debugfs
reports them to be "Tue Jan 19 20:14:08 2038").  Add a fix so that
files with this exact timestamp have the timestamp reset to 0.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I22f2cd443402c0c524bafaf37c80cad7b6d00c1e
Reviewed-on: http://review.whamcloud.com/2036
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-797 tests: skip ost-pools.sh 23b when SLOW=no
Andreas Dilger [Fri, 3 Feb 2012 22:27:40 +0000 (15:27 -0700)]
LU-797 tests: skip ost-pools.sh 23b when SLOW=no

Running test_23b can take over 30 minutes, and should not be run on a
large LUN inside a VM.  Print out some of the constants that determine
whether the test is run or not, for debugging purposes.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I7491002276e36994be4baf30a731576c8ced7530
Reviewed-on: http://review.whamcloud.com/2091
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-963 build: update Lustre ChangeLog
Niu Yawei [Tue, 14 Feb 2012 02:21:57 +0000 (18:21 -0800)]
LU-963 build: update Lustre ChangeLog

Update the recommended e2fsprogs version to 1.41.90.wc4 for 2.2.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I5516a0c228cca4aa36c68cc299d0127c9c6f5325
Reviewed-on: http://review.whamcloud.com/2140
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1055 remove improper assert in osd_declare_object_destroy
Niu Yawei [Fri, 3 Feb 2012 07:44:24 +0000 (23:44 -0800)]
LU-1055 remove improper assert in osd_declare_object_destroy

After recovery, orphan cleanup could race with the client unlink on
close, so the LASSERT on lu_object_is_dying() should be moved from
declare stage into the real destroy function.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ibc4ad0613d907ab98b653d5a64ce54e1f018dcb2
Reviewed-on: http://review.whamcloud.com/2083
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-506 tests: modprobe exportfs for fsfilt_ldiskfs
Andreas Dilger [Mon, 23 Jan 2012 22:17:55 +0000 (15:17 -0700)]
LU-506 tests: modprobe exportfs for fsfilt_ldiskfs

When trying to load fsfilt_ldiskfs.ko from the build tree, it fails
to load due to the missing exportfs_decode_fh() symbol in RHEL6
kernels.  Force loading of the exportfs.ko module if ldiskfs is used.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Iecb13155b69ffc3a227e3df770ca590277cd500c
Reviewed-on: http://review.whamcloud.com/2014
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
8 years agoLU-1051 osd: improve quota credits calculation
Niu Yawei [Thu, 2 Feb 2012 14:32:02 +0000 (06:32 -0800)]
LU-1051 osd: improve quota credits calculation

Instead of reserving constant LDISKFS_QUOTA_INIT_BLOCKS for all kinds
of transactions, this patch tracks how many/which uid/gids are
affected in each declare function, then calculates the total quota
credits according to the affected uid/gids in osd_trans_start().

This patch also includes following credits improvement:
- For object creation, reserve less credits for the '.' and '..'
  insertion, and don't reserve for file creation;
- Only reserve the credits for oi insertion for normal fids;
- Limit the credits to j_max_transaction_buffers in the
  osd_trans_start();

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ifbcc26b670c4965f22cc96ae7db16154927f32a4
Reviewed-on: http://review.whamcloud.com/2082
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoLU-985 lprocfs: verify user buffer access
Bobi Jam [Fri, 13 Jan 2012 05:46:07 +0000 (13:46 +0800)]
LU-985 lprocfs: verify user buffer access

In lprocfs_xxx_evict_client(), need verify user's buffer when access
it.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I702e22f8d432edce200c6d91a0af8a1eac792008
Reviewed-on: http://review.whamcloud.com/1961
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1061 agl: cl_locks_prune() waits for the last user
Fan Yong [Thu, 2 Feb 2012 11:17:41 +0000 (19:17 +0800)]
LU-1061 agl: cl_locks_prune() waits for the last user

The AGL sponsor holds user reference count on the cl_lock before
triggering AGL RPC. The user reference count on the cl_lock will
be released by AGL RPC reply upcall. Such AGL mechanism conflict
with cl_locks_prune(), which requires no lock is in active using
when the last iput() called.

So the cl_locks_prune() should wait for the last user reference
count to be released by the enqueue reply upcall.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I8998c0a247448b1b6c6e99995c9d956b1666279b
Reviewed-on: http://review.whamcloud.com/2079
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1017 handle -EAGAIN properly in lu_object_find_try()
Niu Yawei [Tue, 31 Jan 2012 06:06:47 +0000 (22:06 -0800)]
LU-1017 handle -EAGAIN properly in lu_object_find_try()

htable_lookup() could return -EAGAIN for dying object, we should
handle it properly in lu_object_find_try().

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I616928cb983d4f64a64f25b7d296b6c9bd18e4ea
Reviewed-on: http://review.whamcloud.com/2066
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-874 ptlrpc: handle in-flight hqreq correctly
Jinshan Xiong [Wed, 25 Jan 2012 19:27:55 +0000 (11:27 -0800)]
LU-874 ptlrpc: handle in-flight hqreq correctly

If there are in-flight requests pending, we shouldn't timeout the
covering dlm locks; neither should we remove the requests from export
exp_hp_rpcs list until the requests are handled.

In this patch, the following things are improved:
1. leave IO rpcs in export's hp list until they are handled;
2. using interval tree to find rpc overlapped locks;
3. refresh the lock again after IO rpcs are finished to leave a time
   window for clients to cancel covering dlm locks;
4. rework repbody in ost_handler.c so as to not modify original obdo
5. cleanup the code.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I33e2d113d7929a56389741c06dffb5efb6bf28a3
Reviewed-on: http://review.whamcloud.com/1918
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: <alexander_boyko@xyratex.com>
8 years agoLU-874 osc: prioritize writeback pages
Jinshan Xiong [Tue, 10 Jan 2012 07:34:06 +0000 (23:34 -0800)]
LU-874 osc: prioritize writeback pages

When a lock is being canceled, we should prioritize those covering
pages which have already been submitted by page writeback daemon;
otherwise, this client may be evicted because there is no active IO
for that lock for a long time.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: If14eff6361f55d2b2eeb2db7146789dda4c32060
Reviewed-on: http://review.whamcloud.com/1938
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1067 obdecho: Recheck client env ctx for echo md client.
wangdi [Sat, 4 Feb 2012 08:12:48 +0000 (00:12 -0800)]
LU-1067 obdecho: Recheck client env ctx for echo md client.

During echo md test, if there are real clients being mounted
at the same time, the cl env it gotten from the cache might
contain the wrong context, so we need recheck the ctx and
refill the env forcedly.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: Iddbceee80966b5ca9284c886731386a97d089d53
Reviewed-on: http://review.whamcloud.com/2092
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>
8 years agoLU-1073 llite: no CERROR on unknown flock type
Alexander Zarochentsev [Sat, 11 Feb 2012 07:19:31 +0000 (11:19 +0400)]
LU-1073 llite: no CERROR on unknown flock type

Xyratex-bug-id: MRP-215

Signed-off-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Change-Id: I435c3282bc87750f6ebd19e618a1ee8e229834d2
Reviewed-on: http://review.whamcloud.com/2109
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1013 obdclass: lu_object_find miss to unlink object from LRU
Fan Yong [Sat, 11 Feb 2012 01:26:29 +0000 (09:26 +0800)]
LU-1013 obdclass: lu_object_find miss to unlink object from LRU

There is race condition between lu_object_find and lu_object_put.
For the case of two threads trying to find some object with the
same FID concurrently, and the object is not allocated in memory
yet, if the first thread adds the object into LRU list before the
second thread re-searching object hash table for inserting the
new object created by itself, then the second thread will find
the object created by the first thread. Under such case, the
second thread should unlink the object from LRU.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: Iadec96c27d5285f8b859b0060a6f611e87585789
Reviewed-on: http://review.whamcloud.com/2134
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-687 ldiskfs: resolve section dynlocks mismatch
Andreas Dilger [Thu, 26 Jan 2012 10:06:30 +0000 (03:06 -0700)]
LU-687 ldiskfs: resolve section dynlocks mismatch

Fix __init/__exit section mismatch.

  WARNING: lustre-2.1.0/ldiskfs/ldiskfs/ldiskfs.o(.init.text+0x1bc):
  Section mismatch in reference from the function init_module() to the
  function .exit.text:dynlock_cache_exit().  An __init init_module()
  function references a function __exit dynlock_cache_exit().

  This is often seen when error handling in the init function uses
  functionality in the exit path.  The fix is often to remove the
  __exit annotation of dynlock_cache_exit() so it may be used outside
  an exit section.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie0bdde7f78c18bca1127151175cf56bfa6ad500c
Reviewed-on: http://review.whamcloud.com/2019
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>
8 years agoLU-1046 ldlm: hold ldlm_cb_set_arg until the last user exit
Fan Yong [Tue, 31 Jan 2012 05:51:41 +0000 (13:51 +0800)]
LU-1046 ldlm: hold ldlm_cb_set_arg until the last user exit

There is race condition between ldlm_cb_interpret() and
ldlm_run_ast_work() when test/release "ldlm_cb_set_arg":
ldlm_run_ast_work() can exit before ldlm_cb_interpret()
processing "ldlm_cb_set_arg::waitq", then causes invalid
memory accessing.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: Idfb3f41739e02a79fe4310ecbc7bb842e75a82d8
Reviewed-on: http://review.whamcloud.com/2065
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>
8 years agoLU-993 osd: code cleanup for directory nlink count
Niu Yawei [Mon, 16 Jan 2012 06:52:12 +0000 (22:52 -0800)]
LU-993 osd: code cleanup for directory nlink count

- LDISKFS_LINK_MAX is ldiskfs unique, we should not handle it in the mdd
  layer. It's moved down to the osd layer in this patch.

- Remove the declared operation count assertion in OSD_EXEC_OP(), since
  the undo operations are not declared, if there some operation failed,
  the undo operation will trigger the assertion unnecessarily.

- Restore the sub-directory count to 70000 for the sanity test_51b, and
  add test_51ba for testing unlink > LDISKFS_LINK_MAX sub-directories.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Id02e7d2ac3a7664a55566b1de783f0a73162339b
Reviewed-on: http://review.whamcloud.com/1971
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoLU-928 llite: fix comment for lustre_client_ocd
Andreas Dilger [Thu, 15 Dec 2011 08:24:33 +0000 (01:24 -0700)]
LU-928 llite: fix comment for lustre_client_ocd

ll_ocd_update() was renamed to cl_ocd_update() before 2.0.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I834935d2dc9ef0edebbd5badb4bc54283a325730
Reviewed-on: http://review.whamcloud.com/1868
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1053 build: allow deleted/chmod in commit-msg
Andreas Dilger [Sun, 29 Jan 2012 07:20:45 +0000 (00:20 -0700)]
LU-1053 build: allow deleted/chmod in commit-msg

Allow files that were deleted or chmod when verifying a commit
message that contains a diff generated with "commit -v".  The
checks added for excluding the diff were previously too strict.
Add a test case for each of these situations, as well as a case
for a commit message that contains "diff" at the start of a line
in the middle of a commit message.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I74fe98682342e445da7fe64fd42e91df4564500c
Reviewed-on: http://review.whamcloud.com/2053
Reviewed-by: Bruce Korb <bruce_korb@xyratex.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1025 checksum: add final bit inversion for crc32c
Alexander.Boyko [Fri, 3 Feb 2012 07:20:01 +0000 (11:20 +0400)]
LU-1025 checksum: add final bit inversion for crc32c

The linux kernel implementations of crc32c perform final bit
inversion after loop calculation of checksum.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Change-Id: I5fa6af60c51f6f86f394f3cc71aa2672be614f7b
Reviewed-on: http://review.whamcloud.com/2018
Tested-by: Hudson
Reviewed-by: Shuichi Ihara <sihara@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-817 lustre-iokit: sgpdd-survey is encountering r/w errors on arrays using 2TB...
Shuichi Ihara [Mon, 7 Nov 2011 09:45:33 +0000 (18:45 +0900)]
LU-817 lustre-iokit: sgpdd-survey is encountering r/w errors on arrays using 2TB drives

There are two fix/improvements in sgpdd-survey.
(1) adding --lba option to sg_readcap for large LUNs.
(2) support configurable boundadry block size between
concurrent regions per device.

Signed-off-by: Shuichi Ihara <sihara@ddn.com>
Change-Id: Ib3cdb051cf55e096919ad63a42640aaacfe511c4
Reviewed-on: http://review.whamcloud.com/1658
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-746 test: obdfilter-survey FAIL hndls expected >8, have 2
Lai Siyao [Fri, 4 Nov 2011 15:08:25 +0000 (08:08 -0700)]
LU-746 test: obdfilter-survey FAIL hndls expected >8, have 2

obdfilter-survey.sh checks jbd proc stats after survey, but it
doesn't take obd cleanup time into account, so the stats collected
may not reflect the data of test. To fix this, save run time of
survey test, and collect stats of (run_time/4) ago.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I597a6279353c203b50b1c2b17543bd34d86d8806
Reviewed-on: http://review.whamcloud.com/1645
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
8 years agoLU-1023 utils: Time counting fix for obdfilter-survey
wangdi [Tue, 24 Jan 2012 03:56:09 +0000 (19:56 -0800)]
LU-1023 utils: Time counting fix for obdfilter-survey

1. Assigning the start and end time of test_brw so it
   can get correct time usage.
2. In mds_survey, it adds a new output line for threas utils,
   (Total: total xxxx threads X sec ...), and we should skip
   this line in get_stats(obdfilter-survey), so it can get
   correct min/max time.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I58c13bde299c254ed10e1405bfed3e1dce4ef216
Reviewed-on: http://review.whamcloud.com/1999
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-874 ldlm: prioritize LDLM_CANCEL requests
Jinshan Xiong [Thu, 22 Dec 2011 00:33:51 +0000 (16:33 -0800)]
LU-874 ldlm: prioritize LDLM_CANCEL requests

If a lock canceling request has already reached server, there is no
reason of evicting the client when the waiting list times out.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I1a300916b4b3b592ca565ffc06cb3658d699d7a0
Reviewed-on: http://review.whamcloud.com/1900
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>