Whamcloud - gitweb
fs/lustre-release.git
11 years agoLU-1581 mount: kernel do not parse ldd
Alex Zhuravlev [Tue, 31 Jul 2012 11:42:29 +0000 (15:42 +0400)]
LU-1581 mount: kernel do not parse ldd

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

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ice15cf4fa8e411144713d0276d006f8cfe9c56f1
Reviewed-on: http://review.whamcloud.com/3613
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
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-1302 llog: pass lu_env as parametr in llog functions
Mikhail Pershin [Thu, 16 Aug 2012 13:25:11 +0000 (17:25 +0400)]
LU-1302 llog: pass lu_env as parametr in llog functions

Add lu_env as paramenter in llog API functions and helpers

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

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

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

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

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Ie38b3da4090df35281e51ef196d91e3f96f95bdc
Reviewed-on: http://review.whamcloud.com/3644
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
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/3792
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
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-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-1302 llog: structures changes, llog_thread_info
Mikhail Pershin [Tue, 14 Aug 2012 08:04:57 +0000 (12:04 +0400)]
LU-1302 llog: structures changes, llog_thread_info

Add changes in structures, introduce llog_thread_info,
protect llog header data with new lock.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Id1438e69d8771880481e1a335d38d3e2d1635085
Reviewed-on: http://review.whamcloud.com/3631
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
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 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-1400 test: obdfilter-survey tests fail but still green
Keith Mannthey [Fri, 17 Aug 2012 04:43:09 +0000 (21:43 -0700)]
LU-1400 test: obdfilter-survey tests fail but still green

obdfilter-survey tests are failing but appear green in Maloo.
ENOSPACE errors are not being properly reported.

Add the "set -e" flag to make obdfilter-survey fail on errors.

Test-Parameters: testlist=obdfilter-survey
Signed-off-by: Keith Mannthey <keith@whamcloud.com>
Change-Id: I83666d085136178737727080a1a3b55768fb13a7
Reviewed-on: http://review.whamcloud.com/3591
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1407 msg: Wrong error messages on MDS and Client
yangsheng [Mon, 11 Jun 2012 08:43:12 +0000 (16:43 +0800)]
LU-1407 msg: Wrong error messages on MDS and Client

Don't show error messages on console in some case.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I0b8b1bb523f677813b2f3998509afba639398d9d
Reviewed-on: http://review.whamcloud.com/3076
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@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-1303 build: bump warning on LOD/OSP workarounds
Andreas Dilger [Wed, 22 Aug 2012 02:18:44 +0000 (20:18 -0600)]
LU-1303 build: bump warning on LOD/OSP workarounds

There are a number of generated compile warnings in the code
that need to be fixed due to LOD/OSP workarounds that need to
be removed.  I've bumped the version check to version 2.3.55,
to give the LOD/OSP patches a chance to land.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I41356848d7f1d0699bb0f01cb9302012ff386bc4
Reviewed-on: http://review.whamcloud.com/3741
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoNew tag 2.3.50 2.3.50 v2_3_50 v2_3_50_0
Oleg Drokin [Tue, 21 Aug 2012 03:32:10 +0000 (23:32 -0400)]
New tag 2.3.50

After branching off b2_3, master becomes 2.4.0 development branch.

Change-Id: If7b8c875cb23d3f673ec6185dd5de9f13352c0f0
Signed-off-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>
11 years agoLU-1625 test: reduce test duration for nfs mode
Keith Mannthey [Thu, 16 Aug 2012 20:40:52 +0000 (13:40 -0700)]
LU-1625 test: reduce test duration for nfs mode

There isn't much value to run long duration in
nfs mode. Cut down IOR test as well.
Based on original work by Minh Diep.

Test-Parameters: testgroup=parallel-scale-nfsv4
Signed-off-by: Keith Mannthey <keith@whamcloud.com>
Change-Id: Id0c2b23d41a7e0a2763a45747a0f98a24fd77fa7
Reviewed-on: http://review.whamcloud.com/3701
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-1745 test: Fix recovery-small test 105
James Simmons [Wed, 15 Aug 2012 18:00:05 +0000 (14:00 -0400)]
LU-1745 test: Fix recovery-small test 105

Update check_target_ir_state() to handle the old IR reported
state of ON/OFF as well as the new reported state of DISABLED/
ENABLED.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ib2e10594cd2fb5d2e54d22187db32af9229e27ff
Reviewed-on: http://review.whamcloud.com/3667
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
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>
11 years agoLU-1548 tests: add test 63 in conf-sanity
wangdi [Fri, 10 Aug 2012 17:05:25 +0000 (10:05 -0700)]
LU-1548 tests: add test 63 in conf-sanity

Add test_63 in conf-sanity to verify each page can
at least hold 3 ldiskfs inode.

