Whamcloud - gitweb
fs/lustre-release.git
7 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>
7 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>
7 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>
7 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>
7 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>
7 years agoLU-169 lov: add lsm refcounting
Jinshan Xiong [Tue, 19 Jun 2012 13:09:48 +0000 (21:09 +0800)]
LU-169 lov: add lsm refcounting

This patch adds a reference counter to the lsm structure.
Each time a lsm is used, a reference must be taken with lsm_get/addref
(lsm_addref() can be used when we already own a reference on the lsm).
This reference can be released via obd_free_memmd(). The lsm is freed
when the last reference is dropped.

This patch also moves lov_stripe_md into a private data of
lov_object.

Signed-off-by: Jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I156b4cc2dc82bb15ae8107cf9842f100048c03d4
Reviewed-on: http://review.whamcloud.com/1874
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-957 lfsck: LFSCK main engine
Fan Yong [Sun, 1 Jul 2012 02:16:10 +0000 (10:16 +0800)]
LU-957 lfsck: LFSCK main engine

Implement the main engine for Lustre online fsck. The kernel
thread "lfsck" scans the system object table by low layer DT
iteration APIs, and will drives registered scrub component(s)
to check/repair Lustre system.

It is the controller for the whole LFSCK, and controls the
speed, including the low layer OI scrub (for osd-ldiskfs).

For urgent mode, like MDT is restored from file-level backup
against ldiskfs, the OI files are invalided. Under such case,
we need to rebuild the OI files ASAP, then low layer OI scrub
inside osd-ldiskfs ignores the main engine speed control, and
runs with full speed.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: If1bd3cfac1f299e964c029e5e9c4cce6432edfa5
Reviewed-on: http://review.whamcloud.com/3169
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-957 scrub: Proc interfaces and tests for OI scrub
Fan Yong [Fri, 29 Jun 2012 11:34:50 +0000 (19:34 +0800)]
LU-957 scrub: Proc interfaces and tests for OI scrub

1) Control/trace OI scrub running.

2) Verify whether the OI scrub basic functions works or not.

3) Test OI scrub performance.

For autotest:
Test-Parameters: testlist=sanity-scrub,scrub-performance

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I5be3d1a521f5f7875f56e9455ff2010016e6a344
Reviewed-on: http://review.whamcloud.com/3168
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoNew tag 2.2.59 2.2.59 v2_2_59 v2_2_59_0
Oleg Drokin [Mon, 2 Jul 2012 16:37:50 +0000 (12:37 -0400)]
New tag 2.2.59

Change-Id: Ia3d5edcc5032e33ce4b90914a6c00f06ae73aa00
Signed-off-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1182 tests: run accounting tests when OFD is used
Johann Lombardi [Tue, 26 Jun 2012 14:46:31 +0000 (16:46 +0200)]
LU-1182 tests: run accounting tests when OFD is used

Skip all quota enforcement tests in sanity-quota.sh and only run
the accounting tests when OFD is used.

This patch also enables the ext4 quota feature when OFD is in use.
Although it is not done in a very efficient way, it still allows
us to run tests.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: Ie35bba9fb064acd8e878e4c31f1b43e90e164e15
Reviewed-on: http://review.whamcloud.com/3191
Tested-by: Hudson
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1182 osd-zfs: lu_quota.h was renamed to lquota.h
Johann Lombardi [Mon, 2 Jul 2012 07:35:29 +0000 (09:35 +0200)]
LU-1182 osd-zfs: lu_quota.h was renamed to lquota.h

Fix build issue due to lu_quota.h which was renamed to lquota.h.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I01f5b159eeae932f1985546b7ba6b6a064e77a01
Reviewed-on: http://review.whamcloud.com/3254
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
7 years agoLU-1182 osd-zfs: add accounting support
Johann Lombardi [Wed, 27 Jun 2012 14:36:34 +0000 (16:36 +0200)]
LU-1182 osd-zfs: add accounting support

Create QSD instance in ZFS OSD so that space accounting data
are exported via procfs.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: Ie44a8032d437beadcd0cf337f6271247538946c4
Reviewed-on: http://review.whamcloud.com/3201
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-56 lnet: wrong assertion for optimized GET
Liang Zhen [Fri, 29 Jun 2012 04:22:00 +0000 (12:22 +0800)]
LU-56 lnet: wrong assertion for optimized GET

Event type of optimized GET/REPLY will not match message type,
lnet_msg_decommit_rx() did correct assetion for optimzed REPLY,
but wrong assertion for optimized GET.
this patch also removed another wrong assertion in lnet_finalize()

Both wrong assertions are introduced by this commit:
75a8f4b4aa9ad6bf697aedece539e62111e9029a

Test-Parameters: no_virtualization=true nettype=o2ib
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I089c091819c05e27a8b13cf378a60d6fe64cb849
Reviewed-on: http://review.whamcloud.com/3238
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-56 lnet: tuning wildcard portals rotor
Liang Zhen [Wed, 27 Jun 2012 01:49:48 +0000 (09:49 +0800)]
LU-56 lnet: tuning wildcard portals rotor

By default, PUT messages arrived on wildcard Portals always prefer
to match buffers on current CPT, this patch added a few more
options for dispatching message match which's called portals rotor:

- OFF: Turn off message rotor
- ON: round-robin dispatch all PUT messages to different CPTS
- RR_RT: round-robin dispatch routed PUT message to different CPTs
- HASH_RT: dispatch routed PUT message to CPTs by hashing source NID

User can change portals rotor by /proc interface at runtime.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Ie2f03255d9b00b005ca5365315fff350d45a6933
Reviewed-on: http://review.whamcloud.com/3193
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1182 ofd: add space accounting support
Johann Lombardi [Mon, 25 Jun 2012 23:57:54 +0000 (01:57 +0200)]
LU-1182 ofd: add space accounting support

Add space accounting support to OFD. This is done by calling into the
lquota library which looks up space usage via the accounting objects.
Report success on quotacheck, quotaon & quotaoff for the time being,
otherwise space accounting can't be tested with current MDT stack
which requires quotacheck to be run for space accounting to be
enabled.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I442f3d1bcc9e7c95bb3f505f7a00665419d0f517
Reviewed-on: http://review.whamcloud.com/3186
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-56 lnet: SMP improvements for LNet selftest
Liang Zhen [Wed, 16 May 2012 06:53:43 +0000 (14:53 +0800)]
LU-56 lnet: SMP improvements for LNet selftest

LNet selftest is using a global WI threads pool to handle all RPCs,
it has performance problem on fat cores machine because all threads
will contend on global queues protected by a single spinlock.
This patch will fix this by creating WI scheduler for each CPT,
RPCs will be dispatched to WI schedulers on different CPTs, and there
is no contention between threads in different WI schedulers.

