Whamcloud - gitweb
fs/lustre-release.git
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-812 build: fix "make rpms" failure
Liu Xuezhao [Tue, 24 Jul 2012 02:29:05 +0000 (10:29 +0800)]
LU-812 build: fix "make rpms" failure

In FC15 (2.6.40-4) the generated kernel headers have moved
from "include/linux" to "include/generated".
Update lustre.spec.in to fix the break of "make rpms".

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I5059b5f9bb4f77aa3fc05ced9612b0a46e5f2386
Reviewed-on: http://review.whamcloud.com/3444
Tested-by: Hudson
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1582 tests: do not force sync before failover
Andreas Dilger [Fri, 29 Jun 2012 05:22:42 +0000 (23:22 -0600)]
LU-1582 tests: do not force sync before failover

Commit 17a69cf25ed0991e04d85c259f4294dc59734e1e forced sync on every
target on a facet before it was failed, in order to fix failures in
recovery-small.sh test_105() due to initial client connect failing.
This was causing local-node testing to hang in replay-ost-single.sh
test_8b() because the client mountpoint was being sync'd and would
never finish due to a fail_loc preventing any RPCs from completing.

Syncing the targets before failover also defeats the purpose of many
recovery tests.  Instead, recovery-small test_105 creates a file on
the to-be-failed OST and writes to it, to trigger the exp_need_sync
and commit the new client export, without incorrectly forcing every
OST to be sync'd for every test that is using facet_failover().

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ied5f2ecf1f6523d4163916b24e5c4281902d500c
Reviewed-on: http://review.whamcloud.com/3239
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
11 years agoLU-1664 build: Feed spl/zfs Module.symvers to osd-zfs
Li Wei [Tue, 24 Jul 2012 08:28:36 +0000 (16:28 +0800)]
LU-1664 build: Feed spl/zfs Module.symvers to osd-zfs

This hunk, from Orion, should also be included to make sure that osd-zfs
can access spl/zfs's Module.symvars files.

Change-Id: Ic4e514c1f1f8f026353c4a8c686c0e4c389663a1
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/3454
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-723 fsfilt: Remove EXT4_EXT_HAS_NO_TREE macro
Prakash Surya [Mon, 11 Jun 2012 16:48:25 +0000 (09:48 -0700)]
LU-723 fsfilt: Remove EXT4_EXT_HAS_NO_TREE macro

This change removes the EXT4_EXT_HAS_NO_TREE macro and any logic which
is based on the definition of this macro. From now on, this macro is
assumed to be defined.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: I13af4c44d7cafef53fe45cf5e143053054d6ee50
Reviewed-on: http://review.whamcloud.com/3080
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
11 years agoLU-1235 osd: debug patch for transaction commit callback
Bobi Jam [Tue, 12 Jun 2012 09:31:12 +0000 (17:31 +0800)]
LU-1235 osd: debug patch for transaction commit callback

During transaction commit phase, osd_trans_commit_cb accesses an
invalid memeroy, this patch insert some assertions to find out the
possible faulty point.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Idb39a6946fbd5d8a96ee6915f828f557ccebadb6
Reviewed-on: http://review.whamcloud.com/2394
Tested-by: Hudson
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1337 vfs: kernel 3.3 hides vfsmount guts
Liu Xuezhao [Mon, 9 Jul 2012 08:54:09 +0000 (16:54 +0800)]
LU-1337 vfs: kernel 3.3 hides vfsmount guts

3.3 starts hiding vfsmount guts series (move from
include/linux/mount.h to fs/mount.h, kernel commit
7d6fec45a5131918b51dcd76da52f2ec86a85be6).