Signed-off-by: wang di <di.wang@whamcloud.com>
Change-Id: I281df5945a1e26736bb2b27c211a8239d25e0c7e
Reviewed-on: http://review.whamcloud.com/3605
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1581 mount: use a special separator in svname
Alex Zhuravlev [Mon, 30 Jul 2012 14:03:33 +0000 (18:03 +0400)]
LU-1581 mount: use a special separator in svname

with this new approach mkfs marks fresh filesystem
by a special separator (:) between fsname and service
name. then mount utility recognizes this separator
and passes 'writeconf' option to the kernel mount.
upon this first mount (and having a new configuration
profile on MGS) mount utility replaces ':' with regular
'-' in svname and sets label to that.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I83e1d1e4f1fd67ae9a6453069b324696715d4fee
Reviewed-on: http://review.whamcloud.com/3612
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agonew tag 2.2.93 2.2.93 v2_2_93 v2_2_93_0
Oleg Drokin [Thu, 16 Aug 2012 20:22:03 +0000 (16:22 -0400)]
new tag 2.2.93

Change-Id: I6bb117a22febd7a59273ec14310e2e8b82bca081
Signed-off-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1581 utils: label methods
Alex Zhuravlev [Mon, 30 Jul 2012 14:01:54 +0000 (18:01 +0400)]
LU-1581 utils: label methods

label methods for ldiskfs and zfs, used by mount utility
to update the label upon the first successful mount.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ibd5e14bd10e39d71264d15bbee42021b089091ea
Reviewed-on: http://review.whamcloud.com/3611
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>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1727 lprocfs: fix an old assertion
Bobi Jam [Fri, 10 Aug 2012 06:22:45 +0000 (14:22 +0800)]
LU-1727 lprocfs: fix an old assertion

lprocfs_counter_add() can be called in interrupt context, as a memory
allocation can trigger memory shrinker call ldlm_pool_shrink(), which
calls lprocfs_counter_add().

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I0f5d3e07c234f7d615ca87761a7bd6367e72beac
Reviewed-on: http://review.whamcloud.com/3597
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
11 years agoLU-1024 tests: Test replay-vbr.test_1c failed
Kyrylo Shatskyy [Tue, 24 Jan 2012 11:21:02 +0000 (13:21 +0200)]
LU-1024 tests: Test replay-vbr.test_1c failed

Fixed execution of runmultiop_bg_pause from replay-vbr.sh.

The test-framework.sh wasn't able to to be included in
runmultiop_bg_from script, because since it was started via sh
and dirname didn't return correct path for LUSTRE initialization.

Running the script as executable allows to detect it's directory
correctly via dirname.

Xyratex-bug-id: MRP-299
Reviewed-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Reviewed-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Signed-off-by: Kyrylo Shatskyy <kyrylo_shatskyy@xyratex.com>
Change-Id: I0c1e88af405a87bf73ff3e2ac438bccba2b92afc
Reviewed-on: http://review.whamcloud.com/2003
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1548 ldiskfs: repostion some items in ldiskfs_inode_info
wangdi [Tue, 7 Aug 2012 21:55:28 +0000 (14:55 -0700)]
LU-1548 ldiskfs: repostion some items in ldiskfs_inode_info

Reposition a few items of ldiskfs_inode_info to remove
the alignment hole in the structure, i.e. reduce the size
of this structure, then each slab page can hold more
objects(ldiskfs_inode_info).

Signed-off-by: Wang di <di.wang@whamcloud.com>
Change-Id: I2a4ff44cd98366029dfbee7c4f750e13df8bf7c3
Reviewed-on: http://review.whamcloud.com/3562
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1581 osd: zfs osd to take svname from lsi
Alex Zhuravlev [Mon, 30 Jul 2012 14:00:21 +0000 (18:00 +0400)]
LU-1581 osd: zfs osd to take svname from lsi

as the label is marked with ':' at the beginning

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I54b651392834278bf1b0d72807576970887ca2b3
Reviewed-on: http://review.whamcloud.com/3610
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-708 utils: convert_hostnames() should not change its arg
Bobi Jam [Tue, 14 Aug 2012 01:39:59 +0000 (09:39 +0800)]
LU-708 utils: convert_hostnames() should not change its arg

Fix an omission.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I29b6179ef7d36751d1a9bd28119ab14145bf2f61
Reviewed-on: http://review.whamcloud.com/3628
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
11 years agoLU-1689 tests: fix mount during e2fsck test
Minh Diep [Tue, 14 Aug 2012 07:44:02 +0000 (15:44 +0800)]
LU-1689 tests: fix mount during e2fsck test

The current mmp test 8 (mount during e2fsck) has two time issues:
1) the mount operation may start before e2fsck
2) the e2fsck operation may stop before mount

This patch fixes the above issues by providing enough time for e2fsck
operation to be started before mount operation, and setting the
superblock free_blocks_count field with 0 to force e2fsck checking
the Lustre server target device, which provides enough time for
the mount operation to be started during the e2fsck operation.

