Whamcloud - gitweb
fs/lustre-release.git
6 years agoLU-2989 build: some make targets are broken
Dmitry Eremin [Tue, 26 Mar 2013 18:03:47 +0000 (22:03 +0400)]
LU-2989 build: some make targets are broken

Add make targets "distclean" and "maintainer-clean" in
ldiskfs/ldiskfs/Makefile. The global "make distclean" now
executes whithout an error.

Also lustre/target/.gitignore file is created to hide
message from GIT.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ic8841d11960d5aacd8293ecfcaf8c628dd743c45
Reviewed-on: http://review.whamcloud.com/5766
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-1199 lbuild: Fix error handling
Christopher J. Morrone [Thu, 21 Feb 2013 00:26:11 +0000 (16:26 -0800)]
LU-1199 lbuild: Fix error handling

Improper grouping of expressions in the error() function meant
that even a simple "lbuild -h" would trigger a backtrace, and email to
someone at whamcloud.com.  That is fixed here.

Also stop sending email to a static email address on errors.

Also fix a minor typo.

Change-Id: I5a3f6131baaadc9dba23414e9e959f72fbda2679
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/5961
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2877 Add a roundtrip delay in sanity test 34h
Oleg Drokin [Fri, 29 Mar 2013 03:48:36 +0000 (23:48 -0400)]
LU-2877 Add a roundtrip delay in sanity test 34h

It seems we are still getting false failures in test 34h due to
overloaded server that takes longer than 2 seconds to process
a request.
To even things out - do another sync RPC to OST first before
starting the timeout.

Change-Id: I070345233398d7a15a105162523ef6dc81c1a929
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/5882
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
6 years agoLU-3242 obdclass: skip zero cookie in class_handle_hash()
John L. Hammond [Mon, 29 Apr 2013 14:33:54 +0000 (09:33 -0500)]
LU-3242 obdclass: skip zero cookie in class_handle_hash()

In class_handle_hash() really skip the zero cookie when it comes
around.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I042d7a43b70feb9710a7b3a27e732fc314ec1cf5
Reviewed-on: http://review.whamcloud.com/6198
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3182 lmv: fix duplicate directory entries
Ned Bass [Wed, 17 Apr 2013 00:58:02 +0000 (17:58 -0700)]
LU-3182 lmv: fix duplicate directory entries

lmv_readpage() fails to overwrite the ldp_hash_end and ldp_flags of
the first lu_dirpage in a CFS_PAGE with the values from the last
lu_dirpage. This causes duplicate directory entries to be returned
from readdir() for sufficiently large directories.  This is only
an issue on platforms where CFS_PAGE_SIZE > LU_PAGE_SIZE, i.e. PPC.

* Fix the regression introduced in commit 5e91e5b, which was the
  apparently accidental removal of these lines from lmv_readpage():

-                        hash_end = dp->ldp_hash_end;
-                        flags = dp->ldp_flags;

* Refactor the lmv_readpage() function and add some comments.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I04e9a98b90216a7da7ce9d9325080d6b6c4010c7
Reviewed-on: http://review.whamcloud.com/6071
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-718 mds: fix mds-max-threads configure parameter
Andreas Dilger [Thu, 14 Mar 2013 19:03:38 +0000 (12:03 -0700)]
LU-718 mds: fix mds-max-threads configure parameter

Commit 648b69c2c9 renamed MDT_MAX_THREADS to MDS_MAX_THREADS, but
didn't update the configuration parameter for setting this value
at build time.  Fortunately, the configure parameter itself has
the correct name to begin with, so no build-visible changes needed.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I21dc22e470e7e3788ebef8009643b5c7a98bc220
Reviewed-on: http://review.whamcloud.com/5723
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2838 build: Syntax issues in sources
Dmitry Eremin [Thu, 14 Mar 2013 11:47:21 +0000 (15:47 +0400)]
LU-2838 build: Syntax issues in sources

Just fix syntax issues in source code.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I822b943f31785e18ca09125466a9b21d7f7ce558
Reviewed-on: http://review.whamcloud.com/5476
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
6 years agoLU-2856 mdt: Workaround for filenames w/zero hash
Daniel Kobras [Wed, 10 Apr 2013 12:25:12 +0000 (14:25 +0200)]
LU-2856 mdt: Workaround for filenames w/zero hash

Zero is a valid return value of full_name_hash(), but
consumers of mlh_pdo_hash don't handle this case correctly.
Work around problems by consistently mapping zero hashes to
a different value.

Signed-off-by: Daniel Kobras <d.kobras@science-computing.de>
Change-Id: I8b2622cb9b04d9f005f8e414ad35102155820c7d
Reviewed-on: http://review.whamcloud.com/6166
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
6 years agoLU-2139 osc: Track and limit "unstable" pages
Prakash Surya [Tue, 2 Apr 2013 20:36:39 +0000 (13:36 -0700)]
LU-2139 osc: Track and limit "unstable" pages

This change adds a global counter to track the number of "unstable"
pages held by a given client, along with per file system counters. An
"unstable" page is defined as a page which has been sent to the server
as part of a bulk request, but is uncommitted to stable storage.

In addition to simply tracking the unstable pages, they now also count
towards the maximum number of "pinned" pages on the system at any given
time. Thus, a client will now be bound on the number of dirty and
unstable pages it can pin in memory. Previously only dirty pages were
accounted for in this limit.

In addition to tracking the number of unstable pages in Lustre, the
NR_UNSTABLE_NFS memory zone is also incremented and decremented for
easy monitoring using the "NFS_Unstable:" field in /proc/meminfo.
This field is also used internally by the kernel to limit the total
amount of unstable pages on the system.

The motivation for this change is twofold. First, the client must not
allow itself to disconnect from an OST while still holding unstable
pages. Otherwise, these unstable pages can get lost due to an OST
failure, and replay is not possible due to the disconnect via unmount.

Secondly, the client needs a mechanism to prevent it from allocating too
much of its available RAM to unreclaimable pages pinned by the ptlrpc
layer. If this case occurs, out of memory events can trigger as a side
effect, which we need to avoid.

The current number of unstable pages accounted for on a per file system
granularity is exported by the unstable_stats proc file, contained under
each file system's llite namespace. An example of retrieving this
information is below:

$ lctl get_param llite.*.unstable_stats

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: Ic43d34bfa39da9ac4fe159000c7db5908467fd7b
Reviewed-on: http://review.whamcloud.com/4245
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3196 tests: a few fixes for > 10 OSTs.
wang di [Sun, 21 Apr 2013 07:00:38 +0000 (00:00 -0700)]
LU-3196 tests: a few fixes for > 10 OSTs.

1. Because the stripe index not necessarily follow OST index order,
even it specifies the index, so we should not check the layout by
OST inde order in sanity 27C.

2. In test 33c, it should print the OSTXXXX by %.4x instead of
%.4d.

3. In replay 44, timeout is under mds, instead of mdt.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Id60ffece99f76cd7dd2e88a655e78e9abcbdfa9b
Reviewed-on: http://review.whamcloud.com/6110
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3133 lfsck: remove objects from OST
Emoly Liu [Thu, 28 Mar 2013 17:15:23 +0000 (01:15 +0800)]
LU-3133 lfsck: remove objects from OST

In lfsck test, remove_objects() should remove objects from OST,
just like remove_files() removes files from MDT.

Test-Parameters: testlist=lfsck
Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: I826bea7c780de275c1890e920deb3c8e8e942c53
Reviewed-on: http://review.whamcloud.com/5981
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3014 utils: Fix an offset overflow in file_create()
Li Wei [Fri, 22 Mar 2013 06:41:11 +0000 (14:41 +0800)]
LU-3014 utils: Fix an offset overflow in file_create()

On an x86_64 machine, creating a 3 GB ZFS-based target using a file
VDev failed like this:

  mkfs.lustre FATAL: mkfs.lustre: Unable to truncate backing store:
  Invalid argument

The error, returned by the ftruncate() call in file_create(), was due
to the "int"-type calculation for the "off_t" argument.  The byte
number of 3 GB overflowed the "int" type and became a negative
"off_t".  This patch changes file_create() to take an "__u64" size
instead of an "int" one and adds "_FILE_OFFSET_BITS=64" to the
AM_CPPFLAGS of lustre/utils, so that file VDevs larger than 2 GB can
be created on both 32-bit and 64-bit x86 architectures.

Change-Id: Id7e6bfc963b0ccba8266795ba2bf9832e9c641ba
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/5805
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-2311 osd-ldiskfs: fix link refcounting
Hongchao Zhang [Mon, 8 Apr 2013 02:59:49 +0000 (10:59 +0800)]
LU-2311 osd-ldiskfs: fix link refcounting

Fix potential problem with osd_object_ref_{add,del}() where the link
count is temporarily set to an invalid value before being corrected
later on.  Since the link count is accessed in some places without a
lock, there is a chance an invalid value is sampled.  This was fixed
in ext4 via kernel commit 909a4cf1ffe4b875c87abf38239a9bfd25167e0c.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Change-Id: I396bff24f8a23d6b7622cebfb39b8f847e500c1e
Reviewed-on: http://review.whamcloud.com/4675
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
6 years agoLU-3110 osd-ldiskfs: Dynamic LBUG in osd declares tracking
Bruno Faccini [Mon, 29 Apr 2013 10:21:29 +0000 (12:21 +0200)]
LU-3110 osd-ldiskfs: Dynamic LBUG in osd declares tracking

This patch implements a dynamic way to enable/disable osd
declaration tracking LBUGs.

OSD_TRACK_DECLARES define usage has been removed, and
tracking of declares is no longer a compile time option.

Enable/disable of declares tracking LBUGs is done via new
global lprocfs "track_declares_assert" boolean, also a
module-parameter.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I5164c51c3c3362a77d1a0c7cb7b9f63383b00403
Reviewed-on: http://review.whamcloud.com/6032
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-2831 tests: Sync MDS data also when doing sync_all_data
Nathaniel Clark [Wed, 24 Apr 2013 14:10:25 +0000 (10:10 -0400)]
LU-2831 tests: Sync MDS data also when doing sync_all_data

The quota data was differing in sanity-quota/35 before and after
restart because the MDS data had not synced prior to checking the
values.  This patch forces MDS data to sync whenever sync_all_data is
called.  This should prevent this error from recurring here and
elsewhere.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ic2e1dafefbc2d83fc281d76845504c4547dd0694
Reviewed-on: http://review.whamcloud.com/6142
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2547 tests: EXCEPT recovery-small/24a for ZFS
Nathaniel Clark [Mon, 22 Apr 2013 20:46:48 +0000 (16:46 -0400)]
LU-2547 tests: EXCEPT recovery-small/24a for ZFS

