Whamcloud - gitweb
fs/lustre-release.git
7 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>
7 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>
7 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>
7 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>
7 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 years agoLU-1166 recovery: don't leak a connected client counter.
Alexey Lyashkov [Mon, 5 Mar 2012 16:17:19 +0000 (20:17 +0400)]
LU-1166 recovery: don't leak a connected client counter.

target_handle_connect vs client eviction race may leak a
connected client counter and some evicted clients will counted twice.

Xyratex-bug: MRP-451

Change-Id: Id35baae16ae09bc3647d089b45b95e967582d09b
Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-on: http://review.whamcloud.com/2255
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-884 osc: remove unlikely() marker for checksums
Andreas Dilger [Sat, 25 Feb 2012 23:06:39 +0000 (16:06 -0700)]
LU-884 osc: remove unlikely() marker for checksums

When the bulk RPC checksums were originally introduced they were
disabled by default, and marked with an unlikely() annotation for
the compiler to optimize branch prediction.  Checksums are now
enabled by default, so this compiler annotation is incorrect.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ib1d5c09da732224dfd331c1ce07a252a441ed549
Reviewed-on: http://review.whamcloud.com/2197
Reviewed-by: Jinshan Xiong <jinshan.xiong@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>
8 years agoLU-808 llite: deny truncate beyond user rlimit
Andreas Dilger [Mon, 31 Oct 2011 20:14:27 +0000 (14:14 -0600)]
LU-808 llite: deny truncate beyond user rlimit

Add a call to inode_newsize_ok() in ll_setattr_raw() to ensure
that the file is not truncated beyond the VFS/VM maximum limits
or the user maximum file size, as set by rlimit.

Replace the PAGE_CACHE_MAXBYTES constant with MAX_LFS_FILESIZE,
which is already defined by the VFS.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I6b4f03820dd59d6b1c3429e9bbfea62c50206cc9
Reviewed-on: http://review.whamcloud.com/1635
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-812 compat: clean up mutex lock to use kernel mutex primitive
Wally Wang [Tue, 28 Feb 2012 20:19:43 +0000 (12:19 -0800)]
LU-812 compat: clean up mutex lock to use kernel mutex primitive

Linux has removed DECLARE_MUTEX and init_MUTEX/_LOCKED which
were defined with semaphore functions. Instead of continuing to
map the cfs_mutex_*() functions to semaphore, this patch
maps these functions to existing kernel mutex primitive.

Change-Id: Ie814dd2a04f506b67b20b474c4a04147413d6506
Signed-off-by: Wally Wang <wang@cray.com>
Reviewed-on: http://review.whamcloud.com/1949
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-444 lnet: Add LNetError for S_LND and S_LNET
James Simmons [Mon, 5 Mar 2012 14:28:48 +0000 (09:28 -0500)]
LU-444 lnet: Add LNetError for S_LND and S_LNET

This changes the console error string for LND and LNET subsystem
messages to LNet or LNetError depending on the severity. This
should make it much easier to figure out where the issues are.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ibd5f5c4cd717d2c9b6bd865e7e13258e84cda821
Reviewed-on: http://review.whamcloud.com/990
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-433 ldiskfs: remove jbd2-jcberr patch from kernel
Brian Behlendorf [Fri, 9 Mar 2012 22:12:12 +0000 (14:12 -0800)]
LU-433 ldiskfs: remove jbd2-jcberr patch from kernel

Remove the AC_MSG_ERROR for kernels which don't export either
the jbd2_journal_callback_set or journal_callback_set symbols.
These are no longer required if your building against ext4
and thus should not cause a failure at configure time.

Change-Id: I09151d6eaf409627bdcd31abf5b8a1826e1f3355
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/2278
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-1047 utils: mkfs shouldn't create loopback files in /dev
Johann Lombardi [Fri, 27 Jan 2012 21:48:17 +0000 (22:48 +0100)]
LU-1047 utils: mkfs shouldn't create loopback files in /dev

When the target device does not exist, mkfs.lustre shouldn't assume
that the user wants to create a loopback file under /dev.

This patch also fixes some error msgs printed by mkfs.lustre:
mkfs.lustre: Unable to create backing store: 2
mkfs.lustre: Unable to truncate backing store: 2

to be instead:
mkfs.lustre: Unable to create backing store: No such file or directory
mkfs.lustre: Unable to truncate backing store: No such file or
             directory

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I5f4393a47d06e5b7bde7745b38a938dcd2eb7ecd
Reviewed-on: http://review.whamcloud.com/2035
Reviewed-by: Andreas Dilger <adilger@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>
8 years agoLU-787 clio: ftruncate shouldn't block when grouplock is hold
Johann Lombardi [Thu, 2 Feb 2012 13:21:22 +0000 (14:21 +0100)]
LU-787 clio: ftruncate shouldn't block when grouplock is hold

Pass the file descriptor used by ftruncate to the CLIO stack so that
ccc_io_one_lock_index() can use the group lock when appropriate (i.e.
when LL_FILE_GROUP_LOCKED is set).

This patch also adds a regression test for this issue.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Signed-off-by: Jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I81828cc63bb40586cc1155a58c00e3dab1100ec3
Reviewed-on: http://review.whamcloud.com/2081
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>
8 years agoLU-92 files and dirs missing in dist tarball
Brian J. Murrell [Tue, 22 Feb 2011 19:47:32 +0000 (14:47 -0500)]
LU-92 files and dirs missing in dist tarball

Some files and dirs are missing in the "dist" tarball.

Change-Id: I24d4cb2c294850192d504eb49193fdf62df06a6a
Signed-off-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/356
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Michael MacDonald <mjmac@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1110 fid: add full support for open-by-fid
Lai Siyao [Wed, 29 Feb 2012 04:44:54 +0000 (12:44 +0800)]
LU-1110 fid: add full support for open-by-fid