Another major change in this patch is create percpt data for LST
service. In current implementation each service has a global data
structure to store buffer list and RPC list etch, and all operations
on them are protected by per-service lock, again, this could be a
serious performance issue if the service is busy enough. Having
percpt service data would resolve this issue because threads running
in one CPT will only require lock lock and access local data.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I8035faf2e87d8e424a8c2fac903bf3b241668e00
Reviewed-on: http://review.whamcloud.com/2805
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1182 ldiskfs-osd: space accounting support
Mikhail Pershin [Tue, 19 Jun 2012 19:49:35 +0000 (23:49 +0400)]
LU-1182 ldiskfs-osd: space accounting support

Add space accounting support to ldiskfs OSD.

This patch also sets initial attributes in do_create().
mdd_attr_set_internal() from mdd_object_initialize() is kept until
EDQUOT is returned in lquota itself.
Attributes of new inodes are now initialized in osd_object_create().
All LA_MODE bits are now passed to ldiskfs_create_inode().
(original patch from LiWei, see ORI-46)

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I77a621c76343c2633810bb3cef9859ee30b7b23a
Reviewed-on: http://review.whamcloud.com/3160
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1201 checksum: add libcfs crypto hash
Alexander.Boyko [Thu, 28 Jun 2012 06:04:06 +0000 (10:04 +0400)]
LU-1201 checksum: add libcfs crypto hash

Add libcfs crypto hash and cleanup all lustre hash checksumming.
Now lustre hash calculations base on linux kernel crypto api for kernel,
and base on libcfs crypto implementation for userlevel. So any improvement
at linux kernel for hashes would improve lustre.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Xyratex-bug-id: MRP-337, MRP-471
Change-Id: I2fbf0f4d0c8ce7e7c3c7ea411c6ccd9dcfc7e03a
Reviewed-on: http://review.whamcloud.com/3098
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1305 build: support for osd-zfs
Alex Zhuravlev [Wed, 23 May 2012 08:17:44 +0000 (12:17 +0400)]
LU-1305 build: support for osd-zfs

changes to enable building of spl, zfs and osd-zfs.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I01dcc211b6943b3ed19eaf8756397a97095bbc59
Reviewed-on: http://review.whamcloud.com/2885
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1305 osd: Makefiles for osd-zfs
Alex Zhuravlev [Tue, 29 May 2012 11:26:11 +0000 (15:26 +0400)]
LU-1305 osd: Makefiles for osd-zfs

Makefiles ...

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I1fdf9eecf98306b0cfe0bbc0611df3a977f48b10
Reviewed-on: http://review.whamcloud.com/2972
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
7 years agoLU-1577 lnet: should export lnet_net2ni
Liang Zhen [Thu, 28 Jun 2012 01:52:38 +0000 (09:52 +0800)]
LU-1577 lnet: should export lnet_net2ni

We don't want to export lnet_net2ni_locked because it requires
an extra parameter CPT number, which is internal to LNet and
confusing to user, also, no LND is using it/should use it, however,
LND does need lnet_net2ni() which is an inline function and it is
referring lnet_net2ni_locked(), which means it forces us to export
lnet_net2ni_locked.
The way to fix should be simple, we can just dis-inline lnet_net2ni()
and export itself instead of exporting lnet_net2ni_locked.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I251d42d47770211ae6238ee56972fb9aacd63599
Reviewed-on: http://review.whamcloud.com/3207
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1415 tests: Basic support for ZFS-based servers
Li Wei [Tue, 12 Jun 2012 13:54:47 +0000 (21:54 +0800)]
LU-1415 tests: Basic support for ZFS-based servers

This patch extends Test Framework to support formatting and mounting
ZFS-based servers.

Current global FSTYPE is no longer flexible enough, as different
facets can use different types of back ends.  Such "mixed-fstype"
configurations are firstly resulted from the incremental landing of
Orion changes.  For example, when we have OFD and ZFS OSD, although
OSTs will be able to use ZFS, MGS and MDTs can still only use LDiskFS.
Secondly, to reduce the test matrix, we may also want to have both
OSTs using LDiskFS and OSTs using ZFS in the same test cluster.
Hence, this patch makes back end file system type a per-facet
attribute.  The flexible configuration variables in local.sh are
reserved for users; all other scripts shall use facet_fstype()
instead.

The major differences between using an LDiskFS-based target and a
ZFS-based one are on the mkfs.lustre(8) command line:

  - ZFS-based targets shall have "--backfstype=zfs", while
    LDiskFS-based ones shall have "--backfstype=ldiskfs".

  - LDiskFS-specific "--mkfsoptions" arguments shall not be given to
    ZFS-based targets, and vice versa.

  - ZFS-based targets have different device specifications.  See
    mkfs.lustre(8).

In addition, we will make "--index" mandatory.  Naturally, format
options have to be generated for each facet dynamically, based on its
back end type, index, etc.  This patch changes mkfs_opts() to do
exactly that.  All test scripts shall use mkfs_opts() instead of
reading related environment variables directly.

Similarly, mount options should also be generated on a per-facet, or
at least per-fstype, basis.  Nevertheless, this patch takes a shortcut
by keeping current per-facet-type {MGS,MDS,OST}_MOUNT_OPTSs and
generating the "loop" mount option dynamically in mount_facet().  I
believe this solution introduces fewer changes comparing to a pure
per-facet one and is sufficient for current use cases.

This patch is based on Brian Behlendorf's work under ORI-155.  See
http://review.whamcloud.com/1417.

Change-Id: Ifcce9b10179dd1b4992a30d10df13ea10bc34548
Whamcloud-bug-id: ORI-155
Test-Parameters: testgroup=full
Test-Parameters: testgroup=full envdefinitions=USE_OFD=yes,LOAD_MODULES_REMOTE=true
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2907
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1305 osd: dmu helpers
Alex Zhuravlev [Tue, 29 May 2012 10:56:48 +0000 (14:56 +0400)]
LU-1305 osd: dmu helpers

few simple functions to wrap native dmu funtions.
to be replaced with direct calls at some point.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ibf9331b5668b1e7db22670caf395391bca002061
Reviewed-on: http://review.whamcloud.com/2971
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
7 years agoLU-1561 tests: Fix ALWAYS_EXCEPT in mds-survey.sh
Li Wei [Mon, 25 Jun 2012 13:24:53 +0000 (21:24 +0800)]
LU-1561 tests: Fix ALWAYS_EXCEPT in mds-survey.sh

Modifying the ALWAYS_EXCEPT assignment in mds-survey.sh does not take
effect, because the test filters have already been built.  This patch
moves the build_test_filter() call below the ALWAYS_EXCEPT assignment.
Also moved downward is the check_and_setup_lustre() call, which
usually goes after environment checks.

Test-Parameters: testlist=mds-survey
Change-Id: I547310e4fccfaaa4fbe7010e14baefa2ab9bbdd4
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/3183
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1528 test: run_one_logged should return error when test fail
Minh Diep [Fri, 15 Jun 2012 11:14:22 +0000 (04:14 -0700)]
LU-1528 test: run_one_logged should return error when test fail