EXCEPT this test for ZFS as it is failing over 50% of the time
currently.  Re-enable when root cause of failure is located.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I6c02a4db5a0d9f876cb4e8cff4e614eb3ac86dfd
Reviewed-on: http://review.whamcloud.com/6119
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3238 ptlrpc: expression expansion bug in macro
Liang Zhen [Sun, 28 Apr 2013 08:51:52 +0000 (16:51 +0800)]
LU-3238 ptlrpc: expression expansion bug in macro

slab flag passed into __OBD_SLAB_ALLOC_VERBOSE is not bracketed,
so __OBD_SLAB_ALLOC_VERBOSE will get wrong value from unexpected
expression expansion and hit assertion.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Change-Id: I4f09ccf743d6bda765bab64c60801a87d9a6b9b5
Reviewed-on: http://review.whamcloud.com/6190
Tested-by: Hudson
Reviewed-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3231 fld: fix previous range copy in fld_cache_lookup()
John L. Hammond [Thu, 25 Apr 2013 18:37:44 +0000 (13:37 -0500)]
LU-3231 fld: fix previous range copy in fld_cache_lookup()

In fld_cache_lookup() when returning the previous seq range, copy the
appropriate part of the previous fld_cache_entry.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Iabc1146e5c5ac188c8d37c953ffbb645450e070d
Reviewed-on: http://review.whamcloud.com/6171
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
6 years agoLU-3135 wireshark: Add version check to Makefile
Nathaniel Clark [Wed, 10 Apr 2013 14:49:27 +0000 (10:49 -0400)]
LU-3135 wireshark: Add version check to Makefile

This will check for a minimum wireshark version, and warn if not
present.  While the info is in the README, this will make it more
clear why things fail to build.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Id4d5a5734befaa86e8e4fd77d4c35c25d1bbfb85
Reviewed-on: http://review.whamcloud.com/6011
Tested-by: Hudson
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3205 llite: Set layout_gen before compatibility check
Jinshan Xiong [Tue, 23 Apr 2013 23:59:56 +0000 (16:59 -0700)]
LU-3205 llite: Set layout_gen before compatibility check

We should set IO's layout generation to current generation of inode,
no matter what it is. Otherwise, it will go into an infinite loop
on layout change check.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I9f1f0d9ae0dd53dea130db46bbcbdbd29526b6eb
Reviewed-on: http://review.whamcloud.com/6137
Tested-by: Hudson
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3006 utils: mount to pass/clear UPDATE flag
Alex Zhuravlev [Tue, 23 Apr 2013 12:11:00 +0000 (16:11 +0400)]
LU-3006 utils: mount to pass/clear UPDATE flag

this flag is maintained in mountdata (or fs attribute in case
of ZFS) and used to signal MGS parameters have been changed
and this need to be reflected in configuration profiles.

the flag is cleared before actual mount as the device can
be exclusively open by the filesystem preventing any updates.

the scope of the patch is limited to UPDATE flag, but later
we can try to use the approach to deal with WRITECONF/VIRGIN
flags as well.

test 73 added to conf-sanity to verify the case.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Ic0b4eb6b86798450e4dd4201611e4f5a1c54ef40
Reviewed-on: http://review.whamcloud.com/5982
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
6 years agoLU-2459 osd: add LMA incompat flag check
Bobi Jam [Mon, 8 Apr 2013 05:55:41 +0000 (13:55 +0800)]
LU-2459 osd: add LMA incompat flag check

* Add LMA incompatibility flags checking after object initialization.
* Add a sanity test case (test_17o).

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Iec83f3c87bd5ff769c3544c5897011333aa2d656
Reviewed-on: http://review.whamcloud.com/6121
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Hudson
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3142 tests: gather logs on passive server nodes
Jian Yu [Mon, 22 Apr 2013 07:26:02 +0000 (15:26 +0800)]
LU-3142 tests: gather logs on passive server nodes

This patch adds all_mdts_nodes(), all_osts_nodes(), all_server_nodes()
and all_nodes() into the test-framework.sh to get the active and
passive server nodes. By using these functions, after recovery-*-scale
tests failed in failover configuration, the logs on passive server
nodes can also be gathered.

This patch also fixes yml_entities() to add MGS entity and entities
for passive server nodes.

Test-Parameters: clientdistro=el6 serverdistro=el6 clientcount=4 \
osscount=2 mdscount=2 austeroptions=-R failover=true \
useiscsi=true testlist=recovery-mds-scale

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: Idbba6f02f4f50b7d5097a78ea6b6954d5347919a
Reviewed-on: http://review.whamcloud.com/6112
Tested-by: Hudson
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3142 tests: use echoerr() to redirect debug logs
Jian Yu [Thu, 11 Apr 2013 10:37:47 +0000 (18:37 +0800)]
LU-3142 tests: use echoerr() to redirect debug logs

This patch fixes run_dd.sh to use echoerr() for redirecting
debug logs to the log file instead of messing up the output.

Test-Parameters: clientdistro=el6 serverdistro=el6 \
clientarch=x86_64 serverarch=x86_64 clientcount=4 \
osscount=2 mdscount=2 austeroptions=-R failover=true \
useiscsi=true testlist=recovery-double-scale

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I72c02a38c22fca4e7e806af6771e135efd506478
Reviewed-on: http://review.whamcloud.com/6027
Tested-by: Hudson
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3216 kernel: Kernel update [RHEL6.4 2.6.32-358.6.1.el6]
yangsheng [Thu, 25 Apr 2013 01:48:37 +0000 (09:48 +0800)]
LU-3216 kernel: Kernel update [RHEL6.4 2.6.32-358.6.1.el6]

Update RHEL6.4 kernel to 2.6.32-358.6.1.el6.

Signed-off-by: yang sheng <yang.sheng@intel.com>
Change-Id: I8c02c826a4e40eb58bc0df017eb0654e3c0465de
Reviewed-on: http://review.whamcloud.com/6153
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3142 mdt: update mdt_max_mdsize in mdt_lvbo_size
Hongchao Zhang [Sun, 21 Apr 2013 13:12:52 +0000 (21:12 +0800)]
LU-3142 mdt: update mdt_max_mdsize in mdt_lvbo_size

during calling mdt_lvbo_size to get the size of lsm, mdt_max_mdsize
could be less than the lsm size of this object in failover mode.
then it is needed to check and update this value.

Test-Parameters: envdefinitions=RECOVERY_MDS_SCALE_EXCEPT=failover_ost \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 serverarch=x86_64 \
clientcount=4 osscount=2 mdscount=2 austeroptions=-R failover=true \
useiscsi=true testlist=recovery-mds-scale

Change-Id: Id490c346ca9f34edcc963334e396678f1b41562c
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Signed-off-by: Jian Yu <jian.yu@intel.com>
Reviewed-on: http://review.whamcloud.com/6102
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-1189 tests: run save_lustre_params() on facets
Jian Yu [Mon, 8 Apr 2013 08:15:21 +0000 (16:15 +0800)]
LU-1189 tests: run save_lustre_params() on facets

This patch fixes save_lustre_params() and restore_lustre_params()
to get and set Lustre parameters through do_facet() instead of
do_node(). This will fix the issue that restore_lustre_params() still
tries to restore the saved params on the original node which will
likely become inactive under failover test environment.

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
clientcount=4 osscount=2 mdscount=2 austeroptions=-R \
failover=true useiscsi=true \
testlist=replay-vbr,replay-dual

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I5bfc4797727aaaa15fac1e34b6a7182ae8f26da8
Reviewed-on: http://review.whamcloud.com/5628
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
6 years agoLU-992 build: remove obsolete rhel5 server configurations
James Simmons [Thu, 18 Apr 2013 15:28:32 +0000 (11:28 -0400)]
LU-992 build: remove obsolete rhel5 server configurations

For 2.4 RHEL5 server side support has been removed but
some technical debt remained before. This patch removes
the no longer needed rhel5 kernel configurations and
the CONFIG_LDISKFSDEV_* options that were left over
from the rhel5 ext3 days.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I345b1b5d182602b82be018b1e18a7bdbe939f578
Reviewed-on: http://review.whamcloud.com/5930
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3202 osd: no inode::i_mutex inside osd_object_destroy
Fan Yong [Mon, 22 Apr 2013 06:06:40 +0000 (14:06 +0800)]
LU-3202 osd: no inode::i_mutex inside osd_object_destroy

Originally, to control the race between the OI scrub inserting
OI mapping and the osd_object_destroy() removing OI mapping on
the same target, the inode::i_mutex was used.

But the unlink thread which called osd_object_destroy() already
started transaction handle. Such order is different from others
as to may cause some deadlock between transaction start and the
obtain inode::i_mutex.

So now, the osd_object_destroy() will not obtain inode::i_mutex,
instead, the OI scrub will check whether someone unlinked the
inode or not during the OI scrub rebuilding the OI mapping, and
remove the new-inserted OI mapping if the race happened.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ic5c2e2b1d967e52a2b980d4f6bcaed4bdcf8368b
Reviewed-on: http://review.whamcloud.com/6124
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Cliff White <cliff.white@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3029 osd-ldiskfs: clear old FMODE_32BITHASH for readdir
Fan Yong [Mon, 22 Apr 2013 05:31:20 +0000 (13:31 +0800)]
LU-3029 osd-ldiskfs: clear old FMODE_32BITHASH for readdir

On MDS, the RPC service thread's "osd_thread_info" will be reused
without completely reset when switches from one RPC processing to
another RPC processing.

Some old client may not claim "OBD_CONNECT_64BITHASH" when connect
to the MDS, then it will be regarded as 32-bit client. For readdir
RPC from such old client, the MDS will use 32-bit dirhash, the RPC
service thread's "osd_thread_info::oti_it_ea::oie_file::f_mode" is
set as "FMODE_32BITHASH", which will not be dropped until restart.

If some RPC service threads (for readdir) are "FMODE_32BITHASH",
but some NOT, then for new client, which support 64-bit dirhash,
it may get trouble when traverses large directroy as following:

1) The first readdir RPC is served by the RPC service thread1,
   which is marked as "FMODE_32BITHASH" because it ever served
   readdir RPC from old client. So the thread1 still generates
   32-bit dirhash (major hash only) for the new client readdir.

2) The new client triggers another readdir RPC for the same dir
   with the 32-bit dirhash as cookie, which was returned by the
   thread1.

3) This time, the readdir RPC is served by another RPC service
   thread2, which is NOT marked as "FMODE_32BITHASH". Then the
   thread2 explains the readdir cookie as 64-bit dirhash, It's
   wrong. So the thread2 can NOT locate the position correctly.

So we need to clear some fields in "osd_thread_info" to avoid
to be reused when switch from one RPC processing to another.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I3b9aaede0bccab900f1d198c7093b98f0fc48945
Reviewed-on: http://review.whamcloud.com/6138
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-631 osc: wait OSC to complete initial connection with OST
Hongchao Zhang [Mon, 8 Apr 2013 02:49:09 +0000 (10:49 +0800)]
LU-631 osc: wait OSC to complete initial connection with OST