Op-by-fid which involves parent change are not permitted:
        link/unlink/rename/create/open(CREATE)
return -EPERM directly in case dt operations are triggered, but obf
object doesn't have disk object, which will panic.

Add more sanity tests for op-by-fid.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I10869923e861ac0165886a48880f58e1269554ec
Reviewed-on: http://review.whamcloud.com/2224
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Faccini Bruno <bruno.faccini@bull.net>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-611 tests: clean up code style in tests/lfs
Andreas Dilger [Thu, 26 Jan 2012 11:31:15 +0000 (04:31 -0700)]
LU-611 tests: clean up code style in tests/lfs

Make existing "lfs {find,getstripe,setstripe}" tests more consistent.
- whitespace/line wrap/line continuation cleanups
- put the options at the start, and pathnames at the end.
- use $GETSTRIPE and $SETSTRIPE everywhere
- use "getstripe [-c|-i|-S]" instead of parsing verbose output
- use "getstripe -S" instead of "getstripe -s"
- replace uses of "getstripe --offset" with "getstripe --index"

Make sanity test_27z parsing of "lfs getstripe" output more robust:
- do not depend on positional parameters for most output
- use "lfs getstripe [-c|-i|-S]" options to get specific values
- parse OST index/objid/seq on a line-by-line basis
- use debugfs to extract filter_fid info instead of unmount/remount OSTs

Remove duplicate code in test_204 parsing of default/raw striping.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ia90de17e39e38543bcd9bc5a9861533accf6500c
Reviewed-on: http://review.whamcloud.com/2022
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-611 utils: lfs find --stripe-{count,size,index}
Andreas Dilger [Thu, 26 Jan 2012 10:45:20 +0000 (03:45 -0700)]
LU-611 utils: lfs find --stripe-{count,size,index}

Add options to "lfs find" so it can find files by their stripe-count,
stripe-index, and stripe-size. For stripe-index (alias ost-index) it
is possible to specify a comma-separated list of OST indexes. Make the
short options for these consistent between "lfs find", "lfs getstripe"
and "lfs setstripe", keeping the old options for usage compatibility.
Add sanity.sh tests for the new "lfs find -c, -i, -S" options.

Add a verbose deprecation for "lfs {get,set}stripe --offset" (which
is too vague a term) and suggest "lfs {get,set}stripe --index",
which existed since Lustre 1.8.1 and can be used for interop tests.
The prefered long-term option name is --stripe-index, but this is not
available in Lustre 1.8.x and would break interop tests.

Remove deprecated "-v", "-q", and "-r" options from "lfs find".  These
are holdovers from when "lfs find" and "lfs getstripe" were the same
command, and have been verbosely deprecated since the 1.6.4 release.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ia90de17e39e38543bcd9bc5a9861533accf6c158
Reviewed-on: http://review.whamcloud.com/1264
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1148 build: Handle download kernel-devel failure
Brian J. Murrell [Wed, 29 Feb 2012 14:46:58 +0000 (09:46 -0500)]
LU-1148 build: Handle download kernel-devel failure

When the kernel-devel fails to get downloaded with yumdownloader,
emit a meaningful error message rather than just mysteriously exiting.
While it would be nice to actually be able to do something about this
failure programatically, typically it's something that requires
human intervention somewhere.  Or at least more time than we'd rather
have a build blocked for while it's rectified.

Signed-off-by: Brian J. Murrell <brian@whamcloud.com>
Change-Id: I070968f73eb0e78152705e78eedefdc3b6ac8e4f
Reviewed-on: http://review.whamcloud.com/2226
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-911 osd: OI is implemented internally within OSD
Alex Zhuravlev [Mon, 12 Dec 2011 16:16:19 +0000 (19:16 +0300)]
LU-911 osd: OI is implemented internally within OSD

previously lu infrastructure was used and it was impossible
to initialize OI without MDD (which is the case of OST).
instead ldiskfs osd use ldiskfs directly.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Iaca243959dbb83bbbe81145b2ceaaa97f95be70c
Reviewed-on: http://review.whamcloud.com/1835
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-911 osd: zerocopy methods in ldiskfs osd
Alex Zhuravlev [Wed, 23 Nov 2011 07:55:07 +0000 (10:55 +0300)]
LU-911 osd: zerocopy methods in ldiskfs osd

add implementation for zerooopy methods to manipulate data:
grab/release buffers, prepare them for read/write, commit
modified buffers, truncate

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ied662c7c837bb25b71587b69096bc12fe002d115
Reviewed-on: http://review.whamcloud.com/1834
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-958 tests: debug_mb set incorrectly for smp or vm
Denis Kondratenko [Tue, 27 Mar 2012 07:47:51 +0000 (10:47 +0300)]
LU-958 tests: debug_mb set incorrectly for smp or vm

For cpus with number of cores or for some VMs,
number of possible CPUs in the system could
be greater than number of cpu reported by getconf.
Added check for maximum debug buffer size.
Added check that "possible" is exist, if not - use old method.

Xyratex-bug-id: MRP-219 incorrect settings for debug_mb
Signed-off-by: Denis Kondratenko <Denis_Kondratenko@xyratex.com>
Change-Id: I1ea367d1b956ae1009c4a501e0f02b6c9209a2f7
Reviewed-on: http://review.whamcloud.com/2377
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1225 utils: Change %llu to LPU64
Christopher J. Morrone [Fri, 16 Mar 2012 03:12:09 +0000 (20:12 -0700)]
LU-1225 utils: Change %llu to LPU64