run_one_logged need to return error code even FAIL_ON_ERROR=false

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I1ac59ddfb58b25e7292aacc8c5a31fc218371520
Reviewed-on: http://review.whamcloud.com/3112
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1448 llite: Prevent NULL pointer dereference on disabled OSC
Jeremy Filizetti [Thu, 31 May 2012 12:26:28 +0000 (08:26 -0400)]
LU-1448 llite: Prevent NULL pointer dereference on disabled OSC

When a file system is mounted with a disabled OSC reading the import
information from the proc file system can result in a NULL pointer
dereference. The Lustre import on a disabled OSC with remain
in the LUSTRE_IMP_NEW state and imp_connection will remain NULL.

Signed-off-by: Jeremy Filizetti <jeremy.filizetti@gmail.com>
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ia6df51a36efbcd5a7fc7668bb23455b253ae4855
Reviewed-on: http://review.whamcloud.com/2995
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 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>
7 years agoLU-56 ldlm: SMP improvement for ldlm_lock_cancel
Liang Zhen [Tue, 19 Jun 2012 14:43:31 +0000 (22:43 +0800)]
LU-56 ldlm: SMP improvement for ldlm_lock_cancel

ldlm_del_waiting_lock() is always called twice in ldlm_lock_cancel
even the ldlm_lock is not on expiring waiter list, this is bad for
performance because it needs to grab a global lock and disable
softirq.
This patch add a new bit l_waited to ldlm_lock, it's set only if
ldlm_add_waiting_lock() is ever called, and we can bypass
ldlm_del_waiting_lock() in ldlm_lock_cancel() if w/o this bit.

I also adopted patch(32562) on BZ 20509 because it's necessary for
this improvement.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Ie48d527b8da187a88646aa070be3aa4beb304b1d
Reviewed-on: http://review.whamcloud.com/3141
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1203 mdt: recognize old rootsquash and nosquash_nid params
Yu Jian [Tue, 8 May 2012 10:12:14 +0000 (18:12 +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: I9fc71e2a997a3b0835a3adad2ccfde6d2c64ca56
Reviewed-on: http://review.whamcloud.com/2680
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1095 debug: no console message for long symlink
Andreas Dilger [Mon, 4 Jun 2012 22:03:28 +0000 (16:03 -0600)]
LU-1095 debug: no console message for long symlink

Some minor fixups from running local sanity.sh tests:
- don't print a console message for long-but-legal symlinks,
  which could be hit during normal usage as well

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I24e3e8ea9d8db0ca9c59597f3170f2b18359500c
Reviewed-on: http://review.whamcloud.com/3130
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1305 osd: osd-zfs to use correct objset name
Alex Zhuravlev [Wed, 27 Jun 2012 12:11:08 +0000 (16:11 +0400)]
LU-1305 osd: osd-zfs to use correct objset name

before utils were fixed, we have to add '/' to objset name.
now this is not required.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ice60fa6c30ede531965ec0032f7134c6c412e4c2
Reviewed-on: http://review.whamcloud.com/3199
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-56 ptlrpc: Reduce at_lock dance
Liang Zhen [Fri, 25 May 2012 09:30:25 +0000 (17:30 +0800)]
LU-56 ptlrpc: Reduce at_lock dance

Some lock dances of service at_lock are unnecessary,
we made some cleanup in this patch to reduce useless lock/unlock.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I004729692254d1200a8b18c0c4494ff437233caf
Reviewed-on: http://review.whamcloud.com/2911
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1182 quota: quota accounting library
Mikhail Pershin [Tue, 19 Jun 2012 04:28:53 +0000 (08:28 +0400)]
LU-1182 quota: quota accounting library

Library functions for quota accounting.
Introduce basic support for Quota Slave Driver (aka QSD) which just
registers procfs file to dump the accounting data for the time being.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I35495062b82f43f2bc26c263e08a656f9cbd9c2b
Reviewed-on: http://review.whamcloud.com/3147
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1305 osd: xattr support for osd-zfs
Alex Zhuravlev [Tue, 29 May 2012 10:54:10 +0000 (14:54 +0400)]
LU-1305 osd: xattr support for osd-zfs

xattr set/get/list, including SA

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ifae82853911a1891ad4b3e6e127e29f6d83bba7b
Reviewed-on: http://review.whamcloud.com/2969
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
7 years agoLU-1396 osc: control the RPC rate between MDS and OST
wangdi [Fri, 22 Jun 2012 14:08:35 +0000 (07:08 -0700)]
LU-1396 osc: control the RPC rate between MDS and OST

1. Limit the RPC rate with setting 50 maxim rpc in flight between
MDS and OST.

2. Add specify flag in oa to tell whether the destory from echo_md
destory or MDT close/unlink orphan, where we can not throttle the
destory RPC, since it might block ptlrpcd thread. See Bug 16006.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: Ie3b555eecd2716a82b058f645d002f46d8c4dd36
Reviewed-on: http://review.whamcloud.com/2899
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1305 osd: body operations for osd-zfs
Alex Zhuravlev [Tue, 29 May 2012 10:53:35 +0000 (14:53 +0400)]
LU-1305 osd: body operations for osd-zfs

read/write, get/put bufs, punch

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ie2ccd127b52b00904ec0ce5ba143466ca0328f95
Reviewed-on: http://review.whamcloud.com/2968
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
7 years agoLU-1305 osd: index operations for osd-zfs
Alex Zhuravlev [Tue, 29 May 2012 10:52:49 +0000 (14:52 +0400)]
LU-1305 osd: index operations for osd-zfs

index insert/delete/lookup, iterator support

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I46819a5dd4da601716e516fb54942aa611497aef
Reviewed-on: http://review.whamcloud.com/2967
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
7 years agoLU-56 libcfs: CPT affinity workitem scheduler
Liang Zhen [Mon, 14 May 2012 07:27:41 +0000 (15:27 +0800)]
LU-56 libcfs: CPT affinity workitem scheduler

this patch covered multipled changes:
- flexible APIs for creating WI schedulers
  a) therioticall user can create any number of WI schedulers, each
     scheduler can have its own threads pool
  b) user can create CPT affinity WI schedulers for each CPT, it's
     reserved for LNet selftest.
- rehashing and LNet selftest will not share WI schedulers anymore
- libcfs will only start a WI scheduler with small number of threads
  for cfs_hash rehashing
- LNet selftest will create its own schedulers on starting of module,
  and destroy schedulers on shutting down of module

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Idf66a83817fe847ed29e052e0ddc2a4fed498f1a
Reviewed-on: http://review.whamcloud.com/2729
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>
7 years agoLU-56 obdclass: SMP improvement for lu_key
Liang Zhen [Thu, 17 May 2012 06:47:15 +0000 (14:47 +0800)]
LU-56 obdclass: SMP improvement for lu_key