in functions lov_prep_*_set, if one OSC isn't active and it is trying
its first connection with OST, then spend some time (obd_timeout)
to wait it to complete.

Change-Id: I424dbf81b6ceebf2cfd1cf48b0f89be40c4c3df4
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/2469
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jeremy Filizetti <jeremy.filizetti@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3143 tests: pass correct facet to wait_osc_import_state()
Jian Yu [Mon, 22 Apr 2013 11:12:58 +0000 (19:12 +0800)]
LU-3143 tests: pass correct facet to wait_osc_import_state()

This patch fixes recovery-small test 29a and some other tests
to pass correct facet to wait_osc_import_state(), which will
make the tests pass under failover configuration.

Test-Parameters: envdefinitions=SLOW=yes \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 clientcount=4 osscount=2 mdscount=2 \
austeroptions=-R failover=true useiscsi=true \
testlist=recovery-small

Change-Id: I68b8d2f2528223a5140eed5724c2a4ffdd1988fa
Signed-off-by: Jian Yu <jian.yu@intel.com>
Reviewed-on: http://review.whamcloud.com/6100
Tested-by: Hudson
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3201 lmv: check result of lmv_find_target()
John L. Hammond [Mon, 22 Apr 2013 18:42:23 +0000 (13:42 -0500)]
LU-3201 lmv: check result of lmv_find_target()

In lmv_locate_mds() and lmv_iocontrol() check the result of
lmv_find_target() using IS_ERR() before dereferencing it.  In
lmv_get_target() return ERR_PTR(-ENODEV) rather than NULL when the
indicated MDS cannot be found among the members of lmv->tgts.  In
__lmv_fid_alloc() check the result of lmv_get_target() using IS_ERR().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I8cfce869e4be329fd432a7b6a88f48fbc81d69dd
Reviewed-on: http://review.whamcloud.com/6116
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
6 years agoLU-3118 lfsck: resume LFSCK from the last checkpoint
Fan Yong [Mon, 22 Apr 2013 01:58:42 +0000 (09:58 +0800)]
LU-3118 lfsck: resume LFSCK from the last checkpoint

It is a misc patch to enable the support to resume LFSCK from the last
checkpoint: no object will be skipped, not repeatly scan the object(s)
in front of checkpoint.

Other fixes:
1) Simplify LFSCK checkpoint logic.
2) Add linkEA for .lustre itself, then LFSCK will not be misguided.
3) Set LFSCK status as "failed" if hit error at prepare phase.
4) osd_otable_it_store() should return the cursor position, instead
of the pre-load position.
5) Other code cleanup.

Test-Parameters: testlist=sanity-scrub,sanity-lfsck
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I3f6e988da323239ff2655ad4b13eae711e892ebe
Reviewed-on: http://review.whamcloud.com/6078
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-2747 mdt: use of mdt_XXX helpers
jcl [Mon, 4 Feb 2013 18:09:51 +0000 (19:09 +0100)]
LU-2747 mdt: use of mdt_XXX helpers

replace explicit use of some obd fields by mdt helpers:
mdt_obd_name() mdt2obd_dev() mdt_lu_site() mdt_seq_site()

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I1a67145478a143bf6444c9a248c5cc213dc91687
Reviewed-on: http://review.whamcloud.com/5261
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-398 ptlrpc: Add the NRS ORR and TRR policies
Nikitas Angelinas [Wed, 9 Jan 2013 02:40:21 +0000 (02:40 +0000)]
LU-398 ptlrpc: Add the NRS ORR and TRR policies

The ORR (Object-based Round Robin) policy schedules brw RPCs in
per-backend-filesystem-object groupings; RPCs in each group are
sorted according to their logical file or physical disk offsets.

The TRR (Target-based Round Robin) policy performs the same
function as ORR, but instead schedules brw RPCs in per-OST
groupings.

Both these policies aim to provide for increased read throughput
in certain use cases, either by minimizing costly disk seek
operations (by ordering OST_READ, and perhaps also OST_WRITE
RPCs), but may also allow for improved performance through better
resource utilization and by taking advantage of locality of
reference characteristics of the I/O load.

Signed-off-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Co-authored-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I1f5a367f2f4a1cf296a3b38f3e395ab28a10668e
Oracle-bug-id: b=13634
Xyratex-bug-id: MRP-73
Reviewed-on: http://review.whamcloud.com/4938
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
6 years agoRevert "LU-2459 osd: add LMA incompat flag check"
Oleg Drokin [Tue, 23 Apr 2013 17:57:16 +0000 (13:57 -0400)]
Revert "LU-2459 osd: add LMA incompat flag check"

This reverts commit 9ee6e92bcf4a142e76e27d5b8ac8b34684749002.

This disrubptively broke maloo testing, unfortunately

6 years agoLU-3103 obdclass: Remove EXPORT_SYMBOL on static function
Christopher J. Morrone [Wed, 3 Apr 2013 23:43:14 +0000 (16:43 -0700)]
LU-3103 obdclass: Remove EXPORT_SYMBOL on static function

In LU-2912 commit 7e915f5d7177b22bd3cc800137fb505781a2c037,
the function linkea_entry_pack() was accidentally delared static
and then also explicitly exported with EXPORT_SYMBOL.  On ppc64
gcc balks at this conflict.

linkea_entry_pack() is not declared in lustre_linkea.h, so leave
it static and remove the EXPORT_SYMBOL.

Change-Id: I60093fc3da8b82e51530ed93427e5ee8d8e6745d
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/5939
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3125 layout: allow stripeless layouts swap
Lai Siyao [Tue, 9 Apr 2013 19:16:15 +0000 (03:16 +0800)]
LU-3125 layout: allow stripeless layouts swap

* allow stripeless layouts swap
* `lfs swap_layouts` should open with O_LOV_DELAY_CREATE

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I3947005d1060ee9be189a9c2adbab61064a8e6f0
Reviewed-on: http://review.whamcloud.com/5998
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
6 years agoLU-2976 tools: ZFS upstream sonames are versioned
Alexey Shvetsov [Sat, 16 Mar 2013 18:24:57 +0000 (22:24 +0400)]
LU-2976 tools: ZFS upstream sonames are versioned

Current zfsonlinux upstream has versioned zfs libs sonames, while in
lustre/utils/mount_utils_zfs.c are set unversioned

Versions are
libzfs.so -> libzfs.so.1
libnvpair.so -> libnvpair.so.1

Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
Change-Id: I871613081c117731b5ec89fc2d79349df0668f94
Reviewed-on: http://review.whamcloud.com/5742
Tested-by: Hudson
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-2799 ptlrpc: reduce verbosity of warning
Nathaniel Clark [Sat, 16 Feb 2013 15:07:22 +0000 (10:07 -0500)]
LU-2799 ptlrpc: reduce verbosity of warning

Reduce verbosity of a warning about large number of threads that the
user can change and should not change.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I2713a0629da5c7d4d1a8a6c0d4c35cdea765e5f0
Reviewed-on: http://review.whamcloud.com/5447
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3020 obdclass: Lustre returns EINTR when SA_RESTART is set
Patrick Farrell [Wed, 27 Mar 2013 21:27:28 +0000 (16:27 -0500)]
LU-3020 obdclass: Lustre returns EINTR when SA_RESTART is set

When Lustre is in a read or write system call and receives a
SIGALRM, it currently returns EINTR at this location. This is
problematic because it prevents the system call from being restarted
if SA_RESTART is set in the handler.

This patch changes behavior in this location to return ERESTARTSYS
when a signal is found.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I26e24b8e8e325c5b0bd7d5d20fa97e2180c12263
Reviewed-on: http://review.whamcloud.com/5814
Reviewed-by: Cory Spitz <spitzcor@cray.com>
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-2986 mdc: Kernel Oops on ioctl LL_IOC_GET_MDTIDX
Bruno Faccini [Tue, 19 Mar 2013 23:37:02 +0000 (00:37 +0100)]
LU-2986 mdc: Kernel Oops on ioctl LL_IOC_GET_MDTIDX

ll_get_mdt_idx() calls md_getattr() with a NULL 3rd
parameter as a (struct ptlrpc_request **), this can
lead to a SEGV if lmv is skipped, like for a
single-MDS system without an LMV, and mdc_gettatr()
is called straight.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I0f9e5f6a4ae09c9e9a26b231d26b803418827c23
Reviewed-on: http://review.whamcloud.com/5769
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Ned Bass <bass6@llnl.gov>
6 years agoLU-3008 lnet: Update support for Cray's interconnects
James R. Shimek [Thu, 21 Mar 2013 22:41:24 +0000 (17:41 -0500)]
LU-3008 lnet: Update support for Cray's interconnects

This patch updates gnilnd to include all of Cray's
patches for the last year since the initial push.

Included changes

----------------------------------------------------------------------
Subject
Reverse rdma kgnilnd fixes
Description
A LNET_PUT when matched on the receiving side is parsed it
can call kgnilnd_recv with a mlen == 0, previously the reverse_rdma
code for kgnilnd did not handle this and asserted. This mod adds
handling of the case when mlen is set to 0 and also adds handling
when an LNET_GET's lnetmsg is == NULL, which is another case which
is handled in non reverse_rdma path but not in the reverse_rdma path.

----------------------------------------------------------------------
Subject
Gnilnd refcount changes
Description
This mod adjusts connection refcount handling to bring the
reference adding and removing in line with what was expected, this
was brought up during the whamcloud review but left undone on their
end.

----------------------------------------------------------------------
Subject
kgnilnd peer_timeout enhancement for peer_health
Description
Currently on router nodes kgnilnd peer_health is enabled, when
peer_health is enabled it sets a default timeout factor of
kgn_timeout+kgn_timeout/8. This value currently cannot be adjusted
except through adjust kgn_timeout. This mod allows for the user to
increase the value by setting the module parameter peer_timeout in
conjunction with peer_health.

When peer_timeout is set and peer_health is enabled the timeout
passed to lnet will be what the user has specified as long as it is
greater than the previous fudge calculation. If the user specifies a
value less than fudge kgnilnd will fail to load and throw an error
to the console.

Changes
1. Added module parameter peer_timeout, when peer_health is enabled
   this allows manipulation of the ni_peertimeout value passed to
   lnet.

----------------------------------------------------------------------
Subject
kgnilnd conn double free refcount fix
Description
Currently kgnilnd has a possible race condition on service nodes
between two scheduler threads. When a connection is scheduled another
scheduler can act upon the conn before the first has decremented its
reference.
Currently kgnilnd_conn_decref uses a seperate atomic_read after it
decrefs to decide what to do next. There is the possibility that two
threads calling kgnilnd_conn_decref could see the same value of zero
even though one thread would have brought the refcount to one and the
other to zero. The same issue can occur with kgnilnd_peer_decref.

