Whamcloud - gitweb
fs/lustre-release.git
11 years agoLU-1940 ost: wait a while for OBD_FAIL_OST_EROFS
Hongchao Zhang [Tue, 13 Nov 2012 22:36:43 +0000 (06:36 +0800)]
LU-1940 ost: wait a while for OBD_FAIL_OST_EROFS

for OSC, -EROFS is a recoverable error, it will resend the failed
request at most cl_resends times (obd->u.cli.cl_resends), and
its default value is 10, then for test case, the failed request
will be resent repeatly without delay, and the cl_resends could be
not enough to handle, replaces OBD_FAIL_CHECK with OBD_FAIL_TIMEOUT
will introduce some delay for -EROFS.

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: Ic2a8fe6f2d75e74f30d007940a8fd631997135e4
Reviewed-on: http://review.whamcloud.com/4622
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-930 utils: update lfs_migrate example usage
Andreas Dilger [Tue, 6 Nov 2012 23:12:40 +0000 (16:12 -0700)]
LU-930 utils: update lfs_migrate example usage

Update the lfs_migrate example usage to exclude files created within
the past two days.  This makes it more clear that the current script
needs to take care to avoid migrating files that may still be modified
by applications.  While two day old files are not guaranteed to be
unused, it definitely would avoid the vast majority of cases of files
that were just created and are being written to by running apps.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: If7c06ef3b0688db492930a56d7ba5ad4599b04e2
Reviewed-on: http://review.whamcloud.com/4481
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
11 years agoLU-1978 llite: Fix i_size race with truncate and mkwrite
michael.mckay [Wed, 19 Sep 2012 14:54:56 +0000 (10:54 -0400)]
LU-1978 llite: Fix i_size race with truncate and mkwrite

These changes address a race between the truncate
process and the mkwrite process. We add an additional
check in the case of a mkwrite to make sure we are not
past the end of the file. While holding the lli_trunc_sem
lock we check the size and make sure we are not past
the end of the file. If we are we return -ENODATA which
will trigger a SIGBUS. This is similar to what occurs in the
ext4 filesystem in these cases. The return status to -ENODATA
which will eventually get mapped to
VM_FAULT_NOPAGE (ll_page_mkwrite()).
The kernel will then return a SIGBUS. These changes
return -ENODATA to ensure we correctly clean up. In the
case of the mapping being null nothing will change.

Xyratex-bug-id: MRP-651
Reviewed-by: Andrew Perepechko <Andrew_Perepechko@xyratex.com>
Reviewed-by: Alexander Zarochentsev <Alexander_Zarochentsev@xyratex.com>
Signed-off-by: Michael McKay <michael_mckay@xyratex.com>
Change-Id: Ice41b20ac16d81be44fb0c6a1bf0da8b2fcf9b7c
Reviewed-on: http://review.whamcloud.com/4044
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1517 ptlrpc: throw net error to ptlrpc for bulk
Alexander.Boyko [Mon, 17 Sep 2012 13:48:59 +0000 (17:48 +0400)]
LU-1517 ptlrpc: throw net error to ptlrpc for bulk

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

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Change-Id: I0cf2ee1230a039336f081fbb520c1ce768882088
Xyratex-bug-id: MRP-523
Reviewed-on: http://review.whamcloud.com/4299
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Cory Spitz <spitzcor@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1944 ldlm: Add another net_latency to recoverry timer.
wangdi [Fri, 14 Sep 2012 14:39:21 +0000 (07:39 -0700)]
LU-1944 ldlm: Add another net_latency to recoverry timer.

Add another net_latency to this request deadline, i.e.
we need add 2 net_latency to extend the recovery timer,
one for balance rq_deadline (see ptl_send_rpc), one for
resend the req to server.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I6cb6e57358f4fe32ae2ac8d982af6ce03b68014b
Reviewed-on: http://review.whamcloud.com/4351
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoRevert "LU-1756 kernel: cleanup lustre_compat25.h"
Oleg Drokin [Wed, 21 Nov 2012 16:42:00 +0000 (11:42 -0500)]
Revert "LU-1756 kernel: cleanup lustre_compat25.h"

This is causing build failures on SLES11SP2

This reverts commit 472fe13982952c9ccad969a996c054f9cf643847.

11 years agoLU-2139 osc: Move cl_client_lru to cl_client_cache
Prakash Surya [Tue, 6 Nov 2012 21:24:27 +0000 (13:24 -0800)]
LU-2139 osc: Move cl_client_lru to cl_client_cache

The cl_client_lru structure was renamed to cl_client_cache. This is
intended as a purely cosmetic change motivated by the future inclusion
of other, non LRU, information in that structure. For example, the plan
is to include "unstable" page information in this structure; which is
unrelated to the LRU list of clean pages, but still part of a client's
cache.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: I286a1bbb2fb0d7dc52f007407bb823f960ae7c62
Reviewed-on: http://review.whamcloud.com/4483
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1756 kernel: cleanup lustre_compat25.h
Peng Tao [Thu, 16 Aug 2012 07:59:21 +0000 (15:59 +0800)]
LU-1756 kernel: cleanup lustre_compat25.h

1. unused functions:
   ll_bdi_wb_cnt()
2. call bdi_init/bdi_destroy directly
3. call add_to_page_cache_lru directly
4. fix a typo of ll_pagevec_init
5. remove QUOTA_OK/NO_QUOTA. They are defined in libcfs

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I9953dabbc758e6fb7a3d0649bdc64ba1455efb99
Reviewed-on: http://review.whamcloud.com/3689
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
11 years agoLU-2031 obdclass: check if client is connected to the target
Jinshan Xiong [Tue, 13 Nov 2012 19:56:17 +0000 (11:56 -0800)]
LU-2031 obdclass: check if client is connected to the target

When the client is notified by IR, it may not connect to the OST
yet, verify it before writing the new NID to the import.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ia144b695443a9850ecccd0c8946de029492b4446
Reviewed-on: http://review.whamcloud.com/4525
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2244 lov: remove unused bits from lov, osc
Alex Zhuravlev [Sun, 28 Oct 2012 18:38:11 +0000 (21:38 +0300)]
LU-2244 lov: remove unused bits from lov, osc

- precreation logic in OSC
- QoS code in LOV
- fake requests in ptlrpc

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I7a3e3ec6cf254a9fcd53ae7eab6c2d23b7520234
Reviewed-on: http://review.whamcloud.com/4399
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
11 years agoLU-591 mdd: link ea code cleanup
Vitaly Fertman [Mon, 22 Oct 2012 19:55:12 +0000 (23:55 +0400)]
LU-591 mdd: link ea code cleanup

Change-Id: I7504a2a3ae540471ef37d75e46ca0d7cf9d8a9f5
Xyratex-bug-id: MRP-139
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Nathan Rutman <Nathan_Rutman@xyratex.com>
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-on: http://review.whamcloud.com/1230
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2345 tests: remove $FSTYPE from tests
Niu Yawei [Fri, 16 Nov 2012 10:50:13 +0000 (05:50 -0500)]
LU-2345 tests: remove $FSTYPE from tests

$FSTYPE is deprecated, it should be replaced by facet_fstype.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I6671249c88a53b01badebd7172fb3307c8f4f48b
Reviewed-on: http://review.whamcloud.com/4596
Tested-by: Hudson
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
11 years agoLU-1606 api: Do not include lustre_idl.h from lustreapi.h
Christopher J. Morrone [Sat, 10 Nov 2012 02:06:29 +0000 (18:06 -0800)]
LU-1606 api: Do not include lustre_idl.h from lustreapi.h