%llu in printf should be LPU64 to allow compilation on ppc64.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: Ia0a6adf4220e19802164e6567f3d0c5a24875fe2
Reviewed-on: http://review.whamcloud.com/2338
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1092 ptlrpc: take export refcount during connect
Lai Siyao [Mon, 19 Mar 2012 08:41:54 +0000 (16:41 +0800)]
LU-1092 ptlrpc: take export refcount during connect

In the process of (re)connect,  a refcount of export should be taken,
otherwise disconnect of this export may be called, and it will put
the last refcount of this export and make access to this export
invalid.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: Iaf27e842ed516b8968c90bfce396609e39f52c85
Reviewed-on: http://review.whamcloud.com/2345
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-709 build: clean up four macros in lustre-core.m4
Peng Tao [Sun, 22 Jan 2012 23:58:14 +0000 (07:58 +0800)]
LU-709 build: clean up four macros in lustre-core.m4

1. truncate_inode_pages_range() was added since v2.6.15
2. HAVE_RELEASEPAGE_WITH_GFP is not used
3. HAVE_STATFS_NAMELEN is not used
4. HAVE_D_ADD_UNIQUE is not used

Signed-off-by: Peng Tao <peng_tao@emc.com>
Change-Id: I6864d0f18c14f5087b2d1a0c20fcf14f92d7246f
Reviewed-on: http://review.whamcloud.com/2313
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-911 osd: minor code reorganization
Alex Zhuravlev [Wed, 23 Nov 2011 07:48:03 +0000 (10:48 +0300)]
LU-911 osd: minor code reorganization

to make structures and helpers usable outside of osd_handler.c
in other files (within ldiskfs osd)

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I1b421a0a6ad148dea0e453d8b01942fe63cf1397
Reviewed-on: http://review.whamcloud.com/1833
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoLU-1218 proc: Recovery timer in proc always displays 0
yangsheng [Thu, 15 Mar 2012 16:18:29 +0000 (00:18 +0800)]
LU-1218 proc: Recovery timer in proc always displays 0

Calculate remain recovery time for proc display.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I50c14859c704c7e2bc60b66b3d70350648feebb6
Reviewed-on: http://review.whamcloud.com/2334
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1222 ldlm: Fix the race in AST sender vs multiple arriving RPCs
Oleg Drokin [Tue, 20 Mar 2012 03:43:37 +0000 (23:43 -0400)]
LU-1222 ldlm: Fix the race in AST sender vs multiple arriving RPCs

LU-1046 tried to close this race, but still left a bit of a window open.
Basically when two last RPCs arrive one of them is declared as "last"
and it is the one that would release "rpc" part of the arg refcount.
The problem is the "non last" rpc might actually finish processing later.

To combat this every RPC will now hold its own arg reference.

Change-Id: I0d1e69dc6ea37224422d4c7822bb1e6b9417585b
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2350
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
8 years agoLU-1081 fid: define special FID for BFL
wangdi [Wed, 22 Feb 2012 18:44:35 +0000 (10:44 -0800)]
LU-1081 fid: define special FID for BFL

The sequence of LUSTRE_BFL_FID is in conflict with
FID_SEQ_OST_MDT1, so reserve a new sequence for this FID.

Also it defines a new FID sequence(FID_SEQ_SPECIAL) for
later special purpose.

Move some special dot_lustre oid to lustre_idl.h, so avoid
oid conflict in future.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I556b31c706cc04c610c909f83e59f0cb9a821535
Reviewed-on: http://review.whamcloud.com/2180
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-981 llite: fix loop back device writeback
Jinshan Xiong [Wed, 25 Jan 2012 07:13:26 +0000 (23:13 -0800)]
LU-981 llite: fix loop back device writeback

In vvp_mmap_locks(), we should distinguish if the write is from
loopback device, and to not try to find mmap region in this case.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I4409e460b77576e07e279200ccc69f62cc48ad0f
Reviewed-on: http://review.whamcloud.com/2010
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1212 ptlrpc: ptlrpc_grow_req_bufs is racy
Liang Zhen [Wed, 14 Mar 2012 04:41:08 +0000 (12:41 +0800)]
LU-1212 ptlrpc: ptlrpc_grow_req_bufs is racy

multiple ptlrpc service threads can enter ptlrpc_grow_req_bufs()
the same time if they found "low_water" in ptlrpc_check_rqbd_pool(),
each of these threads will allocate ptlrpc_service::srv_nbuf_per_group
request buffers and could consume all memory.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I83d6fe53a0f86691ae7e2afb3d75fb8677f58688
Reviewed-on: http://review.whamcloud.com/2308
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
8 years agoLU-1206: mdt: Fix error handling in mdt_mfd_open
Oleg Drokin [Thu, 15 Mar 2012 00:56:02 +0000 (20:56 -0400)]
LU-1206: mdt: Fix error handling in mdt_mfd_open

In mdt_mfd_open if the mo_open() call failed or we could not allocate
mfd, we also need to undo write/exec reference count in order to
not mess up with subsequent exec/write accesses.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Change-Id: I3bd98bd68368b48f2afaa7bb450d3a9947c992ac
Reviewed-on: http://review.whamcloud.com/2300
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-827 lov: Implement a per file data_version.
Aurelien Degremont [Tue, 10 Jan 2012 14:27:33 +0000 (15:27 +0100)]
LU-827 lov: Implement a per file data_version.

This patch extends getattr RPC to also send in its reply a data
version for the file content.  This only tracks data object changes.
This does not track chown/chmod on OST object.  This value is intended
to be only compared for equality.  A new call in liblustreapi is
available and through 'lfs data_version'.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I5d748e096b11627c05f86ef6f3f6906bce120893
Reviewed-on: http://review.whamcloud.com/1671
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1070 agl: update lock state when AGL upcall
Fan Yong [Mon, 20 Feb 2012 10:37:36 +0000 (18:37 +0800)]
LU-1070 agl: update lock state when AGL upcall