This mod introduces changes to the scheduler to prevent two decrefs
at the same time in different scheduler threads. Also it updates
kgnilnd_conn_decref to utilize the value that is returned by
atomic_dec_return instead of doing a second atomic_read to verify
the reference count.

Changes
1. Changed kgnilnd_conn_decref to use the val returned by
   atomic_sub_return instead of doing atomic_reads to get the value.
2. Changed kgnilnd_peer_decref to use the val returned by
   atomic_sub_return instead of doing atomic_reads to get the value.
3. Updated kgnilnd_schedule_conn and kgnilnd_schedule_process conn
   so that when a connection is scheduled from within a scheduler
   thread it carries the reference forward instead of removing it.
   This in addition to the kgnilnd_conn_decref change should remove
   the double free problem.
4. Changed assertions in kgnilnd_peer_addref, kgnilnd_conn_addref so
   they catch when the value is incremented up from 0 to 1.
5. Use magic value to verify conn is not being free twice.

----------------------------------------------------------------------
Subject
Debug for mailbox corrruption.
Description
We have two peers (routers) writing to the same mailbox of a compute
node.

Add more debug to identify the cause of two peers getting the same
mailbox information.
- Store both the previous nid and the previous purgatory nid for this
  mailbox.
- Store the dgram type in the conn so we can tell if the conn
  resulted from a matched wildcard or a direct connection request.
- Keep track of the total allocations of a mailbox and the current
  number of allocations.
- Add a proc file peer_conns with information containing the peer's
  connection information.
  - writing a nid value (echo 1234 > /proc/kgnilnd/peer_conns) will
    allow the read (cat /proc/kgnilnd/peer_conns) to produce a list
    of conns associated with the specified nid.

----------------------------------------------------------------------
Subject
Ignore events generated from 'xtcli set/clr_reserve'
Description
'xtcli set_reserve' and 'xtcli clr_reserve' operations overload the
ec_node_unavailable event as described in bug 785850.  Since gnilnd
uses ec_node_unavailable events, we need to ignore them when they
originate from those commands.

----------------------------------------------------------------------
Subject
Close connection upon receipt of RCA unavailable event.
Description
When a blade is powered down, messages sent to the nodes will
cause ORB timeouts which causes a quiesce and ORB scrub. The quiesce
causes gnilnd to bump it's timeouts so we continue sending traffic
causing more ORB timeouts.

----------------------------------------------------------------------
Subject
kgnilnd_dgram_mover thread runtime deadline
Description
Currently there is no deadline associated with starting outbound
dgrams within the kgnilnd_dgram_mover thread. The thread will loop
while the list is not empty. When there is a large amount of network
problems the thread could run for a very long time. This mod adds a
deadline check to make sure the dgram thread stops attempting to post
dgrams after the deadline passes, the thread will schedule itself and
be woken up normally after time has passed to continue its work.

Changes
1. Added deadline to kgnilnd_dgram_mover so
   kgnilnd_start_outbound_dgrams is bounded in runtime by size of
   list and by a maximum runtime deadline.
2. Added error injection to verify dgram deadline.
3. Added module parameter to adjust deadline of dgram thread.

----------------------------------------------------------------------
Subject
fix peer_conn_lock deadlock
Description
kgnilnd_tx_done() called with lock held.
There is an error case whereby kgnilnd_tx_done will be called by
kgnilnd_queue_tx(). This can cause a deadlock if lnet calls back
needing the write lock.

Remove call to kgnilnd_tx_done since the tx will be processsed by
kgnilnd_process_fmaq() (like the EAGAIN case).

----------------------------------------------------------------------
Subject
Make kgnilnd_bump_timeouts aware of DONE connections
Description
Currently when kgnilnd comes out of quiesce all connections timeouts
are bumped so they dont close from the period they were paused.
kgnilnd_bump_timeouts schedules all the connections on a peer
including ones that are in purgatory in the GNILND_CONN_DONE state.
These connections are not supposed to be put through the scheduler
once they are in the DONE state.

A LBUG can occur if after the quiesce occurs the scheduler thread
does not push the newly scheduled conns through the state machine
fast enough. This can leave DONE conns on the scheduled list when
stack reset is triggered. Stack reset then puts any scheduled conns
through kgnilnd_complete_closed_conn which when the function sees a
conn in the GNILND_CONN_DONE state it asserts.

Changes
1. Add if statement so kgnilnd_bump_timeouts does not schedule DONE
   connections.

----------------------------------------------------------------------
Subject
Subscribe GNILND to UXACT errors
Description
Aries has a new type of error that GNILND needs to be subscribed to
for stack reset initiation. This mod adds that error type to our
callback subscription routine.

Changes
1. Add GNI_ERRMASK_UNKNOWN_TRANSACTION to mask passed into
   kgnilnd_subscribe_errors function.

----------------------------------------------------------------------
Subject
kgnilnd reverse bte rdma transactions
Description
Currently GNILND executes all of its kgni bte rdma transactions
using GNI_POST_RDMA_PUT, on cascade systems this can cause IOMMU
thrashing on router nodes from the many computes initiating rdma
to the single service node. This can cause linear performance
degradation as more and more computes attempt to write into a single
service nodes memory space. To alleviate this problem we will change
how rdmas are done we will use GNI_POST_RDMA_GET, so the service node
will initiate the transfer of data to it instead of thousands of
clients all trying at once. By adding a run time tunable that allows
us to switch to using GNI_POST_RDMA_GET we can govern the RDMA from
the receiving node.

Changes
1. Added new message types that exist side by side with current
   infrastructure so different nodes can have rdma setting tuned
   and all nodes will handle the messages.
2. Added tunables so that the REVERSE setting can be adjusted at
   run time.
3. Added support for non byte aligned data transfers so that gets
   will succeed when non byte aligned offsets and lengths are
   provided to kgnilnd.
4. Added the capability to send checksum information in the message
   being sent to the side that will be initiating the rdma.
   This works side by side with existing rdma checksum capabilities.
5. Corrected rdma nak problems when RDMA mapping fails for a specific
   type of tx.
6. Added counters to rdma when a copy needs to be made due to
   unaligned data, this will allow us to see if performance is
   hindered because of a large number of vmalloc calls have to be
   made.
7. Changed the entire call tree for rdma to support the handling of
   the new message types.
8. On Aries platforms service nodes will be defaulted to
   GNILND_REVERSE_GET, compute nodes defaulted to GNILND_REVERSE_PUT.

----------------------------------------------------------------------
Subject
Generate/check checksum over the number of bytes actually transferred
Description
It is possible for PUTs to have a different length than the
length stored in lntmsg->msg_len since LNET can adjust this
length based on it's buffer size and offset.
lnet_try_match_md() sets the mlength that we use to do the
RDMA transfer.

Therfore we need to compute checksum using tx->tx_rdma_desc.length
and verify the checksum using length returned in the
msg->gnm_u.completion.gncm_retval which contains the actual number
of bytes transmitted.

----------------------------------------------------------------------
Subject
GniLND needs to filter accelerator events.
Description
Change the kgnilnd_rca thread to filter out accelerator events.
----------------------------------------------------------------------
Subject
kgnilnd BTE Delivery MODE tunable
Description
Currently kgnilnd only exposes a few options to tune for kgni's rdma
bte delivery mode. This works well for Gemini systems, but on Cascade
we would like finer grained control. This mod allows us to change the
delivery mode at run time through the exposed tunable interface.
Giving us the capability to tune the delivery modes without having to
restart the system or make code changes.

Changes
1.  Added tunable bte_dlvr_mode which takes a mask/number for the
    delivery mode and uses that to set the bte delivery option for
    rdma.
2.  Removed extraneous tunables that were only single tunable
    specific.
3.  Added Gemini and Aries header options if in the future we need to
    change the defaults on Aries or Gemini.

----------------------------------------------------------------------
Subject
GniLND connection serialization, debug for compute bad message type.
Description
Introduce a semaphore for connection processing serialization within
the scheduler thread for bugs 789853 and 789855.
  - The main work of the scheduler thread is now protected by a read
    semaphore.
  - When kgnilnd_process_conns needs to do work on a connection, it
    takes a write semaphore.

----------------------------------------------------------------------
Subject
GniLND rca_thread exit fix.
Description
Change the kgnilnd_rca thread from exiting when receiving an error
from krca_wait_event.

----------------------------------------------------------------------
Subject
GniLND kgnilnd_recv message type unknown
Description
Add debug to print out more info in kgnilnd_recv() default case of
the gnm_type switch statement.

----------------------------------------------------------------------
Subject
fix fma_blk state when mdd is invalidated.
Description
Currently when an VIRT_MAPPED fma_blk is unmapped kgnilnd doesnt
change its state to IDLE. Since it doesnt the code that finds a free
mbox will use mboxes within the fma_blk even though its mdd has been
invalidated, causing dgram exchanges to contain bad mailboxes.

This change will mark the fma_blk as having its mdd invalidated.

----------------------------------------------------------------------
Subject
gnilnd/rca integration
Description
Subscribe for the rca events ec_node_unavailable, ec_node_available
and ec_node_failed to prevent reconnect attempts to downed nodes.
We do not use the event to kill a live connection.

----------------------------------------------------------------------
Subject
kgnilnd eager_recv double free fix
Description
Currently the function call kgnilnd_eager_recv does no verification
that the connection passed into it with an rx message is alive and
valid. Normally this is without issue except when connections are
being closed and opened on routers. A connection could be in the
process of being destroyed and have its refcount incremented.
The next call to kgnilnd_recv could cause a double free.

This mod alleviates this by doing a reverse lookup on the connection
based on the information we can validate within the rx message. By
using a read_lock on kgn_peer_conn_lock we can then lookup the
connection based on its nid and verify it conn_stamp matches the one
the message is expecting. If we find a valid connection that matches
we then increment that connections refcount while the lock is held,
preventing it from disappearing until after the receive. Without the
lock and reverse lookup we could end up looking at already freed
memory.

This race was showing itself through an fma_blk assertion on the
router nodes, when 2 destroy_conn calls occured in parallel sometimes
one would get past an if(fma_blk) check and then find that the
fma_blk had already been set to 0.

----------------------------------------------------------------------
Subject
Sequence kgnilnd tx use with close of connections.
Description
Currently kgnilnd makes an incorrect assumption
that when a conn is closed and the connection is removed from
the cqid lookup table that no tx's are in use by other threads.

What can happen is one of the other scheduler threads can be
in the process of using a tx and has called
kgnilnd_tx_del_state_locked. This can race against
kgnilnd_complete_closed_conn in a different scheduler thread as it
attempts to remove all existing tx's from the conn's tx_ref_table.
That kgnilnd_complete_closed_conn calls kgnilnd_tx_del_state_locked
on the connection's tx's, and since a tx could still be in use in the
first scheduler thread an exception can occur.

This mod marks the conn as having tx's in use when the first thread
has a read_lock on the kgnilnd_peer_conn_lock.