Test-Parameters: testlist=mmp
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I37e07ffdb6669dfabceaab5ef242460abe204ba0
Reviewed-on: http://review.whamcloud.com/3569
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Chris Gearing <chris.gearing@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1053 build: add test for commit-msg with diff
Andreas Dilger [Mon, 9 Jul 2012 23:16:45 +0000 (17:16 -0600)]
LU-1053 build: add test for commit-msg with diff

Add a test case for the build/commit-msg script with "diff" at the
start of an intermediate line, which should not be ignored.  This
needs to be distinguished from the start of "git commit -av" output
which has a full "git diff" of the output inline with the commit.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Icf2399568437de7f9e23419386bf3b1b99ebbfd1
Reviewed-on: http://review.whamcloud.com/3363
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bruce Korb <bruce_korb@xyratex.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
11 years agoLU-474 build: document the build release versions
Andreas Dilger [Tue, 6 Dec 2011 09:04:24 +0000 (02:04 -0700)]
LU-474 build: document the build release versions

Update ancient document to better describe the build versions
and Git tags that are being used today.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I804f10bf486745ddd3b23b89e959dfd58558cab0
Reviewed-on: http://review.whamcloud.com/3625
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
11 years agoLU-1625 test: reduce test duration for nfs mode
Keith Mannthey [Mon, 13 Aug 2012 19:55:55 +0000 (12:55 -0700)]
LU-1625 test: reduce test duration for nfs mode

There isn't much value to run long duration in
nfs mode.  Based on original work by Minh Diep.

Test-Parameters: testgroup=full
Signed-off-by: Keith Mannthey <keith@whamcloud.com>
Change-Id: I635d388e4dba5192199602b29ccaae843e9a1346
Reviewed-on: http://review.whamcloud.com/3596
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-1657 lov: LBUG at lov_fini_raid0()
Jinshan Xiong [Wed, 1 Aug 2012 22:31:05 +0000 (15:31 -0700)]
LU-1657 lov: LBUG at lov_fini_raid0()

The refcount of lsm could be greater than 1 if the object was failed
at initialization because llite held another reference.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I86884eb36f256123e835fdc9e0e585a984f7713a
Reviewed-on: http://review.whamcloud.com/3513
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1683 agl: increase lock cll_holds for AGL upcall
Fan Yong [Thu, 2 Aug 2012 01:30:45 +0000 (09:30 +0800)]
LU-1683 agl: increase lock cll_holds for AGL upcall

If without additional cll_holds held for AGL upcall, the AGL lock
may be cancelled/deleted by the AGL thread if the AGL lock cannot
be granted at once.

The osc_lock_wait() will re-trigger lock enqueue for non-granted
AGL lock and return 'CLO_REENQUEUED' to the caller. Original lov
lock enqueue logic ignored such case for lov_lock_enqueue_one(),
so may cause unexpected LASSERT when checking the result.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I37305aba9d9f9ad525decc20badac4afbe7aedb0
Reviewed-on: http://review.whamcloud.com/3249
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1634 test: Check client only for version matching
Jinshan Xiong [Wed, 1 Aug 2012 20:18:48 +0000 (13:18 -0700)]
LU-1634 test: Check client only for version matching

For reliability, we should check nidtbl versions on the client only
to make sure the client is not notified if IR on the MGS is disabled.
Otherwise, if the MGS can't respond while OST is restarting, the
nidtbl version won't be updated and this will fail the test.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I903add4261f5fb133ae4ac170b10c0783c226e29
Reviewed-on: http://review.whamcloud.com/3511
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-1548 osd: move i_htree_lock to iam container
wangdi [Tue, 7 Aug 2012 21:40:45 +0000 (14:40 -0700)]
LU-1548 osd: move i_htree_lock to iam container

Move i_tree_lock from ldiskfs_inode to iam_container,
so to reduce ldiskfs_inode_info size.

Signed-off-by: wang di <di.wang@whamcloud.com>
Change-Id: I4277e73347380bcb3fd34e3d76f66b1d6ec881f5
Reviewed-on: http://review.whamcloud.com/3561
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1538 tests: cleanup test output, acc-small
Andreas Dilger [Tue, 19 Jun 2012 02:21:05 +0000 (20:21 -0600)]
LU-1538 tests: cleanup test output, acc-small

There are a number of issues observed when running test scripts
on a single-node system.  Several minor cleanups to the test
scripts are also possible (coding style, more clear output, etc):

- sanity.sh test_51ba() should clean up subdirectories even if
  test_51b() failed to create all of the files
- sanity.sh test_61ic() shouldn't print all files to stdout
- running fsx accepts $FSXOPT to allow adding extra test options
- implement acceptance-small.sh via auster, so that we don't have to
  maintain two separate test wrappers, and it would be possible for
  users running acc-sm to upload results to Maloo if they wanted.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I8aae9c1af508d8173135f0938e0a26d9731253df