The AGL RPC sponsor may exits the cl_lock processing without
wait() called before related OSC lock upcall(). So when AGL
upcall(), it needs to update the cl_lock state according to
the enqueue result through the general cl_lock API wait().

Originally, it is done in "lov_lock_unuse()" against toplock.
But osc_lock upcall() is against sublock. So the sublock state
may be un-updated and inconsistent with the low layer osc_lock
state, then causes the sublock cannot be cached.

On the other hand, cl_lock::cll_descr::cld_enq_flags should not be
changed during unuse() for passing parameter, as the replacement,
it can be done through cl_lock::cll_flags.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I4bc4c0ef0b93d5e0c2e59304158a35c57635ad70
Reviewed-on: http://review.whamcloud.com/2099
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-734 tests: add sub-tests into recovery-*-scale tests
Yu Jian [Wed, 7 Mar 2012 14:45:27 +0000 (22:45 +0800)]
LU-734 tests: add sub-tests into recovery-*-scale tests

This patch adds sub-tests into the recovery-*-scale tests
so that test results and logs could be gathered properly
and uploaded to Maloo.

The patch also does some cleanup works on the test scripts
and moves some common functions into test-framework.sh.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I2c23b641e62a56882171982b8a3157ba023ea36c
Reviewed-on: http://review.whamcloud.com/2265
Tested-by: Hudson
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-969 debug: reduce stack usage
Hongchao Zhang [Mon, 12 Mar 2012 08:11:47 +0000 (16:11 +0800)]
LU-969 debug: reduce stack usage

1, libcfs_debug_vmsg2 to accept libcfs_debug_msg_data struture
   to replace SUBSYSTEM, __FILE__, __FUNCTION__, __LINE__ and
   cdls on the stack

2, CDEBUG, DEBUG_CAPA use static libcfs_debug_msg_data

3, remove the local variable in RETURN/GOTO/__CHECK_STACK

4, reduce stack in recovery thread by moving lu_env,
   ptlrpc_thread to heap.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: I4a66d18d956ea4526ac85794d17305bde67f5634
Reviewed-on: http://review.whamcloud.com/2162
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1082 test: create test for mds-survey
Minh Diep [Mon, 12 Mar 2012 17:17:19 +0000 (10:17 -0700)]
LU-1082 test: create test for mds-survey

Create a mds-survey.sh test with two test cases
1. test without stripe count
2. test with stripe count
Create test_224[a|b] for quick run on metadata survey

Notice, we remove all clients before testing
because the real client and echo_client share
the same client object memory

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I453ac34d8b6019e109be5d89d482300d31571f93
Reviewed-on: http://review.whamcloud.com/2156
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1198 idl: move FID VER to DLM resource name[1]
Andreas Dilger [Thu, 8 Mar 2012 07:29:09 +0000 (15:29 +0800)]
LU-1198 idl: move FID VER to DLM resource name[1]

Until Lustre 1.8.7/2.1.1 the FID version was packed into name[2].

However, this leaves very little room in the LDLM resource name
for other uses.  The upcoming quota code needs to store another
FID into the LDLM resource to allow directory tree quotas, and
managed by the DLM.

The 32-bit VER, which is currently always 0, is moved into the high
bits of name[1] along with the 32-bit OID, to avoid consuming the
name[2] field.  Since future use of the FID version (including
snapshots, pools, etc) will need changes on the client side anyway,
there will never be non-zero VER on an existing client.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: If1e500cfb277dfc25bc056bb0c5763e48e7dccdf
Reviewed-on: http://review.whamcloud.com/2271
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1190 test: Test failure on sanity, subtest test_51c.
yangsheng [Thu, 8 Mar 2012 03:08:45 +0000 (11:08 +0800)]
LU-1190 test: Test failure on sanity, subtest test_51c.

Since LU-993 already add test_51ba for rmdir test, So remove test_51c.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: Ib517f83964a877b687a332c7e1ff7a74c79836b6
Reviewed-on: http://review.whamcloud.com/2269
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-734 tests: save recovery-*-scale debug logs into $LOGDIR
Yu Jian [Mon, 5 Mar 2012 08:08:53 +0000 (16:08 +0800)]
LU-734 tests: save recovery-*-scale debug logs into $LOGDIR

This patch changes the specific debug log names of
recovery-*-scale tests and saves them into $LOGDIR.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Id1ad7dd3dde41bd49a53986945d15d80f91718e5
Reviewed-on: http://review.whamcloud.com/2261
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1195 llite: error handling for statahead/AGL start failure
Fan Yong [Thu, 8 Mar 2012 02:47:07 +0000 (10:47 +0800)]
LU-1195 llite: error handling for statahead/AGL start failure

Statahead/AGL status will be checked when release ll_statahead_info.
But if some reasons cause statahead/AGL cannot be started, then the
status are undefined. So need proper error handling for such failure
cases.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I4dec58862ad425c19e9c6284b7183b8bcaa449f6
Reviewed-on: http://review.whamcloud.com/2268
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1155 obdecho: Oops if target device can not be found.
wangdi [Thu, 1 Mar 2012 00:32:23 +0000 (16:32 -0800)]
LU-1155 obdecho: Oops if target device can not be found.