Changes
1. Added to kgn_conn_t an atomic gnc_tx_in_use that is incremented
   any time kgnilnd_validate_tx_ev_id is called.
2. Added a decref to the conn's gnc_tx_in_use after the function
   is finished using the tx.
3. Added a check in kgnilnd_process_conns that barriers entry for a
   given connection into kgnilnd_complete_closed_conn until
   gnc_tx_in_use is 0. Once the conn is removed by the close call from
   the cqid hash table only existing in use tx's from before the close
   will prevent the close from completing so no livelocks should be
   possible.

----------------------------------------------------------------------
Subject
Add kgnilnd scheduler thread runtime deadline
Description
This mod makes sure that the kgnilnd scheduler threads
are not sitting on the cpu longer than neccessary by adding a deadline
that forces a yield after the deadline is hit. The amount of time
that the scheduler will allow itself to run without scheduling
is configurable via module parameter in 1 second intervals.

It was also found that the nice value of the scheduler threads
is preventing the heartbeat system from working correctly on
compute nodes with only a single scheduler thread. So we are
changing default nice value of thread to 0 to allow other
threads to run.

Changes
1. Added sched_timeout module parameter to allow changing of
   default scheduler thread deadline.
2. Added deadline check to kgnilnd_process_conns so it does
   not spin in its while loop forever.
3. Added error injection to verify deadline is checked and
   calls to yield occur.
3. Added sched_nice module parameter to allow adjustment of
   scheduler thread priority seperate from other kgnilnd
   threads.

----------------------------------------------------------------------
Subject
Cleanup kgnilnd_schedule_conn races during conn close
Description
This patch reworks the previous debug patch and adds a
debug framework that addresses the shortcomings previous patch.

We are also removing an extraneous kgnilnd_schedule_conn
call from kgnilnd_finish_connect that was causing a large number of
the schedule after close occurences.

There is still a chance that a conn can be scheduled after close but
the current refcount framework is designed to counteract issues that
arise when that happens, making the removal of the assertion valid.

----------------------------------------------------------------------
Subject
Repost WC dgram when OOM event occurs
Description
Currently when kgnilnd runs out of GART space while attempting to
repost a wildcard datagram, the system asserts and tips over. Instead
we can put into place a mechanism that allows WC datagrams to be
reposted when the OOM conditon resolves.

This mod removes the assertion and puts into place a mechanism within
the dgram mover thread to post wildcards when neccessary. This allows
the system to stay up instead of crashing. When posting a dgram
fails a D_NETERROR message will be written out to the console.

----------------------------------------------------------------------
Subject
Workaround and additional debug for scheduler assertion
Description
This mod adds debug to get a better analysis of the gnc_scheduled
problem. It also has a workaround; the call to
kgnilnd_complete_closed_conn will short circuit and let
kgnilnd_process_conns handle the schedule normally when it sees that
gnc_scheduled != GNILND_CONN_PROCESS instead of asserting. I have also
added debug to all the calls to kgnilnd_schedule_conn so we can find
the call that is causing the assertion.

----------------------------------------------------------------------
Subject
Remove assertion and attempt recovery on mailbox corruption
Description
Previous mods have addressed the sequencing that could cause mailbox
corruption by fixing the state machine and adding timeouts. This mod
builds on those and makes the detection of issues relating to the
mailbox a correctable error. Instead of asserting we will now close
the connection when we detect corruption occuring and utilize the
purgatory system to attempt to get things back in order.  The previous
changes allow us to do this as they prevent the close sequence
corruption from spiraling out of control.

Changes
        1. Removed assertion in kgnilnd_check_fma_rx on seqno
           corruption and replace with a statement that closes the
           connection and returns -EIO. This should allow the system
           to continue without causing the node to come down.
        2. Added debug so when we do detect corruption it will be
           tagged in the console. This will allow us to see how often
           the problem occurs and if it contributes to system
           problems.

----------------------------------------------------------------------
Subject
Fix race condition and sequence kgnilnd connection closing
Description
There is a race between the scheduler thread and
kgnilnd_close_conn_locked. While we take the kgn_peer_conn_lock to
close the connection, the scheduler threads dont look at it when they
check the gnc_state. We could end up all the way through the close
state machine by the time the kgnilnd_close_conn_locked function
finishes tripping an assertion. To correct this race and improve
sequencing we need to make sure when changing the conn's gnc_state
we grab the write_lock on kgn_peer_conn_lock.

Changes
        1. In kgnilnd_send_conn_close when setting the conn's
           gnc_state to GNILND_CONN_CLOSED added a write_lock to make
           sure we are sequencing the close with other threads that
           might be changing the connections state.
----------------------------------------------------------------------

Signed-off-by: James R. Shimek <jshimek@cray.com>
Change-Id: I5b8de3b72cdc17b32134cb2532c9ad7dc4fa621c
Reviewed-on: http://review.whamcloud.com/5815
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-1750 ofd: always update last_id.
wangdi [Fri, 17 Jan 2014 10:13:54 +0000 (02:13 -0800)]
LU-1750 ofd: always update last_id.

Always update last_id during orphan cleanup, even though
the orphan might be cleanup by the preious request.

Change-Id: I824c97b29b5e03906e66f27e044876cf097ce534
Signed-off-by: Wang Di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/4331
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3048 llapi: make lfs getstripe less crashy, more correct
John L. Hammond [Wed, 3 Apr 2013 20:57:05 +0000 (15:57 -0500)]
LU-3048 llapi: make lfs getstripe less crashy, more correct

Use of get_param_obdvar() in get_mds_md_size() could cause the
max_easize param from the wrong filesystem to be read, possibly
preventing userspace from allocating a sufficiently large buffer to
receive the results of the IOC_MDC_GETFILESTRIPE ioctl() and causing a
buffer overrun in copy_to_user().  Add internal functions
get_param_{cli,llite,lmv,lov}() which finds the correct params for the
filesystem containing the path argument.

In common_param_init() the lum buffer used for IOC_MDC_GETFILESTRIPE
is sized based on the return of get_mds_md_size().  For file systems
with a small number of OSTs this buffer may be too small to hold a
path component.  Fix this by ensuring that the allocated buffer has
size at least PATH_MAX + 1.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I9847a1414cb4306f4bce5f7c30d1d1cddfab8621
Reviewed-on: http://review.whamcloud.com/5934
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-2983 osd: osd-zfs to handle errors in IO path
Alex Zhuravlev [Tue, 19 Mar 2013 12:27:51 +0000 (16:27 +0400)]
LU-2983 osd: osd-zfs to handle errors in IO path

- handle an error returned by dmu_buf_hold_array_by_bonus():
  release already pinned buffers, return an error to the caller.
- OFD to handle an error returned by dt_bufs_get()

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I1fe46364967dbc527d0d80f3729673c00ab7154c
Reviewed-on: http://review.whamcloud.com/5784
Tested-by: Hudson
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3044 llite: LSeek SEEK_CUR incorrect after O_APPEND write
Patrick Farrell [Fri, 29 Mar 2013 17:41:34 +0000 (12:41 -0500)]
LU-3044 llite: LSeek SEEK_CUR incorrect after O_APPEND write

When a file is opened with O_APPEND set and a write is done,
the file offset value immediately after the write is incorrect.
It is too much by approximately the length of the write.

This can be seen by doing lseek SEEK_CUR immediately after the
write. This does not cause corruption on subsequent writes
because with O_APPEND VFS resets the file offset to EOF before
each write.

This is resolved by removing the change made for BUG:17711,
which was to set crw_pos in ll_prepare_write.

That change was to pass the LASSERT(cl_page_in_io(page, io)) in
cl_io_prepare_write().  However, this assert has since been
modified to exclude the O_APPEND case, making this unnecessary.

crw_pos is also updated in cl_io_rw_advance which is why pos is
greater than expected.

Removing the extra update to crw_pos in ll_prepare_write fixes
this.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I7c1ad10eefec44aae415b8cfce6b01bc9b39fc8f
Reviewed-on: http://review.whamcloud.com/5861
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3183 tests: sanity test_27f dd to the wrong file
Minh Diep [Wed, 17 Apr 2013 20:56:25 +0000 (13:56 -0700)]
LU-3183 tests: sanity test_27f dd to the wrong file

typo in the output file in dd.

Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: I63c5627ed766b92b1446b8f8082017b0e804dbbe
Reviewed-on: http://review.whamcloud.com/6084
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-2679 grant: OFD grant as client requested upon reconnect
Lai Siyao [Fri, 1 Feb 2013 13:46:17 +0000 (21:46 +0800)]
LU-2679 grant: OFD grant as client requested upon reconnect

Part of the patch in bz20278 is lost in OFD implementation,
add it back:
* besides recovery, grant client requested amount on normal
  reconnect.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I9e06316d0bd8602663eef4ba661a4ebfebb6e1bd
Reviewed-on: http://review.whamcloud.com/5255
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3138 osd: ignore unlink inode in index delete
wang di [Tue, 16 Apr 2013 07:01:39 +0000 (00:01 -0700)]
LU-3138 osd: ignore unlink inode in index delete

We should ignore unlink inode during index delete, otherwise
inode will be become bad inode, which cause unclean delete.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ie3c99cd3bfa71876b34007bb5754360c73fc6f86
Reviewed-on: http://review.whamcloud.com/6072
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3186 lmv: do not need allocate FID for open by FID
wang di [Mon, 3 Feb 2014 02:06:14 +0000 (18:06 -0800)]
LU-3186 lmv: do not need allocate FID for open by FID

We do not need allocate FID or set op_fid2 if it is for
Open by FID, otherwise, it will cause the MDT to open
the file with new FID.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I67e5a52c643228a6d8bd0190ca1a78b047fd1e7a
Reviewed-on: http://review.whamcloud.com/6099
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-1820 ptlrpc: fix put export for hp request
Alexander.Boyko [Sat, 30 Mar 2013 07:43:02 +0000 (11:43 +0400)]
LU-1820 ptlrpc: fix put export for hp request

Fix for ASSERTION(cfs_list_empty(&exp->exp_hp_rpcs)) failed.

The root cause is in target_handle_connect()
if (req->rq_export != NULL)
class_export_put(req->rq_export);

/* request takes one export refcount */
req->rq_export = class_export_get(export);

For previous export it release export reference, but
rq_exp_list still in exp_hp_rpcs queue, after connect
requests became hp requsts. ptltpc_server_handle_req put last
reference for export and export go to zombie list with non
empty exp_hp_rpcs.
This patch add rq_exp_list move to new export at
target_handle_connect(), and cleanup for
id I3d312c28481143b557d7987501c975c7e287885e.

Fixed export reference for request.  Before this patch, request
take one reference by class_conn2export() and take another reference
and increment export rpc counter by class_export_rpc_get(). One
export reference for request is enough.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Xyratex-bug-id: MRP-881
Change-Id: I6da198fe9b50e85b09f8fe74789e6c6f5bfd534d
Reviewed-on: http://review.whamcloud.com/5922
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3196 tests: several test fixes about DNE tests
wang di [Fri, 19 Apr 2013 07:10:23 +0000 (00:10 -0700)]
LU-3196 tests: several test fixes about DNE tests