Reviewed-on: http://review.whamcloud.com/3132
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Keith Mannthey <keith@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1095: debug: Clarify a IR message about support.
James Simmons [Tue, 31 Jul 2012 19:36:07 +0000 (15:36 -0400)]
LU-1095: debug: Clarify a IR message about support.

During testing of Imperative Recovery we turned off IR but in the
logs we saw a IR:ON message which is confusing since we set it to
disable on the MGS. The IR:ON message is only to make aware that
IR functionality exist. A better message would be IR: [DIS|EN]ABLED.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I5990b26b326ce912faf6c5d556cb92334748322c
Reviewed-on: http://review.whamcloud.com/2853
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-657 obdfilter: commit pending journals if -ENOSPC
Hongchao Zhang [Tue, 7 Aug 2012 00:43:11 +0000 (08:43 +0800)]
LU-657 obdfilter: commit pending journals if -ENOSPC

in filter_preprw_write, if there is no enough space for this
write operation, then commit the pending journals to get some
more disk space and retry it.

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: I46106b26443bb203eee6f01a0795b47be09170a6
Reviewed-on: http://review.whamcloud.com/3446
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-359 llite: no close error if application has known failure
Fan Yong [Thu, 2 Aug 2012 04:29:25 +0000 (12:29 +0800)]
LU-359 llite: no close error if application has known failure

Don't return error again when close if the application has known
former write failure.

Rename the per-inode based 'lli_write_rc' as per file-structure
based 'fd_last_write' to track the last write/fsync failure.
When 'sys_close()' is called against the 'file' structure,
we know whether the caller has already known former write/fsync
failure or not, then avoid potenical rdundant error handling,
like confused error message.

Miss to set 'lli_async_rc' if ll_writepage() failed.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I62d9cd83fc03fad22c994f2a77774ca113a6c057
Reviewed-on: http://review.whamcloud.com/1497
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-1648 llog: prevent journal to restart for llog cancel
Fan Yong [Sun, 5 Aug 2012 15:59:38 +0000 (23:59 +0800)]
LU-1648 llog: prevent journal to restart for llog cancel

Journal credit for llog cancel should include the blocks for
deleting the inode. Otherwise the journal handle may need to
be restarted during the transaction for more credit. Then it
may be blocked with holding llog_handle::lgh_lock, which may
cause deadlock with other llog operations those have started
journal handle but waiting for the llog_handle::lgh_lock.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I157093cbe9e625715ec033f59dde325e81ec6b71
Reviewed-on: http://review.whamcloud.com/3463
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1095 debug: Improve RPC completed message
Jinshan Xiong [Mon, 23 Jul 2012 09:09:16 +0000 (17:09 +0800)]
LU-1095 debug: Improve RPC completed message

Do not print RPC completed messages for fake requests.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I7156c22c94210f265d01c8621e2be9da0c4a913d
Reviewed-on: http://review.whamcloud.com/3445
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-812 compat: SPIN/RW_LOCK_UNLOCKED no longer exist
James Simmons [Tue, 7 Aug 2012 13:55:49 +0000 (09:55 -0400)]
LU-812 compat: SPIN/RW_LOCK_UNLOCKED no longer exist

SPIN_LOCK_UNLOCKED/RW_LOCK_UNLOCKED were deprecated and no longer
exist after 2.6.39. Use DEFINE_SPIN_LOCK/DEFINE_RW_LOCK instead.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Wally Wang <wang@cray.com>
Change-Id: Ie294e817c850c35e561987f6ab46c6d12d6d018d
Reviewed-on: http://review.whamcloud.com/1942
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-1617 build: skip generated files in .gitignore
Andreas Dilger [Mon, 9 Jul 2012 23:08:26 +0000 (17:08 -0600)]
LU-1617 build: skip generated files in .gitignore

Ignore automatically generated files via .gitignore so that a large
number of spurious files are not listed at "git commit" time.  Also
consolidate many duplicate ignored files in the top-level .gitignore
file, since we don't need to list the exceptions in every directory
like the original .cvsignore files that they were generated from.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I5f9c60dc498f98abcd8c91042fc72408a915500c
Reviewed-on: http://review.whamcloud.com/3364
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-812 replace get_sb with mount in struct file_system_type
James Simmons [Tue, 24 Jul 2012 14:39:22 +0000 (10:39 -0400)]
LU-812 replace get_sb with mount in struct file_system_type

get_sb() has been removed from struct file_system_type since
2.6.39 and switched to mount().

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Wally Wang <wang@cray.com>
Change-Id: I44fa30eb51c4444d9ef8e7b545f2b80088f127cc
Reviewed-on: http://review.whamcloud.com/1951
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bogl@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1548 mdssurvey: fix file_count in mds_survey
wangdi [Mon, 6 Aug 2012 21:49:26 +0000 (14:49 -0700)]
LU-1548 mdssurvey: fix file_count in mds_survey

It should use file_count_per_thread in lctl command,
instead of file_count directly.