Missing setting error value if target device can not be found,
which will cause Oops in some cases.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I5fc7cd376c8c7c276739692c7234ae142b4f6e23
Reviewed-on: http://review.whamcloud.com/2229
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoMaster is now for upcoming 2.3.0 release 2.2.50 v2_2_50_0
Oleg Drokin [Tue, 6 Mar 2012 07:54:03 +0000 (02:54 -0500)]
Master is now for upcoming 2.3.0 release

Updates changelog and lustre version.
New tag 2.2.50

Signed-off-by: Oleg Drokin <green@whamcloud.com>
Change-Id: I8bbe086bbc8a579749eb7554b902dd83ca5670d0

8 years agoLU-445 lnet: Send timestamps with LNet counters
Wally Wang [Wed, 22 Jun 2011 17:53:03 +0000 (10:53 -0700)]
LU-445 lnet: Send timestamps with LNet counters

We use a millisecond timer on a per-session basis. Each node then
sends the milliseconds since session start over with the LNet
counters. With 32bits and millisecond resolution, this should
allow ~49 days of session age before the timers would wrap.

This will change the wire attribute and not backward compatible.

Change-Id: I0dc6498d187ccc900b86d21b0460e1d419770033
Signed-off-by: Wally Wang <wang@cray.com>
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1000
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: <bruce.korb@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
8 years agoLU-1128 ldlm: return -1 for server pool shrinker
Niu Yawei [Fri, 24 Feb 2012 05:21:51 +0000 (21:21 -0800)]
LU-1128 ldlm: return -1 for server pool shrinker

For ldlm server pool shrinker, we just use it to decrease SLV,
but never reclaim any memory directly, so it should always return
-1 to inform the kernel to break the shrink loop.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I17f51ac84eb0b8c70b2cee9ac7eeca34647c1990
Reviewed-on: http://review.whamcloud.com/2184
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-983 llite: align readahead to 1M after ra_max adjustment
wangdi [Fri, 20 Jan 2012 20:30:37 +0000 (12:30 -0800)]
LU-983 llite: align readahead to 1M after ra_max adjustment

1. Align the readahead pages only if ria_start != 0, otherwise
   the readahead pages will be cut to zero.
2. Add test_101e to verify small reads for small size files.
   Add test_101f to verify max_read_ahead_whole_mb.
3. Port 101c from b1_8

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: Ia22434a5d546aa1154f6067c7db84743c4ff5a96
Reviewed-on: http://review.whamcloud.com/1998
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-164 test: Update testframework to restart sessions at next suite
Chris Gearing [Mon, 27 Feb 2012 10:59:26 +0000 (10:59 +0000)]
LU-164 test: Update testframework to restart sessions at next suite

Update the test framework so that it can append to yaml files rather
than begin a new series and allow auster to begin at a selected
test_suite.

auster has a new switch '-S suite-name' which allows the caller to
start a test group part way through.

The idea behind all of this is that a test session that fails at a
test suite can be restarted at the next suite.

Signed-off-by: Chris Gearing <chris@whamcloud.com>
Change-Id: Ieaa987874d69fa8c33c3af92957e99607a8a7be7
Reviewed-on: http://review.whamcloud.com/414
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Robert Read <rread@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
8 years agoLU-1163 llite: never try to invalidate a dirty page
Jinshan Xiong [Fri, 2 Mar 2012 05:46:18 +0000 (21:46 -0800)]
LU-1163 llite: never try to invalidate a dirty page

When ll_page_mkwrite() detects page's covering lock is being canceled,
it should write the page back before invalidating it. Otherwise, it
will cause data corruption.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I345728daacf50edc154cd434dea392410f8cc782
Reviewed-on: http://review.whamcloud.com/2243
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
8 years agoLU-459 tests: quiet spurious console/test messages
Andreas Dilger [Wed, 25 Jan 2012 23:52:52 +0000 (16:52 -0700)]
LU-459 tests: quiet spurious console/test messages

Quiet a number of frequent and useless messages printed to the test
output and/or the console.  These distract from understanding what
is happening in the test and provide little, if any, value.

The "acl" mount option on the client has been deprecated since 1.8.0,
since it was added in mid-1.6, and is driven by the MDS config only.

Use textual debug/subsystem flags instead of numeric flags.  This has
been possible through all of 1.8, but is deprecated in 2.x so that
we can move to a more sophisticated debug mechanism in the future.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I81bed13c22465dc179e19f5a6714b732d68c500c
Reviewed-on: http://review.whamcloud.com/2015
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>
8 years agoLU-1145 test: add Test-Parameters tag for autotest
Andreas Dilger [Wed, 22 Feb 2012 11:47:28 +0000 (04:47 -0700)]
LU-1145 test: add Test-Parameters tag for autotest

Allow Test-Parameters line to specify extra tests that should be run
to properly validate a change made to code or a regression test.

The Test-Parameters line can be quite long, depending on the number
of parameters specified.  A single set of test parameters can be
split over multiple lines by escaping the linefeed, though the
individual lines should still be kept below the 70-character limit.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I65e1d41ad0f487df3753f25d9111ade9a0af08b1
Reviewed-on: http://review.whamcloud.com/2176
Reviewed-by: <bruce.korb@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Chris Gearing <chris@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1039 ptlrpc: handle bulk IO errors correctly.
Alexey Lyashkov [Thu, 26 Jan 2012 12:39:12 +0000 (16:39 +0400)]
LU-1039 ptlrpc: handle bulk IO errors correctly.

don't panic on incorrect bulk transfer,
correctly handle a bulk request reorder.

LustreError: 12927:0:(client.c:1696:ptlrpc_check_set()) LBUG
Pid: 12927, comm: ptlrpcd-brw