ptlrpc service threads need to call lu_context_init/fini in each
loop (for each RPC), this could be a big performance issue on
fat SMP machine if we always add lu_context to remember list
because operations on lu_context with LCT_REMEMBER are serialized
by one spinlock and we need to lock/unlock it for multiple times
for each RPC.

But we found LCT_REMEMBER is abused at here, it's impossible that
server stack is being unloaded but service threads are still
running, so we can simply remove LCT_REMEMBER flag from ->rq_session,
and made some small changes to bypass global lock in lu_context_init
and lu_context_fini if w/o LCT_REMEMBER.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I5875a90365a103707526483047ec7628f6964a56
Reviewed-on: http://review.whamcloud.com/2824
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-56 lnet: multiple cleanups for inspection
Liang Zhen [Sun, 24 Jun 2012 14:52:19 +0000 (22:52 +0800)]
LU-56 lnet: multiple cleanups for inspection

This patch covered multiple cleanups for previous patches:
- user "features" to replace "versions" of router checker ping
- code cleanup for lnet_ni_alloc
- fix a loading issue on 32-bit system
- comments cleanup and some small changes
- coding style cleanup

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I96e5fa260d93082851c5146883df1a5b8a96ef42
Reviewed-on: http://review.whamcloud.com/3180
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agonew tag 2.2.58 2.2.58 v2_2_58 v2_2_58_0
Oleg Drokin [Wed, 27 Jun 2012 16:58:57 +0000 (12:58 -0400)]
new tag 2.2.58

Change-Id: I22a3a84ce6e2ed4260c3a8652131afc43df22e46
Signed-off-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-56 lnet: allow user to bind NI on CPTs
Liang Zhen [Fri, 15 Jun 2012 15:56:44 +0000 (23:56 +0800)]
LU-56 lnet: allow user to bind NI on CPTs

By default, NI will be bond on all CPTs, which means messages for a
NI could be handled by LND threads on any CPT (hashed by NID).
This patch add a new parameter for NI configuration, it allows user
to bind NI on specified CPT(s):

- tcp0(eth1)[0,1]
  bind NI (tcp0) on CPT0 and CPT1
- o2ib(ib0)[2-5]
  bind NI (o2ib) on CPT2,3,4,5

Expression between square brackets are CPTs that user wants this NI
to bind, if user provided this expression, messages for the NI
will only be handled by LND threads running on specified CPTs.

This is an intermediate patch, to get this feature we also need
upcoming LND patches.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I706a92c6da181ed0fec857cc25b5ae27a7a7c36b
Reviewed-on: http://review.whamcloud.com/3114
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-56 lnet: Partitioned LNet networks
Liang Zhen [Wed, 13 Jun 2012 12:37:39 +0000 (20:37 +0800)]
LU-56 lnet: Partitioned LNet networks

We have implemented partitioned LNet sources (MD/ME/EQ),
This patch created partitioned data for other LNet objects:
- Peer-tables
  Peers are hashed into peer-table on different partitions by NID
- NI refcount and message queue
  NI will have refcount and message queue for each partition
- counters for each partition

These objects are protected by percpt lock lnet_t::ln_net_lock,
which replaced the original LNET_LOCK

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I7c8c1359aca04a7f859672ccd3268f0282505dd5
Reviewed-on: http://review.whamcloud.com/3113
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1341 tests: recovery-small test_19* fixes
Vitaly Fertman [Tue, 26 Jun 2012 10:44:18 +0000 (14:44 +0400)]
LU-1341 tests: recovery-small test_19* fixes

- test 19a uses ELC, so no eviction happens;
- test 19b cancels conflicting lock in advance due to CLIO logic,
  no eviction again;

fix tests to check what is expected - eviction must take place.

Change-Id: Ib5365c9f90d1fc388fe81196661b262da5e7ad78
Xyratex-bug-id: MRP-482
Reviewed-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Reviewed-by: Alexander Lezhoev <Alexander_Lezhoev@xyratex.com>
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-on: http://review.whamcloud.com/2592
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1157 ldlm: replace waiting flock lists by hashes
Vitaly Fertman [Mon, 25 Jun 2012 21:47:50 +0000 (01:47 +0400)]
LU-1157 ldlm: replace waiting flock lists by hashes

replace per-export list by per-export hash to locate a lock with
blocking export & owner.

Change-Id: I9c4089579bbf126781e232ea7021317fd10223e9
Xyratex-Bug-ID: MRP-385
Reviewed-by: Andriy Skulysh <andriy_skulysh@xyratex.com>
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-on: http://review.whamcloud.com/2240
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-56 lnet: cleanup for rtrpool and LNet counter
Liang Zhen [Tue, 12 Jun 2012 09:15:20 +0000 (17:15 +0800)]
LU-56 lnet: cleanup for rtrpool and LNet counter

This patch covered a few of things:
- code cleanup for router buffer pools
- code cleanup for error handling in lnet_prepare()
- code cleanup for LNet counters

This is an intermediate patch for LNet SMP improvements.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I554d6acb79a55dd77f709d3b6633f157f50a8cee
Reviewed-on: http://review.whamcloud.com/3091
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-56 lnet: Partitioned LNet resources (ME/MD/EQ)
Liang Zhen [Mon, 11 Jun 2012 14:28:23 +0000 (22:28 +0800)]
LU-56 lnet: Partitioned LNet resources (ME/MD/EQ)

We already have a new lock lnet_res_lock to protect LNet resources,
but it's still a global lock and could have performance issue.
This patch created partitioned data for LNet, resources are
spreaded into different partitions. Also, lnet_res_lock is not
a single spinlock anymore, it's a percpt lock now, which means
LNet only needs to lock one partition at a time while operating
MD/ME belonging to that partition.

There are a few things are still serialized by exclusive lock:
- EQ allocation/free
- LNetEQPoll (non-zero size EQ)
- delay message on lazy portal
- Steaing MD between partitions.

There operations are either rare or deprecated so they shouldn't
become performance problem.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: If5e88b92dd508b84c0fd91725b3aaed424dd3108
Reviewed-on: http://review.whamcloud.com/3078
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>
7 years agoLU-56 ptlrpc: cleanup of ptlrpc_unregister_service
Liang Zhen [Sat, 26 May 2012 06:40:05 +0000 (14:40 +0800)]
LU-56 ptlrpc: cleanup of ptlrpc_unregister_service

This patch is only a cleanup of ptlrpc_unregister_service(),
it's an intermediate patch for partitioned ptlrpc service.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I334fa3813f77711defd598bbb7f688d3ea6026be
Reviewed-on: http://review.whamcloud.com/2917
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-56 ptlrpc: svc thread starting/stopping cleanup
Liang Zhen [Fri, 25 May 2012 12:40:24 +0000 (20:40 +0800)]
LU-56 ptlrpc: svc thread starting/stopping cleanup