Signed-off-by: Wang di <di.wang@whamcloud.com>
Change-Id: I606a988db373c1065544385fdd1dfd42821eef2b
Reviewed-on: http://review.whamcloud.com/3549
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1458 test: dump changelog for lustre-rsync-test
Bobi Jam [Tue, 7 Aug 2012 05:57:33 +0000 (13:57 +0800)]
LU-1458 test: dump changelog for lustre-rsync-test

Dump plain text format changelog records for failed lustre-rsync-test
test case to help debugging.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I2041e8262dd3b5307e4d5eac4619a3fbcfe5abb4
Reviewed-on: http://review.whamcloud.com/3551
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-1685 test: fix FAIL_ON_ERROR=false parameter
Minh Diep [Wed, 1 Aug 2012 16:18:21 +0000 (09:18 -0700)]
LU-1685 test: fix FAIL_ON_ERROR=false parameter

The previous fix on LU-1528 which was supposed to
fix the overall status to FAIL when a subtest FAIL
didn't work. This commit will provide the proper
fix. The issue is grep FAIL: in exit_status() should
not include ":"

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I7eaf14351ac8a2c3d21f530e43c75871b4b01f6a
Reviewed-on: http://review.whamcloud.com/3507
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1697 mdt: create OST-objects for open by fid
Fan Yong [Sat, 4 Aug 2012 03:07:48 +0000 (11:07 +0800)]
LU-1697 mdt: create OST-objects for open by fid

Original prcessing for open by fidi gnored the case of OST-objects
to be created because of re-exporting by NFS or O_LOV_DELAY_CREATE
flags, then MDD failed to find useful stripe EA to create releated
OST-objects.

Rename mdt_open_anon_by_fid() to mdt_open_by_fid_lock() to make it
more match the real use cases.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I3c0e4791f6f74fa6b365d41a8e550dba518b39cc
Reviewed-on: http://review.whamcloud.com/3537
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1696 test: Test failure on test suite sanity test_49
yangsheng [Mon, 6 Aug 2012 19:12:56 +0000 (03:12 +0800)]
LU-1696 test: Test failure on test suite sanity test_49

Use 'grep -w' for pid search to avoid a partial match.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I809a9c3553b3a9d736891c7399d2786eb43c4d3b
Reviewed-on: http://review.whamcloud.com/3544
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-718 mdt: rename mdt threads parameters to mds
wangdi [Wed, 11 Jul 2012 09:34:11 +0000 (02:34 -0700)]
LU-718 mdt: rename mdt threads parameters to mds

rename mdt threads parameters to mds, so the following
mds layer change does not need to deal with the compatiblity
issue.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I3cb095812488b9459e4a3e878757d40410ac4191
Reviewed-on: http://review.whamcloud.com/3377
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@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-1698 test: Test failure on test suite lfsck
yangsheng [Fri, 3 Aug 2012 13:17:19 +0000 (21:17 +0800)]
LU-1698 test: Test failure on test suite lfsck

Fix the wrong redirect in get_obdfilter_param().

Test-Parameters: testlist=lfsck
Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I665bd5b25287b453f5c6fc3fc12405064d02b696
Reviewed-on: http://review.whamcloud.com/3523
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>
11 years agoLU-1710 general: add LVB type connect flag
Jinshan Xiong [Fri, 3 Aug 2012 19:18:03 +0000 (12:18 -0700)]
LU-1710 general: add LVB type connect flag

LVB type will be used for nanoseconds and layout lock. Reserve this
connect flag to prevent collision.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I76f6b8fc8be2d98b8b80f15e69b36ea50b9d7a7d
Reviewed-on: http://review.whamcloud.com/3528
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
11 years agoLU-1626 lov: fix lov request set finish check race
Bobi Jam [Mon, 16 Jul 2012 11:07:10 +0000 (19:07 +0800)]
LU-1626 lov: fix lov request set finish check race

When several lov_request callbacks are called, if one of them is
the last lov_request in the set, lov_finished_set() checks for
all of them will return true, while the following action is supposed
be called only once for the set, in this case the assumption is broke
and the lov request set's refcount is wrong.

This patch fixed another glitch, in qos_remedy_create(), when we use
OST pool, the ost_idx value does not initialied correctly.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Id3ff1777b2146630b2d693e046038fcc6f465309
Reviewed-on: http://review.whamcloud.com/3401
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1581 obdclass: take fsname from svname
Alex Zhuravlev [Mon, 9 Jul 2012 06:02:04 +0000 (10:02 +0400)]
LU-1581 obdclass: take fsname from svname

lsi_prepare() to take correct fsname from svname

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I60127273633b53f906fa8ff4b94dc370a5b58fcf
Reviewed-on: http://review.whamcloud.com/3484
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
11 years agoLU-1629 ldlm: Fix recovery messages when denying new clients
Li Wei [Fri, 27 Jul 2012 04:18:02 +0000 (12:18 +0800)]
LU-1629 ldlm: Fix recovery messages when denying new clients

