Whamcloud - gitweb
fs/lustre-release.git
11 years agoLU-2420 tests: add add_group() and add_user()
Yu Jian [Tue, 11 Dec 2012 12:51:32 +0000 (20:51 +0800)]
LU-2420 tests: add add_group() and add_user()

This patch adds add_group() and add_user() functions into the
test-framework.sh. They are used by setup_posix_users() in
posix.sh.

This patch is backported from commit 34a6092 for LU-1661.
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I33baec4abe60752ba236205e03d607a5da250216
Reviewed-on: http://review.whamcloud.com/4797
Tested-by: Hudson
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2448 build: add {prepare-,}commit-msg git hooks
Andreas Dilger [Sun, 9 Dec 2012 23:58:03 +0000 (16:58 -0700)]
LU-2448 build: add {prepare-,}commit-msg git hooks

Add commit message and patch format hooks for b2_1 to match other
development branches.  This avoids problems when checking out b2_1
from master, where the .git/hooks/{prepare-,}commit-msg symlinks
are installed but not pointing at anything.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I9bea14402d1f5668855b55230aaac919e5d0d90e
Reviewed-on: http://review.whamcloud.com/4782
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1299 clio: a combo patch to fix cl_lock
Jinshan Xiong [Fri, 7 Dec 2012 18:34:24 +0000 (10:34 -0800)]
LU-1299 clio: a combo patch to fix cl_lock

In this patch, the following issues are fixed:
* redefine cl_lock_error(). There are two kinds of error when
  enqueuing a cl_lock: internal errors return from server side and
  local error for example interrupted by signal when waiting for a
  lock. Obviously the latter one is not fatal so we shouldn't err the
  lock out;
* for fault handling, only signal SIGKILL and SIGTERM is not allowed;
* handle return code of ll_fault correctly;
* redefine ->unuse() to release resource it held if enqueuing lock
  failed;
* in cl_lock_hold_release(), only CLS_CACHED mode lock will be cached,
  for locks in other states, they will be cancelled voluntarily;
* fix the problem that cfs_block_sigs() is wrongly used as
  cfs_restore_sigs() and implementation of cfs_block_sigs() was wrong
* Unuse method releases the underneath resources even error occurs, so
  we should set the lock to be CLS_NEW anyway.
* other minor fixes.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Iffce8be356723781b8f33ec9bdc2cf73e9e07138
Reviewed-on: http://review.whamcloud.com/2574
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-1833 util: don't update mtab if linked to /proc
Shuichi Ihara [Mon, 10 Dec 2012 16:58:50 +0000 (01:58 +0900)]
LU-1833 util: don't update mtab if linked to /proc

Backport patch of LU-1833 for b2_1.
This is needed for the diskless environment since their
mtab is linking to /proc/mount.

Signed-off-by: Shuichi Ihara <sihara@ddn.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Id18cd6a820dff905f0d61ecc1f71f4ce7b48cf77
Reviewed-on: http://review.whamcloud.com/4785
Tested-by: Hudson
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
11 years agoLU-1526 tests: add version_code() and lustre_version_code()
Yu Jian [Thu, 6 Dec 2012 15:45:23 +0000 (23:45 +0800)]
LU-1526 tests: add version_code() and lustre_version_code()

This patch adds the version_code() and lustre_version_code()
functions into the test framework.

It also fixes the version number for the interoperability
of quota codes and reads the quota_type from MDS instead of
MGS.

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes testlist=conf-sanity,ost-pools,sanity-quota
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I5a4d26fb71a7e56fa8497688ee2492ec90c446f8
Reviewed-on: http://review.whamcloud.com/4754
Tested-by: Hudson
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-847 quota: client retrieve quota usage directly
Niu Yawei [Thu, 15 Sep 2011 03:36:19 +0000 (20:36 -0700)]
LU-847 quota: client retrieve quota usage directly

Current 'lfs quota' sends getquota RPC to MDS, and MDS is responsible
for retrieving disk usage from all targets, this scheme will be
changed to client retrieving disk usage from all targets directly.

This patch addresses the compatibility issue as well: If the getquota
returned by MDS has QIF_SPACE, client just trust the disk usage
returned by MDS, otherwise, client has to issue RPCs to all OSTs to
collect disk usage by itself.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Signed-off-by: Bob Glossman <bogl@whamcloud.com>
Change-Id: Ia05e588e1a28abd3057274b38684057ecc887f5b
Reviewed-on: http://review.whamcloud.com/2794
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-1693 obdfilter: Set bi_rw before calling bio_add_page()
Emoly Liu [Fri, 7 Dec 2012 06:54:57 +0000 (14:54 +0800)]
LU-1693 obdfilter: Set bi_rw before calling bio_add_page()

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

port of master patch 79badd39c6584ae136b14d919eaf699ee812b666

Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: Ib43a5c198db691f8ed4001c41af7b984a264922b
Reviewed-on: http://review.whamcloud.com/4765
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
11 years agoLU-2420 tests: Have POSIX testing on b2_1
Emoly Liu [Fri, 7 Dec 2012 07:29:55 +0000 (15:29 +0800)]
LU-2420 tests: Have POSIX testing on b2_1

Have POSIX testing automated on b2_1 as it is on master.
LU-2274 port is included to change the baseline filesystem to ext3
for POSIX testing on SLES distro.

Test-Parameters: envdefinitions=SLOW=yes clientdistro=sles11 testlist=posix
Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: If20262a37d77053bda3a1e143d74c4ebd11b7ec5
Reviewed-on: http://review.whamcloud.com/4731
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2405 tests: verify off-by-one symlink length fix
Nathaniel Clark [Thu, 29 Nov 2012 14:14:37 +0000 (09:14 -0500)]
LU-2405 tests: verify off-by-one symlink length fix

Add regression test for off-by-one bug in symlink code. Ensures boundary
condition of 60 character symlinks are readable after creation.

original commit 6c3606b79a4c25946255a680f79ff2d58df66bbc

Whamcloud-bug-id: LU-2241
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I4264558a5b638e73e7631b988b05b92405d13288
Reviewed-on: http://review.whamcloud.com/4711
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2371 ptlrpc: add support for -EINPROGRESS
Niu Yawei [Fri, 13 Jan 2012 08:33:22 +0000 (00:33 -0800)]
LU-2371 ptlrpc: add support for -EINPROGRESS