lustre_idl.h has become increasingly difficult to use from
user-space.  Normal users of the lustre api should not
be looking into lustre wire protocol anyway, so this change
eliminates the include of lustre_idl.h.

After removing lustre_idl.h, it became obvious that a number
of programs have been picking up normal user-space headers
through a very windy path of includes.  With the include
of lustre_idl.h gone, they no longer compiled, so we also
add the missing explicit includes.

It became clear that copytool.c explicity requires
libcfs/libcfs.h, and lustre_rsync.c require lustre_idl.h.
But I believe that it is far better to have those includes
explicitly stated, so it is obvious that those programs
are peeking into lustre's internals.  In the future we
can work on creating new lustre API calls that provide the
information that they need without side-stepping abstraction
layers.

Change-Id: I8ce55ffe0e1766515061f3dbc63c2372d5713f58
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4505
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Yu Jian <yujian@whamcloud.com>
11 years agoLU-1623 mdt: Atomically update MDT export connection flags
Ned Bass [Fri, 26 Oct 2012 22:32:26 +0000 (15:32 -0700)]
LU-1623 mdt: Atomically update MDT export connection flags

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

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

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

This patch makes the following changes:

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

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

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

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

Signed-off-by: Ned Bass <bass6@llnl.gov>
LLNL-bug-id: bz1711
Change-Id: Ic00c4679cc9b813bdb47cf148bef8f62c0ef8ddb
Reviewed-on: http://review.whamcloud.com/4406
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1337 llite: kernel 3.2 protects inode->i_nlink
Liu Xuezhao [Tue, 30 Oct 2012 09:01:51 +0000 (17:01 +0800)]
LU-1337 llite: kernel 3.2 protects inode->i_nlink

Kernel 3.2 protects inode->i_nlink from direct modification.
Filesystems can only read i_nlink directly and shall use the
(set|clear|inc|drop)_nlink for modification.
See kernel commit a78ef704a8dd430225955f0709b22d4a6ba21deb.

This patch adds LC_HAVE_PROTECT_I_NLINK checking and implements
set_nlink for old kernel, clear/inc/drop_nlink exists after 2.6.18

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: Ie958cb308291ecc48d409a1282fed7ea3549a561
Reviewed-on: http://review.whamcloud.com/3577
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2322 quota: OBD_IDX_READ should be handled during recovery
Niu Yawei [Wed, 14 Nov 2012 09:57:04 +0000 (04:57 -0500)]
LU-2322 quota: OBD_IDX_READ should be handled during recovery

OBD_IDX_READ should be handled during recovery.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I509be43b062943e7601fdfc3a38178acb2d150b0
Reviewed-on: http://review.whamcloud.com/4580
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
11 years agoLU-2156 misc: too noisy messages are suppressed
Alex Zhuravlev [Fri, 12 Oct 2012 08:16:54 +0000 (12:16 +0400)]
LU-2156 misc: too noisy messages are suppressed

- number of messages leading to confusion and adding no
  useful information to the customers are suppressed.

- remove KEY_REVIMP_UPD - it's not used with OFD

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I9679b786354a2f4b52c5c13e0e2ec98a5a5b86a9
Reviewed-on: http://review.whamcloud.com/4261
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
11 years agoLU-2220 doc: add CLIO notes
Ned Bass [Tue, 23 Oct 2012 23:26:35 +0000 (16:26 -0700)]
LU-2220 doc: add CLIO notes

Add notes on the CLIO subsystem originally composed by Nikita Danilov
to the lustre/doc directory.  Update document to improve accuracy,
language, and formatting.

Original document URL:
http://wiki.lustre.org/images/3/37/CLIO-TOI-notes.pdf

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I18ac65bc437cf095ac7a897ebd2f8882318d27ad
Reviewed-on: http://review.whamcloud.com/4377
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Ian Colle <Ian.Colle@intel.com>
11 years agoLU-2284 quota: debug patch for test_7d
Niu Yawei [Mon, 12 Nov 2012 02:53:19 +0000 (21:53 -0500)]
LU-2284 quota: debug patch for test_7d

Try to collect D_TRACE & D_QUOTA log to see why the setquota failed
with -EINVAL.

This patch improve the test script a bit: fail the test when setquota
failed.

Test-Parameters: testlist=sanity-quota
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ic866dcefcb174bd0128e63f5777824608db52962
Reviewed-on: http://review.whamcloud.com/4510
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
11 years agoLU-1337 llite: take trunc_sem outside cl_io_loop for mkwrite
Liu Xuezhao [Wed, 7 Nov 2012 03:17:44 +0000 (11:17 +0800)]
LU-1337 llite: take trunc_sem outside cl_io_loop for mkwrite

In truncate path it acquires lli_trunc_sem and then dlm lock, so
in page_mkwrite we should take it in the same sequence to avoid
dead lock.

This is a fix for f78805dbf041bb42b250fe754dff7b864856203f .

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: Idb5574bffdaf00461befd43b867cdd9b3e549efe
Reviewed-on: http://review.whamcloud.com/4485
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1956 test: Disable test_156 for ZFS
Nathaniel Clark [Fri, 2 Nov 2012 16:00:11 +0000 (12:00 -0400)]
LU-1956 test: Disable test_156 for ZFS

Since osd-zfs does not collect or report caching stats, do not run 156
against it.  Mark test as skipped.  Created LU-2261 as enhancement to
add caching stats to osd-zfs.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Id4a0b92cc775a0751fa023d6027240e8511aa312
Reviewed-on: http://review.whamcloud.com/4448
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoRestore build after a tag crossed imaginary line. tag 2.3.56 2.3.56 v2_3_56 v2_3_56_0
Oleg Drokin [Mon, 19 Nov 2012 18:21:37 +0000 (13:21 -0500)]
Restore build after a tag crossed imaginary line. tag 2.3.56

We need to find a better way to control such can-kicking excercises.

Change-Id: I25d8a2fbf7d5905c8f002a7c38fc44ef3124dda5

11 years agoLU-2129 llog: protect llog write against concurrent read
Mikhail Pershin [Thu, 18 Oct 2012 19:01:49 +0000 (23:01 +0400)]
LU-2129 llog: protect llog write against concurrent read

llog_write_rec contains case when buffer passed separately from
header and tail, resulting 3 writes instead of single one, so
concurrent read may read partial record.
Another similar case is llog_pad, which writes header and tail
with required gap to align records at the end of 8K buffer.

Use dt_read/write locks on llog object to protect writes against
read. Such '3-writes' case happens only with configs llogs.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Idfb94706b2cf8ad22776c1a277b862863f94c2f6
Reviewed-on: http://review.whamcloud.com/4303
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
11 years agonew tag 2.3.55 2.3.55 v2_3_55 v2_3_55_0
Oleg Drokin [Mon, 19 Nov 2012 15:59:31 +0000 (10:59 -0500)]
new tag 2.3.55

Change-Id: I92940a37023baccdbd36fa9ca4c669b67cad8c95

11 years agoLU-2130 osp: wait until all the requests are processed
Alex Zhuravlev [Wed, 14 Nov 2012 19:12:11 +0000 (23:12 +0400)]
LU-2130 osp: wait until all the requests are processed