This patch covered two things:
- serialize creation of ptlrpc service thread
  In current version we can parallel create service threads, so there
  could be "hole" of thread ID if one creation failed, it could be
  problemaic because some modules require thread ID to be strictly
  contiguous and unique. Serializing thread creation can resolve this
  issue.
- code cleanup for for stopping of ptlrpc servcie threads, this is
  just for the next step work of partitioned ptlrpc service.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Ied8ad89003aa9d53fa73a4e5166a2c8d07a1aae9
Reviewed-on: http://review.whamcloud.com/2912
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-506 kernel: 2.6.38 kernel macro check cleanup
Lai Siyao [Thu, 21 Jun 2012 07:40:50 +0000 (15:40 +0800)]
LU-506 kernel: 2.6.38 kernel macro check cleanup

* HAVE_DCACHE_LOCK is used to mark kernel >= 2.6.38, instead of other
kernel macros, this makes it easier to maintain kernel support in
the future.
* minor cleanups.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: Ic9a6a8c339a10b34e2b1b06b47fd9e252cd3ec2c
Reviewed-on: http://review.whamcloud.com/3159
Reviewed-by: Yang Sheng <ys@whamcloud.com>
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>
7 years agoLU-723 ldiskfs: Drop support for ext3 based ldiskfs
Prakash Surya [Mon, 11 Jun 2012 16:27:18 +0000 (09:27 -0700)]
LU-723 ldiskfs: Drop support for ext3 based ldiskfs

Building ldiskfs from ext3 is no longer supported, thus this change
attempts to clean things up and only support building ldiskfs from
ext4 sources. The main changes made, involved replacing the @BACKFS@
autoconf variable with 'ext4', and removing the HAVE_EXT4_LDISKFS
macro. It is now safe to assume that ldiskfs is build based entirely
on ext4.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: Ia0eff6e4c1b755806ccfbf554e4a36201f9f1a64
Reviewed-on: http://review.whamcloud.com/1643
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 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>
Reviewed-by: Andriy Skulysh <andriy_skulysh@xyratex.com>
Reviewed-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Xyratex-bug-id: MRP-456
Change-Id: Ife79adfe6cde0f2090776cd27cd87f65c1e988e2
Reviewed-on: http://review.whamcloud.com/2789
Reviewed-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-56 lnet: reduce stack usage of "match" functions
Liang Zhen [Sun, 10 Jun 2012 06:01:31 +0000 (14:01 +0800)]
LU-56 lnet: reduce stack usage of "match" functions

Use new structure lnet_match_info to transfer the parameters
of LNet "match" functions and reduce stack usage.

This is an intermediate patch for LNet SMP improvements.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I710a78c58add8609606f5d6de1f975ffc5200439
Reviewed-on: http://review.whamcloud.com/3070
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-56 lnet: Granulate LNet lock
Liang Zhen [Thu, 7 Jun 2012 08:43:29 +0000 (16:43 +0800)]
LU-56 lnet: Granulate LNet lock

LNet is using a global lock LNET_LOCK to serialize all operations
and event callbacks of LNet, it's a big performance issue on fat
SMP machines because of high lock contention.

We have submitted many changes to separate critical logic of LNet
and this patch is the key step for finer-grained LNet locking.
This patch add a new lock "lnet_res_lock", all operations on LNet
resources (ME, MD, EQ) are under protection of this lock, we still
keep LNET_LOCK so far, but it's only called for serializing
operations on NI, peer, credits and routers.

This is still an intermediate patch for LNet SMP improvements, both
LNET_LOCK and lnet_res_lock are just spinlock now, they will be
replaced by percpt lock in upcoming patches.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I313caffd21776ee3474c2a1391ea78f002b47790
Reviewed-on: http://review.whamcloud.com/3056
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1305 osd: object operations for osd-zfs
Alex Zhuravlev [Tue, 29 May 2012 10:52:00 +0000 (14:52 +0400)]
LU-1305 osd: object operations for osd-zfs

allocate/release, create/destroy, attr set/get, etc

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I4e56a175b6fd5008d89cdd509b47f8bc00ce5552
Reviewed-on: http://review.whamcloud.com/2966
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>
7 years agoLU-1305 osd: object index for osd-zfs
Alex Zhuravlev [Tue, 29 May 2012 10:47:02 +0000 (14:47 +0400)]
LU-1305 osd: object index for osd-zfs

functionality to map fids to dnodes

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: If8153907342a8c0ac3fe8f657f7dc740db6b2753
Reviewed-on: http://review.whamcloud.com/2964
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>
7 years agoLU-1305 osd: osd_handler.c for osd-zfs
Alex Zhuravlev [Tue, 29 May 2012 10:45:32 +0000 (14:45 +0400)]
LU-1305 osd: osd_handler.c for osd-zfs

functions to setup/mount zfs backend

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I200709e0c86e4f7aae35528cbae7f7b08e094f47
Reviewed-on: http://review.whamcloud.com/2963
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-56 ptlrpc: partition data for ptlrpc service
Liang Zhen [Wed, 23 May 2012 06:34:18 +0000 (14:34 +0800)]
LU-56 ptlrpc: partition data for ptlrpc service

We will have multiple partition data & threads for ptlrpc service,
this patch is the first step work, we moved quite a lot members
of ptlrpc_service to a new structure ptlrpc_service_part.
Now we only create one instance of ptlrpc_service_part for each
service, but we will have multiple instances for each service
very soon (instance per CPT, CPU ParTion).

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I63d816bdf44a22528c6097fe348060f57d862df3
Reviewed-on: http://review.whamcloud.com/2895
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-957 scrub: trigger OI scrub if found bad OI entry
Fan Yong [Thu, 14 Jun 2012 07:41:22 +0000 (15:41 +0800)]
LU-957 scrub: trigger OI scrub if found bad OI entry

If some RPC involves OI lookup and finds inconsistent OI mapping,
it should trigger OI scrub to check and repair the inconsistency.

Known issues:
When the fid is returned to client, the OI mapping corresponding
to such fid may be not updated, or not committed to disk yet. If
server crashed before OI scrub completed, then recovery with the
fid corresponding to inconsistent OI mapping may fail or blocked.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I9709386aa6d42954b619f6b1342adae59a2ec5a9
Reviewed-on: http://review.whamcloud.com/2554
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1459 llite: Don't LBUG when import has LUSTRE_IMP_NEW state
Jeremy Filizetti [Thu, 31 May 2012 14:30:00 +0000 (10:30 -0400)]
LU-1459 llite: Don't LBUG when import has LUSTRE_IMP_NEW state

When a disabled OSC/OST is configured in the system at mount
time, a client will LBUG if calling "lfs check servers".
Disabling the LBUG causes client to return -EIO instead.

