Whamcloud - gitweb
fs/lustre-release.git
11 years agoLU-936 Remove LUSTRE_KERNEL_VERSION
Brian Behlendorf [Mon, 19 Dec 2011 21:10:17 +0000 (13:10 -0800)]
LU-936 Remove LUSTRE_KERNEL_VERSION

Patched kernels are no longer an absolute requirement for
Lustre servers.  Remove the LC_LUSTRE_VERSION_H autoconf
check and all usage of the LUSTRE_KERNEL_VERSION #define.
Going forward any specific kernel dependency should be
expressed with an explicit, clearly documented, autoconf
test.

As part of this change the check for automatically disabling
lustre server support has been moved to the ldiskfs autoconf
checks.  Previously this was done by checking for the
existance of a patched kernel.

Change-Id: Ifb5dcaf62638146a190f5d7417b9462177c5730d
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/1873
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1318 ldlm: allow different LVB structures to be used
Johann Lombardi [Fri, 24 Feb 2012 15:42:23 +0000 (16:42 +0100)]
LU-1318 ldlm: allow different LVB structures to be used

The DLM code always assumes that the request buffer storing the LVB is
of type ost_lvb.
This patch allows new LVB types to be defined and used. Although there
is still one single LVB structure defined (i.e. ost_lvb), the new
quota architecture will define its own LVB soon.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I497d774eb4b66029ff2755739bbe75190f6aeee8
Reviewed-on: http://review.whamcloud.com/2649
Reviewed-by: Andreas Dilger <adilger@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-911 osd: couple helpers for osd api
Alex Zhuravlev [Mon, 12 Dec 2011 17:03:59 +0000 (20:03 +0300)]
LU-911 osd: couple helpers for osd api

- dt_find_or_create() to "open" and create if needed an object
- dt_object_sync() - a wrapper for corresponding osd api method

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: If10e2f522f6e5383260a1d729f305ccdc0b02bbb
Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1838
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1205 tests: sanityn test_18 sometimes takes long time to run
Jinshan Xiong [Fri, 13 Apr 2012 23:15:51 +0000 (16:15 -0700)]
LU-1205 tests: sanityn test_18 sometimes takes long time to run

This is a live-lock problem where two processes are writing to the
same mmaped file via two nodes. To write a mmap region, both processes
will do:

  acquire cl_lock -> read page -> release cl_lock-> install page.

During the above steps, the page can be truncated after the lock is
released and then immediately cancelled by the other process, so
kernel has to do page fault again and never complete.

Lustre can't handle this case well so this test case is disabled.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I0c3fd5beab388cbed6193ae496d4d0e4f23be797
Reviewed-on: http://review.whamcloud.com/2544
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1389 lov: standardize lov_do_div64() usage
Andreas Dilger [Thu, 27 Oct 2011 04:11:07 +0000 (22:11 -0600)]
LU-1389 lov: standardize lov_do_div64() usage

Rename ll_do_div64() to lov_do_div64() and move it to a header
for use by LOV and LOD.  Lustre shouldn't use linux-specific
methods in the code, so this is a bit of portability fix as well.

Change-Id: Ia6f071914a982c7c7d5f2d11271f9587aea01ed6
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/1619
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1102 crypto: correctly check crypto_alloc_blkcipher returns
Bobi Jam [Wed, 9 May 2012 19:22:58 +0000 (03:22 +0800)]
LU-1102 crypto: correctly check crypto_alloc_blkcipher returns

ll_crypto_alloc_blkcipher() returns error value as well as possible
NULL pointer, should check its return value carefully.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I181b236406e2649580a04940886f849ad6071078
Reviewed-on: http://review.whamcloud.com/2703
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1078 lnet: two minor issues in lnet
Bob Glossman [Tue, 8 May 2012 22:18:45 +0000 (15:18 -0700)]
LU-1078 lnet: two minor issues in lnet

Fix typos, 1 in a doxygen comment, 1 in a failure test

Signed-off-by: Bob Glossman <bogl@whamcloud.com>
Change-Id: I09a2f4f3e2762f8826e075ef5de2d6d2d6fb6f13
Reviewed-on: http://review.whamcloud.com/2692
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Isaac Huang <Isaac_Huang@xyratex.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1361 build: enable kabi on rhel6
Minh Diep [Thu, 3 May 2012 23:00:46 +0000 (16:00 -0700)]
LU-1361 build: enable kabi on rhel6

Turn on USE_KABI=true to build with kabi on rhel6

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: Ie028ced17baf5a4540c59b8b63fb279a146718a6
Reviewed-on: http://review.whamcloud.com/2642
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Tested-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1095 debug: Send common recovery messages to D_HA
Christopher J. Morrone [Sun, 26 Feb 2012 23:05:14 +0000 (15:05 -0800)]
LU-1095 debug: Send common recovery messages to D_HA

These messages are always present at recovery time, and are not
understable by a sysadmin.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: I907b0ac49541b20699914dc4f8c5e0db3fb6bec9
Reviewed-on: http://review.whamcloud.com/2198
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-251 Fix gcc configure warnings
Ned A. Bass [Thu, 21 Apr 2011 23:45:43 +0000 (16:45 -0700)]
LU-251 Fix gcc configure warnings

Newer versions of gcc are getting smart enough to detect the sloppy
syntax used for the autoconf tests.  It is now generating warnings for
unused or uninitialized variables.  Newer versions of gcc even have the
-Wunused-but-set-variable option set by default.  This isn't a problem
except when -Werror is set and they get promoted to an error.  In this
case the autoconf test will return an incorrect result which will result
in a build failure or runtime error later on.

To handle this I'm tightening up many of the autoconf tests to
explicitly mark variables as unused to suppress the gcc warning.  Tests
emitting uninitialized variable errors are updated to initialize
pointers to NULL, and some variables are converted to pointers to
accomodate this.  'Argument makes integer from pointer without a cast'
errors were fixed by passing 0 for the offending argument in cases where
we are not explicitly testing the argument type.  0 is accepted as both
an integer and a pointer.

Change-Id: Idaa04b04308e3cd994b0d802a5ee1eb5c90f9be6
Signed-off-by: Ned Bass <bass6@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/478
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-1095 debug: Improve recovery console messages
Christopher J. Morrone [Sat, 3 Mar 2012 01:41:45 +0000 (17:41 -0800)]
LU-1095 debug: Improve recovery console messages

Quiet and/or improve a few recovery messages.

A sysadmin will not understand this:

  2012-03-02 16:27:19 Lustre: 5211:0:(ldlm_lib.c:2072:
  target_queue_recovery_request()) Next recovery transno: 410629539,
  current: 410629539, replaying

Messages like this are too verbose for the console:

  2012-03-02 16:27:59 LustreError: 5286:0:
  (genops.c:1270:class_disconnect_stale_exports())
  lc3-OST0004: disconnect stale client
  47808f4f-9f36-e8eb-f363-14b1abe4ac57@<unknown>

and can be left to this simpler message:

  2012-03-02 16:27:59 Lustre: lc3-OST0005: disconnecting 0 stale
  clients

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: I457602c3440ba10475e4ddca7c4e58ef8669922c
Reviewed-on: http://review.whamcloud.com/2249
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Liu Xuezhao <xuezhao.liu@emc.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-709 build: cleanup lustre-lnet.m4 and ofed.m4
Peng Tao [Sat, 25 Feb 2012 05:30:17 +0000 (13:30 +0800)]
LU-709 build: cleanup lustre-lnet.m4 and ofed.m4