Console messages printed when denying new client connections during
target recovery show misleading client statistics.  For example, in
this case:

  Lustre: lustre-MDT0000: Denying connection for new client
  192.168.117.50@o2ib1 (at 11e711ab-a329-f07a-8312-6a40af7fc5a4),
  waiting for 0 clients in recovery for 2:38
  [...]
  Lustre: lustre-MDT0000: Recovery over after 5:00, of 112 clients 0
  recovered and 112 were evicted.

The MDT was actually waiting for all the 112 known clients to recover.
None had connected, however.  In addition, the client NID and UUID
seem to be in the wrong order.  This patch changes the first console
message to look like this:

  Lustre: lustre-MDT0000: Denying connection for new client
  939243e4-2f54-a96f-3cbb-9fcf55426e2e (at 0@lo), waiting for all 2
  known clients (1 recovered, 0 in progress, and 1 unseen) to
  recover in 0:05

Hopefully this new format will be a little bit more useful to users,
although the counters are (still) read in a racy way.

Change-Id: Iefda085602de7967d66892b8f3567561962078ab
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/3485
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-812 vfs: address_space_operations.migratepage has 4 args
James Simmons [Thu, 12 Jul 2012 15:05:06 +0000 (11:05 -0400)]
LU-812 vfs: address_space_operations.migratepage has 4 args

Linux 3.3 address_space_operations.migratepage has 4 args.
Add detection in build configure and condition in code for
the new argument. Before Linux 3.3 the migration_mode values
were located in migrate.h instead of migrate_mode.h

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Wally Wang <wang@cray.com>
Change-Id: I5be5de9c6693b09ddbbc92e729b79bfa1d99ee3a
Reviewed-on: http://review.whamcloud.com/2279
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1422: debug: remove obsolete Cray Catamount support
James Simmons [Thu, 12 Jul 2012 13:03:16 +0000 (09:03 -0400)]
LU-1422: debug: remove obsolete Cray Catamount support

The lustre debug layer also had special hooks for Catamount
support. Now that Catamount support has been removed we can
remove this code as well.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I838deb6ec7f1e9f43cb2d8121bf27bff5dbad68e
Reviewed-on: http://review.whamcloud.com/3385
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-1057 quota: speed up lookup in osc_quota_chkdq
Hongchao Zhang [Thu, 12 Jul 2012 07:23:18 +0000 (15:23 +0800)]
LU-1057 quota: speed up lookup in osc_quota_chkdq

This patch replace the global hash table used to store uid/gid
about to run out of quota space with a per-OSC cfs_hash.

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: Ibf0785a60b007f33a8660298159abcc387dd8507
Reviewed-on: http://review.whamcloud.com/2074
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: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1522 recovery: rework LU-1166 patch in different way
Mikhail Pershin [Sun, 17 Jun 2012 11:08:36 +0000 (15:08 +0400)]
LU-1522 recovery: rework LU-1166 patch in different way

Dropping recovery counters upon last export put caused LU-1522 issue,
return class_export_recovery_cleanup() back to the
class_export_disconnect() and use exp_failed flag to avoid race
between target_handle_connect() and class_disconnect_stale_exports()

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I78c19a8d49786877d2de27c82bf40ebec494f044
Reviewed-on: http://review.whamcloud.com/3122
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1158 general: added nanosecond OBD connect flag
Isami Romanowski [Wed, 11 Jul 2012 20:56:50 +0000 (15:56 -0500)]
LU-1158 general: added nanosecond OBD connect flag

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

Signed-off-by: Isami Romanowski <isami@whamcloud.com>
Change-Id: I965a0ce0120f253014a75c80fe0941ba92f1c45e
Reviewed-on: http://review.whamcloud.com/3380
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-1337 kernel: NETIF_F_NO_CSUM and LOOKUP_CONTINUE removed
Liu Xuezhao [Tue, 26 Jun 2012 02:53:06 +0000 (10:53 +0800)]
LU-1337 kernel: NETIF_F_NO_CSUM and LOOKUP_CONTINUE removed

1. kernel: 3.3 removes NETIF_F_NO_CSUM feature bit
   (kernel commit 34324dc2bf27c1773045fea63cb11f7e2a6ad2b9)
   The only one place uses NETIF_F_NO_CSUM is to check
   "(caps & (NETIF_F_IP_CSUM | NETIF_F_NO_CSUM | NETIF_F_HW_CSUM))".
   Replace (NETIF_F_IP_CSUM | NETIF_F_NO_CSUM | NETIF_F_HW_CSUM)
   as NETIF_F_ALL_CSUM which was added since kernel 2.6.17
   (kernel commit 8648b3053bff39a7ee4c711d74268079c928a657)