there is a window between osp_sync_interpret() and
osp_sync_request_commit_cb() where opd_syn_rpc_in_progress
is not zero while opd_syn_rpc_in_flight can be zero.
the assertion in osp_sync_thread() can hit this window or
osp_sync_request_commit_cb() can pin request at the point
where osp_sync_thread() has already stopped the processing
- this would be a deadlock.

with this patch osp_sync_thread() will be waiting until all
the requests are processed, checking the list of committed
requests in a while.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I409feb0bbb681e41bff1d41cb1232ef5ef1cbf37
Reviewed-on: http://review.whamcloud.com/4581
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-930 doc: update URLs in man pages
Andreas Dilger [Tue, 6 Nov 2012 23:06:21 +0000 (16:06 -0700)]
LU-930 doc: update URLs in man pages

Update the bug reporting URL to point at http://bugs.whamcloud.com/,
since current releases are not longer being made by Sun, and they
should not be getting bug reports about any 2.x releases.  Since all
of the man pages reference lustre(7), and the URL is also in the RPM
packages, we don't need to put the URL into every man page.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I24f95df62efbf75de89d96b52acfacbd16c12074
Reviewed-on: http://review.whamcloud.com/4480
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
11 years agoLU-1934 ofd: Fix a mis-aligned closing brace
Prakash Surya [Wed, 14 Nov 2012 19:38:48 +0000 (11:38 -0800)]
LU-1934 ofd: Fix a mis-aligned closing brace

This is a trivial change to correctly align a closing brace with
its open brace and code block.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: I1206211b0485ea6dac54dbc6f6e3acbcf8443837
Reviewed-on: http://review.whamcloud.com/4582
Tested-by: Hudson
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-2304 tests: fsx log print file descriptor number
Andreas Dilger [Fri, 9 Nov 2012 00:19:33 +0000 (17:19 -0700)]
LU-2304 tests: fsx log print file descriptor number

Print the file descriptor number when dumping logs after an fsx
failure during multi-mount testing.  This allows easier tracking
of which mountpoint data was written to and read from.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I5800bb982e1874d2394a554c95289342ab3444a2
Reviewed-on: http://review.whamcloud.com/4498
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2310 quota: fix typo in find_tree_dqentry()
Niu Yawei [Mon, 12 Nov 2012 02:09:41 +0000 (21:09 -0500)]
LU-2310 quota: fix typo in find_tree_dqentry()

In find_tree_dqentry(), we should pass 'type' to quota_read_blk(),
instead of '0'.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ife8afd248833b53ead017dd909359fc792db7689
Reviewed-on: http://review.whamcloud.com/4509
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2274 tests: use ext3 as baseline for POSIX test on SLES
Yu Jian [Tue, 13 Nov 2012 14:16:07 +0000 (22:16 +0800)]
LU-2274 tests: use ext3 as baseline for POSIX test on SLES

Since SLES distro does not support read-write access to an ext4
file system by default, this patch changes the baseline filesystem
to ext3 for POSIX testing on SLES distro.

The patch also removes the package installation codes from the
test script, which can detect and prompt which mandatory package
is not installed.

Test-Parameters: envdefinitions=SLOW=yes clientdistro=sl11 testlist=posix
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Iac901bb62afe0a944e8211e73bacb061e9a3aac1
Reviewed-on: http://review.whamcloud.com/4524
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
11 years agoLU-2183 interop: handle deprecated quota param
Niu Yawei [Wed, 14 Nov 2012 03:33:33 +0000 (22:33 -0500)]
LU-2183 interop: handle deprecated quota param

The 'quota_type' param is deprecated now, we should ignore them
when processing config logs.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ife12d266db9ac049487217076410671685063389
Reviewed-on: http://review.whamcloud.com/4528
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
11 years agoLU-2283 test: fix sanity-quota test_18
Niu Yawei [Wed, 7 Nov 2012 02:40:18 +0000 (21:40 -0500)]
LU-2283 test: fix sanity-quota test_18

test_18 should grep the watchdog message start from "sanity-quota
test 18" instead of "test 18b", otherwise, the messages from other
tests could be mis-processed.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Icf4c13cd5f602cbb1974fc3ca5d156c87398cd3e
Reviewed-on: http://review.whamcloud.com/4484
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1113 llite: hide DCACHE_LUSTRE_INVALID in ll_dentry_data
Peng Tao [Thu, 14 Jun 2012 06:10:22 +0000 (14:10 +0800)]
LU-1113 llite: hide DCACHE_LUSTRE_INVALID in ll_dentry_data

DCACHE_LUSTRE_INVALID is lustre private flag in vfs layer.
Replace it with dentry->d_fsdata->lld_invalid so that it won't
conflict with VFS flags.

After dcache scalability patch, dentry->d_fsdata is always set
before dentry is materised/rehashed. So if a dentry's d_fsdata
is not set, then it is not hashed/materised. The patch make use
of the fact and treat such dentry as invalid as well. It is
necessary because d_lustre_invalidate() can be called in
ll_invalidate_negative_children() and finds unmaterised/unhashed
dentries.

Also drop all vfs_races patches as they are no longer needed.

Plus two minor cleanups.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I655154b8807440c99574ad6b865bd550cbc145f1
Reviewed-on: http://review.whamcloud.com/2407
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
11 years agoLU-1257 config: keep using old osc name
Niu Yawei [Sun, 1 Apr 2012 05:13:35 +0000 (22:13 -0700)]
LU-1257 config: keep using old osc name

When adding new OST to a system upgraded from 1.8, we
arbitrarily use the new OSC naming style in the MDT config
log, however, config parameter (conf_param) updating code
will use old naming OSC style for the newly added OST since
it found that the system is upgraded from 1.8. Such OSC
name mismatching problem will cause error when processing
the parameter config records.

This patch changed the registration code to follow the
same rule as the param updating code: always use old OSC
naming style for the upgraded 1.8 system.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I4d9b02bfa439fb95993bdbdb0b05fc5a38c9af96
Reviewed-on: http://review.whamcloud.com/2432
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-2285 osp: Send correct object IDs when deleting orphans
Li Wei [Mon, 12 Nov 2012 09:04:45 +0000 (17:04 +0800)]
LU-2285 osp: Send correct object IDs when deleting orphans

When processing an orphan deletion request with object ID n, ofd (as
well as obdfilter in older branches) destroys objects from n + 1.
This patch fixes osp to send last used IDs instead of last used ID
plus ones, so that the first orphan in each sequence will be destroyed
correctly.

Change-Id: I6aae73dfdd7fa73aca7b1a8cfe074a1902ad981f
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/4511
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-2286 osc: unplug OSC queue at the end of truncate
Jinshan Xiong [Tue, 6 Nov 2012 16:59:58 +0000 (08:59 -0800)]
LU-2286 osc: unplug OSC queue at the end of truncate

It was missed somehow. Otherwise, this extent would never be flushed
until the next write to this file is coming. Even writepage() won't
help out this case.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I179269163e5ad5382448036046925a5747282472
Reviewed-on: http://review.whamcloud.com/4477
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2192 tests: enable large xattr testing on zfs
Yu Jian [Thu, 8 Nov 2012 04:16:14 +0000 (12:16 +0800)]
LU-2192 tests: enable large xattr testing on zfs

Since zfs supports large xattr by default and dumpe2fs does not
work on zfs, we need improve large_xattr_enabled() to check the
backend fs type on MDS.