1. add error message in sanity test_27c.

2. In DNE, obdfilter.*.last_id will show last_id with different seqs
0x100000000:33
0x200000400:33
so we need check both last_id and seq here. And also on the OFD we
should show the real IDIF seq, instead of 0.

3. skip 130 now, if OSTCOUNT > 10.

4. conf-sanity 66 should use "start mdt 1" to start a single MDT,
instead of all MDTs, which will cause replace_nids failed.

5. add all MDTs in conf-sanity 72.

6. skip sanity-hsm for DNE.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I6e88cd21c24e363680d02ef4765416f696a434cd
Reviewed-on: http://review.whamcloud.com/6106
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
6 years agoLU-3149 llog: separate named and unnamed llog sequences
Mikhail Pershin [Mon, 15 Apr 2013 02:57:25 +0000 (06:57 +0400)]
LU-3149 llog: separate named and unnamed llog sequences

unnamed llogs are placed in O/seq/d<n> like OST objects,
that adds them to the namesapace. At the same time named llogs
don't need that. Patch introduces new sequence for named llogs
FID_SEQ_LLOG_NAME, so they can be distinguished and not placed
into O/seq/d..
This allows to remove technical debts code releated to the
named llogs handling.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I5e6edbf02ae0c34ed616833530957ba4afc40f97
Reviewed-on: http://review.whamcloud.com/6053
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
6 years agoLU-3073 test: cancel lru locks for OSC
Hongchao Zhang [Tue, 9 Apr 2013 18:16:44 +0000 (02:16 +0800)]
LU-3073 test: cancel lru locks for OSC

in test_120a of sanity.sh, the locks in LRU of OSC should also be
cancelled for the asynchronous object destroy at MDT could cause
blocking AST sent to client.

Change-Id: Ibb619e2a93f8c70f41f6514149d06a12c4b5aa4e
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/6088
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2459 osd: add LMA incompat flag check
Bobi Jam [Mon, 8 Apr 2013 05:55:41 +0000 (13:55 +0800)]
LU-2459 osd: add LMA incompat flag check

* Add LMA incompatibility flags checking after object initialization.
* Add a sanity test case (test_17o).

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I06b1ec35ca73094903304cac13d919e46e23fcf2
Reviewed-on: http://review.whamcloud.com/4819
Tested-by: Hudson
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
6 years agoLU-3124 llite: To use an extra RPC to transfer layout
Jinshan Xiong [Thu, 11 Apr 2013 23:11:14 +0000 (16:11 -0700)]
LU-3124 llite: To use an extra RPC to transfer layout

To support wide stripe, we have to use an extra RPC to transfer
large layout, instead of using LVB buffer in completion AST for
layout lock since it doesn't reserve enough space. Also, to fix
the problem in LU-2807, we decide to transfer layout with an extra
RPC if it has ever been blocked.

In LU-2807, it turns out we can't call mdt_object_find() in ptlrpc
thread context as following may happen:
1. thread1 unlink reaches the MDT;
2. before unlink enqueues lock, thread2 does getattr intent req to
   find and hold object;
3. unlink acquires inodebits dlm lock;
4. thread3 enqueues LAYOUT lock, blocked;
4. thread2 blocked at acquiring dlm lock as well;
5. unlink finishes and releases the lock(the object becomes dying),
   LAYOUT lock's completion_ast will be invoked;
6. mdt_lvbo_fill() calls mdt_object_find() and waits for dying object,
   this will never succeed because thread2 is being blocked at
   completion AST with object held. live locked.

By using extra RPC to fetch layout, we won't have the above problem
any more.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: If75ae92424ada6ef275e813a87a93acd426eabdc
Reviewed-on: http://review.whamcloud.com/6042
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3152 tests: seq/oid needs to hex format in sanity 27z
wang di [Sat, 25 Jan 2014 22:34:32 +0000 (14:34 -0800)]
LU-3152 tests: seq/oid needs to hex format in sanity 27z

Seq/Oid needs to remove 0x if it is normal FID in sanity_27z

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I1fc277460c3189a457e183996a7a8a68bcf7cfae
Reviewed-on: http://review.whamcloud.com/6022
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3165 ptlrpc: missing fields in mdt_rec_reint
Lai Siyao [Mon, 15 Apr 2013 05:47:10 +0000 (13:47 +0800)]
LU-3165 ptlrpc: missing fields in mdt_rec_reint

Fields rr_flags_h and rr_umask are missing in mdt_rec_reint, as
may cause swab issue in non-x86 system.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I9a7b9a6b2fca6f16a03c48b2ae1ec5eae9852f76
Reviewed-on: http://review.whamcloud.com/6054
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3131 tests: fix sanity 56u/102k for single OST.
wang di [Sat, 25 Jan 2014 00:35:51 +0000 (16:35 -0800)]
LU-3131 tests: fix sanity 56u/102k for single OST.

sanity 56u and 102k should check OSTCOUNT before setstripe,
in case there are only one OST.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I5efd9b8c1cb25f68a48728dee1cdf44a71d13b49
Reviewed-on: http://review.whamcloud.com/6001
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3087 mdd: Record layout changes.
Henri Doreau [Thu, 4 Apr 2013 14:18:22 +0000 (16:18 +0200)]
LU-3087 mdd: Record layout changes.

1. Introduce a new CL_LAYOUT changelog record type.

2. Emit CL_LAYOUT records on layouts swap operations
and delayed LOVEA changes.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: I5b94e9707b289e321e7d7f49a742ce3b002e2abb
Reviewed-on: http://review.whamcloud.com/5966
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
6 years agoLU-3143 tests: use facet_active_host to get host
Hongchao Zhang [Fri, 12 Apr 2013 14:28:14 +0000 (22:28 +0800)]
LU-3143 tests: use facet_active_host to get host

In wait_osc_import_state() called in test_29a of recovery-small,
facet_acitve_host should be used instead of facet_host for the host
could change during failover with FAILURE_MODE=HARD.

Test-Parameters: clientdistro=el6 serverdistro=el6 \
clientarch=x86_64 serverarch=x86_64 clientcount=4 \
osscount=2 mdscount=2 austeroptions=-R failover=true \
useiscsi=true testlist=recovery-small

Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I7fe45c7d979b64d802894c92eaad6f76bec3fadf
Reviewed-on: http://review.whamcloud.com/6036
Tested-by: Hudson
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2872 tests: EXCEPT sanity-quota/0+1 for zfs
Nathaniel Clark [Thu, 28 Mar 2013 19:19:59 +0000 (15:19 -0400)]
LU-2872 tests: EXCEPT sanity-quota/0+1 for zfs

Drop the failing IO rate for dd in test_0 to account for slow dd
performance (LU-2887).  EXCEPT test_1 for zfs (since "passing" times
have been seen as long as 3400s, and "normal" times are around 2000s
which is still very slow).

Test-Parameters: testlist=sanity-quota mdtfilesystemtype=zfs  mdsfilesystemtype=zfs ostfilesystemtype=zfs
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ic9a0ba0bed56fa5d2150bb6b4b70fd48e83ce730
Reviewed-on: http://review.whamcloud.com/5876
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3129 osd: Get FID from LMA if not in directory entry
wang di [Sun, 14 Apr 2013 07:57:10 +0000 (00:57 -0700)]
LU-3129 osd: Get FID from LMA if not in directory entry

During deleting agent inode, if the FID can not be found in
directory entries, for example FS upgraded from 1.8 or restored
FS, it should try to get the FID from LMA.

Fix DNE upgrade tests to use a temporary loop device for adding
new MDT, instead of MDTDEV2, which might affect other tests.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I082c330f2b12258e996bdd9820db56a8659540f1
Reviewed-on: http://review.whamcloud.com/5997
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
6 years agoLU-3159 lprocfs: fix LDLM namespace names in /proc
Jian Yu [Fri, 12 Apr 2013 10:23:33 +0000 (18:23 +0800)]
LU-3159 lprocfs: fix LDLM namespace names in /proc

This patch fixes LDLM namespace names in
/proc/fs/lustre/ldlm/namespaces/ to use obd->obd_uuid.uuid
instead of a pointer address.

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: Ieb3ef6c48d1f52f8d238bb64b7ce9ea004d2964f
Reviewed-on: http://review.whamcloud.com/6039
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3136 test: add /bin:/usr/sbin to do_rpc_node()
Minh Diep [Wed, 10 Apr 2013 20:13:58 +0000 (13:13 -0700)]
LU-3136 test: add /bin:/usr/sbin to do_rpc_node()

Under fc18, /bin and /usr/sbin is not included in
default PATH

Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: I251cc50e7c0f42116ec716695eedc3c564cb3f9b
Reviewed-on: http://review.whamcloud.com/6021
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2384 kerberos: Support for MIT-kerberos >=1.8.X is broken
Thomas Stibor [Mon, 26 Nov 2012 15:13:08 +0000 (16:13 +0100)]
LU-2384 kerberos: Support for MIT-kerberos >=1.8.X is broken

Since version 1.8.X the function signature for deriving
cryptographic keys of the MIT-kerberos library:
krb5_derive_key(const struct krb5_enc_provider *enc,
                const krb5_keyblock *inkey,
                krb5_keyblock *outkey,
                const krb5_data *in_constant)
is changed in:
krb5int_derive_key(const struct krb5_enc_provider *enc,
                   krb5_key inkey, krb5_key *outkey,
                   const krb5_data *in_constant)
The kerberos support for lustre thus is not working anymore
with current linux distributions supporting MIT-kerberos
library >= 1.8.X.

Signed-off-by: Andrew Korty <ajk@iu.edu>
Change-Id: I35e85a15e7fd846df6d63d430d7ac98ec53d7c56
Reviewed-on: http://review.whamcloud.com/4672
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
6 years agoNew tag 2.3.64 2.3.64 v2_3_64 v2_3_64_0
Oleg Drokin [Sat, 13 Apr 2013 14:27:02 +0000 (10:27 -0400)]
New tag 2.3.64

Change-Id: Ia40c179b6570f9f97c467498257800c2011d3c57

6 years agoLU-2888 fid: still Use oi_id/oi_seq for log/lov object.
wang di [Mon, 27 Jan 2014 03:44:48 +0000 (19:44 -0800)]
LU-2888 fid: still Use oi_id/oi_seq for log/lov object.

Since llog are only used locally on MDS right now, so we will use
oi_id/oi_seq to identfy the log, instead of trying to convert it to
FID, to avoid confusion in ostid_to_fid/fid_to_ostid.