2. Kernel 3.1 kills LOOKUP_CONTINUE, LOOKUP_PARENT is equivalent
   to it since that.
   See kernel commit 49084c3bb2055c401f3493c13edae14d49128ca0

Another minor change is adding "#include <linux/module.h>" to
libcfs/linux/linux-crypto-adler.c, linux-crypto-crc32.c.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I4f3621fcb921c866b33881027a4a0a491d676640
Reviewed-on: http://review.whamcloud.com/3398
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
11 years agoLU-1337 vfs: generic_permission has 2 args
Liu Xuezhao [Mon, 25 Jun 2012 09:12:05 +0000 (17:12 +0800)]
LU-1337 vfs: generic_permission has 2 args

generic_permission has 2 args since kernel 3.1
(kernel commit 2830ba7f34ebb27c4e5b8b6ef408cd6d74860890).

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I1ee2d127af3dfdc3c24f1466d9e183918c3a652c
Reviewed-on: http://review.whamcloud.com/3397
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
11 years agoLU-1337 build: make configure process not break for 3.4 kernel
Liu Xuezhao [Tue, 19 Jun 2012 02:47:12 +0000 (10:47 +0800)]
LU-1337 build: make configure process not break for 3.4 kernel

1. remove "ifeq ($(PATCHLEVEL),4)" from build/Makefile, Rules.in
   "ifeq ($(PATCHLEVEL),4)" is for old 2.4 kernel, it breaks
   configuration process for 3.4 kernel.
2. change the "-include" file from "include/$AUTOCONF_HDIR/autoconf.h"
   to "include/linux/kconfig.h", as kconfig.h includes autoconf.h and
   defines some macros(IS_ENABLED etc.) which is needed for some
   header files.
3. Fix a typo from "blkkdev.h" to "blkdev.h" in lustre-core.m4

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: If1c712c194ba76a2fe46c31afad28c37f0b465c6
Reviewed-on: http://review.whamcloud.com/3396
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
11 years agoLU-1477 kernel: Kernel update [RHEL6.3 2.6.32-279.2.1.el6]
yangsheng [Tue, 10 Jul 2012 16:03:00 +0000 (00:03 +0800)]
LU-1477 kernel: Kernel update [RHEL6.3 2.6.32-279.2.1.el6]

Add support for RHEL6.3 kernel 2.6.32-279.2.1.el6.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I792b174c77d635100cd02dbbddef568b550d6ed1
Reviewed-on: http://review.whamcloud.com/3033
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-1682 ptlrpc: LBUG in ldlm_cli_cancel_local
Hiroya Nozaki [Fri, 27 Jul 2012 09:04:46 +0000 (18:04 +0900)]
LU-1682 ptlrpc: LBUG in ldlm_cli_cancel_local

When the case ldlm_cli_enqueue() created a new lock, and then, fails
to allocate memory for a new request, it could cause the LBUG in
ldlm_cli_cancel_local() because the lock->l_conn_export is NULL,
nevertheless the lock is a client-side lock.
This patch fills in some lock fields before the memory allocation
for a new request.

Signed-off-by: Hiroya Nozaki <nozaki.hiroya@jp.fujitsu.com>
Change-Id: I4ba4b6f1bc5dfbb51853261a0f247289304a6abd
Reviewed-on: http://review.whamcloud.com/3488
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
11 years agoNew version: 2.2.92 2.2.92 v2_2_92 v2_2_92_0
Oleg Drokin [Mon, 30 Jul 2012 22:46:46 +0000 (18:46 -0400)]
New version: 2.2.92

Change-Id: I34be6bd03d8620c228f29b32eefbbaeeb0da6dcc
Signed-off-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1436 debug: return the original type in RETURN
Hongchao Zhang [Wed, 11 Jul 2012 07:20:20 +0000 (15:20 +0800)]
LU-1436 debug: return the original type in RETURN

in RETURN, the bit length of rc could be 32 or 64, and it also could
be pointer type, the conversion betweens pointer and integer type
will trigger compile warning related to type casting, then define an
static variable of typeof(rc), and avoid the stack usage ATM.

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: I7f3a54438dfe1f294168691718c4db8116f68de4
Reviewed-on: http://review.whamcloud.com/3072
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-1461 libcfs: Fix crypto not to use x86 pcmul for non x86 arch
Oleg Drokin [Mon, 9 Jul 2012 18:26:12 +0000 (14:26 -0400)]
LU-1461 libcfs: Fix crypto not to use x86 pcmul for non x86 arch

Also fix x86 detection in configure.

This fixes a build failure on ppc64:

In file included from user-crypto.c:34:
/var/lib/jenkins/workspace/lustre-ppc-builder/arch/ppc64/
build_type/client/distro/el6/ib_stack/inkernel/BUILD/BUILD/
lustre-2.2.60/libcfs/include/libcfs/user-crypto.h:30:
error: 'regparm' attribute directive ignored