Signed-off-by: Jeremy Filizetti <jeremy.filizetti@gmail.com>
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I1844b66e56259da28129df2c60d2542e9c95aeee
Reviewed-on: http://review.whamcloud.com/2998
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>
7 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>
7 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>
7 years agoLU-957 scrub: osd-ldiskfs itable based iteration
Fan Yong [Thu, 14 Jun 2012 07:40:39 +0000 (15:40 +0800)]
LU-957 scrub: osd-ldiskfs itable based iteration

Implement inode table based object iteration in osd-ldiskfs.
It is implemented as DT iteration APIs, which can be used by
up layer LFSCK to scan the whole device sequentially.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I3d80bb4a174d47429764e5cca35e4f07be52d50b
Reviewed-on: http://review.whamcloud.com/2553
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-56 lnet: code cleanup for lib-move.c
Liang Zhen [Wed, 6 Jun 2012 14:15:59 +0000 (22:15 +0800)]
LU-56 lnet: code cleanup for lib-move.c

Most changes in this patch are just code cleanup:
- remove one unnecessary lock dance for message forwarding
- move some code blocks to make functions cleaner
- rename lnet_ni_peer_alive to lnet_ni_query_locked

It's an intermediate patch LNet SMP improvements.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Ia7cfe37a5a4f896be4fcc7f6c5cf9c27268de9ba
Reviewed-on: http://review.whamcloud.com/3048
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-56 lnet: match-table for Portals
Liang Zhen [Tue, 5 Jun 2012 10:02:55 +0000 (18:02 +0800)]
LU-56 lnet: match-table for Portals

Create sub-object named as "match-table" for each Portal, MEs will
be attached match-table instead of Portal.
Although we only have one match-table for each Portal in this patch,
but in upcoming changes, we will create multiple match-tables
for each Portal:
- unique-match Portal
  MEs will be scattered to different match-tables by match info
- wildcard Portal
  LND threads just grab ME/MD from match-table corresponding to
  current CPT (CPU partition).

We also did some code cleanup for delayed message in this patch.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I2b24723c3bd2a6664f2b241840de19d5f43be11f
Reviewed-on: http://review.whamcloud.com/3043
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-56 lnet: code cleanup for lib-md.c
Liang Zhen [Sat, 2 Jun 2012 05:45:32 +0000 (13:45 +0800)]
LU-56 lnet: code cleanup for lib-md.c

This patch just did some code cleanup for lib-md.c, it's an
intermediate patch for LNet SMP improvements.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I5d162852008284ae08f3b9e7935c9251b245fb5c
Reviewed-on: http://review.whamcloud.com/3010
Tested-by: Hudson
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-56 lnet: split lnet_commit_md and cleanup
Liang Zhen [Fri, 1 Jun 2012 05:53:01 +0000 (13:53 +0800)]
LU-56 lnet: split lnet_commit_md and cleanup

Briefly, LNet has two types of operations: 1) resource operations
on EQ, MD and ME; 2) network operations on credits, peer, NI etc.
Most of them are in different logic blocks, but there are still
a few functions have mixed operations, lnet_commit_md() is one of
these functions.

This patch is a key step for LNet SMP improvements, lnet_commit_md()
of current LNet did two things: 1) consume MD threshold and commit
it to network; 2) attach the message on active message list to show
it might have taken LNet message credits. This patch split it into
two sets of functions, lnet_msg_attach/detach_md and
lnet_msg_commit/decommit,

We need to call lnet_msg_attach_md and lnet_msg_comit before deliver
a message to network, call lnet_msg_detach_md and lnet_msg_decommit
while finalizing a message. These two sets of functions will be
protected by different locks in upcoming patches.

Another change in this patch is, we moved most counters operations
into lnet_msg_decommit, this will make code cleaner and easier for
the next step work. The reason that we put counters operations in
lnet_msg_decommit instead of lnet_msg_commit is because we can't
guarantee lnet_msg_commit is always called after lnet_msg_attach_md,
and counters need information filled by lnet_msg_attach_md, which
means lnet_msg_commit might not have enough information for counters.
The thing we know for sure is lnet_msg_decommit is always called
after lnet_msg_attach_md, so it's safe to put counter operations
inside lnet_msg_decommit.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Iee961fbff6e6e39ed76c14c0bd5b6560a7730af9
Reviewed-on: http://review.whamcloud.com/2997
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: Andreas Dilger <adilger@whamcloud.com>
7 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>
7 years agoLU-1030 test: delete test file at the end of test script
Jinshan Xiong [Thu, 21 Jun 2012 05:59:49 +0000 (13:59 +0800)]
LU-1030 test: delete test file at the end of test script

At sanity.sh:test_49, we need to delete the test file after test is
finished otherwise the following test cases may fail due to lack of
storage capacity.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: Iec9e93f1a4844156345608bf9f7a9bf679b36253
Reviewed-on: http://review.whamcloud.com/3158
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1305 osd: procfs support for osd-zfs
Alex Zhuravlev [Tue, 29 May 2012 10:47:56 +0000 (14:47 +0400)]
LU-1305 osd: procfs support for osd-zfs

procfs support

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I599d1317f762b50965f760a590f2f99ffd86bef5
Reviewed-on: http://review.whamcloud.com/2965
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>
7 years agoLU-1305 obdclass: lprocfs helpers
Alex Zhuravlev [Tue, 12 Jun 2012 06:51:47 +0000 (10:51 +0400)]
LU-1305 obdclass: lprocfs helpers

few lprocfs helpers to dump statfs data via OSD API

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: If90c410c9155f480baa8d344a670cc1a48077f07
Reviewed-on: http://review.whamcloud.com/3089
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-56 lnet: LNet message event cleanup
Liang Zhen [Wed, 30 May 2012 07:38:43 +0000 (15:38 +0800)]
LU-56 lnet: LNet message event cleanup

In current version, LNet message events are assigned at many places,
it's not easy to maintain, also, assignments of some fields of event
need to be protected by lock and some don't need, this will be a
problem for upcoming LNet SMP improvements.
This patch created a new function lnet_build_msg_event(), all events
are assigned inside this function and it can be called w/o lock
protection.
This is an intermediate patch for LNet SMP improvements.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Ief8722a15d17909e3844149c55d24fb22ed0c04c
Reviewed-on: http://review.whamcloud.com/2983
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-56 lnet: eliminate a few locking dance in LNet
Liang Zhen [Tue, 29 May 2012 07:34:13 +0000 (15:34 +0800)]
LU-56 lnet: eliminate a few locking dance in LNet

This patch gets rid of a few unnecessary locking dance from
LNet, also changed type of lnet_ni_t::ni_last_alive from jiffy to
second because per-second checking should be good enough.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I0e3269f0a5ae0cfecd9611584d5e213a670e38f6
Reviewed-on: http://review.whamcloud.com/2933
Tested-by: Hudson
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-56 lnet: parse RC ping in event callback
Liang Zhen [Tue, 29 May 2012 06:15:39 +0000 (14:15 +0800)]
LU-56 lnet: parse RC ping in event callback