Test-Parameters:mdsfilesystemtype=zfs mdtfilesystemtype=zfs ostfilesystemtype=zfs testlist=sanity,conf-sanity,replay-single,lustre-rsync-test
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I27bdad38d8a40e3858d96ee29f44a6abb5365fef
Reviewed-on: http://review.whamcloud.com/4493
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
11 years agoLU-2211 quota: cache return code of acq for 1s
Johann Lombardi [Wed, 24 Oct 2012 18:51:36 +0000 (20:51 +0200)]
LU-2211 quota: cache return code of acq for 1s

Cache failed return code of acquire request for 1s to avoid
request flooding with EINPROGRESS and cumulative timeout on
ETIMEOUT when the master isn't responsive.

Signed-off-by: Johann Lombard <johann.lombardi@intel.com>
Change-Id: I3c212055b1ed6cd3671e69a0cff079dae831af61
Reviewed-on: http://review.whamcloud.com/4380
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2188 tests: Fix assumptions in test 133d
Nathaniel Clark [Thu, 1 Nov 2012 17:51:13 +0000 (13:51 -0400)]
LU-2188 tests: Fix assumptions in test 133d

The test assumed that with 512 files in a directory, the inode sizes
would be different in the two test directories.  This is not the case
on zfs which caused the get_rename_size() function to return multiple
values.  This change adds a argument to specify which stat is pulled
from rename_stats, and doesn't rely on the sizes being different.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I568ec95bd7f0613caf96101055a392ea5762cd2d
Reviewed-on: http://review.whamcloud.com/4438
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2244 mds: remove remaining of old mds code
Alex Zhuravlev [Sun, 28 Oct 2012 17:17:42 +0000 (20:17 +0300)]
LU-2244 mds: remove remaining of old mds code

it's not used anymore.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Ie6e94d7a19a38ed57397ff48091597ea02f2ada1
Reviewed-on: http://review.whamcloud.com/4398
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: wangdi <di.wang@intel.com>
11 years agoLU-1832 ldlm: fix double list add
Peng Tao [Wed, 5 Sep 2012 07:51:04 +0000 (15:51 +0800)]
LU-1832 ldlm: fix double list add

Adding list to itself will cause kernel warning if
CONFIG_DEBUG_LIST is on.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Ibaf135c2c6ca6cc8ee4f0e6f270d738c6964fddb
Reviewed-on: http://review.whamcloud.com/3880
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Keith Mannthey <kemannthey@gmail.com>
11 years agoLU-2186 mdt: initialize pointer to lu_site
Alex Zhuravlev [Tue, 16 Oct 2012 19:20:25 +0000 (23:20 +0400)]
LU-2186 mdt: initialize pointer to lu_site

later it's used to access top device (which is MDT) and
learn number of current clients to foresee how many
sequences will be needed.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I0f542dfbc45836180ec274dc605d3770b527e988
Reviewed-on: http://review.whamcloud.com/4280
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
11 years agoLU-2073 procfs: procfs symlinks are apparently never freed
yangsheng [Thu, 1 Nov 2012 15:33:05 +0000 (23:33 +0800)]
LU-2073 procfs: procfs symlinks are apparently never freed

We shouldn't set proc_dir_entry->data to NULL in any case.
There must cause memleak when it is a symlink entry.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I45c82fd206be738b5fdc4b2e612c3d87a708df67
Reviewed-on: http://review.whamcloud.com/4434
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
11 years agoLU-1538 tests: sanity.sh failed tests to clean up after themselves
Oleg Drokin [Sat, 3 Nov 2012 19:36:55 +0000 (15:36 -0400)]
LU-1538 tests: sanity.sh failed tests to clean up after themselves

commit 467cf22b changed behavior of error() function to abort the
test right away, as the result a lot of older tests were leaving
piles of files behing causing subsequent tests to fail spuriously.
Also tests like 32[ijkl] left mountpoints on lutre so subsequent test
65j is no longer able to umount lustre and hands there indefinitely.

This patch adds cleanups in tests: 24v, 27m, 32[ijkl]

Additionally tests 17m, 27m, 59 were making unsafe assumptions about
how long would it take for objects to be deleted. Removed explicit sleep
there to calls to wait_delete_completed

test 110: fixed a typo with quotes, autogenerate long filenames

test 72a 80: removed unnecessary "true" call.

Change-Id: I1c1002bfad278b767e45301b56e74688690690ee
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4454
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1337 llite: kernel 3.2 make_request_fn returns void
Liu Xuezhao [Tue, 30 Oct 2012 08:59:11 +0000 (16:59 +0800)]
LU-1337 llite: kernel 3.2 make_request_fn returns void

3.2 request_queue.make_request_fn defined as function returns void.
(kernel commit 5a7bbad27a410350e64a2d7f5ec18fc73836c14f)
Add LC_HAVE_VOID_MAKE_REQUEST_FN/HAVE_VOID_MAKE_REQUEST_FN for check.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I49a27873c1754addc9fef7c5f50cbf84592adf05
Reviewed-on: http://review.whamcloud.com/3576
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1527 clio: check if lock is freed in cl_lock_peek()
Andriy Skulysh [Thu, 4 Oct 2012 14:20:05 +0000 (17:20 +0300)]
LU-1527 clio: check if lock is freed in cl_lock_peek()

The lock may have been freed between cl_lock_lookup() and
cl_lock_mutex_get() so we should check lock state after grabbing
lock mutex.

Xyratex-bug-id: MRP-665
Change-Id: Id3562b3dd8bd052b74ad7840f08b904ca38a6746
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-on: http://review.whamcloud.com/3117
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2191 utils: tunefs.lustre failed to read ZFS partitions
Nathaniel Clark [Mon, 5 Nov 2012 21:07:55 +0000 (16:07 -0500)]
LU-2191 utils: tunefs.lustre failed to read ZFS partitions

ZFS shared libraries were not loaded prior to attempting to verify
type of partition supplied on commandline, it would never recognize a
ZFS partition.  Mount type also needs to be passed down to
osd_read_lld, and not just use whatever is set in defaults.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Iad88da4ddd9cf5fcc75f8409933467d9237f58d3
Reviewed-on: http://review.whamcloud.com/4469
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
11 years agoLU-2281 utils: Fix possible segfault in tunefs.lustre
Nathaniel Clark [Mon, 5 Nov 2012 21:22:33 +0000 (16:22 -0500)]
LU-2281 utils: Fix possible segfault in tunefs.lustre

ldiskfs_read_ldd() can segfault if fopen of mountdata fails, because
it will always try to fclose the file handled (which if it is NULL,
dies).

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I553a7972b61ec01473bf834f98f8937bc7b11dbc
Reviewed-on: http://review.whamcloud.com/4470
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2275: obdclass: Proper error cleaup for class_newdev
Oleg Drokin [Mon, 5 Nov 2012 05:24:18 +0000 (00:24 -0500)]
LU-2275: obdclass: Proper error cleaup for class_newdev

class_newdev did not have a proper cleanup for the case of no more
obd devices and used to leak obdtype reference and some memory
in such a case.
This patch fixes the issue.

Change-Id: I6b683f914f5cbcd21ef414fe470ccc88c39c4deb
Signed-off-by: Oleg Drokin <green@whamcloud.com
Reviewed-on: http://review.whamcloud.com/4460
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1531 mdt: Check non-normalised fid.
build [Thu, 11 Oct 2012 18:16:32 +0000 (13:16 -0500)]
LU-1531 mdt: Check non-normalised fid.