1. HAVE_SPINLOCK_T is not used
2. OFED supports iWarp transport since v2.6.18

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Ieb5971f359b5d81b7dce3db8ea732ca33c6cbd53
Reviewed-on: http://review.whamcloud.com/2327
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
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-812 kernel: sync_page() removed from address_space_operations
Wally Wang [Tue, 10 Apr 2012 23:47:29 +0000 (16:47 -0700)]
LU-812 kernel: sync_page() removed from address_space_operations

sync_page function has been removed from struct
address_space_operations since Linux 2.6.39.

Change-Id: Iec85c08bee9c8ee8d7904b7a2bf97ece5c04bbfa
Signed-off-by: Wally Wang <wang@cray.com>
Reviewed-on: http://review.whamcloud.com/1985
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Peng Tao <tao.peng@emc.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1345 tests: sanity test 215 non integer handling fix
James Simmons [Fri, 4 May 2012 11:45:02 +0000 (07:45 -0400)]
LU-1345 tests: sanity test 215 non integer handling fix

Sanity test 215 test the format of various /proc/sys/lnet/* files.
Some of those files are integer values but their can be times when
no valid number is available so a NA is reported. This patch
handles those cases.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I2c9ae2c56d7864099cddb456b998356f0f7c32b2
Reviewed-on: http://review.whamcloud.com/2602
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1347 build: remove the vim/emacs modelines
Liang Zhen [Mon, 7 May 2012 08:46:10 +0000 (16:46 +0800)]
LU-1347 build: remove the vim/emacs modelines

Delete all of the vim/emacs modelines.
Add copyright information for a few files.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Ic22ce8d8cc7786ffdb19937eb9f93a2d49aa2581
Reviewed-on: http://review.whamcloud.com/2658
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1358 kernel: Kernel update [RHEL6.2 2.6.32-220.13.1.el6]
yangsheng [Wed, 2 May 2012 05:49:34 +0000 (13:49 +0800)]
LU-1358 kernel: Kernel update [RHEL6.2 2.6.32-220.13.1.el6]

Update RHEL6.2 kernel to 2.6.32-220.13.1.el6.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: Id6a1c8ef918d9df8f5948caedfd45688f73d4747
Reviewed-on: http://review.whamcloud.com/2653
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years ago2.2.52 2.2.52 v2_2_52_0
Oleg Drokin [Tue, 8 May 2012 03:30:58 +0000 (23:30 -0400)]
2.2.52

Change-Id: Ia2a129c0cb3103c94591869759b4a16ed19901a6

11 years agoLU-1351 llapi: Handle special file types in llapi_path2fid()
John L. Hammond [Sat, 28 Apr 2012 18:40:41 +0000 (13:40 -0500)]
LU-1351 llapi: Handle special file types in llapi_path2fid()

In llapi_path2fid() check for errors from open() and ioctl() that
occur on special file types (device, socket, fifo).  Add a test in
sanity.sh that lfs path2fid will handle each type.

Change-Id: Ib411038179b3eff4191e25ac7320558a0ee1c76b
Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Reviewed-on: http://review.whamcloud.com/2606
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-1264 quota: reserve FID sequences for quota
Johann Lombardi [Wed, 28 Mar 2012 09:41:41 +0000 (11:41 +0200)]
LU-1264 quota: reserve FID sequences for quota

This patch reserves 2 FID sequences for quota.

Slave indexes will be allocated an unique FID from the FID_SEQ_QUOTA
sequence.

As for FID_SEQ_QUOTA_GLB, it will be used to uniquely identify the
global quota indexes. For the global index, the sequence will thus be
set to FID_SEQ_QUOTA_GLB and the 32-bit object ID divided into 3
fields:
- 16-bit pool identifier
- 8-bit quota type (user or group quota)
- 8-bit target type (data or metadata)

Thanks to this static FID scheme, slave can enqueue global quota lock
directly on the right FID without requiring a first readdir or to
change the resource ID on the fly when the lock is granted.
As for the slave index FID, it is allocated dynamically from
FID_SEQ_QUOTA and is returned to the slave in the quota LVB when the
global quota lock is granted.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I27552256cb96bbb88c0eeb3e7e3584d97476c9f1
Reviewed-on: http://review.whamcloud.com/2396
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1306 ldlm: LBUG at ldlm_lock.c:213
Andriy Skulysh [Wed, 11 Apr 2012 11:55:28 +0000 (14:55 +0300)]
LU-1306 ldlm: LBUG at ldlm_lock.c:213

Protect l_flags with locking to prevent race on
signal reception.

Xyratex-bug-id: MRP-420
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-by: Iurii Golovach <iurii_golovach@xyratex.com>
Change-Id: Ifbf9e668bfeba30c9f9f206086186ad7d499a871
Reviewed-on: http://review.whamcloud.com/2511
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-1311 Disable local irqs when locking tcds while walking them
Oleg Drokin [Thu, 26 Apr 2012 21:43:11 +0000 (17:43 -0400)]
LU-1311 Disable local irqs when locking tcds while walking them

This helps us to avoid a deadlock with other threads that goes like this:
thread doint the walking = (1)
other thread = (2)

(1) get some non-irq type tcd locked while walking the tcds
(2) get some irq/bh lock
(2) try to print a debugging message and block on the tcd lock held by (1)
(1) irq/bh arrives, tries to get irq/bh lock held by (2) == BAM!

Change-Id: If1e1cc57c0f2e287b453e34db0c894c1ca830b9a
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2605
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
11 years agoLU-1329 ptlrpc: handle -EINPROGRESS for create
Niu Yawei [Wed, 18 Apr 2012 07:35:38 +0000 (00:35 -0700)]
LU-1329 ptlrpc: handle -EINPROGRESS for create

If some metadata operation get -EINPROGRESS from server, client
should retry the operation infinitely. Which is required by
the new quota design in the DNE environment.

We handle -EINPROGRESS only for create operation for now, if
necessary, it can be extended for other operations later.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Iad568afeff0af1d4df840d3acf2df161df6f7690
Reviewed-on: http://review.whamcloud.com/2572
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-904 ptlrpc: redo io on -EINPROGRESS
Niu Yawei [Fri, 13 Jan 2012 08:33:22 +0000 (00:33 -0800)]
LU-904 ptlrpc: redo io on -EINPROGRESS

When server return -EINPROGRESS for a write RPC, the client
should keep resending the RPC until server return other
error code or the client is evicted.

This is required by the new quota design: when a write on
OST can't acquire quota from master for broken network, it
should return -EINPROGRESS to inform the client to retry
write infinitely.

This patch also fixed the defect of redo io RPC can't be
aborted during eviction, in a lightweight manner.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Iea393cb1ea55e9d006f52dbfc39a2b9a3670d682
Reviewed-on: http://review.whamcloud.com/1962
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-506 statahead: revalidating dentry may be stale
Lai Siyao [Mon, 9 Apr 2012 07:33:29 +0000 (15:33 +0800)]
LU-506 statahead: revalidating dentry may be stale

The revalidating dentry may be stale (other client recreated this
file), so the statahead inode can be different from dentry inode.
Return -ESTALE instead of LASSERT here.

And for this kind of dentry, it shouldn't be revalidated, but dropped
and re-lookup. To achieve this, if ll_statahead_enter() fails to get
a valid dentry, and the return value is not 0 or -EAGAIN,
ll_revalidate_it() should return 0 directly, and let VFS calls
.lookup to get a new dentry.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I3eae450069a59d18d138d0cf7538a225e6d6deb8
Reviewed-on: http://review.whamcloud.com/2492
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Peng Tao <tao.peng@emc.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-911 obdclass: new context tags for future use
Mikhail Pershin [Thu, 22 Mar 2012 09:53:22 +0000 (13:53 +0400)]
LU-911 obdclass: new context tags for future use

- Add new thread tags: local, mgs and osp
- use LCT_LOCAL to avoid extra keys allocation when just local
  server update is needed.
- target_recovery_thread() is capable to serve OFD.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ic41673c91b8d519c95a8740c418070f9e14aa3a6
Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1851
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-425 tests: fix the issue of using "grep -w"
Yu Jian [Fri, 13 Apr 2012 06:33:48 +0000 (14:33 +0800)]
LU-425 tests: fix the issue of using "grep -w"

This patch fixes the following issue while using "grep -w"
to do exact match:

$ echo /mnt/nbp0-2 | grep -w /mnt/nbp0
/mnt/nbp0-2

Per the description of "-w" option:
-w, --word-regexp
Select only those lines containing matches that form whole words.
The test is that the matching substring must either be at the
beginning of the line, or preceded by a non-word constituent
character. Similarly, it must be either at the end of the line
or followed by a non-word constituent character. Word-constituent
characters are letters, digits, and the underscore.

So, the hyphen "-" character is a non-word constituent character
and "grep -w" does not do exact match on strings which contain it.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I53d306d38b05408c351db10dc545120f2f9dabce
Reviewed-on: http://review.whamcloud.com/2529
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-911 osd: osd_ldiskfs_read returns short reads
Mikhail Pershin [Tue, 6 Mar 2012 08:39:27 +0000 (12:39 +0400)]
LU-911 osd: osd_ldiskfs_read returns short reads

osd_ldiskfs_read returned always the requested size even if short
read occurs hiding possible problems. Now it returns real size.

dt_read() helper returns just the same result and can be used to read
any data.

dt_record_read() must be used only for fixed length records

Fix mdt_getattr_internal() code related to readlink, it always tried
to read link of size + 1, so now we need to take this into account.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Ib603c5cbe5b06f3f6a9aef74c52bb78cdbd4c3eb
Reviewed-on: http://review.whamcloud.com/2263
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1214 ptlrpc: removes client lu_target.h/target.c dependency
Liu Xuezhao [Sun, 18 Mar 2012 15:08:37 +0000 (23:08 +0800)]
LU-1214 ptlrpc: removes client lu_target.h/target.c dependency

Needs not include lu_target.h or compile target.c for client.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I332864158839a8ed1f1df3b24477f5e68ef4ecb7
Reviewed-on: http://review.whamcloud.com/2362
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1214 ldlm: splits server specific lock handling from client
Liu Xuezhao [Fri, 16 Mar 2012 04:30:07 +0000 (12:30 +0800)]
LU-1214 ldlm: splits server specific lock handling from client

Splits/removes these server-side specific lock handlings:
1. Server-side blocking/completion/glimpse AST
2. ldlm_cancel_service
3. Resource policy functions
4. ldlm_handle_enqueue /ldlm_handle_convert etc.

Uses "HAVE_SERVER_SUPPORT" to comment out those server-side codes.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: Ia5b607715a45737182932bf5ec90bda9199eaf07
Reviewed-on: http://review.whamcloud.com/2361
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1283 utils: Use variable without initialize
Minh Diep [Wed, 4 Apr 2012 19:38:10 +0000 (12:38 -0700)]
LU-1283 utils: Use variable without initialize

We need to initialize char *savept before use it

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I0c8155d84e255fcf55e98f5b84a09faf8f8487ef
Reviewed-on: http://review.whamcloud.com/2448
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1259 mgs: avoid cancelling IR lock twice
Jinshan Xiong [Tue, 27 Mar 2012 16:28:31 +0000 (09:28 -0700)]
LU-1259 mgs: avoid cancelling IR lock twice

There is a race that if IR shared lock is revoked fastly the
completion ast can be called twice with the lock granted. The
IR lock should be cancelled only once in this case.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: Ie1b2742d436fb6f549cfcb25dc50fbbabcd1f008
Reviewed-on: http://review.whamcloud.com/2390
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1193 tests: test script fixes for incompatibility
yangsheng [Tue, 3 Apr 2012 17:32:37 +0000 (01:32 +0800)]
LU-1193 tests: test script fixes for incompatibility

test script incompatibility when running server as
2.1 and client as 2.2

 - conf-sanity: 61
 - recovery-small: 100, 101, 102, 103, 104, 105
 - santiy: 133a, 133d, 160, 225a, 225b

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I97dea88cdebb2f229aa6d2852a653619145e59a2
Reviewed-on: http://review.whamcloud.com/2441
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1347 build: use kernel checkpatch.pl and check for tabs
Peng Tao [Wed, 25 Apr 2012 23:56:06 +0000 (07:56 +0800)]
LU-1347 build: use kernel checkpatch.pl and check for tabs

We need to enforce kernel coding style, and check for tabs
instead of spaces by default.

Signed-off-by: Peng Tao <peng_tao@emc.com>
Change-Id: I26fc5a5c6d2e629eb284ac604977d09ebe41dc53
Reviewed-on: http://review.whamcloud.com/2610
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1290 quota: transfer quota in osd_attr_set()
Niu Yawei [Fri, 6 Apr 2012 11:08:28 +0000 (04:08 -0700)]
LU-1290 quota: transfer quota in osd_attr_set()

Move the ll_vfs_dquot_transfer() out of the osd_inode_setattr(),
since ll_vfs_dquot_transfer() will hold the dqptr_sem, whereas
the osd_inode_setattr() is protected by spin lock oo_guard.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ib36231fb30eabfd39fe0baf16e982357113c6121
Reviewed-on: http://review.whamcloud.com/2463
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1095 debug: CWARN to CDEBUG for mds_notify() event
Brian Behlendorf [Fri, 19 Feb 2010 19:53:55 +0000 (11:53 -0800)]
LU-1095 debug: CWARN to CDEBUG for mds_notify() event

Both of these warnings represent correct behavior the administrator
does not need to know about, or more importantly do anything about.
As such I am moving both of these warnings to CDEBUG(D_CONFIG).

  Lustre: 8099:0:(mds_lov.c:1167:mds_notify()) MDS lc1-MDT0000:
  add target lc1-OST0023_UUID

  Lustre: lc1-MDT0000: in recovery, not resetting orphans on
  lc1-OST0007_UUID

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: I66a98d87e3d5de7205420c74db4f6d9bcaaf31a7
Reviewed-on: http://review.whamcloud.com/2202
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-577 tests: FAIL replay-single test_70b rundbench load
James Simmons [Wed, 18 Apr 2012 14:02:12 +0000 (10:02 -0400)]
LU-577 tests: FAIL replay-single test_70b rundbench load

Test 70b for replay-single assumes that lustre is mounted on
/mnt/lustre which is not the case for us. This patch passes
the proper MOUNT. The test also was not using the standard
DIR/tdir setup which had generated data files not being
cleaned up. Increased the sleep period to match dbench's
warm up period. This gives dbench a change to start up when
using many clients. Set the pdsh FANOUT environment variable
because by default pdsh launches in blocks of 32 nodes. This
way pdsh will lauch all node jobs at the same time

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Iefdfe4bf47d322e782e138cf6ae17240b3004d8b
Reviewed-on: http://review.whamcloud.com/252
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1312 kernel: crash at boot time in isci driver
yangsheng [Tue, 24 Apr 2012 20:05:15 +0000 (04:05 +0800)]
LU-1312 kernel: crash at boot time in isci driver

Restore SG_ALL to default value to avoid crash isci.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: Ie20bbf669c64514fc95f1f2b274a689d65cd0c2a
Reviewed-on: http://review.whamcloud.com/2596
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1319 mdt: increment MDT getattr stats
Ned Bass [Thu, 12 Apr 2012 23:20:59 +0000 (16:20 -0700)]
LU-1319 mdt: increment MDT getattr stats

Move increment of MDT getattr stat from mdt_getattr() to
mdt_getattr_internal() so we don't miss other call paths
that may service getattr requests.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I45ae7a73eaf81fbe56775725d07ec275b4261f1f
Reviewed-on: http://review.whamcloud.com/2526
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1249 debug: Auto correct improper debug buffer size setting
Bobi Jam [Mon, 9 Apr 2012 05:03:51 +0000 (13:03 +0800)]
LU-1249 debug: Auto correct improper debug buffer size setting

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

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I89def7762f2ec9da3a25d28f7ffa9aede390eb85
Reviewed-on: http://review.whamcloud.com/2489
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-549 llite: Improve statfs performance if selinux is disabled
Yevheniy Demchenko [Tue, 10 Apr 2012 20:01:14 +0000 (22:01 +0200)]
LU-549 llite: Improve statfs performance if selinux is disabled

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

Signed-off-by: Yevheniy Demchenko <zheka@uvt.cz>
Change-Id: I5e416093bba4126e5fcad62d8c0a2963c1866386
Reviewed-on: http://review.whamcloud.com/2503
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1209 tests: add debug info to 133d
wangdi [Wed, 14 Mar 2012 06:36:25 +0000 (23:36 -0700)]
LU-1209 tests: add debug info to 133d

Add more information in 133d to help understanding the
failure.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: Ic84120fa5adcab9490abce732993c7c90d3e2881
Reviewed-on: http://review.whamcloud.com/2309
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-911 ost: ost_handle() to refill environment on every requests
Mikhail Pershin [Thu, 12 Apr 2012 10:09:20 +0000 (14:09 +0400)]
LU-911 ost: ost_handle() to refill environment on every requests

OST threads hold environment (lu_env) for request handling. when
a last instance of some device (say ofd or osd) gone, all keys
registered by the device are released, but enviroments are kept.
then at device instantiation the environments aren't repopulated.
this patch fixes this.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib691f22955d40335535fcf3013d62badb24f7f49
Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1850
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-911 osd: use struct obd_statfs instead of kstatfs_t
Alex Zhuravlev [Mon, 12 Dec 2011 16:49:41 +0000 (19:49 +0300)]
LU-911 osd: use struct obd_statfs instead of kstatfs_t

OSD API and users to use struct obd_statfs.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I6bd98a632db9cd9f6ee4309c29d878a61bd7a228
Reviewed-on: http://review.whamcloud.com/1837
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-911 osd: fix th_sync and OSD_EXEC_OP issues
Mikhail Pershin [Fri, 13 Apr 2012 07:02:26 +0000 (11:02 +0400)]
LU-911 osd: fix th_sync and OSD_EXEC_OP issues

This issues occurs during the porting from Orion to the master
- th_sync should accumulate values with '|=' to be not dropped
  occasionally to the async state from sync
- remove duplicated code
- remove ASSERTION in OSD_EXEC_OP as it was previously done but
  returned again from orion by mistake

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I6ee7eb8a086eae6e0a96364a90a192e6ac95903b
Reviewed-on: http://review.whamcloud.com/2530
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-709 build: clean up HAVE_CAN_SLEEP_ARG and HAVE_F_OP_FLOCK
Peng Tao [Mon, 23 Jan 2012 03:05:34 +0000 (11:05 +0800)]
LU-709 build: clean up HAVE_CAN_SLEEP_ARG and HAVE_F_OP_FLOCK

1. flock_lock_file_wait only has two arguments ever since v2.6.12
2. file_operations.flock exists since v2.6.12

Signed-off-by: Peng Tao <peng_tao@emc.com>
Change-Id: I92406f1042dab71ade780b02500fba4404a56a2b
Reviewed-on: http://review.whamcloud.com/2315
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-709 build: clean up LC_STRUCT_INTENT_FILE and LC_SUNRPC_CACHE
Peng Tao [Mon, 23 Jan 2012 02:52:12 +0000 (10:52 +0800)]
LU-709 build: clean up LC_STRUCT_INTENT_FILE and LC_SUNRPC_CACHE

1. open_intent.file was added since v2.6.14
2. cache_head.ref was added since v2.6.16

Signed-off-by: Peng Tao <peng_tao@emc.com>
Change-Id: Ie4047431f56cf71ef7a17115c2cd1a3812256419
Reviewed-on: http://review.whamcloud.com/2314
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-1280 ldiskfs: remove LASSERTF from ext3_ext_new_extent_cb()
Yu Jian [Thu, 5 Apr 2012 10:35:10 +0000 (18:35 +0800)]
LU-1280 ldiskfs: remove LASSERTF from ext3_ext_new_extent_cb()

The LASSERTF() in ext3_ext_new_extent_cb() was injected for
debugging purpose to make sure the race really happened but
was forgotten to be removed from the original patch in
http://review.whamcloud.com/1618 .

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I978b8ab88cc4413c7ac00db838f7578f8011b192
Reviewed-on: http://review.whamcloud.com/2452
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
11 years agoLU-1247 obdfilter: fix invalid check of precrate objects
Alexander.Boyko [Wed, 21 Mar 2012 17:47:53 +0000 (21:47 +0400)]
LU-1247 obdfilter: fix invalid check of precrate objects

MDT precreate objects when it has objects count less than the
oscc->oscc_grow_count / 2. oscc->oscc_grow_count can be equal
to OST_MAX_PRECREATE, so MDT (last_id - next_id) is less than the
(OST_MAX_PRECREAT * 3 / 2). This patch fix the wrong condition at
filter_handle_precreate() when delete orphans request happend.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: Andriy Skulysh <andriy_skulysh@xyratex.com>
Xyratex-bug-id: MRP-440
Change-Id: I5bac3ee7261fe7462254bd80565d770041c3c206
Reviewed-on: http://review.whamcloud.com/2365
Reviewed-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1214 ptlrpc: splits server-side connection/bulkIO/recovery
Liu Xuezhao [Sun, 18 Mar 2012 12:56:07 +0000 (20:56 +0800)]
LU-1214 ptlrpc: splits server-side connection/bulkIO/recovery

Splits/removes these server-side handling from client:
1. Server-side connection and disconnection
2. Splits obdecho client and server
3. Server-side bulk I/O
4. Server-side recovery handling

Uses "HAVE_SERVER_SUPPORT" to protect those server-side codes.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I14422a36ffa6fa46604682c9eed6d27dd56a4888
Reviewed-on: http://review.whamcloud.com/2360
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1095 debug: Report remaining recovery time consistently
Christopher J. Morrone [Mon, 27 Feb 2012 00:20:47 +0000 (16:20 -0800)]
LU-1095 debug: Report remaining recovery time consistently

Consistency is good, always report the remaining recovery time
in the mm:ss format.  This patch get's the last 3 remaining
instances where it is simply reported as a total number of seconds.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: If5599d8c24b1cd862ab89670553fcd24672cadbc
Reviewed-on: http://review.whamcloud.com/2204
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1095 debug: Improve messages for fake requests
Christopher J. Morrone [Mon, 27 Feb 2012 00:19:21 +0000 (16:19 -0800)]
LU-1095 debug: Improve messages for fake requests

Update the console filter to correctly handle fake requests and
squelched the lov_update_create_set() message for the
-ETIMEDOUT/-ENOTCONN case.

 LustreError: 7872:0:(lov_request.c:693:lov_update_create_set()) error
 creating fid 0x104c5e0b sub-object on OST idx 53/2: rc = -107

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: I5f37f585566b053d515665fcddbcc8a3e653d89a
Reviewed-on: http://review.whamcloud.com/2203
Tested-by: Hudson
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1095 debug: Common client/server message standardization
Christopher J. Morrone [Mon, 27 Feb 2012 00:16:51 +0000 (16:16 -0800)]
LU-1095 debug: Common client/server message standardization

Enhance and standardize several common messages.  In particular
when a peer is involved ensure peers nid is in the message, and
on the server include the obd name in the message.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: Iaea477e7dab240866a10c1863886d21d674e293d
Reviewed-on: http://review.whamcloud.com/2200
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-1095 debug: Standardize, suppress mount/umount messages
Christopher J. Morrone [Mon, 27 Feb 2012 00:06:29 +0000 (16:06 -0800)]
LU-1095 debug: Standardize, suppress mount/umount messages

Standardize mount/umount console message to include profile name,
and optionally suppress them with the 'quiet' mount option.  We
have been using private namespaces for testing and mounting then
umounting the FS as needed for each job.  In this context these
messages end up causing alot of syslog noise.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: I7514f6016c337a358e5e31146644810dff292d02
Reviewed-on: http://review.whamcloud.com/2199
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-80 mds: use md_size supplied by client, repack reply
Mikhail Pershin [Thu, 29 Mar 2012 13:07:42 +0000 (21:07 +0800)]
LU-80 mds: use md_size supplied by client, repack reply

- mdt uses only client easize to pack reply buffer with the same
buffer sizes as client has.
- introduce reply growing, when packing reply the proper MD size
might be unknown so clients data is being used, but after request
processing the proper size may be bigger than client expects and
reply buffer must be re-packed.
- if server data doesn't fit in buffer then it allocates bigger
buffer instead of using reply message buffer.
- rename mdt_shrink_reply into mdt_fix_reply. It does shrink and/or
grow when needed. Upon growing the bigger MD is copied into new
reply.
- server unpacks ea attr size always in mdt_reint_record for all
operation, so it is available always in rr_eadatasize.

Port from: ORI-80
Author: Mikhail Pershin <tappro@whamcloud.com>

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Ieae6a1d4d07fdf7643ca6900d02d0dd962a07f6c
Reviewed-on: http://review.whamcloud.com/1808
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1308 Additional multihomed nid config fix
Oleg Drokin [Wed, 25 Apr 2012 19:28:22 +0000 (15:28 -0400)]
LU-1308 Additional multihomed nid config fix

Need to put the new nid addition at the last slot available,
not next after the last.

Change-Id: Icf9d898fba4c6e9c05f085b855a33282ea0d4b47
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2599
Reviewed-by: Denis Kondratenko <Denis_Kondratenko@xyratex.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Cory Spitz <spitzcor@cray.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-709 build: cleanup LC_SEQ_LOCK/FILEMAP_FDATAWRITE_RANGE
Peng Tao [Mon, 23 Jan 2012 05:08:46 +0000 (13:08 +0800)]
LU-709 build: cleanup LC_SEQ_LOCK/FILEMAP_FDATAWRITE_RANGE

1. struct seq_file has lock instead of semaphore since v2.6.17
   and seq_file lock is not used in Lustre
2. filemap_fdatawrite_range is exported since v2.6.27
   andRHEL v2.6.18 back ported it. So all kernels Lustre
   supports now have it.

Signed-off-by: Peng Tao <peng_tao@emc.com>
Change-Id: I5730852789a5c19350eebb65fd61baf2a6512626
Reviewed-on: http://review.whamcloud.com/2321
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-709 build: cleanup VFS_KERN_MOUNT/INVALIDATEPAGE_RETURN_INT
Peng Tao [Sat, 25 Feb 2012 04:20:49 +0000 (12:20 +0800)]
LU-709 build: cleanup VFS_KERN_MOUNT/INVALIDATEPAGE_RETURN_INT

1. vfs_kern_mount is added since v2.6.18
2. invalidatepage returns void since v2.6.17

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I9926072d2d519c64ef927e02a13a6e9b0c72f2af
Reviewed-on: http://review.whamcloud.com/2320
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1320 llite: fix a race between readpage and releasepage
Jinshan Xiong [Wed, 18 Apr 2012 04:40:24 +0000 (21:40 -0700)]
LU-1320 llite: fix a race between readpage and releasepage

This is a race between page stealing and readpage. If a just read
page is stolen, readpage will find the page is not uptodate, this
makes it panic so -EIO is returned to the reading application.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: Ib16d12d3bc3cc8c0545aa27f0836e4fd89c3a809
Reviewed-on: http://review.whamcloud.com/2591
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1308 Properly add multihomed nids to peer table
Oleg Drokin [Tue, 17 Apr 2012 06:31:10 +0000 (02:31 -0400)]
LU-1308 Properly add multihomed nids to peer table

class_add_uuid had a copy&paste error where it was checking against
wrong entry for nid tables and as such had trouble finding multihomed
nid configurations.

Change-Id: I2d73bdde9cf7b0bf882b14b473b4491873e64c25
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2561
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
11 years agoLU-1240 iokit: fix incorrect statement in README
Minh Diep [Fri, 6 Apr 2012 17:24:14 +0000 (10:24 -0700)]
LU-1240 iokit: fix incorrect statement in README

file_count should be per thread

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I656d53417a529025f863622036ee51fbbfb4364b
Reviewed-on: http://review.whamcloud.com/2464
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Richard Henwood <rhenwood@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1282 lprocfs: Add a module param to disable percpu stats
Bobi Jam [Thu, 12 Apr 2012 00:48:42 +0000 (08:48 +0800)]
LU-1282 lprocfs: Add a module param to disable percpu stats

Add an obdclass module option to choose to use a single lprocfs stats
structure rather than percpu data.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I45d5a05029197e629d4f7d161a5e4e5d01a93bf5
Reviewed-on: http://review.whamcloud.com/2515
Tested-by: Hudson
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1192 tests: automate POSIX compliance testing
Minh Diep [Mon, 5 Mar 2012 23:09:55 +0000 (15:09 -0800)]
LU-1192 tests: automate POSIX compliance testing

a. assuming that the POSIX source already installed
on the system
b. setup loop back ext4 filesystem
c. install, build and run POSIX binaries on ext4
d. run POSIX again lustre
f. compare results from ext4 and lustre

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I104a43549a2dedf272b52c4c9ce3ab0d50a223eb
Reviewed-on: http://review.whamcloud.com/2256
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-840 tests: Fix conf-sanity.sh test_32b
Andriy Skulysh [Sat, 17 Mar 2012 23:45:07 +0000 (01:45 +0200)]
LU-840 tests: Fix conf-sanity.sh test_32b

Fix correct settings debug level
Fix correct mdt.upcall path
Fix mgs node settings to able to connect to correct host
(alternative way to fix it's
- add waiting for export to wait ost<>mgs connection established)

Xyratex-bug-id: MRP-233
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Change-Id: I4bc21fe4abfff0cf89dbb83a1149f822ba69438c
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Bruce Korb <bruce_korb@xyratex.com>
Reviewed-on: http://review.whamcloud.com/1695
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-482 test: sync MDS before first replay test
Lai Siyao [Mon, 16 Apr 2012 01:53:09 +0000 (09:53 +0800)]
LU-482 test: sync MDS before first replay test

Maloo autotest system often fails on mountdata lost on MDS, the cause
may be related with LMV and hyporvisor usage. Sync MDS before first
replay to flush all files on MDS.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I2c0fe37d77b05c81e567c70ef5bffca9eae84632
Reviewed-on: http://review.whamcloud.com/2545
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1285 tests: fix tar breakage in 102d/102f/102j
Andreas Dilger [Thu, 5 Apr 2012 23:37:09 +0000 (17:37 -0600)]
LU-1285 tests: fix tar breakage in 102d/102f/102j

Due to changes in commit a5fed8233f4f5755d61909849e23d146a94d4396
to remove the use of ad-hoc "lfs getstripe" output parsing, the
sanity.sh tests 102d, 102f, and 102j were broken.  Fix the tests
to use "lfs getstripe [-c|-S|-i]" instead of "get_stripe_info()".

Allow the new files to have 3/4 stripes (per min_stripe_count())
of the originally backed up files in case there are not enough
OSC objects available.

Also clean up the formatting of test_102a to match the coding
style, avoid breaking the vim syntax highlighting due to the
use of excessive quoting, and add proper error messages on failure.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I2cd09c455f024882d94cf945a0e2f546d13ac27a
Reviewed-on: http://review.whamcloud.com/2458
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1144 ptlrpc: implement a NUMA aware ptlrpcd binding policy
Gregoire Pichon [Wed, 7 Mar 2012 12:53:37 +0000 (13:53 +0100)]
LU-1144 ptlrpc: implement a NUMA aware ptlrpcd binding policy

This is a complement to the ORNL-22 general ptlrpcd threads pool
support.

This patch improves the PDB_POLICY_NEIGHBOR ptlrpcd binding policy,
when the kernel supports NUMA. In that case, the ptlrpcd threads are
all binded and have threads in the same NUMA node setup as partners.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Change-Id: I8eb553d6f25fac6fd64faf1eecfa4dfae5ed15ee
Reviewed-on: http://review.whamcloud.com/2212
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
12 years agoLU-1205 tests: cleanup code style in mmap_sanity.c
Andreas Dilger [Mon, 12 Mar 2012 20:43:45 +0000 (14:43 -0600)]
LU-1205 tests: cleanup code style in mmap_sanity.c

Cleanup numerous code style issues in the mmap_sanity.c test:
- whitespace at end of line
- spaces around operators
- indentation
- line wrapping at 80 columns

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I7481d358732effa58875cbf2a2d545bf741ecab0
Reviewed-on: http://review.whamcloud.com/2291
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1205 tests: add timestamps to sanityn 18 mmap
Andreas Dilger [Mon, 12 Mar 2012 20:23:07 +0000 (14:23 -0600)]
LU-1205 tests: add timestamps to sanityn 18 mmap

The sanityn.sh test_18 mmap_sanity.c test sometimes takes over
an hour to run, and sometimes only seconds.  Add timestamps to
the subtest results so that it is possible to debug where that
time is being spent.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie33c46d9b72083c79112455ac9df6f357dc7cab0
Reviewed-on: http://review.whamcloud.com/2290
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1241 kernel: Kernel update [RHEL6.2 2.6.32-220.7.1.el6]
yangsheng [Tue, 27 Mar 2012 16:19:04 +0000 (00:19 +0800)]
LU-1241 kernel: Kernel update [RHEL6.2 2.6.32-220.7.1.el6]

Update RHEL6.2 kernel to 2.6.32-220.7.1.el6.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: Ib8149b5fb50dce2f2eb3555be06c4946e763ea93
Reviewed-on: http://review.whamcloud.com/2389
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
12 years agoLU-1016 build: no sub-builds in sub-shells
Bruce Korb [Mon, 12 Mar 2012 23:54:49 +0000 (16:54 -0700)]
LU-1016 build: no sub-builds in sub-shells

The make program paradigm is to have command failures fail the make.
Invoking a failing "make" in a subshell will cause the subshell
to exit returning non-zero to the invoking shell.  However, the
invoking shell will *NOT* exit.  Therefore, to correctly use a
subshell in a make file scriptlet, use the following template:

  ( do-some-stuff ) || false

this will work as expected.  You want "false" instead of "exit 1"
in case make as been invoked with the "-i" ("--ignore-errors")
option.

WRT the code in question, there really is no need of even using
a subshell.  So this patch fixes two (related) things:

1.  the "for subdir in $(RPM_SUBDIR)" is now done in one process
    and will cause the superior make to stop if any subdirectory
    make fails.

2.  The tests for BUILD_TESTS and BUILD_SERVER for building RPMs
    need to take into account the possibility that these are not
    necessarily defined in all autoMakefile.am's that use the
    autoMakefile.am.toplevel file.

Signed-off-by: Bruce Korb <bruce_korb@xyratex.com>
Xyratex-bug-id: MRP-361
Change-Id: Icbfd453d42a69a2b65d66677e02d89f746533121
Reviewed-on: http://review.whamcloud.com/2012
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
12 years agotag 2.2.51 2.2.51 v2_2_51_0
Oleg Drokin [Mon, 9 Apr 2012 20:51:26 +0000 (16:51 -0400)]
tag 2.2.51

Change-Id: Ief1b53a52c1b7e6512004b1ca73ea32d09419ccc
Signed-off-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1134 test: can not assume lustre setup before nfs test
Minh Diep [Mon, 12 Mar 2012 20:42:15 +0000 (13:42 -0700)]
LU-1134 test: can not assume lustre setup before nfs test

During autotest, lustre can be unmounted. parallel-scale-nfs
test should not assume that lustre is mounted and skip the setup.

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I79bd995efd9f08b27ec8c08ac7087be78d578a36
Reviewed-on: http://review.whamcloud.com/2218
Tested-by: Hudson
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-911 defs: XATTR_NAME_FID defition
Alex Zhuravlev [Mon, 12 Dec 2011 17:11:08 +0000 (20:11 +0300)]
LU-911 defs: XATTR_NAME_FID defition

to be used by OFD later to store back pointer
to MDS object referencing this OST object.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I5c7b4838efa9064eedf6c530d9eb54bed9e602fb
Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1839
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-630 lnet: only router checks peer health
Lai Siyao [Mon, 5 Dec 2011 07:28:39 +0000 (15:28 +0800)]
LU-630 lnet: only router checks peer health

The peer health code is designed for router, so a ~rtr node always
assumes peers to be alive.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: Iacdc7359c69e0f172de0914048b35bd6fe06133e
Reviewed-on: http://review.whamcloud.com/1797
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1200 build: check page_mkwrite parameter
Peng Tao [Fri, 9 Mar 2012 16:08:23 +0000 (00:08 +0800)]
LU-1200 build: check page_mkwrite parameter

In SLES11 SP0 (2.6.27.19-5.1), .page_mkwrite uses struct page *
instead of struct vm_fault * as its second parameter.

Signed-off-by: Peng Tao <peng_tao@emc.com>
Change-Id: I249174b34d90edb31bc3dce79a79da3c795975d5
Reviewed-on: http://review.whamcloud.com/2277
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1160 tests: remove liblustre from default tests
Andreas Dilger [Fri, 2 Mar 2012 06:19:48 +0000 (23:19 -0700)]
LU-1160 tests: remove liblustre from default tests

The liblustre testing is currently failing. Since this functionality
is not being used by any (or at least not many?) users since it is
no longer used for the Cray Catamount compute clients, the liblustre
testing should be removed from automated test runs.

Until the test can be fixed this test can be re-enabled. As yet,
the liblustre code will not be removed from the tree.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I916994b71a60e0f8596b7babb69c67a8b2bebc73
Reviewed-on: http://review.whamcloud.com/2244
Tested-by: Hudson
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1227 tests: mds-survey.sh should check ost's space
Minh Diep [Fri, 23 Mar 2012 00:40:30 +0000 (17:40 -0700)]
LU-1227 tests: mds-survey.sh should check ost's space

When we run the test with stripe_count=1, we need to
reduce the file_count to be the min of both mdt's inode
and ost's inode

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I04a558c277ebf9a1e1526a7d507faab8b66e740c
Reviewed-on: http://review.whamcloud.com/2372
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1156 ldlm: per-export waiting flock lists for deadlock detection
Vitaly Fertman [Thu, 1 Mar 2012 16:50:05 +0000 (20:50 +0400)]
LU-1156 ldlm: per-export waiting flock lists for deadlock detection

replace 1 common list of flocks with 1 common spinlock by per-export
list with per-export lock

Change-Id: Ib59c1b4e0e3d08e07505bdfffc007ac2850e9258
Xyratex-Bug-ID: MRP-382
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Andriy Skulysh <andriy_skulysh@xyratex.com>
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-on: http://review.whamcloud.com/2239
Tested-by: Hudson
Reviewed-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1245 lprocfs: use correct cpu number
Bobi Jam [Tue, 27 Mar 2012 02:50:06 +0000 (10:50 +0800)]
LU-1245 lprocfs: use correct cpu number

Take care of correct cpu number in lprocfs_stats_collector().

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ifb149f64ee6d5b67a029331c0d0452fc29533c6b
Reviewed-on: http://review.whamcloud.com/2384
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1254 iokit: should not use single '[]'
Minh Diep [Fri, 23 Mar 2012 01:06:06 +0000 (18:06 -0700)]
LU-1254 iokit: should not use single '[]'

Single [] checking for empty variable is dangerous.
When the variable is undefined, it will fall through
without double quote

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: Iec49cd704be8d106cce07032dc20f060f6044e8a
Reviewed-on: http://review.whamcloud.com/2373
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-352 obdfilter: fix obdfilter-survey to work on verify mode.
Alexander.Boyko [Thu, 15 Mar 2012 06:14:27 +0000 (14:14 +0800)]
LU-352 obdfilter: fix obdfilter-survey to work on verify mode.

With r/o cache landing lctl test_brw command needs to choose a type
of operation with backend device. osc needs to use obd_brw mode,
but obdfilter doesn't work in that mode. It needs to force to use a
obd_prep + obd_commit more.

Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Xyratex-bug-id: MRP-131, MRP-277
Change-Id: I562784b3e9fe537929e78e0197256949cb27a9e1
Reviewed-on: http://review.whamcloud.com/598
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-80 utils: add "-c <stripe_count>" option to lfs_migrate
Yu Jian [Thu, 29 Mar 2012 10:16:28 +0000 (18:16 +0800)]
LU-80 utils: add "-c <stripe_count>" option to lfs_migrate

Add "-c <stripe_count>" option to lfs_migrate to support
restriping the file with a specified stripe count. A sanity
test case was also added to check this option.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Ia86d2417cfa7d08a424ef325c9b3a4509abfc87f
Reviewed-on: http://review.whamcloud.com/2247
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
12 years agoLU-911 obdclass: la_from_obdo helper
Alex Zhuravlev [Fri, 25 Nov 2011 07:39:49 +0000 (10:39 +0300)]
LU-911 obdclass: la_from_obdo helper

- OFD will need la_from_obdo() conversion.
- Fix obdo_from_la() to work with la flags.
- Call obdo_set_parent_fid() directly when needed instead of
  using obdo_from_inode() just to update parent fid
- Make obdo_from_inode() consistent with its name and don't
  update parent FID from.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib1a7d0a4a3e19434ae48c74b06b153d2fc5e5d78
Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1848
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-447 lnet: add lctl --net XXX push
James Simmons [Fri, 30 Mar 2012 12:50:09 +0000 (08:50 -0400)]
LU-447 lnet: add lctl --net XXX push

Lctl --net XXX push is used to clear out purgatory conns arbitrarily.
We use this with lctl --net XXX disconnect for regression testing.
This does not nuke the peer, so it shouldn't yield lnd_query failures
like del_peer does.

Change-Id: Ib47bde4497b8ef49deb6bbfa0c4d8f5b40470c5e
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/1003
Reviewed-by: Cory Spitz <spitzcor@cray.com>
Tested-by: Hudson
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1255 tests: pass $DBENCH_LIB to run_dbench.sh
Yu Jian [Fri, 23 Mar 2012 10:02:11 +0000 (18:02 +0800)]
LU-1255 tests: pass $DBENCH_LIB to run_dbench.sh

This patch does:
1) pass the values of $DBENCH_LIB and $DBENCH_SRC to run_dbench.sh
2) redirect the output of tar directly into the $LOG file instead of
   messing up the test output
3) check the $LOGDIR directory inside gather_logs() in case
   this function was called before init_logging()
4) fix check_logdir() and check_write_access() to avoid using
   node.$(hostname -s).yml files which should not be deleted

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I32350bfe3481614a2e5de7d5e7c254b09bd7e774
Reviewed-on: http://review.whamcloud.com/2376
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1244 obdecho: destroy ost objects for md echo client.
wangdi [Wed, 21 Mar 2012 00:27:55 +0000 (17:27 -0700)]
LU-1244 obdecho: destroy ost objects for md echo client.

Since md echo client connects MDT directly, and there are no
lov for echo client, so it will destroy the ost object in
mdd_unlink directly.

In setxattr test, it should set another EA, instead of LOV,
which would cause problem in the following test.

Reset valid before unlink and getattr.

Signed-off-by: Di Wang <di.wang@whamcloud.com>
Change-Id: Id3da42fac4af944ceef7db34f13e8f2b40f733b6
Reviewed-on: http://review.whamcloud.com/2356
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1137 ldlm: fix for the flock handling for 1.8 clients
Alexey Lyashkov [Fri, 24 Feb 2012 10:47:37 +0000 (02:47 -0800)]
LU-1137 ldlm: fix for the flock handling for 1.8 clients

The current fix intended to fix the issue with incorrect flock
owner field filling. This issue observed when 1.8 clients
(and with lesser version) doesn't fill the owner field correctly.
With this patch this filling integrated on the 2.x server side.

Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andriy Skulysh <andriy_skulysh@xyratex.com>
Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Signed-off-by: Iurii Golovach <iurii_golovach@xyratex.com>
Xyratex-bug-id: MRP-413
Change-Id: I88ba40eb9cb74d07b90862801669028c5dc94e08
Reviewed-on: http://review.whamcloud.com/2193
Reviewed-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-709 build: Remove last bit of HAVE_GFP_T
James Simmons [Fri, 30 Mar 2012 12:44:34 +0000 (08:44 -0400)]
LU-709 build: Remove last bit of HAVE_GFP_T

The build fails when using a external OFED stack due to the
lack of HAVE_GFP_T. This test is no longer needed for newer
kernels.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I6957750736036d6a5150e85442565859e04ce975
Reviewed-on: http://review.whamcloud.com/2417
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-673 llite: Add some metadata stats, fix some file stats.
John L. Hammond [Mon, 12 Mar 2012 19:45:13 +0000 (14:45 -0500)]
LU-673 llite: Add some metadata stats, fix some file stats.

Add LPROC_LL_CREATE, LPROC_LL_LINK, LPROC_LL_UNLINK, LPROC_LL_SYMLINK,
LPROC_LL_MKDIR, LPROC_LL_RMDIR, LPROC_LL_MKNOD, and LPROC_LL_RENAME
for successful calls to the corresponding directory inode operations.

Add LPROC_LL_READDIR for successful calls to ll_readdir().

Tally LPROC_LL_OPEN if and only if the call succeeds.  Under the
previous behavior, opens of a file that was already open locally with
the same flags were not tallied.

Do not tally LPROC_LL_SETATTR when the setattr is from truncate() or
truncate from open().

Tally LPROC_LL_TRUNC when appropriate in ll_setattr_raw(), but remove
tallies in ll_truncate() and vvp_io_init().  Under the previous
behavior, a single call to truncate() caused LPROC_LL_TRUNC to be
tallied 3 times (and similarly for truncate from open()).

Remove the unused stats LPROC_LL_WB_WRITEPAGE, LPROC_LL_WB_PRESSURE,
LPROC_LL_WB_OK, LPROC_LL_WB_FAIL, LPROC_LL_LOCKLESS_TRUNC,
LPROC_LL_DIRECT_READ, LPROC_LL_DIRECT_WRITE, LPROC_LL_LOCKLESS_READ,
and LPROC_LL_LOCKLESS_WRITE.

Change-Id: Id286a6eb986088ea109da2e6c6e31b9d21a34562
Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Reviewed-on: http://review.whamcloud.com/1360
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-911 osd: support for legacy OST objects in ldiskfs osd
Mikhail Pershin [Thu, 15 Mar 2012 19:14:26 +0000 (23:14 +0400)]
LU-911 osd: support for legacy OST objects in ldiskfs osd

ldiskfs osd maintains O/ directory: recognize IDIFs and use O/
to lookup/create such objects by ldiskfs/vfs means.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I76207e5e0540c51923ceaa32a37e4b7a998b624e
Reviewed-on: http://review.whamcloud.com/1836
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-506 kernel: remove unnecessary memset from autoconf test
yangsheng [Thu, 22 Mar 2012 02:16:14 +0000 (10:16 +0800)]
LU-506 kernel: remove unnecessary memset from autoconf test

Eliminate memset() usage from config check. It may introduces
its own compiler error on some systems.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I1e6eae772782b3dbeab75230bfa41e781c4c4028
Reviewed-on: http://review.whamcloud.com/2336
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-812 compat: file_operations.fsync needs 4 arguments
Wally Wang [Fri, 9 Mar 2012 18:39:49 +0000 (10:39 -0800)]
LU-812 compat: file_operations.fsync needs 4 arguments

Linux 3.0 file_operations.fsync needs 4 arguments.

Change-Id: I1e376f35edb87e9eaa0feb82e69905f04ec8ee93
Signed-off-by: Wally Wang <wang@cray.com>
Reviewed-on: http://review.whamcloud.com/1950
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-989 ldlm: Fix client's import destruction
Andriy Skulysh [Fri, 13 Jan 2012 14:08:57 +0000 (16:08 +0200)]
LU-989 ldlm: Fix client's import destruction

Move client's import destruction from disconnect to cleanup phase
The patch allows to use connect after disconnect.

Xyratex-bug-id: MRP-288
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Change-Id: I984660a2917a7e4d5c95cd8288dd6974a7c3ccba
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-on: http://review.whamcloud.com/1963
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>
12 years agoLU-354 test: Change dev_set_rdonly() check to warning
Brian Behlendorf [Fri, 9 Mar 2012 23:08:55 +0000 (15:08 -0800)]
LU-354 test: Change dev_set_rdonly() check to warning

The dev_set_rdonly() symbol is only required to fence I/O
from the underlying device for testing.  This patch is not
strictly required to build a lustre release.

In addition, this change updates the dt_ro callback to
potentially return an error code.

Change-Id: I35b0a120087845e2a57c9df6c3e1de5b9e4b6ff7
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/1872
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1146 build: update script to refresh copyright
Andreas Dilger [Fri, 2 Mar 2012 02:27:42 +0000 (19:27 -0700)]
LU-1146 build: update script to refresh copyright

Update the script for batch processing of copyright messages so that
it can add new copyright messages in addition to replacing existing
copyright messages.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I4d8fe306da7444e9d75214e9fc314a42f4aef345
Reviewed-on: http://review.whamcloud.com/2241
Tested-by: Hudson
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-709 build: clean up LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP
Peng Tao [Tue, 24 Jan 2012 05:00:30 +0000 (13:00 +0800)]
LU-709 build: clean up LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP

grab_cache_page_nowait_gfp does not exist from v2.6.18 to
latest kernel. HAVE_ADD_TO_PAGE_CACHE_LRU is checked twice

Signed-off-by: Peng Tao <peng_tao@emc.com>
Change-Id: I95b8ba91b357c5803613927fce41804f1ad6adf8
Reviewed-on: http://review.whamcloud.com/2326
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-709 build: cleanup two unused macros
Peng Tao [Sat, 25 Feb 2012 05:14:57 +0000 (13:14 +0800)]
LU-709 build: cleanup two unused macros

1. HAVE_MAPPING_CAP_WRITEBACK_DIRTY is not used due to remove of
   LC_EXPORT_FILEMAP_FDATAWRITE_RANGE
2. HAVE_VFS_SYMLINK_5ARGS is not used

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I28383c00087da1b88694770436aab06149e7b8f9
Reviewed-on: http://review.whamcloud.com/2325
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-709 build: clean up libcfs/autoconf/lustre-libcfs.m4
Peng Tao [Fri, 27 Jan 2012 20:27:11 +0000 (04:27 +0800)]
LU-709 build: clean up libcfs/autoconf/lustre-libcfs.m4

1. cpu_online is found from v2.6.18 to latest
2. gfp_t is always defined from v2.6.18 to latest
3. HAVE_SCHED_SHOW_TASK is not used
4. task_struct has rcu field since v2.6.16
5. panic_notifier_list is atomic since v2.6.18
6. HAVE_NLMSG_MULTICAST_5ARGS is not used
7. HAVE_NETLINK and HAVE_NETLINK_NL2 are not used
8. kernel has kmem_cache from v2.6.18 to latest
9. HAVE_NETLINK_NS and HAVE_NETLINK_CBMUTEX is not used

Signed-off-by: Peng Tao <peng_tao@emc.com>
Change-Id: Ib10d4b9f19f96aa85f9be4d6f2dbaa7fb4cbbc34
Reviewed-on: http://review.whamcloud.com/2328
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-974 protocol: change OBD_CONNECT_GRANT_PARAM
Andreas Dilger [Tue, 13 Mar 2012 19:26:05 +0000 (13:26 -0600)]
LU-974 protocol: change OBD_CONNECT_GRANT_PARAM

Change the OBD_CONNECT_GRANT_PARAM flag value to avoid conflict
with the OBD_CONNECT_UMASK flag from LU-974.  While that patch is
not yet landed to our release tree, it is in use in production at
some customers.  While the risk of conflict is currently low, it
is easier to change the GRANT_PARAM value since only in use on the
orion branch, and isn't even handled by the client there yet.

Add (hopefully) clear comments for OBD_CONNECT and obd_connect_data
to ensure that they are not modified in some incompatible way across
branches.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I503892c3b595c0272b0941fa58a16a49631ecab0
Reviewed-on: http://review.whamcloud.com/2297
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-836 ldiskfs: require ldiskfs filesystem has journal
Andriy.Skulysh [Tue, 30 Aug 2011 08:42:31 +0000 (11:42 +0300)]
LU-836 ldiskfs: require ldiskfs filesystem has journal

Add check for journal presence during ldiskfs mount

Xyratex-Bug-Id: MRP-118
Change-Id: If26005f7b597ed8815991fac7cda80e1df2f36e9
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-on: http://review.whamcloud.com/1687
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>