Call Trace:
[<ffffffffa083c865>] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
[<ffffffffa083cea5>] lbug_with_loc+0x75/0xe0 [libcfs]
[<ffffffffa0e2edd6>] ptlrpc_check_set+0x1a66/0x1b90 [ptlrpc]
[<ffffffffa0e61006>] ? ptlrpcd_check+0x46/0x290 [ptlrpc]
[<ffffffffa0e61006>] ? ptlrpcd_check+0x46/0x290 [ptlrpc]
[<ffffffffa0e611b8>] ptlrpcd_check+0x1f8/0x290 [ptlrpc]
[<ffffffffa0e6157b>] ptlrpcd+0x32b/0x3b0 [ptlrpc]
[<ffffffff81056388>] ? finish_task_switch+0x48/0x110
[<ffffffff8105f500>] ? default_wake_function+0x0/0x20
[<ffffffffa0e61250>] ? ptlrpcd+0x0/0x3b0 [ptlrpc]
[<ffffffff8100c2ca>] child_rip+0xa/0x20
[<ffffffff81500b70>] ? _spin_unlock_irq+0x30/0x40
[<ffffffff8100bc10>] ? restore_args+0x0/0x30
[<ffffffffa0e61250>] ? ptlrpcd+0x0/0x3b0 [ptlrpc]
[<ffffffff8100c2c0>] ? child_rip+0x0/0x20

Xyratex-bug-id: MRP-303
Change-Id: Ibb19c33e92dbecf5d029c7e6c567f65fb764f444
Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2023
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
8 years agoLU-335 ldiskfs: SuSE 11 SP1 update for Lustre 2.X
James Simmons [Thu, 16 Feb 2012 14:39:29 +0000 (09:39 -0500)]
LU-335 ldiskfs: SuSE 11 SP1 update for Lustre 2.X

The ext4 code difference between SuSE and RHEL6 is very small.
Because of to this ldiskfs support for SuSE servers is mostly
based the RHEL6 ldisk work. Recently Lustre support migrated
to RHEL6.2 support which required the SuSE port to be updated.
This patch provides this update which works for the SuSE
2.6.32.45 kernel as well as remove some no longer needed
ldsiskfs patches for older SuSE releases.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ia6763e8a35698018bc84c95564ec9ea63d5f2c33
Reviewed-on: http://review.whamcloud.com/2138
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1146 build: batch update copyright messages
Andreas Dilger [Fri, 2 Mar 2012 02:30:30 +0000 (19:30 -0700)]
LU-1146 build: batch update copyright messages

Update copyright messages for all files modified by Whamcloud.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I9654b780c6e4726d369e2a893f7e210d4078819b
Reviewed-on: http://review.whamcloud.com/2242
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-991 llite: cleanup md_readpage interface
wangdi [Tue, 24 Jan 2012 08:08:46 +0000 (00:08 -0800)]
LU-991 llite: cleanup md_readpage interface

Use md_op_data to transfer the parameters of readpage on client
metadata stack.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I103a555094e678711aa2f2e5d73ec848a452aed0
Reviewed-on: http://review.whamcloud.com/2001
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: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1019 ptlrpc: fix ptlrpcd transfer message
Andreas Dilger [Sat, 25 Feb 2012 01:17:55 +0000 (18:17 -0700)]
LU-1019 ptlrpc: fix ptlrpcd transfer message

Fix the debug message when transferring requests between ptlrpcd
threads to correctly identify the source and target thread index.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I330deb92a2ae0c9134dbf24ee6074e0cf9803d31
Reviewed-on: http://review.whamcloud.com/2195
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-949 test: improve sanity test_42e
Niu Yawei [Wed, 21 Dec 2011 04:33:12 +0000 (20:33 -0800)]
LU-949 test: improve sanity test_42e

The sanity test_42e should check that the RPCs with less than 16 pages
are not more than 15%, instead of checking the 16-page RPCs are more
than 85%, because the pages could be merged into even larger(> 16 pages)
RPCs.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I603f9d278b55cd850d66466050745ecb80e2ff02
Reviewed-on: http://review.whamcloud.com/1897
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
8 years agoLU-433 ldiskfs: fix up patch comment for 2.2
Andreas Dilger [Wed, 26 Oct 2011 07:37:59 +0000 (01:37 -0600)]
LU-433 ldiskfs: fix up patch comment for 2.2

The LU-433 patch wasn't landed until 2.2, so this patch is at least
needed to make 2.1->2.2 transition easier.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ia213ae92a8fe21f5153e22b588ff66c8f67439f2
Reviewed-on: http://review.whamcloud.com/1604
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1133 tests: sanity-quota 33 fixes
Andrew Perepechko [Fri, 24 Feb 2012 11:27:51 +0000 (15:27 +0400)]
LU-1133 tests: sanity-quota 33 fixes

sanity-quota test 33 must wait for removal completion
before verifying quota usage correctness

Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Change-Id: Ia9994a41b734a19c0711c201c3b54a38480c33fd
Xyratex-bug-id: MRP-378
Reviewed-by: Alexander Zarochentsev <azarochentsev@xyratex.com>
Reviewed-on: http://review.whamcloud.com/2186
Tested-by: Hudson
Reviewed-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-958 tests: debug_mb set incorrectly for smp or vm
Denis Kondratenko [Fri, 10 Feb 2012 10:54:45 +0000 (12:54 +0200)]
LU-958 tests: debug_mb set incorrectly for smp or vm

For cpus with number of cores or for some VMs,
number of possible CPUs in the system could
be greater than number of cpu reported by getconf.
Added check for maximum debug buffer size.

Xyratex-bug-id: MRP-219 incorrect settings for debug_mb