Apply fid checking in a manner similar to mdt_fid2path processing.

IGIF FIDs are checked to ensure correct behavior for upgraded
1.8 filesystems.

Signed-off-by: Richard Henwood <richard.henwood@intel.com>
Change-Id: Iea7ebfda8a31915b9d4fe2959773c9312b087485
Reviewed-on: http://review.whamcloud.com/4255
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2020 sanity: test 140 should allow 40 consecutive symlink
Peng Tao [Mon, 24 Sep 2012 07:17:41 +0000 (15:17 +0800)]
LU-2020 sanity: test 140 should allow 40 consecutive symlink

For kernel > 3.5, to test recursive symlink, we need real
recursive symlink.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I4f1b834a79cdf4edb1775da45200f6fd2a680709
Reviewed-on: http://review.whamcloud.com/4079
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
11 years agoLU-2170 osc: set osc_lock attribute only once
Jinshan [Fri, 19 Oct 2012 16:28:00 +0000 (12:28 -0400)]
LU-2170 osc: set osc_lock attribute only once

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

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ib8492fa159a43dad11febe5a01f8c4ef72b8c4f3
Reviewed-on: http://review.whamcloud.com/4316
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2241 symlink: fix off-by-one error when reading symlinks
Nathaniel Clark [Wed, 31 Oct 2012 20:56:09 +0000 (16:56 -0400)]
LU-2241 symlink: fix off-by-one error when reading symlinks

This fixes and off-by-one error when reading symlinks of inode size.
The null character is not accounted for when checking bufferlength
vs. inode data size.

Also add regression test to sanity.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: If4464cac60d57012311226113ff38b9c28926958
Reviewed-on: http://review.whamcloud.com/4415
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1684 ldlm: move ldlm flags not sent through wire to upper 32bits
Vitaly Fertman [Mon, 22 Oct 2012 12:49:27 +0000 (16:49 +0400)]
LU-1684 ldlm: move ldlm flags not sent through wire to upper 32bits

there is no empty bit for a LDLM_FL_* flag in lower 32bits, i.e. which needs
to be sent through wire. move locally used flags to upper 32bits to free some
bits.

Change-Id: Iddaff0a75b19d7311800d2ac6c3fef1012b9ffd2
Reviewed-by: Alexander Zarochentsev <Alexander_Zarochentsev@xyratex.com>
Reviewed-by: Andrew Perepechko <Andrew_Perepechko@xyratex.com>
Xyratex-Bug-ID: MRP-541
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-on: http://review.whamcloud.com/3494
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2235 lfsck: remove unnecessary warning message
Fan Yong [Sat, 3 Nov 2012 02:34:40 +0000 (10:34 +0800)]
LU-2235 lfsck: remove unnecessary warning message

Currently, the new online LFSCK does not work for ZFS backend,
but it is neither fatal nor block the mount processing.
So remove those unnecessary warning message.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I106a6b5c978cde8695821776570c30605f03c400
Reviewed-on: http://review.whamcloud.com/4452
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
11 years agoLU-1199 build: Remove ancient "nonfree" module support
Christopher J. Morrone [Tue, 30 Oct 2012 02:54:49 +0000 (19:54 -0700)]
LU-1199 build: Remove ancient "nonfree" module support

Lustre doesn't have any "nonfree" kernel modules, and the code to
support "nonfree" was from 2005.  I think we can remove it now.

Change-Id: I790d170fabdc5cd6e4948f20ccca2a6bfdd1bc29
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4408
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1199 build: Remove duplicate LC_MODULE_LOADING
Christopher J. Morrone [Tue, 30 Oct 2012 02:43:07 +0000 (19:43 -0700)]
LU-1199 build: Remove duplicate LC_MODULE_LOADING

It appears that LC_MODULE_LOADING was accidentally declared twice
back-to-back in the same file.  This removes the first declaration
on the assumption that if my eye-balling of the code missed a
difference, the second one is the one we've been using anyway.

Change-Id: I04a9da80d6be7bef6e4fd35eca8f3e490a8a824f
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4407
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1729: lu_buf code cleaning
jcl [Thu, 9 Aug 2012 21:29:05 +0000 (23:29 +0200)]
LU-1729: lu_buf code cleaning

Fix DLUBUF define and use LU_BUF_NULL to clear a lu_buf

Change-Id: I742308616d9c39196e56bf4983523152d26e1245
Signed-off-by: jcl <jacques-charles.lafoucriere@cea.fr>
Reviewed-on: http://review.whamcloud.com/3589
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1714 lnet: Properly initialize sg_magic value
Prakash Surya [Fri, 17 Aug 2012 16:11:32 +0000 (09:11 -0700)]
LU-1714 lnet: Properly initialize sg_magic value

When the CONFIG_DEBUG_SG flag is enabled in the kernel, we must ensure
the sg_magic field is properly initialized. Otherwise, internal kernel
assertions will fail when trying to verify this field. As a result,
certain calls to sg_* function had to be changed or inserted to ensure
the sg_init_table function would be called, initializing the magic
value. Also, we need to ensure this value isn't zeroed out in the
kiblnd_setup_rd_kiov function.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Change-Id: I5b6b265a4a8dd37408bb78decd79ed54e0f9251b
Reviewed-on: http://review.whamcloud.com/3709
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1840 ldlm: fix mutex leak in ldlm_resource_get
Peng Tao [Thu, 6 Sep 2012 03:08:51 +0000 (11:08 +0800)]
LU-1840 ldlm: fix mutex leak in ldlm_resource_get

We created resource with lr_lvb_mutex locked. Need to drop
it before returning.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Id81f792605d864b9d3236498f063d6c003d8cd77
Reviewed-on: http://review.whamcloud.com/3883
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1951 mdd: fix for error handler of mdd_rename
Liang Zhen [Fri, 5 Oct 2012 12:16:19 +0000 (20:16 +0800)]
LU-1951 mdd: fix for error handler of mdd_rename

If mdd_rename() failed to unlink target file/dir, it will try to
revert everything including insert target file/dir back into target
directory, but it didn't restore nlink count of target, which will
leave a file/dir under target directory with wrong nlink number.

Another thing is fixed by this patch is, mdd_attr_check_set_internal()
didn't release mdd_write_lock() while jumping to error handler.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I601f0569de87b71d032f86ed1082c27d5bf5adaf
Reviewed-on: http://review.whamcloud.com/4405
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1337 llite: provides ll_get_acl to ->i_op->get_acl
Liu Xuezhao [Tue, 30 Oct 2012 08:52:55 +0000 (16:52 +0800)]
LU-1337 llite: provides ll_get_acl to ->i_op->get_acl

Since kernel 3.1 generic_permission() has lost the check_acl
argument, ACL checking has been taken to VFS and filesystems
need to provide a non-NULL ->i_op->get_acl to read an ACL
from disk.

This patch is a complementarity to http://review.whamcloud.com/3397
(d018b087c962b8c66e8dc479fc66e964a2e5fd94), to fix failure of test_25
of sanityn.sh.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: Ica96adac03c1792e2e8b668b959457a4ffec9a43
Reviewed-on: http://review.whamcloud.com/3885
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1337 llite: kernel 3.1 changes open_to_namei_flags
Liu Xuezhao [Tue, 30 Oct 2012 08:45:48 +0000 (16:45 +0800)]
LU-1337 llite: kernel 3.1 changes open_to_namei_flags