Add HAVE_HIDE_VFSMOUNT_GUTS macro to differentiate it.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: If69b4f75e74a64d2c07c082053e639b75585bfc9
Reviewed-on: http://review.whamcloud.com/3399
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
11 years agoLU-1471 tests: check rpcidmapd service in setup-nfs.sh
Yu Jian [Mon, 16 Jul 2012 03:40:05 +0000 (11:40 +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: I0571d9ce3850fda246c1cd43b6c9019de30398e1
Reviewed-on: http://review.whamcloud.com/3400
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-709 compat: remove all reference to LINUX_VERSION_CODE
Peng Tao [Mon, 23 Jul 2012 05:26:48 +0000 (13:26 +0800)]
LU-709 compat: remove all reference to LINUX_VERSION_CODE

All LINUX_VERSION_CODE refereces are used to note kernel version older
than 2.6.18. So we can drop them all.

Affected variables are inlined as much as possible to minimize compat
code definition.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: If3b94ceb5e21db8f96b11526399e9cd8f174fd6f
Reviewed-on: http://review.whamcloud.com/3442
Tested-by: Hudson
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1622 lnet: hash MEs on wildcard portal
Liang Zhen [Wed, 11 Jul 2012 16:47:01 +0000 (00:47 +0800)]
LU-1622 lnet: hash MEs on wildcard portal

This patch addressed a few more issues in BZ21619.

One issue is, we should always attach ME with ignore-bits on a list
instead of hash-table, no matter it's wildcard portal or unique
portal, because message could match buffers with various match-bits
if they also had ignore-bits, which means if user set both match-bits
and ignore-bits for MEs on unique portal, incoming message could
never be able to find them because they only search MEs hashed by
match-bits even those MEs with different match-bits can also fit
them after ignoring some bits.

the reason that nobody complained about it is because Lustre doesn't
have such use-case(posting ME with ignore-bits on unique portal).

The second issue fixed by this patch is, If multiple services share
one portal but use match-bits to identify different buffer types,
we still have performance issue because all buffers are attached
on one list and searching for typed buffer could be long and
expensive. So we should hash buffers on wildcard portal as well.

This is the reason that LNet selftest performance is not so good
if we mixed PING test and BRW test, because PING and BRW are sharing
on portal, so request buffers for them are attached on the same list,
BRW requests are processed much slower than PING requests, so there
will be a long search for request buffer of PING.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I0d2c6330dd231d369e2a86ced2b8374c0c96dbf9
Reviewed-on: http://review.whamcloud.com/3376
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoNew version 2.2.91 2.2.91 v2_2_91 v2_2_91_0
Oleg Drokin [Thu, 19 Jul 2012 16:02:57 +0000 (12:02 -0400)]
New version 2.2.91

Change-Id: I4da67fd6e61749478a4eeecf9667116f4a64d077
Signed-off-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1415 tests: Explain refresh_disk()
Li Wei [Wed, 18 Jul 2012 10:04:29 +0000 (18:04 +0800)]
LU-1415 tests: Explain refresh_disk()

Following Brian's suggestion in http://review.whamcloud.com/2981, this
patch adds a brief comment on refresh_disk(), which could be a bit
tricky to understand at first sight.

Change-Id: I83d583b5149c7648be4c68e31b6ff31f57410d9f
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/3430
Tested-by: Hudson
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-709 build: clean up i_mutex/i_private/quota_info macros
Peng Tao [Tue, 15 May 2012 06:28:48 +0000 (14:28 +0800)]
LU-709 build: clean up i_mutex/i_private/quota_info macros

1. struct inode has i_mutex instead of i_sem since v2.6.16
2. struct inode has i_private since v2.6.17
3. struct quota_info uses mutex instead semaphore since v2.6.17
4. move LC_SECURITY_PLUG to under v2.6.27

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I587d18a8d63927aa0a668268d252f71e7f224b50
Reviewed-on: http://review.whamcloud.com/2318
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: Niu Yawei <niu@whamcloud.com>
11 years agoLU-709 build: clean up percpu_counter and sb.s_time_gran
Peng Tao [Tue, 15 May 2012 05:55:03 +0000 (13:55 +0800)]
LU-709 build: clean up percpu_counter and sb.s_time_gran

1. linux/percpu_counter.h exists since v2.6.12,
   percpu_counter_init() takes two arguments since v2.6.17,
   and percpu_counter is not used in lustre
2. superblock.s_time_gran exists since v2.6.12
3. get_sb_time_gran() doesn't exist since v2.6.12

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Id80b0bfc702f509218fcf29d01334894d122b9c8
Reviewed-on: http://review.whamcloud.com/2317
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
11 years agoLU-709 build: clean up quota_read, follow_link and RCU
Peng Tao [Thu, 14 Jun 2012 07:08:42 +0000 (15:08 +0800)]
LU-709 build: clean up quota_read, follow_link and RCU

1. super_operations.quota_read exists since v2.6.12
2. inode_operations->follow_link returns a cookie since v2.6.13
3. RCU exists since v2.6.12

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Id79df5dcb0e3db9eb424337fd71d896ed8fefcd6
Reviewed-on: http://review.whamcloud.com/2316
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: Niu Yawei <niu@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-1614 ptlrpc: fix for AT proc read
Liang Zhen [Tue, 10 Jul 2012 04:01:01 +0000 (12:01 +0800)]
LU-1614 ptlrpc: fix for AT proc read

This patch fixed a couple of issues in AT proc read:
- calculate of buffer offset is wrong
- current lustre proc read must be less than one page

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Ieef8ad458ca70a4146e0b61fbe8a32b35577ccdf
Reviewed-on: http://review.whamcloud.com/3365
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1600 lnet: another race in lnet_nid2peer_locked
Liang Zhen [Tue, 10 Jul 2012 16:02:10 +0000 (00:02 +0800)]
LU-1600 lnet: another race in lnet_nid2peer_locked

We fixed a race for the case that LNet is shutdown while the second
thread is in progress of creating a peer, but there is another race
if LNet is shutdown _before_ lnet_nid2peer_locked is called by the
second thread, for example: called from lnet_parse() by LND thread,
in this case, we should return error w/o trying to create peer,
otherwise the shuttingdown thread could think peer-table is empty
and move to the next step with leaving a peer on deathrow list.

This patch also passed error code into lnet_finalize() when it's
called from lnet_drop_delayed_msg_list, otherwise lnet_finalize()
will treat the message as a complete message and hit assertion
because the message is actually incomplet.

We also did some coding style cleanup in this patch.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I445298d639173840687412b11da41006ddc20c10
Reviewed-on: http://review.whamcloud.com/3369
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1129 obdfilter: handle race condition of recreating objects
Yu Jian [Fri, 13 Jul 2012 09:45:53 +0000 (17:45 +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: If486bc8221cf4b9d53b6de53e8ec14a4f3174b45
Reviewed-on: http://review.whamcloud.com/3391
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1627 build: Change lbuild to use https://github.com/zfsonlinux
Chris Gearing [Thu, 12 Jul 2012 15:18:09 +0000 (08:18 -0700)]
LU-1627 build: Change lbuild to use https://github.com/zfsonlinux

lbuild fetches zfs/spl source using git@github.com:zfsonlinux which
requires a ssh keypair with git hub. If we change this to
https://github.com/zfsonlinux then we will not need local keys for
github as part of the builds.

The option to change the default by using SPLZFSGITREPO should be kept.

So change
git clone ${SPLZFSGITREPO:-"git@github.com:zfsonlinux"}/$pkg.git $pkg
to
git clone ${SPLZFSGITREPO:-"https://github.com/zfsonlinux"}/$pkg.git $pkg

Signed-off-by: Chris Gearing <chris@whamcloud.com>
Change-Id: I34c870b9aea98001115ff43291a6f95c5d268016
Reviewed-on: http://review.whamcloud.com/3387
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Joshua Kugler <joshua@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1415 tests: Add ZFS support to replay_barrier()
Li Wei [Fri, 18 May 2012 03:09:55 +0000 (11:09 +0800)]
LU-1415 tests: Add ZFS support to replay_barrier()

This patch makes sure that ZFS pool states changed by replay_barrier()
calls are restored upon subsequent failovers.

This was originally developed by Mikhail Pershin under ORI-156.  See
http://review.whamcloud.com/1490.

Change-Id: Ie8d26bc8a6d6103be3c504e0af80e8499096df58
Whamcloud-bug-id: ORI-156
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2981
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1415 tests: Adapt oos to the new grant and osd-zfs behavior
Li Wei [Wed, 30 May 2012 13:49:09 +0000 (21:49 +0800)]
LU-1415 tests: Adapt oos to the new grant and osd-zfs behavior

This was originally developed by Johann Lombardi under ORI-151 and
ORI-398.  See http://review.whamcloud.com/1545 and
http://review.whamcloud.com/1665.

Change-Id: If778df1d672e2adb182cb801036aaef950d80af4
Whamcloud-bug-id: ORI-151
Whamcloud-bug-id: ORI-398
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2978
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
11 years agoLU-1415 tests: Cope with ZFS's delayed space updates
Li Wei [Tue, 22 May 2012 04:22:27 +0000 (12:22 +0800)]
LU-1415 tests: Cope with ZFS's delayed space updates

Space-related updates, such as changes of dn_used and of
ds_used_bytes, are invisible to opertions like dt_attr_get() and
dt_statfs() until after corresponding transaction groups start to be
synchronized.  This patch makes sure the tests do a dt_sync() for each
OST before checking space usage.

Change-Id: Icff5106c0c4c493ef981bc14a0aabac8da16764d
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2909
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-812 kernel: AUTOCONF_INCLUDED removed
Wally Wang [Wed, 11 Jul 2012 20:14:20 +0000 (13:14 -0700)]
LU-812 kernel: AUTOCONF_INCLUDED removed

AUTOCONF_INCLUDED has been removed since 2.6.37 and no longer there
has <linux/config.h>.

Change-Id: I68611638f61012b2becddc4e0dec613ed2b17c99
Signed-off-by: Wally Wang <wang@cray.com>
Reviewed-on: http://review.whamcloud.com/2146
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Peng Tao <tao.peng@emc.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-812 kernel: remove smp_lock.h
James Simmons [Fri, 13 Jul 2012 13:35:06 +0000 (09:35 -0400)]
LU-812 kernel: remove smp_lock.h

smp_lock.h has been removed from kernel since 2.6.39.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Wally Wang <wang@cray.com>
Change-Id: Ia15eb8befe4d7c8c1ab29b5860c7ec5bfffbf563
Reviewed-on: http://review.whamcloud.com/2000
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Peng Tao <tao.peng@emc.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1415 tests: Handle OFD procfs changes
Li Wei [Wed, 20 Jun 2012 02:41:34 +0000 (10:41 +0800)]
LU-1415 tests: Handle OFD procfs changes

This patch handles these procfs entry changes in OFD:

  - obdfilter.*.mntdev -> osd-*.*.mntdev
  - obdfilter.*.<cache_related> -> osd-*.*.<cache_related>

Change-Id: Ie9fac69446b5c183bc8eed44a86338ef62197529
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2934
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1481 build: quiet warnings due to := assignment
Andreas Dilger [Tue, 5 Jun 2012 18:53:31 +0000 (12:53 -0600)]
LU-1481 build: quiet warnings due to := assignment

When running automake to generate Makefiles, newer compilers will
warn about non-portable assignments:

  lvfs/autoMakefile.am:52: `:='-style assignments are not portable

The use of ":=" vs. "=" determines when conditional expressions
are evaluated, but have absolutely no use for constant assignments,
so there is no point in using them at all in that case.

Convert all ":=" to "=" for constant assignments, leaving the
decision to use ":=" for conditional assignments until later.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I76caedbc1368a0d2fe02137c46b46c36fc3a500c
Reviewed-on: http://review.whamcloud.com/3129
Tested-by: Hudson
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1209 tests: get dir size after rename in sanity 133d
wangdi [Sat, 7 Jul 2012 11:22:01 +0000 (04:22 -0700)]
LU-1209 tests: get dir size after rename in sanity 133d

Because rename will change the directory size, so we
should get dir size after rename.

Signed-off-by: wang di <di.wang@whamcloud.com>
Change-Id: I1fee9f75cbc0163d10e9de7f04fcf00a4d5c1d9d
Reviewed-on: http://review.whamcloud.com/3298
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1604 osd: don't call md_ucred() for OFD
Johann Lombardi [Thu, 5 Jul 2012 20:34:23 +0000 (22:34 +0200)]
LU-1604 osd: don't call md_ucred() for OFD

There are several places where md_ucred() is called in osd-ldiskfs.
However, this function is specific to the metadata stack (it ends
up calling a callback in mdd layer) and should not be called with OFD.

osd_{push,pop}_ctxt() have thus been modified to be no-op when the
parent is of DT type. __osd_oi_insert() has also been changed to call
md_ucred() only when dealing with a MDT device.

This hack is required to keep compatibility with current MDT stack,
but should be removed as soon as the LOD/OSP is landed.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I931f0376a78cb2aff8b00a99b1c20618d4093e7d
Reviewed-on: http://review.whamcloud.com/3286
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@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/2601
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jay J Lan <jay.j.lan@nasa.gov>
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-1370 obdecho: few fixes about md_echo clients
wangdi [Mon, 14 May 2012 23:45:07 +0000 (16:45 -0700)]
LU-1370 obdecho: few fixes about md_echo clients

1. Remove LU_NOREF flag from echo client ctxt, because it
conflicts with cl ctxt(which has no NOREF flag). So if
echo_client and normal lustre client share the same context
cache, this flag will cause echo module refcount not being
dropped.

2. Ma_lmm_size in ma will be changed during mdd_xxx,
so we can not use that to free the ma_lmm.

3. Remove lu_device from linkage on lu_site during cleanup
 phase.

Signed-off-by: Di Wang <di.wang@whamcloud.com>
Change-Id: I08fec689ef9c8b64284f7400ab0fc4dc362ebf87
Reviewed-on: http://review.whamcloud.com/2784
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-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>
Change-Id: Ifa627e61d73a2a416bb548fcc510fb9ca3f36e79
Reviewed-on: http://review.whamcloud.com/3151
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bogl@whamcloud.com>
Reviewed-by: Liu Xuezhao <xuezhao.liu@emc.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1415 utils: Process all {get,set}_param arguments
Andreas Dilger [Fri, 29 Jun 2012 09:04:27 +0000 (03:04 -0600)]
LU-1415 utils: Process all {get,set}_param arguments

Process all arguments to get_param and set_param before returning an
error, to allow accessing one of multiple parameters that have changed
during code reorganization.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Li Wei <liwei@whamcloud.com>
Change-Id: Icb3019c8bd6ed83ffbfeae1fa54084f34df00c1e
Reviewed-on: http://review.whamcloud.com/3245
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1603 ofd: Fix null pointer dereferences in ldiskfs_statfs()
Li Wei [Fri, 6 Jul 2012 13:12:38 +0000 (21:12 +0800)]
LU-1603 ofd: Fix null pointer dereferences in ldiskfs_statfs()

On an OSS running the OFD-OSD stack, unmounting all OSTs makes all OFD
and OSD keys (i.e., lu_context_key) quiescent.  Next time the OSTs are
remounted, ofd_stack_init() will try to refill the quiescent osd_key
into the context, resulting in a null pointer dereference in
ldiskfs_statfs().  Before the problem motivating LCT_QUIESCENT and
LCT_REMEMBER can be revisited, the solution is to refill contexts
after new device types have been "revived" via allocations of their
first device instances.

Change-Id: I4835afb88fae460c21501df95765afd29e570860
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/3353
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
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-1595 build: add 70-column commit comment wrap
Andreas Dilger [Wed, 20 Jun 2012 18:59:47 +0000 (12:59 -0600)]
LU-1595 build: add 70-column commit comment wrap

Add a Vim modeline "textwidth=70" to force commit comments to wrap
at 70 characters, to match standard Git commit style guidelines.

Reduce the commit summary length to 62 characters, which is the
maximum that can fit after "Subject: [PATCH] " when formatting a
patch for email.  This is still above the recommended 50 character
summary limit, but with the leading ticket number and component,
there wouldn't be very much room left for a meaningful comment.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I04f8e0278a18a869b78acbf9dd1b55adf354500c
Reviewed-on: http://review.whamcloud.com/3284
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Bruce Korb <bruce_korb@xyratex.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1339 crc: remove #warning
Alexander.Boyko [Mon, 9 Jul 2012 08:16:11 +0000 (12:16 +0400)]
LU-1339 crc: remove #warning

Patch removes #warning from 32bit code path.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Change-Id: I9183caf6bc1a98da0c78086ecd300e7cf6880eb0
Reviewed-on: http://review.whamcloud.com/3354
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-1282 lprocfs: fix multi-thread contention glitch
Bobi Jam [Fri, 29 Jun 2012 07:33:04 +0000 (15:33 +0800)]
LU-1282 lprocfs: fix multi-thread contention glitch

* Revert clear stats patch committed on 8c831cb8, it is not multi-
  thread safe.
* Should protect the change of lprocfs_stats::ls_biggest_alloc_num
* Add a LPROCFS_STATS_FLAG_IRQ_SAFE flag, when a stat is non-percpu
  stats with this flag, lprocfs_stats_lock() should disable irq.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I42f29e97ff75bf3817249940c8bb491af123d1d9
Reviewed-on: http://review.whamcloud.com/3240
Reviewed-by: Liang Zhen <liang@whamcloud.com>
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-107 Add scripts for implementing heartbeat v1 failover
Ned Bass [Thu, 13 Oct 2011 17:56:03 +0000 (10:56 -0700)]
LU-107 Add scripts for implementing heartbeat v1 failover

/usr/sbin/ldev - list devices, determine validity, etc.
/usr/sbin/lhbadm - wrapper for heartbeat utils for failover/failback/status
/etc/ha.d/resource.d/Lustre - heartbeat resource agent (wraps init script)
/etc/init.d/lustre - lustre init script
/etc/init.d/lnet - lnet init script
/usr/sbin/haconfig - helper script for building heartbeat config files

The scripts use two configuration files:
 /etc/ldev.conf - maps hostnames to failover partners, devices, and labels
 /etc/nids - hostnames to lustre NIDS

In addition to heartbeat support, the ldev script enables parallel
execution of commands against all luns configured on a server.  The
lustre init script supports devices backed by Linux software RAID, ZFS,
or traditional block devices.

NOTE: these scripts presume the udev rules for persistent block device
naming are in place, in particular that lustre labels can be mapped to
block devices in /dev/disk/by-id.

Change-Id: I8391744ce6eed989c061f131aca4a2da7b5d51b2
Signed-off-by: Ned Bass <bass6@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/290
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1347 lnet: makes EXPORT_SYMBOL follows function body
Liu Xuezhao [Tue, 10 Jul 2012 13:09:29 +0000 (21:09 +0800)]
LU-1347 lnet: 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: Ief3cc2a8e6bf6ad851287278a354fe542d330865
Reviewed-on: http://review.whamcloud.com/2836
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1378 fld: export fldb under /proc
wangdi [Fri, 22 Jun 2012 14:58:47 +0000 (07:58 -0700)]
LU-1378 fld: export fldb under /proc

Export fldb under /proc.

Signed-off-by: wang di <di.wang@whamcloud.com>
Change-Id: Ie4e877fb707cbd86ca83841fffa98425b8f66c00
Reviewed-on: http://review.whamcloud.com/3175
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1598 osd: bypass OI lookup for creation
Liang Zhen [Wed, 4 Jul 2012 05:50:30 +0000 (13:50 +0800)]
LU-1598 osd: bypass OI lookup for creation

It's unnecessary to call osd_oi_lookup() in osd_fid_lookup if it's a
file creation because FID shouldn't never be re-used so we expect it
to be not existed, which means we can bypass overhead of OI lookup at
here, if it's really a duplicate FID from unexpected reasons, we
should detect it later while calling do_create->osd_oi_insert().

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I87227a4e7d008c06876b1366734832886868de3b
Reviewed-on: http://review.whamcloud.com/3269
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@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-1492 utils: cleanup wirecheck for ptlrpc_body
Niu Yawei [Thu, 7 Jun 2012 12:19:14 +0000 (05:19 -0700)]
LU-1492 utils: cleanup wirecheck for ptlrpc_body

Added check for the consistency of ptlrpc_body_v3 & ptlrpc_body_v2,
minor fix in ptlrpc_body checking & copyright for in wirehdr.c.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I84d756fcccd63400a144dd96b24df7c6364498e5
Reviewed-on: http://review.whamcloud.com/3057
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1331 changelog: allow changelog to extend record
Lai Siyao [Fri, 1 Jun 2012 11:46:44 +0000 (19:46 +0800)]
LU-1331 changelog: allow changelog to extend record

Previously rename is split into two records, this isn't natural and
makes replication hard because rename needs two records, but they
may not be consecutive.

To solve this, allow Changelog to extend record, add fields sfid/spfid
in changelog record to store source/parent fid, and pack both source
and target name into the record.

Added changelog flag CLF_RENAME_LAST: rename unlink of last hardlink
of the target.

Added macro HAVE_CHANGELOG_EXTEND_REC: liblustreapi receives all
changelog records in changelog_ext_rec format.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I97b990687726e45e661cfb11609f80132c84825d
Reviewed-on: http://review.whamcloud.com/2577
Tested-by: Hudson
Reviewed-by: Thomas LEIBOVICI - CEA <thomas.leibovici@cea.fr>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-181 ptlrpc: align fields of ptlrpc_request
Liang Zhen [Sun, 8 Jul 2012 16:11:08 +0000 (00:11 +0800)]
LU-181 ptlrpc: align fields of ptlrpc_request

Size of ptlrpc_request_buffer_desc is 1048 which means we need 2K
slab for allocating rqbd. This can be changed after we align
fields in ptlrpc_reques to decrease size of ptlrpc_requestt,
because each rqbd has an embedded ptlrpc_request.
We also aligned fields of lu_context because it's embedded in
ptlrpc_request.

With this simple change, size of rqbd is 1008 bytes, and we
can save at least tens of MBs on server.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Iac292e4375421843785fdae083b1aa667d43b3a7
Reviewed-on: http://review.whamcloud.com/3352
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
11 years agoLU-1607 tests: enable multiple CPU Partitions
Liang Zhen [Fri, 6 Jul 2012 04:43:11 +0000 (12:43 +0800)]
LU-1607 tests: enable multiple CPU Partitions

CPU partitions number of libcfs is explicitly set to 1 which means
most SMP features are disabled by default, the reason we didn't
enable it so far is because enabling it will break some tests
because change of /proc interfaces or modparameters.

This patch covered a few things:
- use 0 as default value of cpu_npartitions
  libcfs will estimate CPU partition number based on cores
  or NUMA nodes
- a small fix for LNet
  ni_last_alive should use second instead of jiffies as time stamp
- always enable multiple CPU partitions in test-framework
- fix test_215 for sanity
- fix test_52 for conf-sanity

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Ib1a296e254a7b2e91e8d77337a9cd9ac877321e3
Reviewed-on: http://review.whamcloud.com/3288
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoNew tag 2.2.90 2.2.90 v2_2_90 v2_2_90_0
Oleg Drokin [Tue, 10 Jul 2012 02:20:56 +0000 (22:20 -0400)]
New tag 2.2.90

code freeze in preparations for 2.3 release.

Change-Id: Ib2a6fad2d1e1807a1950d0288961eccc446144ad
Signed-off-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1581 ofd: learn osd to be used from lmi
Alex Zhuravlev [Wed, 27 Jun 2012 12:10:19 +0000 (16:10 +0400)]
LU-1581 ofd: learn osd to be used from lmi

so that OSS can work with different type of backends (ldiskfs, zfs)

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I20d7cdc7251881bc83c1d0e5af61a72f0dbca283
Reviewed-on: http://review.whamcloud.com/3282
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-169 clio: restart clio operations if layout changes
Jinshan Xiong [Mon, 18 Jun 2012 10:36:11 +0000 (18:36 +0800)]
LU-169 clio: restart clio operations if layout changes

For glimpse and setattr operations, the layout may change as they may
not open file while running, so we need to restart these operations
in case layout is changed during the IO time.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: Ia7ba1829164259e06af342be3f94e654ed0f89b8
Reviewed-on: http://review.whamcloud.com/2026
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-169 ldlm: add support for layout lock
Jinshan Xiong [Fri, 29 Jun 2012 07:52:19 +0000 (15:52 +0800)]
LU-169 ldlm: add support for layout lock

Add support for layout lock at client side.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: Icbdf691134bfb403b0e2019ed364da3e3a11bf5c
Reviewed-on: http://review.whamcloud.com/2025
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1182 ldiskfs-osd: space accounting support
James Simmons [Mon, 2 Jul 2012 15:47:10 +0000 (11:47 -0400)]
LU-1182 ldiskfs-osd: space accounting support

Also support space accounting for ldiskfs OSD on SLES11 SP1
platforms.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I6fd2f58f2fb04f11105a13dc4c9da423cd80fdcc
Reviewed-on: http://review.whamcloud.com/3258
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
11 years agoLU-1581 utils: mount to parse mountdata
Alex Zhuravlev [Wed, 27 Jun 2012 09:07:01 +0000 (13:07 +0400)]
LU-1581 utils: mount to parse mountdata

only for non-ldiskfs backends for a while

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I051489ff2e853f2fd07fc0b355c1e18278939a1d
Reviewed-on: http://review.whamcloud.com/3235
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1581 utils: introduce osd_tune()
Alex Zhuravlev [Wed, 27 Jun 2012 07:15:40 +0000 (11:15 +0400)]
LU-1581 utils: introduce osd_tune()

mount_lustre.c to use that

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: If3e576c69c30625a079007cb93e5c447721118ab
Reviewed-on: http://review.whamcloud.com/3234
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1581 mount: minimal support to use zfs
Alex Zhuravlev [Mon, 21 May 2012 07:50:57 +0000 (11:50 +0400)]
LU-1581 mount: minimal support to use zfs

few changes to obd_mount.c to pass backend type

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Iea621d089321e81453f937ad1a772a38b3b2a7f1
Reviewed-on: http://review.whamcloud.com/3232
Tested-by: Hudson
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1581 utils: add zfs support to wrappers
Alex Zhuravlev [Mon, 18 Jun 2012 06:04:41 +0000 (10:04 +0400)]
LU-1581 utils: add zfs support to wrappers

now mkfs can create lustre server with zfs backend

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ibbed024ec918f1ef76b6fc92951143cff04421b6
Reviewed-on: http://review.whamcloud.com/3228
Reviewed-by: Andreas Dilger <adilger@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-1581 utils: min zfs support
Alex Zhuravlev [Sun, 17 Jun 2012 07:33:25 +0000 (11:33 +0400)]
LU-1581 utils: min zfs support

set of osd_*() instance to support zfs backend

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I6733d6ad139c288d26e1a5f2617b07c9fdc6ed0f
Reviewed-on: http://review.whamcloud.com/3227
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Li Wei <liwei@whamcloud.com>
11 years agoLU-957 lfsck: misc fixes for lfsck
Fan Yong [Fri, 6 Jul 2012 05:28:28 +0000 (13:28 +0800)]
LU-957 lfsck: misc fixes for lfsck

Some fixes for typo, style, and code cleanup.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: Ia027486de26cf8ee7f41da1a33a4fc39d9656752
Reviewed-on: http://review.whamcloud.com/3289
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-1594 ldlm: disable LUSTRE_TRACKS_LOCK_EXP_REFS
Liang Zhen [Tue, 3 Jul 2012 09:04:19 +0000 (17:04 +0800)]
LU-1594 ldlm: disable LUSTRE_TRACKS_LOCK_EXP_REFS

Disable lock export refcount, it's supposed to expose bug(20498)
but we didn't see it for two years already, disable it will
save 28 bytes for each ldlm_lock and decrease compute overhead.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I385c5e9d5052eb14b23bbf27003bf499e5b51576
Reviewed-on: http://review.whamcloud.com/3260
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1600 lnet: peer creation has race with shutdown
Liang Zhen [Thu, 5 Jul 2012 05:10:08 +0000 (13:10 +0800)]
LU-1600 lnet: peer creation has race with shutdown

lnet_nid2peer_locked()->lnet_find_peer_locked() will get NULL if
LNet's in progress of shutting down, then it will try to allocate
a new peer and insert it into peer table. If one thread is doing this
and another thread could have already finalized everything of LNet,
so the first thread will crash system after allocation.

The solution is add an extra refcount on peer-table (number of peers)
before allocating new peer, because the shutting down thread always
needs to wait until peers number to be zero before going to the
next step of finalization.

This bug is not introduced by new LNet, but it can be exposed
easily by new LNet.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I5c8d26f08ce56092bee1b4bae5111fdfe1e9c12b
Reviewed-on: http://review.whamcloud.com/3274
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoNew tag 2.2.60 2.2.60 v2_2_60 v2_2_60_0
Oleg Drokin [Fri, 6 Jul 2012 16:23:58 +0000 (12:23 -0400)]
New tag 2.2.60

Change-Id: Ib962d669a8f3d0cbeeb92b430a0f86eb0d1b6283
Signed-off-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-56 ptlrpc: post rqbd with flag LNET_INS_LOCAL
Liang Zhen [Wed, 4 Jul 2012 04:21:38 +0000 (12:21 +0800)]
LU-56 ptlrpc: post rqbd with flag LNET_INS_LOCAL

LNet has a new flag LNET_INS_LOCAL which can be used by CPT
affinity threads while posting buffer.
(commit 279bbc81e03dc74d273ec12b4d9e703ca94404c4)
Buffer posted with this flag will be attached on local partition
only, and LND threads can find/match buffer by grabbing a local
partition lock which is good for performance.
This patch applied this flag to ptlrpc service.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I75cee15f125b033642195a71921dbc6ad4db5dfd
Reviewed-on: http://review.whamcloud.com/3268
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-957 lfsck: user space tools for LFSCK/scrub
Fan Yong [Wed, 4 Jul 2012 11:54:00 +0000 (19:54 +0800)]
LU-957 lfsck: user space tools for LFSCK/scrub

Control LFSCK/scrub by lctl commands:

1) lfsck_start: start LFSCK/scrub with specified parameters.

2) lfsck_stop: stop LFSCK/scrub on the specified MDT device.

3) The LFSCK/scrub status can be obtained through some special
lproc interface. For example: check OI scrub status by:
lctl get_param -n osd-ldiskfs.*.oi_scrub

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I5828c18453c92162fa0dc211324b69d15ecd9fbc
Reviewed-on: http://review.whamcloud.com/3170
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1581 mount: do not pass osd= option
Alex Zhuravlev [Thu, 5 Jul 2012 19:40:20 +0000 (23:40 +0400)]
LU-1581 mount: do not pass osd= option

until it's supported by the kernel part

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ia3868e1c2dffb6a0ae8bbe4f8b38018ffcdcc6f4
Reviewed-on: http://review.whamcloud.com/3285
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
11 years agoLU-521 lnet: make LST support variable page size
Liang Zhen [Mon, 5 Sep 2011 15:12:32 +0000 (23:12 +0800)]
LU-521 lnet: make LST support variable page size

LNet selftest can't support variable page size because it sends
number of pages over the wire.
We have to change wire format to fix this but it will have
compatibility issue, so this patch also implemented "session features"
for LST to resolve compatibility issue, only new version LST
can understand new bulk RPC format, although new LST nodes still can
communicate with old LST nodes.

The Variable page size feature can be turned on by setting
LST_FEATURES to LST_FEAT_BULK_LEN (1). This feature is off by default.

Please see the Jira ticket (LU-521) for more details.

Change-Id: I4a552a3310cf0ed0a2f5ae29eaf789469e1c245a
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Signed-off-by: Doug Oucharek <doug@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1338
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1239 ldlm: cascading client reconnects
Vitaly Fertman [Tue, 26 Jun 2012 11:37:47 +0000 (15:37 +0400)]
LU-1239 ldlm: cascading client reconnects

It may happen that
- MDS is overloaded with enqueues, they consume all the threads on
  MDS_REQUEST portal and waiting for a lock a client holds;
- that client tries to re-connect but MDS is out of threads and
  re-connection fails;
- other clients are waiting for their enqueue completions, they try
  to ping MDS if it is still alive, but despite the fact it is a HP-rpc,
  there is no thread reserved for it. Thus, other clients get timed
  out as well.

Ensure each service which handles HP-rpc has an extra thread reserved
for them; make MDS_CONNECT and OST_CONNECT HP-rpc.

Change-Id: I295aec6a2d2fb614d4b5f037068a3dcdda1a8b09
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Andrew Perepechko <Andrew_Perepechko@xyratex.com>
Xyratex-bug-id: MRP-455
Reviewed-on: http://review.whamcloud.com/2355
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-1422 lnet: eliminate obsolete Cray Catamount support
James Simmons [Mon, 2 Jul 2012 17:18:17 +0000 (13:18 -0400)]
LU-1422 lnet: eliminate obsolete Cray Catamount support

Remove the bulk of code for the no longer supported Catamount
platform on Cray. This was conditionally compiled under CRAY_XT3.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I011058fb0bc74aaf01ec34ea6385e54bdee2356f
Reviewed-on: http://review.whamcloud.com/3064
Reviewed-by: Cory Spitz <spitzcor@cray.com>
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-56 ptlrpc: CPT affinity ptlrpc RS handlers
Liang Zhen [Tue, 19 Jun 2012 07:56:45 +0000 (15:56 +0800)]
LU-56 ptlrpc: CPT affinity ptlrpc RS handlers

This patch covered a couple of things:
- reimplement RS handler by using CPU partition APIs
- Instead of always round-robin choose RS handler thread, this patch
  directly choose RS handler thread on partition of rs::rs_svcpt

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I5fdebb116630d073d41b39fc4271c4cebb429965
Reviewed-on: http://review.whamcloud.com/3135
Reviewed-by: wangdi <di.wang@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1581 ofd: revert learn osd to be used from lmi
Johann Lombardi [Thu, 5 Jul 2012 11:16:18 +0000 (07:16 -0400)]
LU-1581 ofd: revert learn osd to be used from lmi

This reverts commit 92ff6ccdfb8b069d36840db97820d3ebe44dfd5b
This patch has broken builds:
ofd_dev.c>:106: error: 'struct lustre_sb_info' has no member
named 'lsi_osd_type'

Change-Id: Id3aa27c513575689c3b33754639b64f716d651f0
Reviewed-on: http://review.whamcloud.com/3279
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Johann Lombardi <johann@whamcloud.com>
11 years agoLU-1581 ofd: learn osd to be used from lmi
Alex Zhuravlev [Wed, 27 Jun 2012 12:10:19 +0000 (16:10 +0400)]
LU-1581 ofd: learn osd to be used from lmi

so that OSS can work with different type of backends (ldiskfs, zfs)

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ia630d010b77a8d7ca74d67122d77a3ceb98e95e1
Reviewed-on: http://review.whamcloud.com/3236
Tested-by: Hudson
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1581 utils: mount to recognize backend type
Alex Zhuravlev [Wed, 27 Jun 2012 05:35:50 +0000 (09:35 +0400)]
LU-1581 utils: mount to recognize backend type

using mount utils introduced earlier.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I18ed4d1840f0b9577b54bc9aa0e7d34e56287ed6
Reviewed-on: http://review.whamcloud.com/3233
Tested-by: Hudson
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1581 utils: mt_type macro
Alex Zhuravlev [Wed, 27 Jun 2012 05:33:18 +0000 (09:33 +0400)]
LU-1581 utils: mt_type macro

to convert ldd_mount_type into string

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I7ea21958584384b68ccde546c1472eb3053f6e22
Reviewed-on: http://review.whamcloud.com/3231
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1581 utils: struct mount_opts
Alex Zhuravlev [Tue, 26 Jun 2012 17:37:03 +0000 (21:37 +0400)]
LU-1581 utils: struct mount_opts

a structure to pass mount options all around

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ide67df554c49752bb06c1f0ed81531925332808a
Reviewed-on: http://review.whamcloud.com/3230
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1581 utils: mkfs's usage to show zfs support
Alex Zhuravlev [Mon, 18 Jun 2012 06:52:27 +0000 (10:52 +0400)]
LU-1581 utils: mkfs's usage to show zfs support

now everyone is aware of zfs support

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ie03aa55360e61b7db1e45a27ea9f0c040827c4d2
Reviewed-on: http://review.whamcloud.com/3229
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-1445 fld: Checking lsr_flage after gotten from the cache.
wangdi [Mon, 11 Jun 2012 21:32:59 +0000 (14:32 -0700)]
LU-1445 fld: Checking lsr_flage after gotten from the cache.

Checking lsr_flags after getting the FLD entry from the local
cache to make sure the the correct entry is gotten.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I42c01bdb6521b69d6ce6b79e2b5eeec512d0d657
Reviewed-on: http://review.whamcloud.com/3164
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-988 clio: use OSC object's m/a/ctime when build write RPC
Bobi Jam [Wed, 27 Jun 2012 13:29:05 +0000 (21:29 +0800)]
LU-988 clio: use OSC object's m/a/ctime when build write RPC

When building OST write RPC, inode's m/a/ctime are out-dated until
lov_merge_lvb() is called, so we need OSC object's m/a/ctime to set
the OST object.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ie4466ad646fd87c36577ea2aad5fa19ad97c5be7
Reviewed-on: http://review.whamcloud.com/3200
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1581 utils: introduce osd_init() wrapper
Alex Zhuravlev [Sun, 17 Jun 2012 07:33:00 +0000 (11:33 +0400)]
LU-1581 utils: introduce osd_init() wrapper

to load and initialize libraries/modules for different backends

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Iae4ac1bbf87093731686f9362d7f6a71cc704030
Reviewed-on: http://review.whamcloud.com/3226
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-1581 utils: unknown fstype
Alex Zhuravlev [Sun, 17 Jun 2012 06:18:15 +0000 (10:18 +0400)]
LU-1581 utils: unknown fstype

scream and exit if specific fstype is not recognized

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib5e897bdfe9609be81d74a41fd65ec57b6cf5d37
Reviewed-on: http://review.whamcloud.com/3225
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-1581 utils: support for multiple underlying devices
Alex Zhuravlev [Thu, 7 Jun 2012 07:22:22 +0000 (11:22 +0400)]
LU-1581 utils: support for multiple underlying devices

will be used by zfs backend

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I90c3630d993811d702f81c838aae7344775cc115
Reviewed-on: http://review.whamcloud.com/3224
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-1581 utils: osd_write_ldd() wrapper
Alex Zhuravlev [Tue, 5 Jun 2012 08:54:41 +0000 (12:54 +0400)]
LU-1581 utils: osd_write_ldd() wrapper

used to write mountdata to backend

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I8cb0275372f00f12f54461ce9afb243283aff4f3
Reviewed-on: http://review.whamcloud.com/3223
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-445 lnet: Make previous change backwards compatible
Doug Oucharek [Wed, 27 Jun 2012 00:16:39 +0000 (17:16 -0700)]
LU-445 lnet: Make previous change backwards compatible

With the previous patch as is, a 2.3 system running against
a 2.2 or 2.1 system will have an invalid timestamp for doing
bandwidth calculations.

This patch checks the value of the timestamp field to
determine if it is a valid value (>= 2.3) or is too small
to be a timestamp (< 2.3). If it is a valid timestamp, it
will be used. If not, the local timestamp will be used.

Signed-off-by: Doug Oucharek <doug@whamcloud.com>
Change-Id: If655144de72d3e46ab32acfcfc35ed79f58d00b2
Reviewed-on: http://review.whamcloud.com/3192
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1581 utils: osd_make_lustre() wrapper
Alex Zhuravlev [Tue, 5 Jun 2012 08:50:41 +0000 (12:50 +0400)]
LU-1581 utils: osd_make_lustre() wrapper

a wrapper to prepare backend (basically mkfs for given type)

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I5ba5c7b5905de524bd0089671c753c3a5c44a9ec
Reviewed-on: http://review.whamcloud.com/3222
Tested-by: Hudson
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1581 utils: osd_read_ldd() wrapper
Alex Zhuravlev [Tue, 5 Jun 2012 08:40:22 +0000 (12:40 +0400)]
LU-1581 utils: osd_read_ldd() wrapper

used to fetch mountdata from backend

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I785c43ff95ae3e8faecf9231495529e0d2da8246
Reviewed-on: http://review.whamcloud.com/3221
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-1339 libcfs: add crc32 pclmulqdq implementation
Alexander.Boyko [Fri, 29 Jun 2012 08:51:56 +0000 (12:51 +0400)]
LU-1339 libcfs: add crc32 pclmulqdq implementation

Using hardware provided PCLMULQDQ instruction to accelerate the CRC32
disposal. This instruction present from Intel Westmere and
AMD Bulldozer CPUs.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyartex.com>
Xyratex-bug-id: MRP-314
Change-Id: Id6c88629f77cc5d389db49b7ee6e7111294c4a14
Reviewed-on: http://review.whamcloud.com/2586
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1581 utils: introduce osd_is_lustre() wrapper
Alex Zhuravlev [Tue, 5 Jun 2012 07:55:36 +0000 (11:55 +0400)]
LU-1581 utils: introduce osd_is_lustre() wrapper

the purpose of that is to verify whether underlying device
can be used for lustre and identify backend filesystem

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ie95cf8b88811be12feb4af67e15ff26ecae9a447
Reviewed-on: http://review.whamcloud.com/3220
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-1581 utils: osd_prepare_lustre
Alex Zhuravlev [Tue, 5 Jun 2012 07:26:38 +0000 (11:26 +0400)]
LU-1581 utils: osd_prepare_lustre

wrapper to prepare backed, load modules, etc

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I9f841889cdb950aa9a6650369d73fdc1f0a57f55
Reviewed-on: http://review.whamcloud.com/3219
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-1581 utils: more common helpers
Alex Zhuravlev [Tue, 5 Jun 2012 05:40:19 +0000 (09:40 +0400)]
LU-1581 utils: more common helpers

check_mtab_entry() and update_mtab_entry() this time

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Idcb4d75c4fe202d41f468085f792519b1c431666
Reviewed-on: http://review.whamcloud.com/3218
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-1581 utils: move common funcs to mount_utils.c
Alex Zhuravlev [Tue, 5 Jun 2012 05:01:01 +0000 (09:01 +0400)]
LU-1581 utils: move common funcs to mount_utils.c

like functions to manipulate loop devices, etc

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I96c6347fbda130b81e7da267547af8a3a1c8b567
Reviewed-on: http://review.whamcloud.com/3217
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-1581 utils: extract ldiskfs specifics from mkfs_lustre.c
Alex Zhuravlev [Mon, 4 Jun 2012 11:44:15 +0000 (15:44 +0400)]
LU-1581 utils: extract ldiskfs specifics from mkfs_lustre.c

into mount_utils_ldiskfs.c

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib63258604f9f38b37bb232bc48a33ff867ec1ef0
Reviewed-on: http://review.whamcloud.com/3216
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-56 ptlrpc: partitioned ptlrpc service
Liang Zhen [Sun, 17 Jun 2012 02:57:03 +0000 (10:57 +0800)]
LU-56 ptlrpc: partitioned ptlrpc service

Current ptlrpc service only have a per-service instance, all service
threads share locks and request queue of this instance, this causes
many perforamnce issues like heavy lock contention and data/threads
migration between CPUs/NUMA nodes.

This patch created per-partition data for ptlrpc service, each service
have locks/request-queues on each partition, also, service will have
CPT (CPU partition) affinity threads on each partition, threads
bond on a CPT will only access data on local partition, this feature
should decrease lock contention and data/thread migration and improve
server side performance.

Another change is we use cfs_hash to replace big array fo_iobuf_pool
in obdfilter, filter_iobuf can be found by from the hash by thread ID.
The reason we made this change is because we removed absolute limit
of ptlrpc threads number, which means we have no idea how big the
fo_iobuf_pool should be. Also, even we have obsolute limit of threads
number, it's still dangerous to use a pre-allocated array because
it's difficult to guarantee thread ID to be contiguous if we want
to shrink threads in the future.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I5f8dce7bcf389f9f076f5ce2d4685a03f910260b
Reviewed-on: http://review.whamcloud.com/3133
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1581 defs: new param
Alex Zhuravlev [Sun, 17 Jun 2012 09:40:02 +0000 (13:40 +0400)]
LU-1581 defs: new param

identity_upcall param

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ie5ed6fea5de4f7dd6ed1f8e2a8333e158d0d147b
Reviewed-on: http://review.whamcloud.com/3215
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-1581 defs: zfs string
Alex Zhuravlev [Fri, 25 May 2012 11:56:42 +0000 (15:56 +0400)]
LU-1581 defs: zfs string

a string corresponding to ZFS type

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I491041e22680f051016e5f782843b88580bf841e
Reviewed-on: http://review.whamcloud.com/3214
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-1305 lprocfs: osd-ldiskfs to use common helpers
Alex Zhuravlev [Wed, 27 Jun 2012 12:08:25 +0000 (16:08 +0400)]
LU-1305 lprocfs: osd-ldiskfs to use common helpers

introduced with osd-zfs

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I504fa697f6502ddfbac1e0ebc524337a02a74328
Reviewed-on: http://review.whamcloud.com/3198
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-56 o2iblnd: CPT affinity o2iblnd
Liang Zhen [Thu, 10 May 2012 13:44:51 +0000 (21:44 +0800)]
LU-56 o2iblnd: CPT affinity o2iblnd

this patch covered a few things:
- implement percpt scheduler threads for o2iblnd
- decrease overall threads number for fat core machine
- increase thread number only if there are more than one NIC

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Ic4b72258f73baabed2e59746639e271cab4467fc
Reviewed-on: http://review.whamcloud.com/2725
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-56 lnet: re-finalize failed ACK or routed message
Liang Zhen [Sun, 1 Jul 2012 14:21:39 +0000 (22:21 +0800)]
LU-56 lnet: re-finalize failed ACK or routed message

lnet_finalize should restart finalizing process for failed ACK
or failed forwarding, because message could be committed for
sending then failed before delivering to LND, i.e: ENOMEM,
in that case we can't just continue to call lnet_msg_decommit():

- The rule is message must decommit for sending first if
  the it's committed for both sending and receiving

- CPT for sending can be different with CPT for receiving,
  so we should return back to lnet_finalize() to make
  sure we are locking the correct partition.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I0b35434762225fcb0dccad7d23bcd63740484e0a
Reviewed-on: http://review.whamcloud.com/3252
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1589 lnet: read peers of /proc could be endless
Liang Zhen [Sun, 1 Jul 2012 07:17:34 +0000 (15:17 +0800)]
LU-1589 lnet: read peers of /proc could be endless

There is a chance that reading /proc/sys/lnet/peers could be endless
because we didn't set correct condition for ending. This bug is
introduced by commit a07e9d350b3e500c7be877f6dcf54380b86a9cbe of LU-56

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I25f6dad4a926bb7c62a4b1b1d4c3a86c783e3f7a
Reviewed-on: http://review.whamcloud.com/3251
Tested-by: Hudson
Reviewed-by: Doug Oucharek <doug@whamcloud.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-1588 lnet: deadlock while shutting down router
Liang Zhen [Sun, 1 Jul 2012 06:12:24 +0000 (14:12 +0800)]
LU-1588 lnet: deadlock while shutting down router

Should release lock on exiting of lnet_prune_rc_data(), otherwise
we will get deadlock on later attempting on lnet_net_lock().
Also, there is a wrong condition check in lnet_prune_rc_data()
can prevent router checker from shutting down.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I5292075453e61f300384043e2346df714c530303
Reviewed-on: http://review.whamcloud.com/3250
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-56 ksocklnd: CPT affinity socklnd
Liang Zhen [Fri, 11 May 2012 02:51:58 +0000 (10:51 +0800)]
LU-56 ksocklnd: CPT affinity socklnd

this patch covered a few things:
- implement percpt scheduler threads for socklnd
- decrease overall threads number for fat core machine
- create more threads only if there are more than one NIC
- remove IRQ affinity implementation from socklnd
  IRQ affinity is not very helpful because CPUs on modern computer
  are very powerful. Also, user can still setup IRQ affinity via
  /proc and cpu_pattern of libcfs

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Idfa19037a529fe96cb1432cbd7f55a5dfac89d29
Reviewed-on: http://review.whamcloud.com/2718
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>