Signed-off-by: Oleg Drokin <green@whamcloud.com>
Change-Id: Icb229a9db0826420ecc431bc7f7f5e45ecbdbd37
Reviewed-on: http://review.whamcloud.com/3361
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1597 obdfilter: fix some capa code for OST
Bobi Jam [Wed, 11 Jul 2012 03:53:06 +0000 (11:53 +0800)]
LU-1597 obdfilter: fix some capa code for OST

* A capability should be set for filter_sync(), and when the operation
  is come from OSS itself, the capability check can be passed.

* filter_capa_fixoa() need check whether filter enabled capability.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ie27497d2b61654a7f24c06f6975e8bfaf5e9ae13
Reviewed-on: http://review.whamcloud.com/3372
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1562 test: recovery-small tests 2,3,5 failed
Kyrylo Shatskyy [Mon, 9 Jul 2012 09:23:17 +0000 (12:23 +0300)]
LU-1562 test: recovery-small tests 2,3,5 failed

1. The code that executed between tests has been cleaned up
and moved to corresponding tests which use it to avoid its
execution all the time, even if it is not required when
running using ONLY.
2. The test_2, and test_3 has been joined with test_1,
and the test_7 has been joined with test_6, because
they are in fact single scenario.
3. Random and zero file creation code moved to corresponding
utility functions in the test-framework.sh
4. Added bash stack trace printing code to error_noexit that
make it easier to analyze logs.

Xyratex-bug-id: MRP-411
Signed-off-by: Kyrylo Shatskyy <kyrylo_shatskyy@xyratex.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Change-Id: Iea417c99edb001e4f5ad0d0980c7c10012e2514a
Reviewed-on: http://review.whamcloud.com/3182
Tested-by: Hudson
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1442 llite: cleanup if a page failed to add into cache
Jinshan Xiong [Mon, 23 Jul 2012 14:09:51 +0000 (22:09 +0800)]
LU-1442 llite: cleanup if a page failed to add into cache

In lustre, we assume that a dirty page must be queued in osc cache
for writing. However, in vvp_io_commit_write(), if a page failed to
add into cache, page dirty flag isn't cleared this will cause the
page will never be added into cache again.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I1c132c6f1d4f5845682e51850eb895b292fc5f0d
Reviewed-on: http://review.whamcloud.com/3447
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-1347 obdclass: makes EXPORT_SYMBOL follows function body
Liu Xuezhao [Tue, 10 Jul 2012 13:13:26 +0000 (21:13 +0800)]
LU-1347 obdclass: makes EXPORT_SYMBOL follows function body

Makes EXPORT_SYMBOL macros immediately follow the function body,
to follow normal Linux kernel coding style.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I3d1b3ebb244e3d7a069d5be13f893ffee7b5f3dd
Reviewed-on: http://review.whamcloud.com/2839
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-220 open: try open_by_fid for the known object
Fan Yong [Wed, 25 Jul 2012 05:20:06 +0000 (13:20 +0800)]
LU-220 open: try open_by_fid for the known object

If the current path for thread1 on client1 is renamed by thread2
on client2, then when thread1 tries to open its current path, it
should use the fid, but not the name. Otherwise, the open on MDS
will hit unexpected "-ENOENT".

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I905113167ebd6fe5f0185007d0e9c77083342680
Reviewed-on: http://review.whamcloud.com/2493
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1670 tests: Load in-tree osd-zfs when necessary
Li Wei [Wed, 25 Jul 2012 04:18:38 +0000 (12:18 +0800)]
LU-1670 tests: Load in-tree osd-zfs when necessary

In a developer's environment, Test Framework should try loading osd-zfs
modules from Lustre build trees when ZFS-based targets are used.

Change-Id: I47646738810401c0a48ecc5ca1459952ff811dce
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/3458
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-1630 scrub: adjust expected OI scrub speed for test
Fan Yong [Thu, 26 Jul 2012 06:10:38 +0000 (14:10 +0800)]
LU-1630 scrub: adjust expected OI scrub speed for test

Because of time error and schedule delay, the real OI scrub speed
may be not as accurate as original expectation. So need to adjust
the expectation to make them match.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I8ce95fef7ca39364a44418aabc39521f47bc150c
Reviewed-on: http://review.whamcloud.com/3457
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1497 client: SLES11 SP0 client build is broken.
James Simmons [Fri, 13 Jul 2012 13:22:55 +0000 (09:22 -0400)]
LU-1497 client: SLES11 SP0 client build is broken.

With the addition of client improvements new linux kernel
apis are exposed to the llite layer. Those apis can be
missing or have a different format in earlier kernels.
This is the case for SLES11 SP0 clients for the case
of the vma handling and the function inode_newsize_ok
that is missing. This patch fixes those issues. Final
bug is a fix to a configure test for a function from
the linux crypto api.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I699c67baec030e61133ff0a44e0ab03261b2f2d0
Reviewed-on: http://review.whamcloud.com/3063
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: Oleg Drokin <green@whamcloud.com>