Since pre-2.4 use {oi_id,oi_seq} for FIDs on MDT, which make
it difficult to tell whether it is ostid or FID by only checking
oi_seq, so this patch will separate lmm_oi/FID conversion from
ostid_to_fid.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ie17b11a8a07ed3a44e41d5e88529541cbd33dd2f
Reviewed-on: http://review.whamcloud.com/6044
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-1460 snmp: Expose lnet stats through SNMP
Jeremy Filizetti [Tue, 16 Oct 2012 13:41:27 +0000 (09:41 -0400)]
LU-1460 snmp: Expose lnet stats through SNMP

Add to the MIB and lustre functionality to monitor
lnet stats via SNMP

Signed-off-by: Jeremy Filizetti <jeremy.filizetti@gmail.com>
Change-Id: I9ae360d7e100af5aef34a6b645fce963376928d1
Reviewed-on: http://review.whamcloud.com/4823
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-2780 mdd: use a real inode for .lustre/fid
John L. Hammond [Wed, 10 Apr 2013 17:48:11 +0000 (12:48 -0500)]
LU-2780 mdd: use a real inode for .lustre/fid

Use a real inode .lustre/fid thereby allowing traditional DACs to
govern open by fid.  Set the default mode of .lustre/fid to
0100/d--x------.  Remove the prohibition on setting attributes of
.lustre and .lustre/fid in mdt_reint_setattr().  Don't set IMMUTE_OBJ
in .lustre/fid's mod_flags and remove the check for IMMUTE_OBJ in
mdd_create_data().  Add a check to sanity test_154 to ensure that
setattr works on .lustre/fid.

Intel-bug-id: INTL-5
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I372e9d6bb230e5b078dbf028fdc4348dfa192f93
Reviewed-on: http://review.whamcloud.com/5298
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-2886 mdd: create local files using local_storage lib
Mikhail Pershin [Tue, 27 Nov 2012 14:00:01 +0000 (18:00 +0400)]
LU-2886 mdd: create local files using local_storage lib

Switch MDD to use local_storage library to create local objects with
generated or pre-defined FIDs. That unifies the way how local objects
are created on both OST/MDT and avoid layering violation with calling
MDD from OSD like md_local_object library does.

two other fixes are included:
- remove DECLARE_LLOG_WRITE/REWRITE and mdd_declare_llog_record()
  which was a temporary solution to declare llog changes and was
  fixed with llog-over-osd implementation
- add .lustre seq range into FLD in fld_insert_special_entries() as
  all other special ranges.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I7f8452e0a6d9abbe6cd1960a8ea71cbae4abe753
Reviewed-on: http://review.whamcloud.com/4682
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2133 lnet: wrong peer state reported
Isaac Huang [Tue, 19 Mar 2013 19:20:53 +0000 (13:20 -0600)]
LU-2133 lnet: wrong peer state reported

When peer health support is disabled, peer state as shown in
/proc/sys/lnet/peers and by IOC_LIBCFS_DEBUG_PEER should be "NA".
Otherwise wrong states could be shown because the peer aliveness time
stamps are not refreshed when peer health is disabled.

Signed-off-by: Isaac Huang <he.huang@intel.com>
Change-Id: Ice5c6651ca5d2620495a0c37de9a22aebd644d0a
Reviewed-on: http://review.whamcloud.com/5955
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2846 kernel: kernel update [RHEL6.4 2.6.32-358.2.1.el6]
yangsheng [Tue, 9 Apr 2013 12:03:00 +0000 (20:03 +0800)]
LU-2846 kernel: kernel update [RHEL6.4 2.6.32-358.2.1.el6]

--update rhel6.4 kernel to 2.6.32-358.2.1.el6
--udpate rhel5.9 kenrel to 2.6.18-348.3.1.el5(client only)

Conmbine the LU-2967 patch:
Pulling in upstream ipoib patch while waiting for RedHat
to do the same.
upstream commit fa16ebed31f336e41970f3f0ea9e8279f6be2d27

Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: yang sheng <yang.sheng@intel.com>
Change-Id: I05c5270230963d0dde4fb0add0237a1682ecbefd
Reviewed-on: http://review.whamcloud.com/5952
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3137 kerberos: GSSAPI broken due to library confusion
Andrew Korty [Tue, 9 Apr 2013 13:54:26 +0000 (09:54 -0400)]
LU-3137 kerberos: GSSAPI broken due to library confusion

libgssglue has replaced libgssapi on some platforms, including RHEL
6.4, producing the compile-time errors