Reviewed-by: Andrew Perepechko <Andrew_Perepechko@xyratex.com>
Reviewed-by: Alexey Lyashko <Alexey_Lyashko@xyratex.com>
Signed-off-by: Denis Kondratenko <Denis_Kondratenko@xyratex.com>
Change-Id: I7001af7b1c88d5be056734d7d73a0263cca01627
Reviewed-on: http://review.whamcloud.com/1912
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1014 mountconf: MGS should process parameter config
Lai Siyao [Thu, 23 Feb 2012 08:23:25 +0000 (16:23 +0800)]
LU-1014 mountconf: MGS should process parameter config

MGS doesn't have llog config of its own, but it should process
<profile>-params config which is global parameters for the whole
system.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I62147dfff17f28c537d75652b49ed3582b0fa64c
Reviewed-on: http://review.whamcloud.com/2139
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-482 test: sync new fs before first replay test
Andreas Dilger [Tue, 28 Feb 2012 21:15:35 +0000 (14:15 -0700)]
LU-482 test: sync new fs before first replay test

LVM lacks barrier support for kernel < 2.6.33, so we need to send an
explicit sync and sleep to avoid the replay_barrier call in the first
test being run from discarding blocks from just-formatted filesystems.
Otherwise this incorrectly causes just-written metadata to be lost by
the block layer by the dev-read-only failover test code.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I69fc64298603ad75a4fcda09edde5bc7ded00c1e
Reviewed-on: http://review.whamcloud.com/2223
Reviewed-by: Lai Siyao <laisiyao@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>
8 years agoLU-78 o2iblnd: kiblnd_check_conns can deadlock
Liang Zhen [Tue, 21 Feb 2012 04:40:25 +0000 (12:40 +0800)]
LU-78 o2iblnd: kiblnd_check_conns can deadlock

kiblnd_check_conns() called kiblnd_check_sends() with hold of global
rwlock, it's wrong because kiblnd_check_sends() could do many things:
 - call lnet_finalize() which is not safe with hold of spinlock
 - call kiblnd_close_conn() which requires to write_lock the same
   global lock
 - kiblnd_check_sends() might need to allocate NOOP message

It can be fixed by moving call of kiblnd_check_sends out from spinlock
This patch is from the fix of Bug 20288, with some small changes.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Icc9fedc70ecb25b0c41ebaf6d80c971f8281c9c6
Reviewed-on: http://review.whamcloud.com/2166
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1125 recovery: initial recovery thread's watchdog
Bobi Jam [Wed, 22 Feb 2012 06:30:41 +0000 (14:30 +0800)]
LU-1125 recovery: initial recovery thread's watchdog

Recovery thread does not have watchdog attached, correctly initialize
it.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I6993c39bbf18f47e9ccd965a5d2ba1919cfb7736
Reviewed-on: http://review.whamcloud.com/2174
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1109 llite: do splice read stripe by stripe
Jinshan Xiong [Thu, 23 Feb 2012 19:57:54 +0000 (11:57 -0800)]
LU-1109 llite: do splice read stripe by stripe

If nfsd is reading an across stripe buffer, and if the first stripe
happens to be 64KB(PIPE_BUFFERS*PAGE_SIZE), then first read will
occupy all pipe buffers and this makes nfsd stuck if it reads the
next stripe immediately.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I13cb54b37f738ee3c081dff1929630ea523b77fd
Reviewed-on: http://review.whamcloud.com/2182
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>
8 years agoLU-1132 protocol: reserve connect flags for new features
Johann Lombardi [Wed, 13 Jul 2011 23:05:32 +0000 (01:05 +0200)]
LU-1132 protocol: reserve connect flags for new features

This patch reserves connect flags for several outstanding features:
* OBD_CONNECT_GRANT_PARAM for grant additional parameters to consume
grant more intelligently on the client side.
* OBD_CONNECT_JOBSTATS to pass a job id in ptlrpc_body.
* OBD_CONNECT_EINPROGRESS for clients that can deal with EINPROGRESS
on write.

This patch also reserves fields for the per-file data_version patch
from LU-827.

Change-Id: Icb55435bca443b4c2106e7eec9b368f94d1be08c
Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1090
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1069 mdc: Avoid doing permission check again.
yangsheng [Wed, 15 Feb 2012 05:57:50 +0000 (13:57 +0800)]
LU-1069 mdc: Avoid doing permission check again.

inode_setattr() replaced by simple_setattr(). The latter
will invoke inode_change_ok(). It causes a -EPERM error when
we want to update inode timestamps.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I29c58d7027df1bf94db58df82e5214fd12ea5c87
Reviewed-on: http://review.whamcloud.com/2145
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>
8 years agoLU-1098 debug: lower debug message level
Bobi Jam [Tue, 21 Feb 2012 01:23:11 +0000 (09:23 +0800)]
LU-1098 debug: lower debug message level

File info read and unlink race is normal, we'd lower the debug message
level since a lot of unnecessary unmasked messages will be generated
if mdt_object_find() cannot find those deleted objects.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I7630e6a1456ffb435c8e67cc626bf38547b840d0
Reviewed-on: http://review.whamcloud.com/2165
Tested-by: Hudson
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-719 ldiskfs: fix error message rate-limiting logic in kmmpd
Nikitas Angelinas [Tue, 14 Feb 2012 09:07:54 +0000 (09:07 +0000)]
LU-719 ldiskfs: fix error message rate-limiting logic in kmmpd

Current logic would print an error message only once, and then
'failed_writes' would stay at 1. Rework the loop to increment
'failed_writes' and print the error message every
s_mmp_update_interval * 60 seconds, as intended according to the
comment.