Kernel 3.1 changes the translation from open_flag to namei_flag,
(kernel commit 8a5e929dd2e05ab4d3d89f58c5e8fca596af8f3a).

So after 3.1, kernel's nameidata.intent.open.flags is different
with lustre's lookup_intent.it_flags, as lustre's it_flags'
lower bits equal to FMODE_xxx while kernel doesn't transliterate
lower bits of nameidata.intent.open.flags to FMODE_xxx.

This patch keeps lustre it_flags' semantics and add
ll_namei_to_lookup_intent_flag for translation.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I408685040688bae574d04cf288abb6ca967607df
Reviewed-on: http://review.whamcloud.com/3583
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-930 utils: minor fixes to lfs_migrate.1 man page
Andreas Dilger [Thu, 1 Nov 2012 21:50:16 +0000 (15:50 -0600)]
LU-930 utils: minor fixes to lfs_migrate.1 man page

Fix the formatting of the lfs_migrate.1 man page SYNOPSIS section,
since ".Blfs_migrate" is not the same as ".B lfs_migrate", and hence
the synopsis was missing the actual name of the command it described.

Also fix some minor grammar issues.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie0d8e3cd6fbab0663562b6a99f124ead953ebbe5
Reviewed-on: http://review.whamcloud.com/4440
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1279 utils: Silence modprobe ptlrpc output in mount.lustre
Oleg Drokin [Fri, 2 Nov 2012 18:52:07 +0000 (14:52 -0400)]
LU-1279 utils: Silence modprobe ptlrpc output in mount.lustre

Patch d8d9b78a5c08eb1d938ab9e3bdaf7f756bfbb5ec introduced
this modprobe, but order of redirects was reversed which results
in printing spurios messages like "FATAL: Module ptlrpc not found."
when mountig lustre from local build dir.

Change-Id: I688d073ad3b0565f73c29a50c2b81383adfd7a48
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4449
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-928 fid: add comments describing different FIDs
Andreas Dilger [Wed, 26 Sep 2012 09:29:26 +0000 (11:29 +0200)]
LU-928 fid: add comments describing different FIDs

Add comments to the code describing various FID types, from
http://wiki.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I325b48a0e85fb25ed8c3a3709e623978969d8d4a
Reviewed-on: http://review.whamcloud.com/4102
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Ned Bass <bass6@llnl.gov>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1337 llite: kernel 3.1 kills inode->i_alloc_sem
Liu Xuezhao [Thu, 27 Sep 2012 06:20:25 +0000 (14:20 +0800)]
LU-1337 llite: kernel 3.1 kills inode->i_alloc_sem

Kernel 3.1 kills inode->i_alloc_sem, use i_dio_count and
inode_dio_wait/inode_dio_done instead.
(kernel commit bd5fe6c5eb9c548d7f07fe8f89a150bb6705e8e3).

Add HAVE_INODE_DIO_WAIT to differentiate it.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: Ife36e07a85c76153985a4a86ee1973262c4c0e27
Reviewed-on: http://review.whamcloud.com/3582
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-2153 quota: several fixes for reintegration
Niu Yawei [Tue, 16 Oct 2012 02:48:03 +0000 (22:48 -0400)]
LU-2153 quota: several fixes for reintegration

- On master side, never delete the id entry from the global/slave
  index, otherwise, those deleted entries will not be transfered
  during reintegration, and improved test_7a for this change;
- When start reintegration thread, if there is any pending
  updates, abort and try to start reintegration later;
- Set rq_no_retry_einprogress for quota request;
- When master found quota acquire for not enforced ID, return
  -ESRCH to slave instead of -EINPROGRESS;
- Check free inodes in test_2;

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I64037f6aff6be686250272eda53c027bf5ba47c2
Reviewed-on: http://review.whamcloud.com/4275
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
11 years agoLU-1337 build: remove unnecessary includings of system.h
Liu Xuezhao [Tue, 30 Oct 2012 09:12:11 +0000 (17:12 +0800)]
LU-1337 build: remove unnecessary includings of system.h

<asm/system.h> is removed in kernel 3.4, and it is indeed not needed.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: Ic4d0a086656c5dfb05669aae40680b41e8ea00c7
Reviewed-on: http://review.whamcloud.com/3575
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1994 kernel: v3.5 defines INVALID_UID
Peng Tao [Wed, 22 Aug 2012 08:55:22 +0000 (16:55 +0800)]
LU-1994 kernel: v3.5 defines INVALID_UID

With kernel commit 7a4e7408, Lustre doesn't need to redefine
INVALID_UID.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I96b854cc51db735d8c985528c879fbeb5b049ab9
Reviewed-on: http://review.whamcloud.com/3755
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1337 osc: fix -Werror=unused-result
chas williams - CONTRACTOR [Tue, 14 Aug 2012 14:42:25 +0000 (10:42 -0400)]
LU-1337 osc: fix -Werror=unused-result

Newer Fedora kernels build using -Werror=unused-result.  It appears
that GOTO() isn't correctly assigning rc in this instance.  The
unused PTR_ERR() is generating warning which is upgraded to an error.

Signed-off-by: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Change-Id: I66d730d4d0e20f0f1c7671dc00acefdf7ed1fbe9
Reviewed-on: http://review.whamcloud.com/3638
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-845 tests: automate large LUN testing
Wei3 Liu [Tue, 30 Oct 2012 21:42:56 +0000 (14:42 -0700)]
LU-845 tests: automate large LUN testing

a. run llverdev on the raw device to verify there is no driver issue
b. run llverfs on OST ldiskfs filesystem
c. use up free inodes on the OST with mdsrate
d. run llverfs on lustre filesystem

Change-Id: I021009647d2053fa53cff1067f8f2bc83d12ce45
Signed-off-by: Wei Liu <sarah@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1700
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1279 utils: mount.lustre load ptlrpc module if necessary
Bobi Jam [Thu, 18 Oct 2012 10:10:09 +0000 (18:10 +0800)]
LU-1279 utils: mount.lustre load ptlrpc module if necessary

When LNET modules have not loaded, and mounting multiple targets at
the same time could fail. Use mount.lustre to load the network modules
if necessary.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I9d7a4007cc5b233055a4a985237b01ff0874cf54
Reviewed-on: http://review.whamcloud.com/4292
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
11 years agoLU-1169 mgs: Fix race during new fsdb creation.
Andriy Skulysh [Thu, 18 Oct 2012 10:29:31 +0000 (13:29 +0300)]
LU-1169 mgs: Fix race during new fsdb creation.

Lock fsdb_mutex until the fsdb is loaded from llogs.
It fixes race between loading data from llog into fsdb
and obtaining data form it.

Xyratex-bug-id: MRP-230
Signed-off-by: Andriy Skulysh <andriy_skulysh@xyratex.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: Bruce Korb <Bruce_Korb@us.xyratex.com>
Change-Id: I8c29040a182f363e83e61e57d3e20756f40300ea
Reviewed-on: http://review.whamcloud.com/2251
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-2226 osp: dump statfs data via lprocfs
Alex Zhuravlev [Thu, 25 Oct 2012 09:59:39 +0000 (13:59 +0400)]
LU-2226 osp: dump statfs data via lprocfs