lsvcgssd-context_lucid.o: In function `serialize_krb5_ctx':
/home/ajk/lustre-master/lustre/utils/gss/context_lucid.c:598:
undefined reference to `gss_export_lucid_sec_context'
/home/ajk/lustre-master/lustre/utils/gss/context_lucid.c:634:
undefined reference to `gss_free_lucid_sec_context'

Having Autoconf look for gss_free_lucid_sec_context() instead of
gss_init_sec_context() finds the correct library.

Signed-off-by: Andrew Korty <ajk@iu.edu>
Change-Id: I1362682a5a2cc78b176ad0b4f9181db335084cd4
Reviewed-on: http://review.whamcloud.com/5991
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-2267 osd-zfs: Use appropriate ZFS flags for file attributes
Nathaniel Clark [Tue, 9 Apr 2013 12:40:42 +0000 (08:40 -0400)]
LU-2267 osd-zfs: Use appropriate ZFS flags for file attributes

Instead of setting arbitrary bits in pflags, convert to use existing
ZFS attributes.  This format is different from previous implementation
and will cause older filesystems with attrs set to not behave
correctly.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ia0aac3e12adedd95b215f93ebe538a61abf910fa
Reviewed-on: http://review.whamcloud.com/5988
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
6 years agoLU-2681 fld: shrink seq_type in lsr_flags
wangdi [Fri, 24 Jan 2014 22:31:52 +0000 (14:31 -0800)]
LU-2681 fld: shrink seq_type in lsr_flags

In lu_seq_range, lsr_flags is treated to only hold LU_SEQ_RANGE_MDT,
LU_SEQ_RANGE_OST or LU_SEQ_RANGE_ANY.  Because they can fit into two
bits, using lsr_flags(32 bits) is clearly unnecessary.

This patch will shrink the current seq_type to 2 bits, so other flags
can be used in lsr_flags in future.  Add wrapper functions to access
and set the flags:

 fld_range_set_mdt(), fld_range_set_ost(), fld_range_set_any()
 fld_range_is_mdt(), fld_range_is_ost(), fld_range_is_any()

If another target type were needed, it could potentially use
LU_SEQ_RANGE_FOO 0x2, which is currently unused.

Signed-off-by: Wang Di <di.wang@intel.com>
Change-Id: I721c9fe5778ee331d3f77ac885f3b482e2322c85
Reviewed-on: http://review.whamcloud.com/5999
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
6 years agoLU-2189 tests: EXCEPT sanityn/36 for ZFS
Nathaniel Clark [Wed, 10 Apr 2013 13:16:57 +0000 (09:16 -0400)]
LU-2189 tests: EXCEPT sanityn/36 for ZFS

EXCEPT sanityn/36 for zfs until a permanent fix can be found.

Test-Parameters: mdsfilesystemtype=zfs mdtfilesystemtype=zfs   ostfilesystemtype=zfs testlist=sanityn
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I1b68b7e219627fa1755118e90cf5f2299e221454
Reviewed-on: http://review.whamcloud.com/6010
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3127 tests: EXCEPT replay-single/62,73b
Nathaniel Clark [Wed, 10 Apr 2013 14:54:07 +0000 (10:54 -0400)]
LU-3127 tests: EXCEPT replay-single/62,73b

Except replay-single/62 (LU-1473) for all tests.
Except replay-single/73b (LU-3127) for ZFS.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ie74e33e9c7aa94db9bbe23c519327e45ced1ea33
Reviewed-on: http://review.whamcloud.com/6012
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-2392 kerberos: GSS keyring is broken >=2.6.29
Thomas Stibor [Thu, 29 Nov 2012 12:49:44 +0000 (13:49 +0100)]
LU-2392 kerberos: GSS keyring is broken >=2.6.29

Kerberos support for lustre employs the GSS framework
and the keyring mechanism (gss_keyring.c) to maintain
and cache cryptographic keys in the Kernel. Due to
structural changes in the kernel the keyring is
(mostly) separated from task_struct
and accessible via credential structure.

Signed-off-by: Andrew Korty <ajk@iu.edu>
Change-Id: Ia022e1d76e6eb0308614f8af615e67d39f1d9e98
Reviewed-on: http://review.whamcloud.com/4708
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
6 years agoLU-2789 lod: sidestep setstripe vs rename race
John L. Hammond [Tue, 9 Apr 2013 17:02:52 +0000 (12:02 -0500)]
LU-2789 lod: sidestep setstripe vs rename race

In mdd_declare_link() and mdd_declare_rename() pass the actual
attributes to be set down to mdo_declare_attr_set().  In
lod_declare_attr_set() and lod_attr_set() only handle striping if
setting UID or GID.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I511e35833042f6004fa6befd382831b7f33bef5a
Reviewed-on: http://review.whamcloud.com/5802
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3000 tests: several fixes of tests for DNE
wangdi [Mon, 13 Jan 2014 01:06:09 +0000 (17:06 -0800)]
LU-3000 tests: several fixes of tests for DNE

1. sanity 27u, set PRECREATE_FAIL for every MDS.

2. sanity 133d, use mkdir, instead of test_mkdir to
avoid checking rename stats on remote MDTs.

3. conf-sanity 32, use do_rpc_nodes for reload module,
in case it needs to reload module on remote nodes, and
also umount mdt2 in 32c.

4. conf-sanity 42, add load_modules to avoid missing
module errors in some cases.

5. skip test_53 and test_225 when there are more than
one MDT.

6. redirect error message to /dev/null, to avoid
too much error message in the log, which might
explore the size of the log.

Test-parameters: mdscount=2 mdtcount=2 testlist=sanity,conf-sanity

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ic09d97fb68b923b3a5862371a59c5ba655c278a7
Reviewed-on: http://review.whamcloud.com/5877
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3134 utils: Fix compilation errors in packet_lustre.c
Doug Oucharek [Tue, 9 Apr 2013 04:30:07 +0000 (21:30 -0700)]
LU-3134 utils: Fix compilation errors in packet_lustre.c

There are compilation errors in packet_lustre.c when building
Wireshark plugins. This was introduced in
http://review.whamcloud.com/#change,2877.  That patch was deleting
llog variables no longer needed.  Not all instances got deleted.

Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Change-Id: Ica97df78e2a3e7b1667cc88484342b97a6c6a01a
Reviewed-on: http://review.whamcloud.com/5980
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-1434 utils: Add build functionality for wireshark and Lustre/LNet plugins
frank [Sat, 23 Feb 2013 15:58:04 +0000 (07:58 -0800)]
LU-1434 utils: Add build functionality for wireshark and Lustre/LNet plugins

Add build script `wsbuild' to create RPMs for wireshark and Lustre/LNet
plugins. Set-up of the download and compile environment for the desired
wireshark version will be handled via configuration file `wsconfig.sh'.
Intention is to use the script for Jenkins builds.

Signed-off-by: frank <Frank.Heckes@intel.com>
Change-Id: I3e00c5df102f2e52f0abf7c2d48488ccfb38a3ca
Reviewed-on: http://review.whamcloud.com/5520
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Chris Gearing <chris.gearing@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2684 fid: unify ostid and FID
wangdi [Fri, 17 Jan 2014 08:30:12 +0000 (00:30 -0800)]
LU-2684 fid: unify ostid and FID

Since 2.4 will support FID on OST, so this patch will try to unify
ostid and FID, so one day, we will use FID to identify the object
everywhere.

Because both ostid and FID has 128 bits long, so we will re-define
ostid as union,

struct ost_id {
    union {
    struct ostid {
    __u64   oi_id;
    __u64   oi_seq;
    } oi;
    struct lu_fid oi_fid;
    };
};

If oi_seq == 0, it will still use <oi_seq, oi_id> to locate the
object as before. And when building reside, it still keeps the
old way res[0] = obj_id, res[1] = obj_seq;

If oi_seq != 0, it will use FID(oi_fid) directly to locate the
object, and use FID to build resid directly, so it will be unified
with META lock resid.

Remove other direct _id and _seq accessment from the code.

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes clientjob=lustre-b1_8 clientbuildno=258 testlist=runtests
Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes clientjob=lustre-b2_1 clientbuildno=191 testlist=runtests
Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes clientjob=lustre-b2_3 clientbuildno=41 testlist=runtests
Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I800a2b569169fcab4c886f3a17fc4e157ff78038
Reviewed-on: http://review.whamcloud.com/5820
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-2921 iokit: plot-obdfilter fixes
Robert Read [Wed, 6 Mar 2013 19:12:01 +0000 (11:12 -0800)]
LU-2921 iokit: plot-obdfilter fixes

plot-obdfilter was mixing up objects and threads in its output.

Signed-off-by: Robert Read <robert.read@intel.com>
Change-Id: If6aa66943b88ea0d35b5a8ab4b61b8f80df67fd5
Reviewed-on: http://review.whamcloud.com/5618
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2904 llite: use 32bitapi for re-export Lustre via NFS
Fan Yong [Tue, 19 Feb 2013 12:45:15 +0000 (20:45 +0800)]
LU-2904 llite: use 32bitapi for re-export Lustre via NFS

Since Lustre-2.4, non-IGIF FID for root object will be
returned to client. For 64bit client, it converts such
root FID into a local ino#, which is larger than 2^32.

For the case of re-exporting Lustre via NFS, it works
only when the ino# less than 2^32, which is NFS defect.
So if without proper handling, it cannot re-export the
Lustre root via NFS. Similar issue exists all along on
old version for re-exporting non-root via NFS.

Current solution is that the user who want to re-export
Lustre (in spite of root or not) via NFS needs to mount
the Lustre client with the options "-o 32bitapi". Then
the client will convert 128-bits FID into 32-bits ino#.

This patch handles the options "32bitapi" for the FID
to ino# conversion. And some code cleanup.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I367ebe07d9bd645b312f37d78dfaa10f9f4b8200
Reviewed-on: http://review.whamcloud.com/5711
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2990 osd-zfs: locate cursor to specified pos via load API
Fan Yong [Thu, 28 Feb 2013 03:25:48 +0000 (11:25 +0800)]
LU-2990 osd-zfs: locate cursor to specified pos via load API

There was defect for zfs-based backend when traverse directory:
the dt_iteration API ::load() did not locate the cursor to the
specified position, then caused non-first directory readpage
RPC obtained repeated entries, and then caused readdir() loop
or unexpected dir hash collision.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I9c159f0f80677590869246dd9f30f0dfb9cc2fbc
Reviewed-on: http://review.whamcloud.com/5894
Tested-by: Hudson
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-398 ptlrpc: Add the NRS CRR-N policy
Nikitas Angelinas [Wed, 9 Jan 2013 02:02:12 +0000 (02:02 +0000)]
LU-398 ptlrpc: Add the NRS CRR-N policy

The CRR-N (Client-based Round Robin over NIDs) policy batch-schedules
all types of RPCs in a Round Robin manner according to the NID of the
client that generated the RPC; the maximum size of the batches is
configurable via interaction with lprocfs. The policy aims to provide
for better resource utilization across the cluster, and to help
shorten completion times of jobs in some cases by distributing
available bandwidth more evenly across client nodes.

Signed-off-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Co-authored-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Ie91ee277fc95564908b20fd0d539a274089657ed
Oracle-bug-id: b=13634
Xyratex-bug-id: MRP-73
Reviewed-on: http://review.whamcloud.com/4937
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2923 ptlrpc: Stop suppressing pings when IR is unavailable
Li Wei [Sun, 31 Mar 2013 06:48:30 +0000 (14:48 +0800)]
LU-2923 ptlrpc: Stop suppressing pings when IR is unavailable

Currently, IR does not notify LWPs and MDT-MDT OSPs of target
recoveries.  This patch removes OBD_CONNECT_PINGLESS from LWP and
MDT-MDT OSP connect requests.

Although an MGC does not know if IR is administratively disabled on
the MGS or if a particular target is mounted with "noir", it can
detect MGSs that do not support IR at all and MGSs that are
unreachable.  This patch stops suppressing pings under those two
cases.

As a cleanup requested by the reviewers, this patch also replaces the
plain OBD_CONNECT_PINGLESS checks with OCD_HAS_FLAG(..., PINGLESS)
macros.

Change-Id: I993b46c8f33413793d9cf2fa1a73b3635996a206
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/5900
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Hudson
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3059 dt: shrink dt_object by 8 bytes on x86_64
John L. Hammond [Fri, 29 Mar 2013 16:28:11 +0000 (11:28 -0500)]
LU-3059 dt: shrink dt_object by 8 bytes on x86_64

Merge struct dt_lock_operations (containing only do_object_lock) into
dt_object_operations.  The DT types that use these two structures do
not have enough variation in their methods to justify separate
structures and it removes an 8 byte pointer member from struct
dt_object.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I4372ba23f0f7691ac86e391772a6a6157311cfda
Reviewed-on: http://review.whamcloud.com/5892
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-1812 osd-ldiskfs: oti_obj_dentry needs d_sb set
James Simmons [Mon, 8 Apr 2013 11:25:49 +0000 (07:25 -0400)]
LU-1812 osd-ldiskfs: oti_obj_dentry needs d_sb set

Commit 431547b3 (v2.6.33) changed the generic xattr handlers to
use dentry->d_sb rather than dentry->d_inode->i_sb.

This patch ensures it's set before calling the xattr ops, which filter
through the generic xattr handlers.

Really, since any call into the kernel using a dentry can deref d_sb,
it should be set so we'll set it for fsync as well.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I0ce38970cd839a220f852f96632b473011adbdc6
Reviewed-on: http://review.whamcloud.com/5120
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3050 quota: amend sync write checking from 1.8 client
Niu Yawei [Wed, 3 Apr 2013 12:04:21 +0000 (08:04 -0400)]
LU-3050 quota: amend sync write checking from 1.8 client

The 1.8 client sync write doesn't carry OBD_BRW_SYNC flag, to
interoperate with 1.8 client, the checking for sync write on OST
should be amended accordingly.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I4179c4878d295dae625f5631b6b02f3b4dd32cb6
Reviewed-on: http://review.whamcloud.com/5928
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-2991 osd: Overflow of transaction credits counters
Bruno Faccini [Sun, 7 Apr 2013 17:39:07 +0000 (19:39 +0200)]
LU-2991 osd: Overflow of transaction credits counters

Switching size of transaction credits counters from uchar to
ushort to avoid possible overflow scenarios, like when
wide-striping.
Also allow OSD_TRACK_DECLARES to be undefined without
compile-time errors for unsatisfied-externals/unused vars.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I2588cf11741ca4e3ee80b795a7d4318f9ed4fd3d
Reviewed-on: http://review.whamcloud.com/5830
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2473 ldiskfs: Add ldiskfs support for RHEL 6.4
Christopher J. Morrone [Sat, 16 Mar 2013 09:13:48 +0000 (02:13 -0700)]
LU-2473 ldiskfs: Add ldiskfs support for RHEL 6.4

Add an ldiskfs kernel patch series to support the RHEL 6.4 kernel.

The ldiskfs series selection macro (LB_LDISKFS_SERIES) is fixed up
to use the AS_VERSION_COMPARE, which allows us to check if the kernel
version is greater than or equal to a specific number, rather than
just a simple pattern match.

Change-Id: I894ace2d98e3d5c7481230794e9edf984bce7aee
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4804
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3098 mdt: continue on LFSCK start error in mdt_prepare()
John L. Hammond [Wed, 3 Apr 2013 15:09:15 +0000 (10:09 -0500)]
LU-3098 mdt: continue on LFSCK start error in mdt_prepare()

In mdt_prepare() do not allow failure of the OBD_IOC_START_LFSCK
ioctl() to prevent mount from succeeding on slave MDTs.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ie3ab2e61037739e3324f6ec28e5f73be861b58f5
Reviewed-on: http://review.whamcloud.com/5931
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3059 lod: shrink lod_object to 128 bytes
John L. Hammond [Thu, 28 Mar 2013 22:05:00 +0000 (17:05 -0500)]
LU-3059 lod: shrink lod_object to 128 bytes

By packing ldo_stripes_allocated into the bitfield containing
ldo_striping_cached and ldo_def_striping_set we reduce the size of
struct lod_object from 136 to 128 bytes on x86_64.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: If419560f9187a98fcb034cd9fcd5c854ff467cec
Reviewed-on: http://review.whamcloud.com/5878
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3053 tests: replay-ost-single/6 wait for delete longer
Nathaniel Clark [Thu, 28 Mar 2013 19:14:01 +0000 (15:14 -0400)]
LU-3053 tests: replay-ost-single/6 wait for delete longer

Add similar code from test 7 to test 6 to wait for delete thread and
add variable wait for kbytesfree to settle down.

Test-Parameters: testlist=replay-ost-single mdtfilesystemtype=zfs  mdsfilesystemtype=zfs ostfilesystemtype=zfs
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I89c1270ac5196ca43c17f3a5bd722c0555960065
Reviewed-on: http://review.whamcloud.com/5875
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3047 tests: typo in s-q
Niu Yawei [Thu, 28 Mar 2013 06:59:37 +0000 (02:59 -0400)]
LU-3047 tests: typo in s-q

In s-q, '$LFS rmdir' should be replaced with 'rmdir'.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Ic828e3b2ab7204bfbf0815062a57cc42dc0e2c0b
Reviewed-on: http://review.whamcloud.com/5865
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>