In current LNet, we don't parse router-checker ping in EQ callback,
NI information from remote side is attached on peer and it's parsed
for each sending. This is OK for now but with upcoming SMP
improvements, the global LNET_LOCK is removed and EQ callback and
peer/router are proteced by different locks, which means sink buffer
of RC ping could be in progressing of change when other thread is
reading it in lnet_send(), and get wrong information.

This patch will parse ping information in EQ callback, and store it
in a new member lnet_route_t::lr_downis which is just a integer,
although reader in lnet_send() still don't have lock while reading
it, but it's OK because it's just an integer and reader can
atomically read reliable result even w/o any lock.

It should also be a little faster than original implememtation
because we don't have to parse RC ping, which should be updated
once for many seconds, for each sending.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I5b89fabfd22f22ba171ef63d30da2d32e2788b16
Reviewed-on: http://review.whamcloud.com/2932
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-56 lnet: router-checker (RC) cleanup
Liang Zhen [Tue, 29 May 2012 03:05:55 +0000 (11:05 +0800)]
LU-56 lnet: router-checker (RC) cleanup

This patched covered a couple of things:
- remove global router-checker data
  In current LNet we can have both global RC data and per-peer
  RC data, the later is only for asymmetrical router failure so far,
  however we can use per-peer RC data even asym_router_failure is
  disabled, it's just increase a little memory overhead but will
  simplify router checker.
  Also, I'm thinking that asym_router_failure is a nice feature and
  it should be enabled by default in the future.

- Code cleanup for router checker, again, it's still an intermediate
  patch for LNet SMP improvements, we need many code cleanup before
  we change locking mechanism of LNet.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I830e706ce5099f15f122b521f74b6dfcde443592
Reviewed-on: http://review.whamcloud.com/2930
Tested-by: Hudson
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1534 osd: Fix LBUGs when destroying IGIF objects
Li Wei [Sun, 17 Jun 2012 05:16:47 +0000 (13:16 +0800)]
LU-1534 osd: Fix LBUGs when destroying IGIF objects

When destroying MDT objects with IGIF FIDs, the following assertion
may occur:

  LustreError: 28147:0:(osd_internal.h:665:osd_fid2oi()) ASSERTION(
  !fid_is_igif(fid) ) failed:
  LustreError: 28147:0:(osd_internal.h:665:osd_fid2oi()) LBUG
  Pid: 28147, comm: mdt_00

With call traces like this:

  osd_oi_delete()
  osd_object_destroy()
  mdd_object_kill()
  mdd_finish_unlink()
  mdd_unlink()

This patch fixes osd_oi_delete() to avoid trying to delete IGIF FIDs
from OI.  Also, the assertion is enhanced to print more debugging
information.

Signed-off-by: Li Wei <liwei@whamcloud.com>
Change-Id: I95fe9db8aec53a496a8dc84c87594ed81f3fe106
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/3120
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
7 years ago2.2.57 tag 2.2.57 v2_2_57 v2_2_57_0
Oleg Drokin [Tue, 19 Jun 2012 20:47:19 +0000 (16:47 -0400)]
2.2.57 tag

Change-Id: I75ef5cf27c4cd7c0c4dd4b1885f4838b5da39002

7 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>
7 years agoLU-1518 mdd: Revert "Fixup mdd_{obf,dot_lustre}_obj_ops."
Johann Lombardi [Tue, 19 Jun 2012 08:44:29 +0000 (04:44 -0400)]
LU-1518 mdd: Revert "Fixup mdd_{obf,dot_lustre}_obj_ops."

This reverts commit cf0d73004a20923c690591c1f3f61a8c872ad86e

Reverting this patch due to build failure (moo_version_get not defined).

Change-Id: I7cac5c6d6de2924d46c3a74ed4aa138f50501a16
Reviewed-on: http://review.whamcloud.com/3137
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Johann Lombardi <johann@whamcloud.com>
7 years agoLU-1371 ldiskfs: fix osd_it_iam_rec() to support binary keys
Johann Lombardi [Thu, 12 Apr 2012 23:29:49 +0000 (01:29 +0200)]
LU-1371 ldiskfs: fix osd_it_iam_rec() to support binary keys

osd_it_iam_rec() assumes a string key and does not support binary key.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I1a09c9b9ad53e593cad642b6ae8a7d417ea83c9d
Reviewed-on: http://review.whamcloud.com/2647
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 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>
7 years agoLU-988 ost: add debugging for inode timestamps
Bobi Jam [Sat, 9 Jun 2012 10:12:51 +0000 (18:12 +0800)]
LU-988 ost: add debugging for inode timestamps

Intermittent test failures for sanity.sh test_39j are showing the
inode timestamps going backward. Add internal debugging to track the
LVB timestamps to see where the old timestamps are coming from, to
determine if this is a problem with the VM environment being used for
testing, or if it is a genuine problem in the Lustre code.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I590d8b28b7a37010af6a43d329917022b840d074
Reviewed-on: http://review.whamcloud.com/3069
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: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1305 libcfs: S_OSD subsystem
Alex Zhuravlev [Tue, 12 Jun 2012 06:45:57 +0000 (10:45 +0400)]
LU-1305 libcfs: S_OSD subsystem

new definition for osd components

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ia224dbd09caecb5cc31488627bb6a958b680377a
Reviewed-on: http://review.whamcloud.com/3088
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1030 osc: new IO engine implementation
Jinshan Xiong [Tue, 12 Jun 2012 00:03:56 +0000 (17:03 -0700)]
LU-1030 osc: new IO engine implementation

New IO engine to manage dirty pages with osc_extent.

Osc_extent is a data structure to manage a series of contiguous
blocks; however, the pages in an extent is not required to be
contiguous. An extent must be written out in one RPC.

The purpose of introducing extents are:
1. make grants work for extent-based OSD;
2. form better IO by picking up contiguous pages to compose RPC;
3. reimplement ll_writepages() with CIT_FSYNC.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I3ef619c1f07eefd201236ab55e5fd858791d41e0
Reviewed-on: http://review.whamcloud.com/2270
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1014 mountconf: Revert "MGS should process parameter config"
Lai Siyao [Wed, 23 May 2012 05:48:49 +0000 (13:48 +0800)]
LU-1014 mountconf: Revert "MGS should process parameter config"

This reverts commit 6cde8692384a1d3a6d0e8114629fa943c951fe40.

Previous commit is wrong, will fix it in another patch.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I5868cb1908f9b123db5b8bd7be9e364ae9a51d6a
Reviewed-on: http://review.whamcloud.com/2843
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1305 osd: quota support for osd-zfs
Alex Zhuravlev [Tue, 29 May 2012 10:54:43 +0000 (14:54 +0400)]
LU-1305 osd: quota support for osd-zfs