Signed-off-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Change-Id: I0c8d90927bd618542026ab5fc70cf12b85898dc3
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Xyratex-bug-id: MRP-222
Reviewed-on: http://review.whamcloud.com/1420
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoLU-1028 tests: re-enable sanityn.sh test_16 (fsx)
Andreas Dilger [Tue, 24 Jan 2012 20:22:08 +0000 (13:22 -0700)]
LU-1028 tests: re-enable sanityn.sh test_16 (fsx)

The sanityn.sh version of fsx in test_16 provides useful test
coverage because it is running an IO load that is doing unaligned
file access from multiple clients (mountpoints) and also verifying
data correctness.  This has exposed several bugs in the orion branch,
and should also be enabled by default for all landings on master.

A longer version of the test is run in sanity-benchmark.sh for
better test coverage.  Check that fsx completes successfully,
otherwise it may fail without reporting an error to the test
framework.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I26dd91cacc2596f6e84f4c32362befa1e339cab0
Reviewed-on: http://review.whamcloud.com/2007
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>
8 years agoLU-1120 kernel: kernel update [RHEL6.2 2.6.32-220.4.2]
yangsheng [Sun, 19 Feb 2012 13:14:00 +0000 (21:14 +0800)]
LU-1120 kernel: kernel update [RHEL6.2 2.6.32-220.4.2]

Update RHEL6.2 kernel to 2.6.32-220.4.2.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: If4d63c32776452fcb615b8ed196cc3f037b07dfa
Reviewed-on: http://review.whamcloud.com/2163
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-819 utils: Fix lfs getstripe -M
wangdi [Fri, 4 Nov 2011 06:00:05 +0000 (23:00 -0700)]
LU-819 utils: Fix lfs getstripe -M

1. Fix lfs getstripe -M problem: some typo in llapi_file_fget_mdtidx.
2. Add lfs find -mdt and lfs mdts.
3. Add sanity test to check lfs getstripe -M and lfs find -mdt.

Signed-off-by: wangdi <di.wang@whamcloud.com>
Change-Id: I3b327d33c49009149dbed23728416efecb67691c
Reviewed-on: http://review.whamcloud.com/1646
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1051 osd: reserve less credits for llog unlink
Niu Yawei [Mon, 6 Feb 2012 06:02:07 +0000 (22:02 -0800)]
LU-1051 osd: reserve less credits for llog unlink

Reserve less credits for the llog write and catalog header udpate.
Since we can't get the llog inode in osd declare function, we use
a temporary solution: hack the 'size' parameter to indicate a llog
write or catalog header udpate.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ic5df00a878cdbf64a44b22b684e2c6b2dff83b07
Reviewed-on: http://review.whamcloud.com/2100
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoTag 2.1.56 2.1.56 v2_1_56_0
Oleg Drokin [Sat, 18 Feb 2012 05:44:13 +0000 (00:44 -0500)]
Tag 2.1.56

Change-Id: I87d5cf42ad646a393fde8743b7153251820c3719
Signed-off-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1084 ptlrpc: Change CWARNs to CDEBUGs
Christopher J. Morrone [Sat, 11 Feb 2012 01:34:32 +0000 (17:34 -0800)]
LU-1084 ptlrpc: Change CWARNs to CDEBUGs

These messages should not appear on the console.  A sysadmin
will have no idea what to make of most of them.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: I58bbc1eca9f5082d08cee6c5a95793c0f64ef370
Reviewed-on: http://review.whamcloud.com/2135
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-633 iokit: mds-survey script for MD echo client test
Minh Diep [Wed, 7 Dec 2011 00:38:54 +0000 (16:38 -0800)]
LU-633 iokit: mds-survey script for MD echo client test

Create a mds-survey script to run echo client for MDS

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I425438aa294d8d4360c28f686296ff7f26f847ea
Reviewed-on: http://review.whamcloud.com/1969
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
8 years agoLU-1054 kernel: Kernel update [RHEL6.2 2.6.32-220.4.1.el6]
yangsheng [Tue, 31 Jan 2012 01:25:07 +0000 (09:25 +0800)]
LU-1054 kernel: Kernel update [RHEL6.2 2.6.32-220.4.1.el6]

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

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: Ife086ef0a8c521373434b02ff4e49dab85b9627c
Reviewed-on: http://review.whamcloud.com/2058
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1050 o2iblnd: fix checking order of rdma_create_id() argument
Shuichi Ihara [Mon, 13 Feb 2012 16:47:38 +0000 (01:47 +0900)]
LU-1050 o2iblnd: fix checking order of rdma_create_id() argument

Replace rdma_create_id() with rdma_destroy_id() in
openib gen2 test and four argument check moves to
the back of openib test.

Signed-off-by: Shuichi Ihara <sihara@ddn.com>
Change-Id: I0782183f15f58647291518a4222610601083c369
Reviewed-on: http://review.whamcloud.com/2097
Tested-by: Hudson
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-1028 osc: fix grant checking on the osc side
Jinshan Xiong [Sat, 28 Jan 2012 22:43:47 +0000 (14:43 -0800)]
LU-1028 osc: fix grant checking on the osc side

If there is no available grant on the client side, but exists dirty
pages, we should issue BRW rpc and wait for more grants.

Another changes is about lost_grant: if dirty pages were truncated,
grants will be returned to client, instead of the target having
allocated them.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I50791554807dddfafafcd2b8d228958ebfa3ac16
Reviewed-on: http://review.whamcloud.com/2037
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-1075 tests: auster detect directory as script name
Minh Diep [Mon, 6 Feb 2012 23:02:56 +0000 (15:02 -0800)]
LU-1075 tests: auster detect directory as script name

Auster should use -f or detect the existing of
script name rather use -e which will treat directory
same as script
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: Idba7b5a25cd48a513e9db885fb7399deff62827f
Reviewed-on: http://review.whamcloud.com/2104
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>