register another set of vars to be accessed with
data=dt device. use existing lprocfs_osd_rd_*() helpers.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Ib2fed358866847d8abb0e818c1d40494c0642681
Reviewed-on: http://review.whamcloud.com/4390
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
11 years agoLU-2152 iam: it->load fix
Niu Yawei [Mon, 15 Oct 2012 03:42:01 +0000 (23:42 -0400)]
LU-2152 iam: it->load fix

Current iam it->load for lfix doesn't work properly because
iam_lfix_ilookup() isn't implemented at all.

This patch also added one more reintegration test for quota to
test the global index transfer in multiple bulks, and proc entry
for global index copy is added to verify the limits on slaves
easily.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ifb1dca0551b2aa4db3d37ff4ac6b3fcded34b7cc
Reviewed-on: http://review.whamcloud.com/4266
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2211 quota: cap how long a thread can wait for quota
Johann Lombardi [Fri, 19 Oct 2012 13:59:12 +0000 (15:59 +0200)]
LU-2211 quota: cap how long a thread can wait for quota

Change qsd_op_begin() path to wait for quota space for less than
obd_timeout / 2.
This patch also abandons the qsd_ops enum in favor of a more generic
qsd_adjust() implementation which will always do the same processing
even if adjustment is delayed because of a quota request in flight.

Signed-off-by: Johann Lombard <johann.lombardi@intel.com>
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I5faf637c5330ca7f503c292e0e28edb84458ee89
Reviewed-on: http://review.whamcloud.com/4314
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
11 years agoLU-921 llite: warning in case of discarding dirty pages
Hongchao Zhang [Tue, 23 Oct 2012 12:00:17 +0000 (20:00 +0800)]
LU-921 llite: warning in case of discarding dirty pages

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

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: Iecfbf096548ff08cdd6064d53ad8c688343fcddc
Reviewed-on: http://review.whamcloud.com/1908
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1822 llite: Remove deprecated truncate handler
michael.mckay [Tue, 4 Sep 2012 15:31:45 +0000 (11:31 -0400)]
LU-1822 llite:  Remove deprecated truncate handler

Remove the ll_truncate handler. This handler was only being used
to display a debug message about the truncated object. That line
was moved to a different location, and the handler removed.
This handler is an issue in kernels after 2.6.34 when running the
patchless client. In that version of the kernel the kernel will log a
kernel warning if its called and the inode has a handler for truncate.
The truncate logic was updated some time ago to be more
consistent with the new sequence of events.

Xyratex-bug-id: MRP-597
Reviewed-by: Alexander Zarochentsev <Alexander_Zarochentsev@xyratex.com>
Reviewed-by: Iurii Golovach <iurii_golovach@xyratex.com>
Signed-off-by: Michael McKay <michael_mckay@xyratex.com>
Change-Id: I77b372a2825fd2bdc4b215ee20a979f03dc7d64b
Reviewed-on: http://review.whamcloud.com/3860
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Iurii Golovach <iurii.golovach@gmail.com>
11 years agoNew tag 2.3.54 2.3.54 v2_3_54 v2_3_54_0
Oleg Drokin [Mon, 29 Oct 2012 06:47:01 +0000 (02:47 -0400)]
New tag 2.3.54

Change-Id: I0c6415d7924ee83c11a5e383915d06fca41ccf2a
Signed-off-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1337 llite: ll_inode_permission should check RCU walk
Peng Tao [Tue, 18 Sep 2012 10:57:53 +0000 (18:57 +0800)]
LU-1337 llite: ll_inode_permission should check RCU walk

For >3.1 kernels, RCU flag is folded into mask field.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Icc6751493e7359646cb6bd84b3ac05de167e4d88
Reviewed-on: http://review.whamcloud.com/4039
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Liu Xuezhao <xuezhao.liu@emc.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-812 llite: 3.0+ kernel fsync should call write
Peng Tao [Tue, 25 Sep 2012 11:16:14 +0000 (19:16 +0800)]
LU-812 llite: 3.0+ kernel fsync should call write

Since 3.0, kernel pushes i_mutex and fsync to fs fsync
callback. So Lustre should check and do the same. Otherwise
there might be data corruption and sanity 63b will fail.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I2f2f6792276eaf6783bffb813f3c3e5405be0450
Reviewed-on: http://review.whamcloud.com/4091
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1889 build: fix false 'uninitialized scalar variable' errs
Sebastien Buisson [Tue, 11 Sep 2012 14:43:33 +0000 (16:43 +0200)]
LU-1889 build: fix false 'uninitialized scalar variable' errs

Fix false 'uninitialized scalar variable' errors found by Coverity
version 6.0.3:
Uninitialized scalar variable (UNINIT)
Using uninitialized value, element or field when calling function.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I83a7dd3ae4a027bf0ebced572245bc4fff35e119
Reviewed-on: http://review.whamcloud.com/3939
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1857 build: fix 'Unbounded source buffer' errors
Sebastien Buisson [Fri, 7 Sep 2012 13:59:51 +0000 (15:59 +0200)]
LU-1857 build: fix 'Unbounded source buffer' errors

Fix 'unbounded source buffer' defects found by Coverity version 6.0.3:
Unbounded source buffer (STRING_SIZE)
Passing string of unknown size to a function that expects
a string of a particular size.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I18e51f04e62241b5c5dad7ae963d8070d6954dd4
Reviewed-on: http://review.whamcloud.com/3904
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1526 utils: Supply default MDT index
James Simmons [Thu, 18 Oct 2012 12:26:16 +0000 (08:26 -0400)]
LU-1526 utils: Supply default MDT index

To prepare for DNE indexing has become a requirement
for MDTs and with the latest lustre you can't mount
a MDT that was not formated with a index. While mount
has this requirement mkfs.lustre has a bug that allows
you to format a MDS without a index and not even warn
the user. At the same time mkfs.lustre has to handle
the case were a user will not supply a index since it
was not required in earlier lustre releases. This patch
address this problem by supplying a default index of
zero for the MDT if no index is supplied to mkfs.lustre
and warns the user they must supply a index in the
future.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I45932321885856d97b10630a0667e8338822b199
Reviewed-on: http://review.whamcloud.com/4293
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-2019 llite: update i_flags in ll_iocontrol properly
Peng Tao [Thu, 20 Sep 2012 09:09:49 +0000 (17:09 +0800)]
LU-2019 llite: update i_flags in ll_iocontrol properly

When client has lsm, we still need to update cache i_flags.
Otherwise i_flags is out of sync.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I7fcb84da82129238f327885a0fc5827fcac90a8d
Reviewed-on: http://review.whamcloud.com/4078
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1756 kernel: clean up lustre_compat25.h
Peng Tao [Thu, 16 Aug 2012 07:59:21 +0000 (15:59 +0800)]
LU-1756 kernel: clean up lustre_compat25.h

1. unused functions:
   mapping_has_pages(), ll_call_writepage(), __set_page_ll_data()
   ll_invalidate_inode_pages(), __set_page_ll_data()
   CheckWriteback(), KIOBUF_GET_BLOCKS()