Backport patches from LU-904, LU-1329 and LU-1788 to introduce
support for -EINPROGRESS in lustre 2.1. This is needed for
quota interoperability with 2.4 servers.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I17689380c8d42a8daef915342f63d96f777dc6fa
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4645
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2170 osc: set osc_lock attribute only once
Jinshan Xiong [Tue, 6 Nov 2012 23:17:33 +0000 (15:17 -0800)]
LU-2170 osc: set osc_lock attribute only once

Set osc_lock's attribute by lock allocator, otherwise if this lock is
matched and enqueued by a glimpse thread, the osc_lock's ols_glimpse
will be set to true and the lock state will be messed in
osc_lock_upcall().

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I2aff3d372d059474fed2c5d0983bdb116e932701
Reviewed-on: http://review.whamcloud.com/4482
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1648 llog: prevent journal to restart for llog cancel
Emoly Liu [Wed, 5 Dec 2012 07:25:21 +0000 (15:25 +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.

port of master patch 8d334f67052ccf77713c780a8040593728977599

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: I4013eb764485c282ed2443d02556c3377e16c936
Reviewed-on: http://review.whamcloud.com/4743
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-1749 llog: MDT should work if cancel llog failed (-ESTALE)
Emoly Liu [Wed, 5 Dec 2012 06:43:56 +0000 (14:43 +0800)]
LU-1749 llog: MDT should work if cancel llog failed (-ESTALE)

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

port of b2_3 patch e5d5cd20169b476cdb4fe4857d64aef4bf03d497

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: I85d571a953b2a34d51d586595e271933a016b04f
Reviewed-on: http://review.whamcloud.com/4742
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1650 obdclass: find the lock by index of subpage
Jinshan Xiong [Mon, 26 Nov 2012 20:04:31 +0000 (12:04 -0800)]
LU-1650 obdclass: find the lock by index of subpage

In check_and_discard_cb(), subpage's index should be used to find if
there exists another lock to cover the same page.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Id8e1da89ef81fad4c7917360d591fc7bd1309a00
Reviewed-on: http://review.whamcloud.com/4698
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
11 years agoLU-2373 kernel: Kernel update [RHEL 6.3 2.6.32-279.14.1.el6]
yangsheng [Tue, 4 Dec 2012 05:34:35 +0000 (13:34 +0800)]
LU-2373 kernel: Kernel update [RHEL 6.3 2.6.32-279.14.1.el6]

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

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: yangsheng <ys@whamcloud.com>
Change-Id: I43a6721663cfab794882f220f7c64a705be20c0f
Reviewed-on: http://review.whamcloud.com/3811
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-921 llite: warning in case of discarding dirty pages
Emoly Liu [Tue, 4 Dec 2012 05:00:10 +0000 (13:00 +0800)]
LU-921 llite: warning in case of discarding dirty pages

when a client is evicted, dirty pages may get silently discarded,
the caller of successful write(2) will not know that the data he
wrote have been discarded due to eviction before it can be flushed
to the OSS.
test 24 of recovery-small is now reenabled back.

port of master patch 624a3ac233938153e889ae81f639cf46c0a8312b
port of master patch 4cfcf91efa06decc155d8f12eafc8ede3e850fd5

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: If8aeed507890a656cbb8231879d0e31aa9f4ea02
Reviewed-on: http://review.whamcloud.com/4716
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-2372 kernel: kernel update [RHEL5.8 2.6.18-308.20.1.el5]
yangsheng [Thu, 22 Nov 2012 19:15:24 +0000 (03:15 +0800)]
LU-2372 kernel: kernel update [RHEL5.8 2.6.18-308.20.1.el5]

Update RHEL5.8 kernel to 2.6.18-308.20.1.el5.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: Iafb4088227fea098840b70e574f2afe5a1f4067c
Reviewed-on: http://review.whamcloud.com/4658
Tested-by: Hudson
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
11 years agoLU-1782 quota: ignore sb_has_quota_active() in OFED's header
Emoly Liu [Thu, 29 Nov 2012 07:42:32 +0000 (15:42 +0800)]
LU-1782 quota: ignore sb_has_quota_active() in OFED's header

sb_has_quota_active() and sb_any_quota_active() are defined
in ofed's backport headers, but if these are reffered on
RHEL5's kernel, quota is broken. So, it ignores them.

port of b1_8 patch df3a5407df2c21da2c43c8acc3624a93303c8856

Signed-off-by: Shuichi Ihara <sihara@ddn.com>
Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: I608a45b86164fd42086a1e8e5fdc63071c3a17a8
Reviewed-on: http://review.whamcloud.com/4704
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1526 tests: add --index support to the test framework
Yu Jian [Thu, 29 Nov 2012 14:06:28 +0000 (22:06 +0800)]
LU-1526 tests: add --index support to the test framework

This patch improves mkfs_opts() in test-framework.sh to
add --index option for MDT and OST targets automatically.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I6a3efd17bbc2396962f860e1a9e0b3149e7302ec
Reviewed-on: http://review.whamcloud.com/4710
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1544 llog: remove lfs catinfo command
Gregoire Pichon [Wed, 20 Jun 2012 11:14:53 +0000 (13:14 +0200)]
LU-1544 llog: remove lfs catinfo command

This patch removes the llog catinfo code, both client and server
side, since it has not been maintained and may crash the client
system in some cases.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Signed-off-by: Bob Glossman <bogl@whamcloud.com>
Change-Id: Ia55e161ca118dad66a3136850de2f0e8f7aa5206
Reviewed-on: http://review.whamcloud.com/3450
Tested-by: Hudson
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-974 security: ignore umask if acl enabled
Lai Siyao [Fri, 13 Jan 2012 10:34:33 +0000 (18:34 +0800)]
LU-974 security: ignore umask if acl enabled

Backport commit: Ibbb45dd79378d116eb428b76070a417fe08a8142.

* add OBD_CONNECT_UMASK to show whether MDS supports umask.
* client packs umask in create/open request, MDS will use it in
  object creation.
* client ignores umask if acl is enabled.
* client enforces umask if MDS doesn't support OBD_CONNECT_UMASK.
* don't update inode->i_mode after creation because la_mode may
  not be correct which doesn't consider umask.
* add an acl test for this.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: Ief42dd27fa500c2f13e7dc672c37744a8ecbf489
Reviewed-on: http://review.whamcloud.com/4660
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1842 quota: t-f changes for new quota
Niu Yawei [Tue, 18 Sep 2012 15:00:12 +0000 (11:00 -0400)]
LU-1842 quota: t-f changes for new quota

Added new quota functions in the t-f according to new quota
architecutre, at the same time, old functions are kept for
the interoprability with old server.

two minor defects fixed:
- in facet_up(), add '-x' option to grep for exact matching,
  otherwise this function will not work in single node test;
- missing 'shift' in wait_update_facet();

Test-Parameters: envdefinitions=ENABLE_QUOTA=yes

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I86915976f53af8620679ab267e04beea18dd5cf3
Reviewed-on: http://review.whamcloud.com/4031
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1363 llite: Not held lock when calling security_d_instantiate
Bobi Jam [Thu, 3 May 2012 15:28:26 +0000 (23:28 +0800)]
LU-1363 llite: Not held lock when calling security_d_instantiate

security_d_instantiate() could allocate momory and/or yield cpu, don't
held spin lock.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ifda26573a1c371de119fa922321dc0de83fb4b57
Reviewed-on: http://review.whamcloud.com/4517
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-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/3869
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1597 obdfilter: fix some capa code for OST
Bobi Jam [Thu, 12 Jul 2012 03:51:20 +0000 (11:51 +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.

port of master commit 27fe2e8d24e70af2377a52d411d53e332c3a3406

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ie27497d2b61654a7f24c06f6975e8bfaf5e9ae13
Reviewed-on: http://review.whamcloud.com/3383
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-1716 test: Verify connection flags race
Andriy Skulysh [Wed, 15 Aug 2012 12:22:01 +0000 (15:22 +0300)]
LU-1716 test: Verify connection flags race

Add OBD_TIMEOUT after setting improt to FULL state

Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Xyratex-bug-id: MRP-577
Change-Id: I301abdb1857e4105210a4af71bd57bbda89d1abb
Reviewed-on: http://review.whamcloud.com/3654
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-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>
Reviewed-on: http://review.whamcloud.com/4515
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
11 years agoLU-32 osd: keep root node BH ref of IAM container
Liang Zhen [Mon, 27 Dec 2010 05:35:20 +0000 (13:35 +0800)]
LU-32 osd: keep root node BH ref of IAM container

IAM in ldiskfs-osd will always consume some slots in bh_lru (see:
fs/buffer.c), if we keep buffer_head reference on root node,
we can save one slot in bh_lru and could be somehow helpful for
overall performance, I did some tests, LRU hits rate increased
5%-10% while creating files if we always keep this reference.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I954f26932462169c9bfc6bbfe1a57b5348624179
Reviewed-on: http://review.whamcloud.com/1826
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>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4514
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1623 mdt: Atomically update MDT export connection flags
Ned Bass [Fri, 26 Oct 2012 22:32:26 +0000 (15:32 -0700)]
LU-1623 mdt: Atomically update MDT export connection flags

MDT processing of connect requests currently updates the export
connection flags in two steps: client/server feature matching is
performed first, then much later various security-related bits are
removed as needed.  Certain error paths may leave the export flags
partially initialized.

A problem arises if multiple connect requests from the same client are
handled out of order, as may occur due to network disruptions. If the
last such request to be handled has a lower connection count than one
that already completed, it will be aborted with -EALREADY after having
modified the connection flags in the export.  However, the
security-related flags are left with incorrect values, as the
top-level connect handler skips setting these in the error path.
Replies to subsequent client requests may then contain unexpected
security information, causing the client to crash.

Similar issues may exist with other target types having non-atomic
export flag updates, and these should be addressed in follow-up
patches.

This patch makes the following changes:

- To avoid the problem described above, update the export connection
  flags atomically, and only in the successful case.

- To make this important atomic operation more conspicuous, move it
  from mdt_init_sec_level() to the top-level handler mdt_connect().

- Add a comment to mdt_connect_internal(), and delete a disabled code
  block from it.

- Correct debug message in target_handle_connect() to match code.

port of master patch dc2e00df1892a287eaf9ad6fad557f2cd28c90c7

Signed-off-by: Ned Bass <bass6@llnl.gov>
LLNL-bug-id: bz1711
Change-Id: Ie75ba0839c18ff8cae3bbf7358fdd30129b5a3a9
Reviewed-on: http://review.whamcloud.com/4688
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1517 ptlrpc: throw net error to ptlrpc for bulk
Alexander.Boyko [Mon, 17 Sep 2012 13:48:59 +0000 (17:48 +0400)]
LU-1517 ptlrpc: throw net error to ptlrpc for bulk

Start reconnect and resend if network error occures
for the bulk transfer.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Change-Id: I0cf2ee1230a039336f081fbb520c1ce768882088
Xyratex-bug-id: MRP-523
Reviewed-on: http://review.whamcloud.com/4296
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1039 ptlrpc: handle bulk IO errors correctly.
Emoly Liu [Fri, 9 Nov 2012 06:51:29 +0000 (14:51 +0800)]
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

port of master patch c9590221dc43dd5e7a7ede389f0a7d9cf566e5bf

Xyratex-bug-id: MRP-303
Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: Ie6d6c0f024605b2c6a7302cb5c424610b098f3e2
Reviewed-on: http://review.whamcloud.com/4499
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1115 kernel: software raid6 related BUG
Emoly Liu [Wed, 14 Nov 2012 01:32:11 +0000 (09:32 +0800)]
LU-1115 kernel: software raid6 related BUG

Software raid6 hit BUGON in fs/bio.c:222 when raid chunk > 64k.
We pull upstream patch: 5b99c2ffa980528a197f26c7d876cceeccce8dd5
to deal with this issue.

port of b1_8 patch 747d905b631d90ce82521aac6a11d5d0eb0f45d8

Signed-off-by: yang sheng <ys@whamcloud.com>
Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: I2b971f49dd621240460c9b9bf10f73f3f0bce32d
Reviewed-on: http://review.whamcloud.com/4526
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.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>
Signed-off-by: Bob Glossman <bogl@whamcloud.com>
Change-Id: I6b0762828b26f065732f7f0c528e0b20d41cb710
Reviewed-on: http://review.whamcloud.com/3661
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1283 utils: Use variable without initialize
Minh Diep [Wed, 4 Apr 2012 19:38:10 +0000 (12:38 -0700)]
LU-1283 utils: Use variable without initialize

We need to initialize char *savept before use it

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I0c8155d84e255fcf55e98f5b84a09faf8f8487ef
Reviewed-on: http://review.whamcloud.com/2448
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-2007 ldlm: reconnect can be racy
Alex Zhuravlev [Sat, 4 Aug 2012 08:14:31 +0000 (12:14 +0400)]
LU-2007 ldlm: reconnect can be racy

exp_connecting should be checked under spinlock

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: I271bc349ae1ad63a4acd1042f30ac7aa7176f105
Reviewed-on: http://review.whamcloud.com/4075
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1479 build: enable srp initiator module with lbuild
Shuichi Ihara [Wed, 6 Jun 2012 15:08:20 +0000 (00:08 +0900)]
LU-1479 build: enable srp initiator module with lbuild

kernel-ib doesn't include ib_srp module if RPMs built by lbuild.
It's required for Infiniband based storage.

Signed-off-by: Shuichi Ihara <sihara@ddn.com>
Change-Id: I16e940592f93abc9150f391316b8f55eb60c663a
Reviewed-on: http://review.whamcloud.com/3049
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-1923 lov: verify stripe is on given device
Andreas Dilger [Thu, 13 Sep 2012 02:35:55 +0000 (20:35 -0600)]
LU-1923 lov: verify stripe is on given device

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

Verify data passed from userspace is within bounds.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I8e70e891b9f23c8f72aa78a4807369584ac2b04f
Reviewed-on: http://review.whamcloud.com/3962
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
11 years agoLU-1688 test: fix the problem in test_58 of recovery_small
Hongchao Zhang [Sat, 4 Aug 2012 10:21:12 +0000 (18:21 +0800)]
LU-1688 test: fix the problem in test_58 of recovery_small

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

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: I226a3d4772d033182ded28caacbecdc44c7af8c4
Reviewed-on: http://review.whamcloud.com/3506
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jay J Lan <jay.j.lan@nasa.gov>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1438 quota: quota active checking is missed on slave
Niu Yawei [Wed, 13 Jun 2012 02:42:01 +0000 (19:42 -0700)]
LU-1438 quota: quota active checking is missed on slave

On quota slave, we missed checking if quota is enabled in the
quota_check_common() and several other places. Which could cause
slave retry acquire quota in quota_chk_acq_common() infinitely
when the quota is already turned off on master.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Iaa48c7cca05daf595b6d3b7e4025c7650e460918
Reviewed-on: http://review.whamcloud.com/3097
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
11 years agoLU-1438 quota: fix race in quota_chk_acq_common()
Niu Yawei [Fri, 1 Jun 2012 06:28:45 +0000 (23:28 -0700)]
LU-1438 quota: fix race in quota_chk_acq_common()

quota_check_common() & qctxt_adjust_qunit() uses different way
to check if quota is enforced on certain ID, which could result
in infinite loop in quota_chk_acq_common() when the QB/QI_SET
flag is cleared just after checking.

This patch used a non-instrusive way to fix this rare race.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ia8c5cb593abf515cf4dc041c63c8a247ebe0cd03
Reviewed-on: http://review.whamcloud.com/2996
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
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.

Change-Id: I892904af4ef01b3687e60a41250b018d67c86734
Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Reviewed-on: http://review.whamcloud.com/3103
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1606 api: Include stddef.h in ll_fiemap.h
Christopher J. Morrone [Wed, 18 Jul 2012 00:40:10 +0000 (17:40 -0700)]
LU-1606 api: Include stddef.h in ll_fiemap.h

In user space only, include stddef.h in ll_fiemap.h to define
such things as size_t.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: Ia5efa7758d27952009a50c479b3e02d4b6b7c9b6
Reviewed-on: http://review.whamcloud.com/3425
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-549 llite: Improve statfs performance if selinux is disabled
Keith [Thu, 28 Jun 2012 20:24:54 +0000 (13:24 -0700)]
LU-549 llite: Improve statfs performance if selinux is disabled

Don't disable all security xattrs when selinux is disabled just
disable security.selinux. Disabling all security xattrs was
overreaching and causing issues at a customer site.

This patch is built ontop of the original patch:
commit 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3.

Signed-off-by: Keith Mannthey <keith@whamcloud.com>
Change-Id: I73482d2ff1f166a48dceb3737df0e9e1b187dc85
Reviewed-on: http://review.whamcloud.com/2955
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1632 fid: remove fid_delete in delete_inode procedure
wangdi [Mon, 16 Jul 2012 17:27:56 +0000 (10:27 -0700)]
LU-1632 fid: remove fid_delete in delete_inode procedure

Remove fid_delete in delete_inode procedure, which is
completely obsolete in 2.x infrastructure , especially
when lmv layer is not being created during upgrade,
because it will cause the client fid space to be zero
out whenever an inode is being deleted.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I07a59da0db2ac284eb99f78a24b0e1af3080e2ca
Reviewed-on: http://review.whamcloud.com/3422
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-2237 tests: new test for re-recreating last_rcvd
Fan Yong [Mon, 29 Oct 2012 15:58:03 +0000 (08:58 -0700)]
LU-2237 tests: new test for re-recreating last_rcvd

To verify that the lost "last_rcvd" file can be re-created
when server mount.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: Ie6d23cafc511d2a99abfc7967cafb2ae0106c18c
Reviewed-on: http://review.whamcloud.com/4397
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
11 years agoLU-1203 mdt: map old params to new ones by using an array
Yu Jian [Fri, 7 Sep 2012 03:17:07 +0000 (11:17 +0800)]
LU-1203 mdt: map old params to new ones by using an array

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

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

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: If7a79cfa20c7cb57246f115b4af71ff996b77d8d
Reviewed-on: http://review.whamcloud.com/3900
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1057 quota: speed up lookup in osc_quota_chkdq
Gregoire Pichon [Thu, 4 Oct 2012 14:55:26 +0000 (16:55 +0200)]
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: Gregoire Pichon <gregoire.pichon@bull.net>
Change-Id: If291ce125d79312ba7abc182a5561657fa63b6bd
Reviewed-on: http://review.whamcloud.com/4184
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
11 years agoLU-1342 test: sanity-quota test_29
Bobi Jam [Wed, 25 Apr 2012 13:44:09 +0000 (21:44 +0800)]
LU-1342 test: sanity-quota test_29

sanity-quota test_29() needs sleep enough seconds to take into account
both service time and network latency.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ide2b321fbd104eede17eee109998d40d98fb2d30
Reviewed-on: http://review.whamcloud.com/3870
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jay J Lan <jay.j.lan@nasa.gov>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1720 kernel: Quota doesn't work over 4TB on single OST
yangsheng [Mon, 8 Oct 2012 04:25:10 +0000 (12:25 +0800)]
LU-1720 kernel: Quota doesn't work over 4TB on single OST

Fix previous kernel update patch wrong update chunk.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I3253469dd285e094f339a17e73c406b008a66195
Reviewed-on: http://review.whamcloud.com/3600
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
11 years agoLU-1789 protocol: reserve connect flag for lightweight conn
Johann Lombardi [Tue, 4 Sep 2012 07:52:00 +0000 (09:52 +0200)]
LU-1789 protocol: reserve connect flag for lightweight conn

Reserve connection flag for lightweight connection support.
Although this feature will never be supported on 2.1, it still avoids
flag conflicts.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I1b943579d8c46cce0d70a5df45d35874bf63b29b
Reviewed-on: http://review.whamcloud.com/3853
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2237 osd: skip OI ops for local objects
Fan Yong [Sat, 27 Oct 2012 07:45:27 +0000 (00:45 -0700)]
LU-2237 osd: skip OI ops for local objects

We should not add the FID mapping in the OI file for local object.
Otherwise it will cause OI lookup to return non-exist local object
when the local object lost for system crash, and it also prevents
new local object to be created, and then causes the server cannot
mountup.

This issue has been fixed in OI scrub project, which will be back
ported to lustre-2.1 soon. This is a temporary patch to allow the
current lustre-2.1 to be workable.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: Ibe2861818aaef3842605fb7d4e24cc02dad22104
Reviewed-on: http://review.whamcloud.com/4395
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
11 years agoLU-1779 tests: fix run_one_logged() to log SKIP status
Yu Jian [Fri, 7 Sep 2012 02:58:35 +0000 (10:58 +0800)]
LU-1779 tests: fix run_one_logged() to log SKIP status

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

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

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I7d4e66982a04d8759e887d88d0e406da719c03bf
Reviewed-on: http://review.whamcloud.com/3899
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-718 mdt: allow mds_num_threads module parameter
Andreas Dilger [Mon, 27 Aug 2012 21:19:40 +0000 (15:19 -0600)]
LU-718 mdt: allow mds_num_threads module parameter

In 1.8.x the MDS service threads tunable is called "mds_num_threads",
but in 2.0/2.1 this was renamed mdt_num_threads without any chance
of compatibility.  In 2.3.x this was named back to mds_num_threads
(commit bd8835cc2dde6e86701650ccf90423ecd8fb042e) since the threads
are a property of the MDS, not of the MDT(s) on the system.

Add a compatible module option "mds_num_threads" for 2.1 so that it
is possible to upgrade 1.8->2.1->2.4 without problems.  No message
is printed in 2.1.x about deprecation, since it isn't possible to use
only one or the other in 2.1, and a warning will be printed in 2.3+
once the system is upgraded.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I3cb095812488b9459e4a3e878757d40410accab0
Reviewed-on: http://review.whamcloud.com/3804
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
11 years agoLU-748 test: shorten the runtime of sanity subtest_220
Hongchao Zhang [Mon, 12 Dec 2011 18:28:08 +0000 (02:28 +0800)]
LU-748 test: shorten the runtime of sanity subtest_220

in sanity.sh, test_220 tries to exhaust all of the inodes on the OSTs
in order to verify that when it returns -ENOSPC to inode precreate
request, but there is still free blocks, then the MDS continues to use
these precreated inodes on the OSTs.

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: Icaad07311125f362f0efb26da76534c7dca27b6a
Reviewed-on: http://review.whamcloud.com/1676
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>
11 years agoLU-1762 tests: get correct MMP update and check intervals
Yu Jian [Tue, 21 Aug 2012 04:27:09 +0000 (12:27 +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: I1b73df9c7e8aea7f9a3967c278b6e82546d26dbf
Reviewed-on: http://review.whamcloud.com/3733
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
11 years agoTag 2.1.3rc3 2.1.3 2.1.3-RC3 v2_1_3 v2_1_3_0 v2_1_3_0_RC3 v2_1_3_RC3
Oleg Drokin [Sat, 25 Aug 2012 04:32:36 +0000 (00:32 -0400)]
Tag 2.1.3rc3

Change-Id: Id3770004ac710228de969d8b1090628b689730e9

11 years agoLU-1540 osd: add NUL terminator for long symlink
Bobi Jam [Thu, 23 Aug 2012 14:56:59 +0000 (22:56 +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/3765
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years ago2.1.3rc2 2.1.3-RC2 v2_1_3_0_RC2 v2_1_3_RC2
Oleg Drokin [Sat, 18 Aug 2012 19:00:36 +0000 (15:00 -0400)]
2.1.3rc2

Change-Id: I1e028505e38120a5270f9fabdec4ce7f91fc454f
Signed-off-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1282 lprocfs: Use present cpu numbers to save memory
Bobi Jam [Thu, 5 Apr 2012 06:25:40 +0000 (14:25 +0800)]
LU-1282 lprocfs: Use present cpu numbers to save memory

Port of combined patch from master branch:
Commit 65dc702123f91c4fb2ae25604f98e195fcc15544
Commit 8c831cb8a05f0d6f63b88e9b2dfb85ba4eca217a
Commit 560efa06be97651252caff4ba9bc2c014cf62ff9

* lprocfs stats data should allocated by the number of present cpus in
  stead of by possible cpu number which wastes a lot of memory.
* When new cpus are hot-plugged in, alloc necessary percpu array
  elements on demand.
* Add a LPROCFS_STATS_FLAG_IRQ_SAFE flag, when a stat is non-percpu
  stats with this flag, lprocfs_stats_lock() should disable irq.
* OSS minimum thread number also better be decided by online cpu
  number.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I7e80f27123d2e0a6352dc8d01e6ca70b9f137220
Reviewed-on: http://review.whamcloud.com/3607
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1689 tests: fix mount during e2fsck test
Yu Jian [Wed, 15 Aug 2012 01:40:59 +0000 (09:40 +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: Yu Jian <yujian@whamcloud.com>
Change-Id: I5be2b84f063a0db386a8d9d48db53c00ebd77864
Reviewed-on: http://review.whamcloud.com/3643
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.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-969 debug: reduce stack usage
Oleg Drokin [Mon, 13 Aug 2012 17:37:56 +0000 (13:37 -0400)]
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.

Updated patch to include all 2.3 fixes. (lu1436 and 1408)

Change-Id: I42437a35d428546beadf656602ede9c12c8bd2fd
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/3623
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1484 lprocfs: refine LC_PROCFS_USERS check
Bobi Jam [Tue, 24 Jul 2012 08:40:31 +0000 (16:40 +0800)]
LU-1484 lprocfs: refine LC_PROCFS_USERS check

In some RHEL patched 2.6.18 kernels, pde_users member is added in
another struct proc_dir_entry_aux instead of in struct proc_dir_entry
in later kernel version of 2.6.23.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Icee65893b2fbf4d0c3b3e957cb038be99aaf6eb8
Reviewed-on: http://review.whamcloud.com/3471
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years ago2.1.3rc1 2.1.3-RC1 v2_1_3_0_RC1 v2_1_3_RC1
Oleg Drokin [Tue, 7 Aug 2012 22:25:29 +0000 (18:25 -0400)]
2.1.3rc1

Change-Id: Id5c32ebee7287d137b28a81349d5df4584b15e15
Signed-off-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1477 kernel: Kernel update [RHEL6.3 2.6.32-279.2.1.el6]
yangsheng [Thu, 26 Jul 2012 16:52:18 +0000 (00:52 +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: yang sheng <ys@whamcloud.com>
Change-Id: I1db26247beff1af667d23858a65e0b8d85888485
Reviewed-on: http://review.whamcloud.com/3467
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1216 LBUG: ASSERTION(lli->lli_sai == NULL) failed using robinhood tool
Bob Glossman [Wed, 1 Aug 2012 16:47:10 +0000 (09:47 -0700)]
LU-1216 LBUG: ASSERTION(lli->lli_sai == NULL) failed using robinhood tool

Since statahead is still buggy, this small fix turns it off default.
This is a workaround and should go away with a future proper fix.

Signed-off-by: Bob Glossman <bogl@whamcloud.com>
Change-Id: Ia5781a976586cb7105cdeae4d772ce76ea56f0b6
Reviewed-on: http://review.whamcloud.com/3512
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1703 llite: Set page dirty before calling sync io
Jinshan Xiong [Fri, 3 Aug 2012 04:04:12 +0000 (21:04 -0700)]
LU-1703 llite: Set page dirty before calling sync io

This problem is imported by commit 9053bd5f where master patch was
used for b2_1 directly. Unfortunately the page must be dirty to call
vvp_page_sync_io() to write a page.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ia804040d7a53973f72e13f769a94d52c847fa7f7
Reviewed-on: http://review.whamcloud.com/3521
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1626 lov: fix lov request set finish check race
Bobi Jam [Mon, 16 Jul 2012 11:27:09 +0000 (19:27 +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/3402
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-1585 lnet: Fix an incorrect timestamp calculation in lst.c
Doug Oucharek [Thu, 26 Jul 2012 00:11:04 +0000 (17:11 -0700)]
LU-1585 lnet: Fix an incorrect timestamp calculation in lst.c

The operation in routine lst_timeval_diff() (in lst.c) has
a bug.  It uses tv_sec where it should be using tv_usec.

Signed-off-by: Doug Oucharek <doug@whamcloud.com>
Change-Id: I8886428253b62562840aa37842e33b63a29be56b
Reviewed-on: http://review.whamcloud.com/3472
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Isaac Huang <iclaymore@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1432 ptlrpc: LBUG in lprocfs_free_client_stats()
Lai Siyao [Fri, 29 Jun 2012 09:15:41 +0000 (17:15 +0800)]
LU-1432 ptlrpc: LBUG in lprocfs_free_client_stats()

* serialize connect and target obd cleanup to avoid connect
  accessing unexisted data structure.
* connect export refcounting cleanup.

Signed-off-by: Hiroya Nozaki <nozaki.hiroya@jp.fujitsu.com>
Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I0a9e8a58ecdc1212565a478f4a758755a1b95f99
Reviewed-on: http://review.whamcloud.com/3244
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1194 llog: fix for not sync llcd at thread stop
Alexander.Boyko [Tue, 15 May 2012 08:55:40 +0000 (12:55 +0400)]
LU-1194 llog: fix for not sync llcd at thread stop

If llog_obd_repl_cancel() happend between llog_sync() and
class_import_put() at filter_llog_finish(), llog_recov_thread_stop()
throw LBUG. This patch fix this issue by adding new flags to llog_ctxt.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Xyratex-bug-id: MRP-456
Signed-off-by: Bob Glossman <bogl@whamcloud.com>
Change-Id: I896519ed11abd301a889f658f96950ec15e76f97
Reviewed-on: http://review.whamcloud.com/3480
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1249 debug: Auto correct improper debug buffer size setting
Bobi Jam [Mon, 9 Apr 2012 05:03:51 +0000 (13:03 +0800)]
LU-1249 debug: Auto correct improper debug buffer size setting

Use the minimum required value when the debug buffer size setting
value is too small, and use the maximum acceptable value when it is
too large.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I89def7762f2ec9da3a25d28f7ffa9aede390eb85
Reviewed-on: http://review.whamcloud.com/2489
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 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>
11 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>
11 years agoLU-1511 kernel: kernel update [RHEL5.8 2.6.18-308.11.1.el5]
yangsheng [Tue, 31 Jul 2012 10:47:38 +0000 (18:47 +0800)]
LU-1511 kernel: kernel update [RHEL5.8 2.6.18-308.11.1.el5]

Update RHEL5.8 kernel to 2.6.18-308.11.1.el5.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: Ibe1a40d45394e9b7ae5fdfdfeaa37f9d3653f022
Reviewed-on: http://review.whamcloud.com/3498
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-575 MRP-133 lfs find speedup
Vitaly Fertman [Wed, 25 May 2011 21:07:09 +0000 (01:07 +0400)]
LU-575 MRP-133 lfs find speedup

lfs find should send getattr on mds only if needed;
lfs find should not break on matched obd but check other parameters as well;
lfs find time compare fixes;

Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Colin Faber <colin.faber@xyratex.com>
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
LU-575 MRP-260 fix quota tests

a fix for quota size units which conflicted with lfind size units

Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Andrew Perepechko <Andrew_Perepechko@xyratex.com>
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Signed-off-by: Bob Glossman <bogl@whamcloud.com>
Change-Id: Id0484955602d6504b622006207ba7be4f183529f
Reviewed-on: http://review.whamcloud.com/2644
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1158 general: added nanosecond OBD connect flag
Isami Romanowski [Wed, 11 Jul 2012 20:44:14 +0000 (15:44 -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: I8637cc081c4c8f3f1b7d3e2065dbf9ea45d09bfa
Reviewed-on: http://review.whamcloud.com/3378
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-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-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>
11 years agoLU-948 clio: add a callback to cl_page_gang_lookup()
Jinshan Xiong [Thu, 12 Jan 2012 00:03:41 +0000 (16:03 -0800)]
LU-948 clio: add a callback to cl_page_gang_lookup()

Add a callback to cl_page_gang_lookup() so that it will be easier to
fix this issue and be helpful for new IO engine.

If a read lock is being canceled, we used to grab page lock and then
check if they are covered by another lock, otherwise they will be
discarded. This is unnecessary because we can do this w/o grabbing
page lock.

With the above fix, when a read-ahead page is in IO during recovery,
and one of covering locks is being canceled by early cancel for
recovery, it will detect that this page is being covered by another
one, and then this page will be skipped w/o trying to grab page lock.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I22a3ea0790f5c0e01c12c29208b6d60c38058f12
Reviewed-on: http://review.whamcloud.com/1955
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1576 llite: correct page usage count
Bobi Jam [Mon, 2 Jul 2012 08:56:07 +0000 (16:56 +0800)]
LU-1576 llite: correct page usage count

If kernel has add_to_page_cache_lru(), the ll_pagevec_add() is defined
as an empty function, while page_cache_get(page) only makes sense if
ll_pagevec_add() is defined.

This patch moves page_cache_get into ll_pagevec_add() macro
definition.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Iad98aacff43beec3e7a64fd1a778f549250aa5b8
Reviewed-on: http://review.whamcloud.com/3255
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1620 lnet: Make asym router failure parameters tunable
Joseph Herring [Wed, 12 May 2010 23:49:47 +0000 (16:49 -0700)]
LU-1620 lnet: Make asym router failure parameters tunable

Make the asymmetric router failure parameters tunable.

Change-Id: Ie36f79d01c35d4c11c4532187abdeb9473ea60b4
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/3371
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1493 quota: extra release caused by race
Niu Yawei [Mon, 11 Jun 2012 10:55:32 +0000 (03:55 -0700)]
LU-1493 quota: extra release caused by race

There is a race between the check_cur_qunit() and the
dqacq_completion(): check_cur_qunit() read hardlimit
and calculate how much quota need be acquired/released
based on the hardlimit, however, the hardlimit can be
changed by the dqacq_completion() at anytime. So that
could result in extra quota acquire/release when there
is inflight dqacq.

In general, such extra dqacq dosen't bring fatal error,
unless an extra release is going to release more than
'hardlimit' quota.

To minimize the code changes (anyway, it'll be totally
rewritten in the new quota design), we just do one more
check here to avoid the extra release which could bring
fatal error. A better solution could be calculating the
qd_count here and removing the lqs_blk/ino_rec stuff.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I0ad5ff0f32e39f32872c201ad1d545fbd9d1a57d
Reviewed-on: http://review.whamcloud.com/3074
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
11 years agoLU-1471 tests: check rpcidmapd service in setup-nfs.sh
Yu Jian [Wed, 18 Jul 2012 12:35:30 +0000 (20:35 +0800)]
LU-1471 tests: check rpcidmapd service in setup-nfs.sh

The rpcidmapd system service is not in SLES11 distro, which
caused "service: no such service rpcidmapd" error while running
setup-nfs.sh. This patch fixes the above issue by checking the
service before restarting or stopping it.

Test-Parameters: testlist=parallel-scale-nfsv3,parallel-scale-nfsv4

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I87b0d496c0214329fa185a935a3e049a5dd2a1f4
Reviewed-on: http://review.whamcloud.com/3431
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1418 osc: remove DEADLOCK error messages
Alexander.Boyko [Thu, 17 May 2012 12:48:09 +0000 (16:48 +0400)]
LU-1418 osc: remove DEADLOCK error messages

Deadlock is impossible for the current code, and the check
exist from some previous version. It can be removed.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Xyratex-bug-id: MRP-497
Change-Id: Ifbd4270739894c946553952d86ff931c4c707791
Reviewed-on: http://review.whamcloud.com/2825
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
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-1095 debug: fix missing CDEBUG() newline
Andreas Dilger [Tue, 19 Jun 2012 04:31:24 +0000 (22:31 -0600)]
LU-1095 debug: fix missing CDEBUG() newline

The console message cleanup 389fde827be2ee6fb4ee08e955d773a2a16e70c6
lost a newline in one of the messages, which itself generates a
warning on the console.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie5eed2977e496e082d5b8e62bfc39e0df93fcab0
Reviewed-on: http://review.whamcloud.com/3134
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1129 obdfilter: handle race condition of recreating objects
Yu Jian [Tue, 3 Jul 2012 14:22:48 +0000 (22:22 +0800)]
LU-1129 obdfilter: handle race condition of recreating objects

During OST recovery, a race can happen while handling replayed
OST_WRITE request during the MDS->OST orphan recovery period to
recreate missing objects, which can trigger ASSERTION(diff >= 0)
failure.

This patch handles the above issue by adding obd->obd_recovering
into the assertion to check whether the OST is in recovery or not.
If it's in recovery and diff < 0, then no assertion failure occurs,
the object has been recreated. If the OST is not in recovery and
diff < 0, then the assertion failure occurs.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Id62970067b3507e832fb65b3ff623e6e67f3becc
Reviewed-on: http://review.whamcloud.com/3264
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1378 fid: Add console info for super seq allocation
wangdi [Wed, 9 May 2012 05:18:20 +0000 (22:18 -0700)]
LU-1378 fid: Add console info for super seq allocation

Add console information for super sequence allocation. Because
one super sequence will include 1 billion sequences, it rarely
happens in reality, so it will not cause the flood of console
msg.

Signed-off-by: Di Wang <di.wang@whamcloud.com>
Change-Id: I5154ee2a03006680b6a08d588287bf3941149457
Reviewed-on: http://review.whamcloud.com/2701
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>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1428 ldlm: fix a race in ldlm_lock_destroy_internal
Liang Zhen [Tue, 5 Jun 2012 08:34:34 +0000 (16:34 +0800)]
LU-1428 ldlm: fix a race in ldlm_lock_destroy_internal

ldlm_lock::l_exp_hash should be protected by internal lock of
cfs_hash, but we called cfs_hlist_unhashed(lock::l_exp_hash)
w/o holding cfs_hash lock in ldlm_lock_destroy_internal,
which means if someone called ldlm_lock_cancel on a lock while
export::exp_lock_hash is in progress of rehashing (thread context of
cfs_workitem), there could be tiny window between deleting this lock
from bucket[A] and re-adding it to bucket[B] of l_exp_hash, and
cfs_hlist_unhashed(lock::l_exp_hash) will return 1 in this window,
then we destroyed a lock but left it on l_exp_hash forever because
lock::l_destroyed has been set to 1 and ldlm_lock_destroy_internal()
wouldn't be able to remove the lock from l_exp_hash even it's called
infinite times in ldlm_cancel_locks_for_export_cb().

This patch also added some debug information to
ldlm_cancel_locks_for_export_cb in case this patch can't fix this
problem.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Ia0932658b3f085a55535e36bee4fb833e74fa242
Reviewed-on: http://review.whamcloud.com/3028
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-857 security: Lustre client tolerates enforced SELinux.
Aurelien Degremont [Mon, 14 Nov 2011 15:25:57 +0000 (16:25 +0100)]
LU-857 security: Lustre client tolerates enforced SELinux.

Fix a bug which prevents Lustre clients to access directoriess when
SELinux is enforced, on RHEL 6.
This patch does not add a real SELinux support for Lustre but ables
to activate it for all other local filesystems, without Lustre
misbehaving.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: Ia6692c96a8439eb9239cb55ce32a1c54958241d1
Reviewed-on: http://review.whamcloud.com/1703
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1423 mdt: 16K pagesize clients error during ls
yangsheng [Sat, 2 Jun 2012 18:14:36 +0000 (02:14 +0800)]
LU-1423 mdt: 16K pagesize clients error during ls

The 1.8.x client need return entire page even partially
filled in readdir.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I762e63dafc511537e3f9e47782dc328a0d7c69de
Reviewed-on: http://review.whamcloud.com/3014
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: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1164 o2iblnd: param to tune number of kib scheduler threads
Sebastien Buisson [Wed, 6 Jun 2012 14:23:52 +0000 (16:23 +0200)]
LU-1164 o2iblnd: param to tune number of kib scheduler threads

This patch gives the ability to control the number of kib scheduler
threads launched by the ko2iblnd module, via a kernel module option.

Indeed, we can have some situations where the default threads number
is not appropriate. The default value is to create as many threads as
the number of CPU cores.

On certain platforms, we have noticed a performance penalty
when running too many kib scheduler threads.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I2f7baa2f9bc9350502d1a0738c8e72777b57fa57
Reviewed-on: http://review.whamcloud.com/3047
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Reviewed-by: Oleg Drokin <green@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/3145
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1203 mdt: recognize old rootsquash and nosquash_nid params
Yu Jian [Fri, 29 Jun 2012 03:40:52 +0000 (11:40 +0800)]
LU-1203 mdt: recognize old rootsquash and nosquash_nid params

Change mdt_process_config() to make it capable of recognizing
old "mdt.rootsquash" and "mdt.nosquash_nid" parameters.

The new parameters are "mdt.root_squash" and "mdt.nosquash_nids".

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I258609ea6f63f14f2e16ec141de1455dd8137b9c
Reviewed-on: http://review.whamcloud.com/3237
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years ago2.1.2 RC3 2.1.2 2.1.2-RC3 v2_1_2 v2_1_2_0 v2_1_2_0_RC3 v2_1_2_RC3
Oleg Drokin [Fri, 8 Jun 2012 19:23:44 +0000 (15:23 -0400)]
2.1.2 RC3

Update version to 2.1.2

Change-Id: I64345a2327371b00daa3b9d7148526809f972ac9
Signed-off-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1467 ost: ASSERTION(lock->l_req_mode == lock->l_granted_mode)
yangsheng [Wed, 6 Jun 2012 08:15:47 +0000 (16:15 +0800)]
LU-1467 ost: ASSERTION(lock->l_req_mode == lock->l_granted_mode)

The lock may be cancel while ost_prolong_lock_one invoked, so
just return in this case.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: Ica6ad9199e4b210145e99d2420925803b18a7edd
Reviewed-on: http://review.whamcloud.com/3042
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1166 recovery: don't leak a connected client counter.
Bob Glossman [Tue, 22 May 2012 18:20:26 +0000 (11:20 -0700)]
LU-1166 recovery: don't leak a connected client counter.

target_handle_connect vs client eviction race may leak a
connected client counter and some evicted clients will counted twice.

Xyratex-bug: MRP-451

additional changes to complete pieces left out of previous commit

Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Signed-off-by: Bob Glossman <bogl@whamcloud.com>
Change-Id: I4218fcc8f5eacc8ddd61fe5d6d22ec4d5eace00a
Reviewed-on: http://review.whamcloud.com/2874
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoUpdate release date for new RC 2.1.2-RC2 v2_1_2_RC2
Oleg Drokin [Sun, 27 May 2012 16:31:18 +0000 (12:31 -0400)]
Update release date for new RC

Change-Id: I3d91ec3d3ef40f69844c09c1cab5c9a24ebbd642
Signed-off-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-549 llite: Improve statfs performance if selinux is disabled
Yevheniy Demchenko [Tue, 10 Apr 2012 20:01:14 +0000 (22:01 +0200)]
LU-549 llite: Improve statfs performance if selinux is disabled

Even if selinux is disabled, client still tries to get selinux
attributes from MDS. As xattrs are not yet cached, this significantly
slows down xattr heavy operations like ls -l. This patch forces
to return -EOPNOTSUPP on the client side if selinux is disabled.
It speeds up ls -l 25% for cold-cache case and 50% for hot-cache
case.

Signed-off-by: Yevheniy Demchenko <zheka@uvt.cz>
Signed-off-by: Keith Mannthey <keith@whamcloud.com>
Change-Id: I0c24bd8559818b0fae29a082790b392095f91ab5
:# Please enter the commit message for your changes. Lines starting
Reviewed-on: http://review.whamcloud.com/2904
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-1398 build: Module.symvers dependencies
Minh Diep [Thu, 24 May 2012 20:06:58 +0000 (13:06 -0700)]
LU-1398 build: Module.symvers dependencies

Ensure a Module.symvers file is generated with the correct
symbols for the configured lustre backend filesystems. This
is accomplished by adding a generic module-symvers rule which
depends on a filesystem specific version of the rule.  When a
filesystem is not configured the result is an empty rule.

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I5333e226f69ca75b6a959cc1ed673d640da22b23
Reviewed-on: http://review.whamcloud.com/2898
Tested-by: Hudson
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>