export of accouting information and enforcement

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Iac5100960a5107277ccd628ba3a682cb9b03c0ed
Reviewed-on: http://review.whamcloud.com/2970
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-1305 defs: zfs definitions
Alex Zhuravlev [Fri, 25 May 2012 11:56:42 +0000 (15:56 +0400)]
LU-1305 defs: zfs definitions

couple definitions required for osd-zfs

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I994ab7353edef7f4ccc39707534e7c262e635af3
Reviewed-on: http://review.whamcloud.com/2962
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>
7 years agoLU-1406 ofd: add OBD methods to handle OST requests
Mikhail Pershin [Thu, 24 May 2012 08:52:22 +0000 (12:52 +0400)]
LU-1406 ofd: add OBD methods to handle OST requests

Finally add OBD handlers to process incoming requests.
Add stub for quota functions, quota is non-functional in OFD.
Fix couple minor issues:
- slot checking in ofd_last_rcvd_update() must check lr_idx
- remove osd_write_locked() assertion from __osd_xattr_set(),
  it is too excessive there

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Iab270cdf5f2ad41df86845190c5c6db3436279c8
Reviewed-on: http://review.whamcloud.com/2894
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-1406 ofd: IO operations
Mikhail Pershin [Wed, 23 May 2012 19:00:33 +0000 (23:00 +0400)]
LU-1406 ofd: IO operations

add IO functions to OFD

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Ie78e92f5f770ff07c94bf87b2d5ee8300673d271
Reviewed-on: http://review.whamcloud.com/2893
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-1406 ofd: add DLM and LVB code
Mikhail Pershin [Wed, 23 May 2012 19:49:51 +0000 (23:49 +0400)]
LU-1406 ofd: add DLM and LVB code

OFD dlm and lvb functions

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Ieddd2b16129f62c6e380d007aaa1f2de70e8a9ca
Reviewed-on: http://review.whamcloud.com/2892
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-1305 osd: lnb_file_offset in struct niobuf_local
Alex Zhuravlev [Wed, 23 May 2012 07:57:13 +0000 (11:57 +0400)]
LU-1305 osd: lnb_file_offset in struct niobuf_local

introduced in orion so that every buffer can be marked
with a specific offset.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ic8c69fd401300107d589a093023ffe41c0f0eddd
Reviewed-on: http://review.whamcloud.com/2884
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1305 osd: new index flag DT_IND_RANGE
Alex Zhuravlev [Wed, 23 May 2012 07:55:01 +0000 (11:55 +0400)]
LU-1305 osd: new index flag DT_IND_RANGE

introduced in orion to recognize whether the index support
range lookups (used by fldb)

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I40efa613697ebe8394557d5f687132ca9f542859
Reviewed-on: http://review.whamcloud.com/2883
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years ago2.3.56 tag 2.2.56 v2_2_56 v2_2_56_0
Oleg Drokin [Mon, 18 Jun 2012 23:14:15 +0000 (19:14 -0400)]
2.3.56 tag

Change-Id: Ia76ec8d6266348c1135292d6de4ded530e6a3889

7 years agoLU-1031: add grouplock test to sanity.sh
jcl [Sun, 5 Feb 2012 21:37:06 +0000 (22:37 +0100)]
LU-1031: add grouplock test to sanity.sh

add a simple grouplock test to sanity.sh (test_82)
replace hardcoded use of multiop by a $MULTIOP in
test scripts.

Change-Id: I94ba2248b7efafe258873c468e6d0cabdfcb7d09
Signed-off-by: jcl <jacques-charles.lafoucriere@cea.fr>
Reviewed-on: http://review.whamcloud.com/2098
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1513 libcfs: call cfs_alloc with proper masks
Fan Yong [Sat, 16 Jun 2012 07:16:55 +0000 (15:16 +0800)]
LU-1513 libcfs: call cfs_alloc with proper masks

Do not use kernel GFP masks directly when call cfs_alloc,
instead, Lustre special flags can be used to control the
allocator's behavior.

cfs_alloc will convert these Lustre special flags to some
kernle GFP masks, then call kmalloc with these GFP masks.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I3189e143ff0cf65a08a1bdf2b8476ab151dc308e
Reviewed-on: http://review.whamcloud.com/3118
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-56 ptlrpc: common code to validate nthreads
Liang Zhen [Wed, 23 May 2012 04:03:08 +0000 (12:03 +0800)]
LU-56 ptlrpc: common code to validate nthreads

Add a common function to validate ptlrpc service threads number,
instead of checking it before registration of each service.
This function (ptlrpc_server_nthreads_check) will be enhanced
soon for CPT affinity ptlrpc service.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I5db09396f4a95e36d8f5d38777c51eafb7dea5b1
Reviewed-on: http://review.whamcloud.com/2879
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-482 tests: cleanup clients/OSTs after MDS error
Andreas Dilger [Mon, 4 Jun 2012 03:59:36 +0000 (21:59 -0600)]
LU-482 tests: cleanup clients/OSTs after MDS error

If the MDS fails to mount due to LU-482, ensure that the clients
and OSTs are unmounted cleanly.  Otherwise, the normal unmount
will hang on the clients as they wait for the MDS to be recovered.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Iccd8f81f714974063eaeec45ffbd80f9cef3242b
Reviewed-on: http://review.whamcloud.com/3019
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-827 tests: fix user ID for sanityn test_60
Andreas Dilger [Mon, 4 Jun 2012 20:58:42 +0000 (14:58 -0600)]
LU-827 tests: fix user ID for sanityn test_60

If sanityn.sh test_60() is run on a test system before any of the
quota users are configured, the test will fail.  The test does not
require that any specific user ID is used, so instead use RUNAS_ID
(which is a numeric value and does not even need to be defined in
/etc/passwd for this test to work).

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Iaca88344e0dc615f44417e4175e5cddd146c2a7a
Reviewed-on: http://review.whamcloud.com/3021
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
7 years agoNew tag 2.2.55 2.2.55 v2_2_55 v2_2_55_0
Oleg Drokin [Thu, 14 Jun 2012 21:06:46 +0000 (17:06 -0400)]
New tag 2.2.55

Change-Id: I61c9699e1a557d3d5c0848c5e8628f70d256c280
Signed-off-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1286 obdclass: oops in lprocfs_remove_nolock
wangdi [Thu, 5 Apr 2012 06:21:31 +0000 (23:21 -0700)]
LU-1286 obdclass: oops in lprocfs_remove_nolock

Move lov /proc entry cleanup from lov_precleanup to
lov_cleanup, so the lov proc entry will be removed after
the pool has been removed, otherwise it will
cause oops during pool proc entry deletion.

Signed-off-by: Di Wang <di.wang@whamcloud.com>
Change-Id: I1d1b03d02348caaa1e421aa1de1535c8cf0ba3f4
Reviewed-on: http://review.whamcloud.com/2450
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>