2. rename ll_vfs_create to vfs_create
3. remove kdev_t related macros
4. move cfs_cleanup_group_info() to lustre_common.h
5. remove kiobuf
6. move ll_inode_blksize() to lustre_common.h
7. drop LL_RENAME_DOES_D_MOVE

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Ic5e29e399e70ccd04cbe1448f3c6cfc3a258289b
Reviewed-on: http://review.whamcloud.com/3686
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2213 scrub: stop LFSCK before osd_shutdown
Fan Yong [Mon, 22 Oct 2012 17:12:05 +0000 (01:12 +0800)]
LU-2213 scrub: stop LFSCK before osd_shutdown

The osd_shutdown will clean all the otable-based iteration,
but up layer LFSCK depends on the otable-based iteration.

So we need to stop the LFSCK before osd_shutdown called.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I97625d54766122314630aff0069d9e14d23b9840
Reviewed-on: http://review.whamcloud.com/4217
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
11 years agoLU-2224 osd-zfs: Fix osd_commit_async() locking
Brian Behlendorf [Thu, 25 Oct 2012 05:45:40 +0000 (22:45 -0700)]
LU-2224 osd-zfs: Fix osd_commit_async() locking

The ZFS osd_commit_async() function never properly acquires the
tx->tx_sync_lock() mutex to protext the tx_state_t.  However,
the mutex is correctly dropped so we just add the obviously
missing mutex_enter().

Change-Id: Iae426feaeb5885034515d6bf0ccb9509ed098bb0
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4383
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2216 mdt: remove obsolete DNE code
wangdi [Sat, 27 Oct 2012 22:05:56 +0000 (15:05 -0700)]
LU-2216 mdt: remove obsolete DNE code

1. remove split checking and cross-ref code from DNE.
2. remove IAM code on ldiskfs and utils.
3. remove cmm directory.

Change-Id: I0c81d753462863706e8918393369dde94a45030c
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4353
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-2179 osc: truncate partial page correctly
Jinshan Xiong [Sun, 21 Oct 2012 00:26:30 +0000 (17:26 -0700)]
LU-2179 osc: truncate partial page correctly

If a partial page is being truncated, the corresponding osc extent
should be held until the truncate finished.

Debug patch for osc_extent_wait() and don't wait for completion
of RPC it's not even sent in truncate.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I96a5ec1fdbb3133c735ebdfdd0330a45a2a8ab1a
Reviewed-on: http://review.whamcloud.com/4317
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2173 lod: QoS code to give up if no good OSP found
Alex Zhuravlev [Thu, 18 Oct 2012 18:38:58 +0000 (22:38 +0400)]
LU-2173 lod: QoS code to give up if no good OSP found

on any iteration. this code was removed by mistake in
commit 03b988a (LU-2093).

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Ifa0d3a5ceeaaf84d3ec49e39bd2f337414a216ce
Reviewed-on: http://review.whamcloud.com/4300
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2219 ptlrpc: so_hpreq_handler is set twice for the ost_io svc
Nikitas Angelinas [Thu, 25 Oct 2012 09:04:20 +0000 (10:04 +0100)]
LU-2219 ptlrpc: so_hpreq_handler is set twice for the ost_io svc

ptlrpc_service_conf.psc_ops.so_hpreq_handler is set twice for
the ost_io service in ost_setup(); the second assignment
overwrites the first to NULL, so ost_io threads would never
handle RPCs as high-priority ones.

While we are at it, remove some superfluous assignments of
so_hpreq_handler to NULL for statically allocated
ptlrpc_service_conf structs when initializing other ptlrpc
services, and rename some relevant functions.

Signed-off-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Change-Id: Ia728a3d7f20511fcb58b259126b05055d5860455
Xyratex-bug-id: MRP-724
Reviewed-on: http://review.whamcloud.com/4368
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2214 lod: fix tricky iterator methods
Alex Zhuravlev [Mon, 22 Oct 2012 13:35:53 +0000 (17:35 +0400)]
LU-2214 lod: fix tricky iterator methods

instead of bypassing LOD layer in the iterator methods,
just get own iterator structure in lod, which keep references
to the object and the iterator of the layer below.

this also let LOD to have different iterators in different
objects which is required for DNE.

to verify the approach lfsck goes through LOD now.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I62935319a686f4b06b2cdf5ea4002a800c0c430d
Reviewed-on: http://review.whamcloud.com/4370
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1571 mdt: Do not update xid for open replay req
Wang Di [Sat, 15 Sep 2012 14:34:15 +0000 (07:34 -0700)]
LU-1571 mdt: Do not update xid for open replay req

Do not update last_xid for open replay req,
otherwise the following resend(after replay)
can not be matched with correct xid.

Remove unnecessary mti_transo zero check in
mdt_empty_transno.

Signed-off-by: wang di <di.wang@whamcloud.com>
Change-Id: I2a05f3ac05b301ae31641a1dc51f8c4eed96427d
Reviewed-on: http://review.whamcloud.com/3195
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
11 years agoLU-2174 test: improve error message
Niu Yawei [Mon, 15 Oct 2012 07:47:23 +0000 (03:47 -0400)]
LU-2174 test: improve error message

In sanity-quota.sh, if the testing user/group isn't existing, print
error message to inform user to create them.

Check free space for test_0.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ie08250d665b305b140315f76391fd5161a6fbdd5
Reviewed-on: http://review.whamcloud.com/4268
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2167 ptlrpc: Fix use after free in ptlrpcd on termination
Oleg Drokin [Sat, 13 Oct 2012 16:51:35 +0000 (12:51 -0400)]
LU-2167 ptlrpc: Fix use after free in ptlrpcd on termination

Should not use pc after signalling completion of its use
since it will be freed later.

Change-Id: Id20e8d188fea77f23a52e9a374e7e5e84fe3ad4b
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4264
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
11 years agoLU-1930 build: Back end file system fixes.
James Simmons [Tue, 16 Oct 2012 11:44:03 +0000 (07:44 -0400)]
LU-1930 build: Back end file system fixes.

Currently Lustre for ZFS requires the zfs development
rpm for its userland support to be installed on the
build machine so we can create the lustre zfs utilities.
What this patch does is allow a user to be able to build
against the zfs/spl source drops as well as the rpms.
A work around is provided so we can point the lustre
build system to were a user can temporary install the
zfs user land headers.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I8e5586ed22956a9dd4799826a442b8f5a895d872
Reviewed-on: http://review.whamcloud.com/3980
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1337 llite: kernel 3.1 renames lock-manager ops
Liu Xuezhao [Thu, 9 Aug 2012 02:37:39 +0000 (10:37 +0800)]
LU-1337 llite: kernel 3.1 renames lock-manager ops

Kernel 3.1 renames lock-manager ops(lock_manager_operations) from
fl_xxx to lm_xxx (commit 8fb47a4fbf858a164e973b8ea8ef5e83e61f2e50).

Add LC_LM_XXX_LOCK_MANAGER_OPS/HAVE_LM_XXX_LOCK_MANAGER_OPS to check.

Re-arrange several macro definitions in lustre-core.m4 as kernel
version sequence.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: Ic86ec9db2f8262ef7ab9f5f2fb51ca79591120a4
Reviewed-on: http://review.whamcloud.com/3579
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2145 target: use tgt_ prefix for target function
Mikhail Pershin [Mon, 15 Oct 2012 13:23:00 +0000 (17:23 +0400)]
LU-2145 target: use tgt_ prefix for target function

There are several prefixes used: target_, lut_, tg_. Start to use
tgt_ prefix as single one.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I4e1f38b81a5311d56472162b8a1114a2aa252874
Reviewed-on: http://review.whamcloud.com/4273
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>