Whamcloud - gitweb
fs/lustre-release.git
8 years agoLU-590 tests: obdfilter-survey.sh fails test 2a.
Andriy Skulysh [Thu, 5 Jan 2012 13:04:14 +0000 (15:04 +0200)]
LU-590 tests: obdfilter-survey.sh fails test 2a.

obdfilter-survey.sh fails to connect during test 2a.
Interruption to and restart of test leads to a panic.
This patch sets correct target for netdisk case, allows to
handle signals in test scripts, sets correct parameters for
obdfilter-survey cleanup.

Xyratex-bug-id: MRP-118
Change-Id: I057610ba51e9a9afb704b4467b8600fd61652a71
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-on: http://review.whamcloud.com/1288
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-952 quota: follow locking order of quota code
Niu Yawei [Fri, 6 Jan 2012 09:18:35 +0000 (01:18 -0800)]
LU-952 quota: follow locking order of quota code

The locking order of quota code is: i_mutex > dqonoff_sem >
journal_lock > dqptr_sem > dquot->dq_lock > dqio_mutex, so we
should call the ll_vfs_dq_init() after journal started to avoid
deadlock.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ia88a2eb8c9dc3827afd4828e0160ee376a1f041e
Reviewed-on: http://review.whamcloud.com/1923
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoRevert "LU-633 iokit: mdt-survey script for MD echo client test"
Oleg Drokin [Fri, 13 Jan 2012 22:27:45 +0000 (17:27 -0500)]
Revert "LU-633 iokit: mdt-survey script for MD echo client test"

Broke build somehow, even though passed gerrit, so reverting meanwhile.

This reverts commit 4f5fc8f9f0a93274c7b7ba7ab79d7a338cd0dfb8.

Signed-off-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-633 iokit: mdt-survey script for MD echo client test
Minh Diep [Wed, 7 Dec 2011 00:38:54 +0000 (16:38 -0800)]
LU-633 iokit: mdt-survey script for MD echo client test

Create a mdt-survey script to run echo client for MD

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I2d75de5c28b70a3b8474ed8512389d850c77e638
Reviewed-on: http://review.whamcloud.com/1803
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-506 tests: check lustre.conf for modprobe
Andreas Dilger [Fri, 16 Dec 2011 02:24:57 +0000 (19:24 -0700)]
LU-506 tests: check lustre.conf for modprobe

The newer userspace modprobe requires that the /etc/modprobe.d/
files end in ".conf", so that there is no confusion between config
files that are supposed to be parsed, and files that are left
after editing (e.g. lustre.conf.orig or lustre.conf~).

Add a check for /etc/modprobe.d/lustre.conf to get lnet module
parameters during testing.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie408f5334b2570f13e225038488df06ff7b524c4
Reviewed-on: http://review.whamcloud.com/1877
Tested-by: Hudson
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-954 build: make lbuild to build lustre-iokit
Minh Diep [Fri, 30 Dec 2011 00:43:44 +0000 (16:43 -0800)]
LU-954 build: make lbuild to build lustre-iokit

Add additional codes in lbuild to build lustre-iokit rpm.
It should be noarch because it's independent of any arch.
Add info to Changelog and change iokit version to 1.3.0

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I8b3c0bbaf348c350155d7c50e9ffcb4ec92fe1ff
Reviewed-on: http://review.whamcloud.com/1907
Tested-by: Hudson
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Michael MacDonald <mjmac@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agonew tag 2.1.54 2.1.54 v2_1_54_0
Oleg Drokin [Wed, 11 Jan 2012 18:00:36 +0000 (13:00 -0500)]
new tag 2.1.54

Change-Id: I62f089d9c945452336b7d22b2b0bca06890ebe7f
Signed-off-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-868 ptlrpc: Fix the timeout for waiting next replay
wangdi [Mon, 21 Nov 2011 06:57:03 +0000 (22:57 -0800)]
LU-868 ptlrpc: Fix the timeout for waiting next replay

During recovery, when setting the timeout for waiting the next
replay, it should consider netlatency(added into timeout) and
early reply as well, so if server sends the early reply for
the request, the client might extend the timeout according to
current estimate service time.

Signed-off-by: Wang di <di.wang@whamcloud.com>
Change-Id: I23ebf1dc3f525f78573890be26474b2c79c65a6d
Reviewed-on: http://review.whamcloud.com/1716
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-506 kernel: FC15 - Introduce simple_setattr().
yangsheng [Wed, 31 Aug 2011 15:52:28 +0000 (23:52 +0800)]
LU-506 kernel: FC15 - Introduce simple_setattr().

Since 2.6.35: simple_setattr() has be introduced to
replace inode_setattr().
kernel-commit: 7bb46a6734a7e1ad4beaecc11cae7ed3ff81d30f

Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: I0e002f20fa4bafb18e0c7d3c55924800265658f6
Reviewed-on: http://review.whamcloud.com/1863
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-506 kernel: Add config check for sb_any_quota_loaded
yangsheng [Tue, 10 Jan 2012 18:59:11 +0000 (02:59 +0800)]
LU-506 kernel: Add config check for sb_any_quota_loaded

Add config check for sb_any_quota_loaded() since
OFED just backport DQUOT_USAGE_ENABLED.

Signed-off-by: yangsheng <ys@whamcloud.com>
Change-Id: I2f5fe42408bed1be7110944e7a47e0af16d896db
Reviewed-on: http://review.whamcloud.com/1943
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Michael MacDonald <mjmac@whamcloud.com>
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-884 osc: async osc_check_rpcs()
Jinshan Xiong [Wed, 4 Jan 2012 18:28:29 +0000 (10:28 -0800)]
LU-884 osc: async osc_check_rpcs()

Add a new "async" parameter to osc_check_rpcs(); if it is called with
async, it will compose a fake ptlrpc_request so that RPCs will be
composed and issued in ptlrpcd context.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I1c2f8ae43da8146428c474f17ddf3dc23a2df9ef
Reviewed-on: http://review.whamcloud.com/1825
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-925 agl: async glimpse lock process in CLIO stack
Fan Yong [Fri, 6 Jan 2012 06:49:42 +0000 (14:49 +0800)]
LU-925 agl: async glimpse lock process in CLIO stack

Adjust CLIO lock state machine for supporting:
1. unuse lock in non-hold state.
2. re-enqueue non-granted glimpse lock.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I9de8939a398d7b4c7062e6c5859bca06deddd089
Reviewed-on: http://review.whamcloud.com/1243
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-962 ptlrpc: feature to run callback in ptlrpcd context
Jinshan Xiong [Wed, 4 Jan 2012 07:56:22 +0000 (23:56 -0800)]
LU-962 ptlrpc: feature to run callback in ptlrpcd context

In this patch, a feature is added to run a callback in ptlrpc
context. We need a ptlrpc work for this purpose. There are three
functions exported:
  1. ptlrpc_alloc_work() to allocate work;
  2. ptlrpc_run_work() to run an allocated work, this function can
     be executed many times;
  3. ptlrpc_destroy_work() to destroy the work;

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I2bce5a17003855468eab9075fb50ed02d7bcc208
Reviewed-on: http://review.whamcloud.com/1917
Reviewed-by: Johann Lombardi <johann@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>
8 years agoLU-506 kernel: FC15 - small changes
yangsheng [Thu, 5 Jan 2012 17:14:34 +0000 (01:14 +0800)]
LU-506 kernel: FC15 - small changes

   -- stacktrace_ops.{warning(), warning_symbol()} removed.
   -- sk_sleep() helper added.
   -- quota_on() 4 parameter change to use 'struct path'.
   -- fs_struct.lock change to use spin_lock.
   -- other trivial changes.

Change-Id: Ic9bf47454b19c1cfc3e41cd3aebbabb074f6110f
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1864
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-506 kernel: FC15 - reiserfs remove & cleanup
yangsheng [Wed, 4 Jan 2012 11:22:04 +0000 (19:22 +0800)]
LU-506 kernel: FC15 - reiserfs remove & cleanup

 -- Remove reiserfs support entirely.
 -- Change to don't use PATCHLEVEL, since kernel has
    forward to version 3.1.

Signed-off-by: yangsheng <ys@whamcloud.com>
Change-Id: I86d185ba522b5c9fc5e16bfe1d34be8720573e58
Reviewed-on: http://review.whamcloud.com/1915
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-822 osd: multiple Object Index files
Liang Zhen [Thu, 8 Dec 2011 16:48:29 +0000 (00:48 +0800)]
LU-822 osd: multiple Object Index files

Single OI container could be performance bottleneck on server side,
because many service threads may content on the same OI htree-tree
even OI htree can support parallel operations but there are
still a lot of spinlock contentions and cacheline contentions.
Also, parallel operations of OI htree can't scale very well if
there are hundreds or thousands threads, it is because limitation
of dynlock. Instead of fix scalability of dynlock, the long term
solution is more straightforward, we can simply support multiple OI
containers and hash service threads to different OIs by lu_fid::f_seq.
We need to make sure this feature can support single OI created
by 2.1 or earlier versions, also, user can specify number of OIs by
modparameter osd_oi_num on creating new filesystem, this parameter
will be ignored if OSD is loading on existed filesystem.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Iaa5ef9e43b80301150608802e40b4ef506467457
Reviewed-on: http://review.whamcloud.com/1822
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-879 mds: Add a few rename stats under /proc
wangdi [Fri, 16 Dec 2011 01:19:31 +0000 (17:19 -0800)]
LU-879 mds: Add a few rename stats under /proc

1. Add samedir_rename in /proc/fs/lustre/mds/lustre-MDT0000/stats
to collect stats of same dir rename.
2. Add crossdir_rename in /proc/fs/lustre/mds/lustre-MDT0000/stats
to collect stats of cross dir rename.
3. Add /proc/fs/lustre/mds/lustre-MDT0000/rename_stats(YAML format)
to collect stats of rename stats happened on different size
directories.
The size of directories under which files are being removed.
With these patches, it will find out how many renames take place
in the same directory compared to how many renames are between
So during DNE implementation, we can know how rename may be
affected by DNE remote directories and large striped directories.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I4452ce196802c5724607455e0a9b4b372b06f159
Reviewed-on: http://review.whamcloud.com/1878
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoLU-169 lov: add generation number to LOV EA
Johann Lombardi [Thu, 15 Dec 2011 00:00:00 +0000 (01:00 +0100)]
LU-169 lov: add generation number to LOV EA

This patch shrinks lov_mds_md_v*::lmm_stripe_count to 16 bits and use
the remaining 16 bits to store a generation number for the layout.
This generation will be used in conjunction the layout lock to allow
clients to detect when the file layout has changed.
The layout generation starts at 0 and will be bumped each time the
file layout is altered.
For backward compatibility, the layout generation is set to 0 when the
layout is sent to a client that does not support
OBD_CONNECT_LAYOUTLOCK.

This patch also stores OBD_INCOMPAT_LMM_VER in the MDS last_rcvd file
to prevent older versions of Lustre that cannot deal with a 16-bit
lmm_stripe from mounting the filesystem and exporting layouts to older
clients without setting the layout to 0.  This flag will be set in the
last_rcvd file only once we start modifying file layouts, but at least
the current version should not be confused by a 16-bit stripe count
and a non-zero generation.

Signed-off-by: Jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: Ic40083227057eba565287d1a10890875b8a96c13
Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1866
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoLU-593 obdclass: echo client for MDS stack
wangdi [Wed, 16 Nov 2011 22:55:23 +0000 (14:55 -0800)]
LU-593 obdclass: echo client for MDS stack

1. Add interfaces and tools for exercising a local MDT
   device for performance reasons, in a similar manner
   to obdfilter-survey.
2. add test_create, test_mkdir, test_lookup, test_destroy,
   test_rmdir, test_setxattr, test_md_getattr in lctl for
   md echo client test.

Signed-off-by: Wang di <di.wang@whamcloud.com>
Change-Id: Ibf774a567820ff36b3624e44371c63a9428d82a5
Reviewed-on: http://review.whamcloud.com/1287
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-955 build: fix bad lustre-backend-fs dependency
Minh Diep [Thu, 5 Jan 2012 17:12:29 +0000 (09:12 -0800)]
LU-955 build: fix bad lustre-backend-fs dependency

Fix an incorrect RPM package dependency if Lustre RPMs are built
with "make rpms" with client only

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: Ib8691a37fc230cc63b7aca48bc5146a67e10a2f0
Reviewed-on: http://review.whamcloud.com/1576
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-909 osd: changes to osd api
Alex Zhuravlev [Fri, 6 Jan 2012 05:01:40 +0000 (13:01 +0800)]
LU-909 osd: changes to osd api

the main purpose of the patch is to get declare methods in the API
and to teach osd-based devices to use that

- new declaration methods for each changing method
- explicit destroy method:
  ->do_ref_del() never destroy object
- methods to access data in 0-copy manner:
  no actual implementation in this patch
- mdd/fld use new methods to create/declare/start transactions
- specific method to change/access version are removed:
  use xattr methods
- ldiskfs osd tracks all declarations and asserts if caller
  is trying to call changing method w/o proper declaration

Change-Id: I473c0c2950c1920abb2fef1dac465c08f35522ea
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1669
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-847 quota: move lmv/mdc/osc/lov quota code out of lquota
Johann Lombardi [Fri, 30 Sep 2011 13:12:59 +0000 (06:12 -0700)]
LU-847 quota: move lmv/mdc/osc/lov quota code out of lquota

All quota code was initially put into a separate kernel module since
quota might be released under a different license. That's not relevant
any more and we can now move the client-side quota code back to the
regular lustre modules.

This removes useless indirections and makes the code easier to read
and to maintain.

Change-Id: If898a46db9158edb8e4eaf855f1ed98db97330f0
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1613
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-80 tests: large xattr support
Yu Jian [Fri, 30 Dec 2011 06:28:44 +0000 (14:28 +0800)]
LU-80 tests: large xattr support

This patch adds and updates some test cases to verify the
large xattr feature. To enable this feature, the "-O large_xattr"
option needs to be set on the filesystem either with --mkfsoptions
at format time or via tune2fs.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Ie62e6e2194fdaa7239ec4e1451a4e696888dca8c
Reviewed-on: http://review.whamcloud.com/1880
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoLU-80 lov: large stripe count support
Alexander Boyko [Fri, 30 Dec 2011 06:24:10 +0000 (14:24 +0800)]
LU-80 lov: large stripe count support

Currently a file can be stripped across OSTs up to a limit of
160 stripes. This patch expands that limit to 2000 and it is
possible to go even to larger stripe counts.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Change-Id: I42e1aad35dd056faac23a0d5b025e0a23fc4ec2f
Reviewed-on: http://review.whamcloud.com/1111
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-80 ldiskfs: large EA support
James Simmons [Fri, 30 Dec 2011 06:02:25 +0000 (14:02 +0800)]
LU-80 ldiskfs: large EA support

This patch implements the large EA support in ext4. If the size of
an EA value is larger than the blocksize, then the EA value would
not be saved in the external EA block, instead it would be saved
in an external EA inode. So, the patch also helps support a larger
number of EAs.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ic08921cf13483c9b28560c987773d7aa36c62fac
Reviewed-on: http://review.whamcloud.com/1708
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoLU-250 lnet: Router random shuffling support
James Simmons [Wed, 28 Dec 2011 16:00:56 +0000 (11:00 -0500)]
LU-250 lnet: Router random shuffling support

This is the last of the router improvements that where
developed at ORNL. This feature allows routes to be
randomly placed. Our results show a 20 percent
improvement with random shuffling.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I6862febebd6797fb35c003646f6d90f5d5d2b014
Reviewed-on: http://review.whamcloud.com/249
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Isaac Huang <Isaac_Huang@xyratex.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-506 kernel: FC15 - file_operations relate changes.
yangsheng [Wed, 4 Jan 2012 15:23:16 +0000 (23:23 +0800)]
LU-506 kernel: FC15 - file_operations relate changes.

   -- file_operations.ioctl() has been removed.
   -- file_operations.fsync() changes need 2 arguments.

Change-Id: I7776593497dd988fbf860221e2dcea61c6c4870f
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1862
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
8 years agoLU-925 agl: trigger async glimpse lock when statahead
Fan Yong [Fri, 16 Dec 2011 07:34:25 +0000 (15:34 +0800)]
LU-925 agl: trigger async glimpse lock when statahead

Client will send async glimpse lock RPCs to OSTs for file size
attribute before stat files to accelerate traversing large dir.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I9bf850abdd3c02c8470ddfcd91a3dc3ef7819c6d
Reviewed-on: http://review.whamcloud.com/1692
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-506 kernel: FC15 - vfsmount.mnt_count doesn't use atomic_t
yangsheng [Fri, 2 Sep 2011 02:20:02 +0000 (10:20 +0800)]
LU-506 kernel: FC15 - vfsmount.mnt_count doesn't use atomic_t

vfsmount.mnt_count use pre-cpu variable instead of atomic_t.

Change-Id: I5eba5a67839719e03d0b44be6312b452bf4dcb98
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1845
Tested-by: Hudson
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-639 obdclass: wait obd cleanup before mount
Bobi Jam [Tue, 20 Dec 2011 09:59:07 +0000 (17:59 +0800)]
LU-639 obdclass: wait obd cleanup before mount

Obd device cleanup is executed by obd zombie thread, and umount thread
can return successfully before obd zomebie finishes its job. In some
cases, especially in test cases, a test may starts before last tests
finishes obd cleanup, this patch makes mount thread wait for obd
zombie finishes its job.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I881be5de18960867c36e8c4e4180c0c594d88a01
Reviewed-on: http://review.whamcloud.com/1896
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-176 obdclass: disable mb_cache by default
Liang Zhen [Tue, 29 Mar 2011 03:37:28 +0000 (11:37 +0800)]
LU-176 obdclass: disable mb_cache by default

We are supposed to disable mb_cache by default (bug 22771),
but we never did because it's not in default mount option.
This patch will add "no_mbcache" to default mount option.

Change-Id: I13c9db8e98ad305d26d887d8bd069eff92c20763
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/373
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-748 test: shorten the runtime of sanity subtest_220
Hongchao Zhang [Mon, 12 Dec 2011 18:28:08 +0000 (02:28 +0800)]
LU-748 test: shorten the runtime of sanity subtest_220

in sanity.sh, test_220 tries to exhaust all of the inodes on the OSTs
in order to verify that when it returns -ENOSPC to inode precreate
request, but there is still free blocks, then the MDS continues to use
these precreated inodes on the OSTs.

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: Icaad07311125f362f0efb26da76534c7dca27b6a
Reviewed-on: http://review.whamcloud.com/1676
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>
8 years agoLU-888 lctl: remove perilous lctl {get,set,list}_param behavior.
Richard Henwood [Sat, 3 Dec 2011 02:44:45 +0000 (21:44 -0500)]
LU-888 lctl: remove perilous lctl {get,set,list}_param behavior.

This patch stops the {get,set)_param from potentially reading and
writing to file in the current working directory. Now lctl
{get,set,list}_param visits /proc/{fs,sys}/{lnet,lustre} for
parameter values. Specifying a file path to {get,set,list}_param
is deprecated behavoir.

Using a path with lctl {get,set,list}_param fails if the path does
not begin with '/proc/'. If the path begins with '/proc/' a warning
is printed the command executes using the given path.

A new helper function lprocfs_param_pattern is introduced to
provide checking and constructing the proc path.

Test suite has been searched for {get,set,list}_param lctl calls.
All specified parameters have been checked to ensure they are
not using the deprecated path interface.

lctl man page is updated to remove ambiguity around using paths
to specifiy parameters.

Signed-off-by: Richard Henwood <rhenwood@whamcloud.com>
Change-Id: I39e355b28fb1337f5b3a53f9e7265f4e969ddd2d
Reviewed-on: http://review.whamcloud.com/1765
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: John Hammond <jhammond@tacc.utexas.edu>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-844 test: limit max IO data size for obdfilter test
Bobi Jam [Thu, 24 Nov 2011 09:55:26 +0000 (17:55 +0800)]
LU-844 test: limit max IO data size for obdfilter test

obdfilter-survey disk case test only supports maximum 1M IO data.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Id974a3cacf50ffe760771224a285b0b7cd308840
Reviewed-on: http://review.whamcloud.com/1741
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-613 clio: Client dead-lock during binary exec
Jinshan Xiong [Fri, 19 Aug 2011 22:24:15 +0000 (15:24 -0700)]
LU-613 clio: Client dead-lock during binary exec

The root cause is clio takes attr lock and i_size_sem in reverse
order.

In my patch, I find out there is no deadlock issue any more in fault
and truncate path, so it holds i_size_sem in fault path to fix this
problem.

Change-Id: I04cca9324158a34fded6651692410e29aae2e402
Signed-off-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1281
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-932 llite: cleanup ll_inode_info to reduce inode size
Fan Yong [Fri, 16 Dec 2011 05:58:37 +0000 (13:58 +0800)]
LU-932 llite: cleanup ll_inode_info to reduce inode size

ll_inode_info contains many special-used members, some of them are only
used for directory object, some are only used for non-directory object.
Share memory between those non-coexist members to reduce inode size.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: Ic10014b2121f64718667addb77ed009aa29c1b4c
Reviewed-on: http://review.whamcloud.com/1691
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-927 ptlrpc: common interfaces for ptlrpc_thread::t_flags
Fan Yong [Thu, 15 Dec 2011 01:50:20 +0000 (09:50 +0800)]
LU-927 ptlrpc: common interfaces for ptlrpc_thread::t_flags

Build some common interfaces for ptlrpc_thread::t_flags processing:
thread_is_xxx and thread_yyy_flags. Operating ptlrpc_thread::t_flags
only can through these interfaces.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I285878ffeff8810ecbaf7a42b8d9381f392c0c9a
Reviewed-on: http://review.whamcloud.com/1690
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-805 quota: lfs quota doesn't print grace time correctly
Niu Yawei [Tue, 8 Nov 2011 13:07:05 +0000 (05:07 -0800)]
LU-805 quota: lfs quota doesn't print grace time correctly

Lustre always trigger grace time when the allocated qunit exceeding
softlimit, however, user tools 'lfs quota' only print grace time
when the total usage greater than softlimit, so sometimes user can't
tell if the softlimit is already exceeded from 'lfs quota' output.

This patch changes the 'lfs quota' to use the data get from kernel
instead of comparing usage with softlimit.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ia564c803ca33b2cf925759b6a6e4e4df2692f28d
Reviewed-on: http://review.whamcloud.com/1674
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-847 quota: client retrieve quota usage directly
Niu Yawei [Thu, 15 Sep 2011 03:36:19 +0000 (20:36 -0700)]
LU-847 quota: client retrieve quota usage directly

Current 'lfs quota' sends getquota RPC to MDS, and MDS is responsible
for retrieving disk usage from all targets, this scheme will be
changed to client retrieving disk usage from all targets directly.

This patch addresses the compatibility issue as well: If the getquota
returned by MDS has QIF_SPACE, client just trust the disk usage
returned by MDS, otherwise, client has to issue RPCs to all OSTs to
collect disk usage by itself.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ia94d3b3ba280d5b31d2d3c508412d662f4e95321
Reviewed-on: http://review.whamcloud.com/1382
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-924 test: sync client data before reboot server
Niu Yawei [Mon, 19 Dec 2011 06:51:26 +0000 (22:51 -0800)]
LU-924 test: sync client data before reboot server

Lustre doesn't write client data synchronously (to avoid flooding sync
writes when there are many clients connecting, see exp_need_sync), so
if the server reboots before client data reachs disk, the client data
will be lost and client will be evicted after recovery, which is not
what we expected.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I21bcafe1f2630285c9108c0528467eb177e3449b
Reviewed-on: http://review.whamcloud.com/1888
Tested-by: Hudson
Reviewed-by: Chris Gearing <chris@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-32 osd: keep root node BH ref of IAM container
Liang Zhen [Mon, 27 Dec 2010 05:35:20 +0000 (13:35 +0800)]
LU-32 osd: keep root node BH ref of IAM container

IAM in ldiskfs-osd will always consume some slots in bh_lru (see:
fs/buffer.c), if we keep buffer_head reference on root node,
we can save one slot in bh_lru and could be somehow helpful for
overall performance, I did some tests, LRU hits rate increased
5%-10% while creating files if we always keep this reference.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I954f26932462169c9bfc6bbfe1a57b5348624179
Reviewed-on: http://review.whamcloud.com/1826
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>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-617 recovery: setattr from open breaks recovery
Niu Yawei [Fri, 26 Aug 2011 02:58:36 +0000 (19:58 -0700)]
LU-617 recovery: setattr from open breaks recovery

The setattr from open(open(O_TRUNC)) is now serialized with
'cl_setattr_lock' on client and goes to a dedicate portal, which is
different with other reint operations, consequently, setattr RPC
can be parallel with other reint RPCs, and that result in the race of
updating last_transno/last_xid on server.

This patch removed the 'cl_setattr_lock' stuff to make all the reint
operations serialized by 'cl_rpc_lock', and the code on server side
which assumes client is holding DLM lock when setattr from open is also
removed, since it's not true.

The MDS_SETATTR_PORTAL service is preserved to keep the compatibility
with old client, and the MDS_SETATTR_FROM_OPEN is also preserved, since
we are using this flag to check write access for open(O_TRUNC), and
it probably can be used for some optimization purpose in future.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I45f83f8f05022ff0d31f8e7784381821c835785d
Reviewed-on: http://review.whamcloud.com/1654
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
8 years agoLU-867 ptlrpc: Resolve section mismatch
Bobi Jam [Sat, 5 Nov 2011 07:55:39 +0000 (15:55 +0800)]
LU-867 ptlrpc: Resolve section mismatch

The __init and __exit attributes appear to have been over used for
the ptlrpc module.  They should only be attached to ptlrpc_init and
ptlrpc_exit respectively and those functions should call the required
cleanup functions.  By using the attributes too broadly the following
section mismatch warning with be hit.  This indentifies cases where
your calling an __exit function from an __init function which is in
the wrong section.

WARNING: ~/src/git/lustre/lustre/ptlrpc/ptlrpc.o(.init.text+0x354):

Section mismatch in reference from the function ptlrpc_init() to the
function .exit.text:sptlrpc_fini() The function __init ptlrpc_init()
references a function __exit sptlrpc_fini().

This is often seen when error handling in the init function uses
functionality in the exit path.  The fix is often to remove the
__exit annotation of sptlrpc_fini() so it may be used outside an
exit section.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I94a4cb5fb7deea41fce5ee939470dc2e40908f98
Reviewed-on: http://review.whamcloud.com/1653
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-882 quota: Quota code compares unsigned < 0
Niu Yawei [Mon, 19 Dec 2011 10:01:36 +0000 (02:01 -0800)]
LU-882 quota: Quota code compares unsigned < 0

Port from b23858.

In check_cur_qunit(), it checks "if (limit + record < 0)", however,
the limit is unsigned, so this check will be always false, and when
limit is smaller than -record, following "limit += record" will make
limit a unreasonable large value.

This patch also fixed a similar defect in dqacq_handler().

Signed-off-by: Vladimir Saveliev <vladimir.saveliev@oracle.com>
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Iea02143dae5542f1a9f9cc823a684a18031b8a03
Reviewed-on: http://review.whamcloud.com/1889
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-728 tests: pdsh HOSTLIST test suite support
James Simmons [Thu, 29 Dec 2011 17:10:41 +0000 (12:10 -0500)]
LU-728 tests: pdsh HOSTLIST test suite support

For large systems it becomes tedious to list all the nodes
or devices. The application pdsh uses a HOSTLIST form to
make listing nodes more compact. This patch takes data in
the HOSTLIST format and creates a expanded list for the
shell scripts in the test suite to use. Also this gives the
option for the pdsh commands to use the nodes list in
HOSTLIST format directly. Its is also possible to use the
HOSTLIST format for devices as well as nodes.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ia7a6c95ab4e701a17fc2b80d8443a5ff79da3f3c
Reviewed-on: http://review.whamcloud.com/1462
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-81 deadlock of changelog adding vs. changelog cancelling
Niu Yawei [Thu, 18 Aug 2011 04:22:19 +0000 (21:22 -0700)]
LU-81 deadlock of changelog adding vs. changelog cancelling

This is a workaround for the deadlock of changelog adding vs.
changelog cancelling. Changelog adding always start transaction
before acquiring the catlog lock(lgh_lock), whereas, changelog
cancelling do start transaction after holding the catlog lock.

We start transaction earlier to avoid above deadlock.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I9647b9a559f68a27dc0d4b4885857d3cf73b5b8e
Reviewed-on: http://review.whamcloud.com/1260
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-625 test: sanityn.sh test file size should be dynamic
James Simmons [Thu, 29 Dec 2011 16:08:51 +0000 (11:08 -0500)]
LU-625 test: sanityn.sh test file size should be dynamic

For large OSTCOUNT, a small write can't take extent locks on all OSTs.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ic3fb8e88444767db70545292c4b81b9fe9f1f813
Reviewed-on: http://review.whamcloud.com/1901
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-884 clio: client in memory checksum
Jinshan Xiong [Wed, 19 Oct 2011 23:34:26 +0000 (16:34 -0700)]
LU-884 clio: client in memory checksum

Use page_mkwrite() method from latest kernels to correctly implement
RPC checksum functionality. Also OBD_FL_MMAP is removed because it
won't be used any more.

Change-Id: I6ec5aae14f56c95b1ac6936d21b5a273582fa4e8
Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1609
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-571 ldlm: add parallel ast flow control
Jinshan Xiong [Wed, 26 Oct 2011 19:48:17 +0000 (13:48 -0600)]
LU-571 ldlm: add parallel ast flow control

Commit {hash: 8c83e7d75989ef527e43a824a0dbe46bffabd07d} removed the
parallel AST limit on the server. However, if there are too many locks
to revoke, it will have to allocate too many RPCs.

Return to having an upper limit on the number of AST RPCs in flight by
adding a flow control algorithm that allows a configurable upper limit on
the number of RPCs in flight.

Change-Id: Ifb68991acf7a33119b334447aec50f7717ed546e
Signed-off-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1608
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-635 tests: conf-sanity 27 28 29 30 35 43 failures
James Simmons [Thu, 29 Dec 2011 14:40:36 +0000 (09:40 -0500)]
LU-635 tests: conf-sanity 27 28 29 30 35 43 failures

Several test in conf-sanity would fail with a error
This command must be run on the MGS. This was due
to seperating the MGS and MDS. I tracked down the fix
to doing a pdsh for several lctl commands to MGS
instead of the MDS.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I721472b15821e2dbcc636292a8e82c1a1b5e0149
Reviewed-on: http://review.whamcloud.com/1869
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>
8 years agoLU-424 tests: conf-sanity test 55, 56, 58 failure fixes
James Simmons [Thu, 29 Dec 2011 14:46:43 +0000 (09:46 -0500)]
LU-424 tests: conf-sanity test 55, 56, 58 failure fixes

The MGS service was not started in conf-sanity test 55,
56 and 58 with separate MGS and MDT configuration. This
patch fix the issue.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I0c01955b4baf81535959cdbf38bf84e7acb04ddf
Reviewed-on: http://review.whamcloud.com/1870
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoNew tag 2.1.53 2.1.53 v2_1_53_0
Oleg Drokin [Sun, 1 Jan 2012 13:08:38 +0000 (08:08 -0500)]
New tag 2.1.53

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

8 years agoLU-417 llite: report non-zero blocks on writing client
Bobi Jam [Fri, 4 Nov 2011 07:22:41 +0000 (15:22 +0800)]
LU-417 llite: report non-zero blocks on writing client

Writing client may not report accurate allocated block numbers when
dirty pages has not been writting back to OSTs, some "cp" or "tar" may
skip the file because it thinks it is completely sparse.

This patch makes writing client consider dirty pages when reporting
allocated blocks, lest the file be treated as a completely sparse one.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I985d50a44ea1e917bf8e1cba3b5cb770eec35c3f
Reviewed-on: http://review.whamcloud.com/1647
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-935 quota: break early when b/i_unit_sz exceeded upper limit
Niu Yawei [Mon, 19 Dec 2011 10:18:28 +0000 (02:18 -0800)]
LU-935 quota: break early when b/i_unit_sz exceeded upper limit

While expanding b/i_unit_sz in dquot_create_oqaq(), we'd break the loop
early when the b/i_unit_sz exceeded upper limit, otherwise, qaq_b/iunit_sz
could be overflow and result in endless loop.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I0bf069e9259627426d7a87ec42844eaed7a733b4
Reviewed-on: http://review.whamcloud.com/1890
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-506 kernel: FC15 - fix GCC 'set-but-unused' warnings
yangsheng [Thu, 8 Sep 2011 17:33:25 +0000 (01:33 +0800)]
LU-506 kernel: FC15 - fix GCC 'set-but-unused' warnings

Eliminate a number of unused variables in the code that
caused GCC-4.6.0 to warn about "set-but-unused variables".
In some cases the variables are only used in
conditionally-compiled code, so they are used in some way
just to quiet the compiler.

Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: I8b9b744c787fff4057722420866adea86d8240f5
Reviewed-on: http://review.whamcloud.com/1330
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>
8 years agoLU-506 kernel: FC15 - super_operations add evict_inode method.
yangsheng [Wed, 31 Aug 2011 18:28:56 +0000 (02:28 +0800)]
LU-506 kernel: FC15 - super_operations add evict_inode method.

super_operations add a new method evict_inode(), it hybird of
delete_inode() and clear_inode().

Change-Id: Ifa6de3bca16294386f33404b5a42ff749e1d0665
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1844
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-506 kernel: FC15 - generic_permission() need 4 arguments.
yangsheng [Wed, 31 Aug 2011 15:27:32 +0000 (23:27 +0800)]
LU-506 kernel: FC15 - generic_permission() need 4 arguments.

generic_permission() add a new parameter flags to determine
if in rcu-walk case. it will return -ECHILD when rcu-walk
request cannot be satisfied. check_acl callback also changed
for this intention. So we don't need check it separately.

Change-Id: I15e0660f47c5db414dbb920f68177f310a185e4d
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1843
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
8 years agoLU-335 ldiskfs: SuSE 11 SP1 support for Lustre 2.X
James Simmons [Wed, 28 Dec 2011 18:00:32 +0000 (13:00 -0500)]
LU-335 ldiskfs: SuSE 11 SP1 support for Lustre 2.X

Lustre 2.X has been lagging for SuSE server side support. This
work brings the code up to date to support the SuSE 11 SP1 kernel
2.6.32.36-0.5. To reduce the maintenance overhead we basically
add a patch that modifies the SuSE ext4 code to match very
closely to the RHEL6.1 ext4 code base.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I554679c9b0d400eeda1d5d30157c5d86e68793f9
Reviewed-on: http://review.whamcloud.com/575
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoLU-766 Fix sops->statfs() autoconf check
yangsheng [Tue, 25 Oct 2011 02:29:26 +0000 (10:29 +0800)]
LU-766 Fix sops->statfs() autoconf check

Building with RHEL6.2 beta (kernel-2.6.32-204) exposed that the
HAVE_STATFS_DENTRY_PARAM autoconf check was incorrect. The test
was setup to check the first argument of vfs_statfs() function.
However, the conditional code itself doesn't use the vfs_statfs()
function it registers a function with the sops->statfs() callback.

Historically, this always worked because both of these prototypes
were changed in a single upstream kernel commit (726c3342). However,
as of RHEL6.2 the vfs_statfs() function changed again and the
sops->statfs() callback stayed the same. The vfs_statfs() function
now takes a path structure as the first parameter.

This was fixed by simply updating the autoconf test to check the
prototype of the function were going to actually use.

Change-Id: I0cf36e758fd9c85609c47c13dbdf249321664b26
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/1527
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoLU-50 ldiskfs: pdirops patch for ldiskfs
Liang Zhen [Fri, 8 Jul 2011 17:43:08 +0000 (13:43 -0400)]
LU-50 ldiskfs: pdirops patch for ldiskfs

Single directory performance is a critical for HPC workloads. In a
typical use case an application creates a separate output file for
each node and task in a job. As nodes and tasks increase, hundreds
of thousands of files may be created in a single directory within
a short window of time.
Today, both filename lookup and file system modifying operations
(such as create and unlink) are protected with a single lock for
an entire ldiskfs directory. PDO project will remove this
bottleneck by introducing a parallel locking mechanism for entire
ldiskfs directories. This work will enable multiple application
threads to simultaneously lookup, create and unlink in parallel.

This patch contains:
  - pdirops support for ldiskfs
  - N-level htree directory
  - integrate with osd-ldiskfs

Change-Id: I269c0e3112e68f3acd79e860dab052a68c7d7aaa
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/375
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-843 iokit: get_ec_devno returns trash
Bruce Korb [Mon, 28 Nov 2011 23:08:04 +0000 (15:08 -0800)]
LU-843 iokit: get_ec_devno returns trash

Some commands leak output to stdout and get_ec_devno returns
its results via stdout.  Redirect fd 8 to stdout and redirect
stdout to stderr.  Echo final results to fd 8.  Since this
only works when run as a subshell, invoke "exit" instead of
"return" when done.

Inside create_objects() function, stdin is redirected for a
shell "while" command.  Though this is done in the current
environment (process) for current BASH, it is not required
and there is no committment that BASH will always behave
this way.  Instead, set fd 3 to be reading from that file
and read from fd 3 insted of stdin.

While there, also test for "is object id" lines and extract
values using shell constructs instead of fork-ed commands.

Also while there, ensure that "ERROR" is always printed on
every error exit.

Also while there, ensure that the libecho file comes from
the same directory as the obdfilter-survey script.

Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Signed-off-by: Bruce Korb <bruce_korb@xyratex.com>
Change-Id: I50137c9ded816aac792aba4a0a79f59c28d16e01
Reviewed-on: http://review.whamcloud.com/1699
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-537 o2iblnd: support aliased interface
Liang Zhen [Wed, 27 Jul 2011 04:47:57 +0000 (12:47 +0800)]
LU-537 o2iblnd: support aliased interface

Current kiblnd_create_dev() doesn't allow to dev_get_by_name() to
return NULL (we added this for supporting failover of ib-bonding),
but this can happen for aliased interface, we can fix this by simply
remove the limitation and set kib_dev_t::ibd_can_failover to 0 for
aliased interface.

Change-Id: Idc3e6e4fd2d5056594f38dd43a0a560c3455ea05
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1148
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>
8 years agoLU-431 o2iblnd: reduce failed alloc retry interval
Liang Zhen [Sat, 18 Jun 2011 10:03:12 +0000 (18:03 +0800)]
LU-431 o2iblnd: reduce failed alloc retry interval

o2iblnd can dynamically grow TX descriptor pool at run time,
it will take 10 seconds as retry interval if there is a failed
allocating, this interval is too long and some RPC might timeout.
So we decreased it to one second.

Change-Id: I0693e9d2cbf321e473713db6dd668afaf64e1bae
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/966
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-803 echo: fill OBD_MAGIC for echo device
Jinshan Xiong [Wed, 7 Dec 2011 06:08:53 +0000 (22:08 -0800)]
LU-803 echo: fill OBD_MAGIC for echo device

Otherwise it will cause failure on obdfilter-survey.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I505da432cdf04fe3275d2a529f4115b1a3238e94
Reviewed-on: http://review.whamcloud.com/1804
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-794 llite: allow larger O_DIRECT read/write RPC
Andreas Dilger [Thu, 27 Oct 2011 00:59:15 +0000 (18:59 -0600)]
LU-794 llite: allow larger O_DIRECT read/write RPC

The O_DIRECT read/write RPC size limit was formerly constrained by
the maximum kmalloc() size, and would fall back to smaller kmalloc()
allocations until they succeeded.  This constrained the number of
concurrent O_DIRECT RPCs, which can significantly affect performance.

Newer code uses OBD_ALLOC_LARGE()  vmalloc() for allocations larger
than a page, so the maximum RPC limit can be increased.  Currently
the limit is arbitrarily set to KMALLOC_MAX_SIZE (which is just a
proxy for what is a reasonably large allocation is for the system).

This increases the maximum O_DIRECT limit to about 682MB, which will
allow sending 8 concurrent RPCs on an 85-stripe file with a single
write() or combination thereof.  This could be increased if needed.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ic12e6536cebed94c3a3b56acbea0f0940cdafec9
Reviewed-on: http://review.whamcloud.com/1617
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-579 MRP-120 changelog CLOSE event.
Vitaly Fertman [Wed, 29 Jun 2011 10:49:07 +0000 (14:49 +0400)]
LU-579 MRP-120 changelog CLOSE event.

add CLOSE event into changelog, but not into the default mask.

do not create close changelog record sometimes, if a dup mfd handler appeared:
- open replay (1st mfd appears)
- re-connect
- open replay (2nd mfd appears)

Reviewed-by: Nathan Rutman <Nathan_Rutman@xyratex.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Change-Id: I8e5ff99905b84ee58416406ca7b690c86db60c62
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-on: http://review.whamcloud.com/1197
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-543 mdd: fix rename changelog
Niu Yawei [Sat, 5 Nov 2011 05:21:12 +0000 (22:21 -0700)]
LU-543 mdd: fix rename changelog

Current rename changelog stores source fid in both CL_RENAME & CL_EXT
records, which is redundant, and the 'tfid' in CL_EXT is never been
used.

Actually, we'd store target fid in the CL_EXT record, then application
could detect the fid unlinked by rename in changelog.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I0c616f813657a2faefa60a707f4fc1d9dc971b39
Reviewed-on: http://review.whamcloud.com/1652
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-848 clio: page writeback support
Jinshan Xiong [Tue, 27 Sep 2011 23:02:22 +0000 (16:02 -0700)]
LU-848 clio: page writeback support

Page writeback support for clio - release vmpage lock in transfer.
Sync IO still holds page lock.

Change-Id: I5137542b5b6b6eaaa4464804b45d372fd12e5c22
Signed-off-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1456
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-680 lfs: instance <-> mount point mapping from lfs
Richard Henwood [Wed, 2 Nov 2011 23:33:51 +0000 (19:33 -0400)]
LU-680 lfs: instance <-> mount point mapping from lfs

A new option to 'lfs' has been created to return the mapping
between Lustre filesystem instance and paths. The option
is 'getname' and it may be called with or without arguements.

'lfs getname' without arguments returns the instances of all
Lustre mount points.

'lfs getname [path...]' returns the instance of each specified
path. If the path is not a Lustre instance 'No such device' is
returned.

OBD_IOC_GETNAME has been added to file.c to provide consistent
behavior for file as well as directory paths.

A llapi_getname helper function has been added to liblustreapi
that returns a lustre instance name if a path is provided.

Documentation for 'lfs getname' is included inline an the lfs
man page has been updated.

Signed-off-by: Richard Henwood <rhenwood@whamcloud.com>
Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Change-Id: Iab8ff12d604c7ce853f3c204b455e3b641f659f4
Reviewed-on: http://review.whamcloud.com/1373
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-575 MRP-133 lfs find speedup
Vitaly Fertman [Wed, 25 May 2011 21:07:09 +0000 (01:07 +0400)]
LU-575 MRP-133 lfs find speedup

lfs find should send getattr on mds only if needed;
lfs find should not break on matched obd but check other parameters as well;
lfs find time compare fixes;

Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Colin Faber <colin.faber@xyratex.com>
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
LU-575 MRP-260 fix quota tests

a fix for quota size units which conflicted with lfind size units

Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Andrew Perepechko <Andrew_Perepechko@xyratex.com>
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Change-Id: I42b2acee18c6c9e0d787b97a5e957431d2bb4bf1
Reviewed-on: http://review.whamcloud.com/1195
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-143 fid hash improvements
Liang Zhen [Tue, 29 Mar 2011 08:44:41 +0000 (16:44 +0800)]
LU-143 fid hash improvements

Current hash function of fid is not good enough for lu_site and
ldlm_namespace.
We have to use two totally different hash functions to hash fid into
hash table with millions of entries.

Change-Id: I6261e63a406118a93d578210c31e67fc7f9e389c
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/374
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-106 procfs: many proc entries are not accessed safely
Lai Siyao [Mon, 13 Jun 2011 03:56:03 +0000 (20:56 -0700)]
LU-106 procfs: many proc entries are not accessed safely

Some in memory data may be released/uninitialized at the time
of proc entry creation/removal, this patch includes the following
fixes:
* initialize data before proc entry creation
* free data after proc entry removal
* free proc entries in obd_precleanup() because
  obd_uuid/nid/nid_stats_hash are released in class_cleanup().
* free proc entries after obd_zombie_barrier() because obd_export
  hold one refcound of nid_stat.
* check osd->od_mount before accessing osd proc entries because the
  osd proc entries are created before mount.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I03cb977e1be0747032a70f6a39fec804f81d70cc
Reviewed-on: http://review.whamcloud.com/326
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-871 build: change %L printk format to %ll
Andreas Dilger [Wed, 23 Nov 2011 19:16:25 +0000 (12:16 -0700)]
LU-871 build: change %L printk format to %ll

The clang-analyzer static code analysis flagged %L format specifiers
for printf/printk as deprecated, so change all of their uses to %ll.

In a couple of files (checkstat.c and truncate.c) there are existing
code style issues that need to be fixed before landing, in order to
get a clean bill of health from checkpatch.pl.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I1bc75a0f43b25de112f5ae8f2273b3dc46081d09
Reviewed-on: http://review.whamcloud.com/1734
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-761: Check return of ll_prep_md_op_data() using IS_ERR().
John Hammond [Thu, 13 Oct 2011 17:50:53 +0000 (12:50 -0500)]
LU-761: Check return of ll_prep_md_op_data() using IS_ERR().

Change-Id: I329fa923b95ae612e50f63641d2c34b121b0f6b9
Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Reviewed-on: http://review.whamcloud.com/1520
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: Andreas Dilger <adilger@whamcloud.com>
8 years agoLU-864 test: Hostname name doesn't equal NID and use facet_mntpt
James Simmons [Mon, 28 Nov 2011 14:26:41 +0000 (09:26 -0500)]
LU-864 test: Hostname name doesn't equal NID and use facet_mntpt

On our test systems the hostname of the servers is on the
ethernet fabric and for lustre we use infiniband separately.
Currently several test will not run because of the assumption
that lustre will use the same fabric and we use to login and
manage the server. This patch allows one to grab the real NIDs
instead of assuming its "hostname"@NETTYPE. The second part of
the patch removes using $MOUNT% directly and uses facet_mntpt.
The reason being is on our system the mount points are different
on our servers from our clients. MOUNT is assumed to be the same
for clients and the servers. This patch allows test to work if
that is not the case.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I49f365561e341d44ace4c961fcae8b871dce7407
Reviewed-on: http://review.whamcloud.com/248
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoLU-50 kernel: configurable BH LRU size
yangsheng [Mon, 5 Dec 2011 14:57:46 +0000 (22:57 +0800)]
LU-50 kernel: configurable BH LRU size

This patch allow per-CPU LRU size to be selected at compile time.
More complex filesystems may be modiyfing multiple blocks
within a single transaction, so keeping more buffer heads in
CPU-local cache speeds up modifications significantly.
User can set LRU size to any value between 8 and 64, linux
kernel is still using 8 and Lustre is going using 16 as
default value.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: I4bb2eea30d57298b706354dd8438a10dc8ae6e98
Reviewed-on: http://review.whamcloud.com/1796
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-278 Improve regex for output of git describe
Christopher J. Morrone [Thu, 5 May 2011 22:08:44 +0000 (15:08 -0700)]
LU-278 Improve regex for output of git describe

Improve the regex in version_tag-git.pl to properly parse the output
then the current commit is tagged, and when the tag names are longer
than just the digits used in the upstream version tags.

Addition from Ned:

Trim trailing newline from git describe output in the
case where the current commit is tagged.

Change-Id: I0a6a1b54f9e2dbd381a6d00f9dcf47d9b8b66616
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/509
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-824 corrupted ldiskfs after md rebuild (bz24264)
yangsheng [Fri, 4 Nov 2011 19:49:49 +0000 (03:49 +0800)]
LU-824 corrupted ldiskfs after md rebuild (bz24264)

Pick up a patch from upstream to fix the md bug may
cause a corruption issue after rebuild.

Change-Id: I802ff3b3d5e86b9d9e77e57d1d98004c17e800a6
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1650
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-669 mea.c unconditionally uses ldiskfs hashs
Brian Behlendorf [Wed, 24 Aug 2011 18:18:07 +0000 (11:18 -0700)]
LU-669 mea.c unconditionally uses ldiskfs hashs

Remove the ldiskfs hash code from mea.c as described by
comment 15 in Lustre bugzilla 22410.  The MEA_MAGIC_HASH_SEGMENT
case has been replaced with a CERROR() which will indicate if
this ever occurs.

"Yes, the two level hashing function is implemented in this patch.
And there no ldiskfs hash dependency on client anymore, so those
ldiskfs hash function can be removed from mea.c"
    -- wangdi

This was originally filed as Lustre bugzilla 22410.

With the removal of this code the ldiskfsfs_dirhash() function
no longer has any consumers in obdclass.  It is now only used
by the ldiskfs osd.  Since this functionality was originally
copied from ldiskfs it makes sense to remove it entirely and
have the osd rely on the ldiskfs implementation.

Change-Id: I017918cad57fc0641ebbd9471cb5b5717c65dea2
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/1350
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-837 release semaphore for error case in gss_do_ctx_init_rpc
Hongchao Zhang [Thu, 17 Nov 2011 02:47:00 +0000 (10:47 +0800)]
LU-837 release semaphore for error case in gss_do_ctx_init_rpc

in gss_do_ctx_init_rpc, the r/w lock "obd->u.cli.cl_sem" is not released
if the obd->u.cli.cl_import is NULL and returns error.

Change-Id: Ib9bb4d4cb79adabe8ff661b9b4a7f6df5963d4ff
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1705
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-645 llite: Avoid unnecessary dentry rehashing
Bobi Jam [Wed, 23 Nov 2011 23:19:41 +0000 (07:19 +0800)]
LU-645 llite: Avoid unnecessary dentry rehashing

In patchless case the sequence __d_drop() then d_rehash_cond() creates
race window if dentry is already hashed, in this case rehashing should
be avoided.

Change-Id: I59e035c6d19b869955e66fb010c1b137d0aab0ec
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1434
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-878 test: pdirop fail timeout too soon
Lai Siyao [Tue, 29 Nov 2011 06:24:08 +0000 (22:24 -0800)]
LU-878 test: pdirop fail timeout too soon

OBD_FAIL_MDS_PDO_LOCK timeout 10 seconds, but our autotest runs on
hypervisor, if sanityn test_40b can't finish in 10 seconds, it will
fail. Increase timeout to 15 should be able to fix this issue.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I85de77b949efc65f439eab64b2d6b709560df772
Reviewed-on: http://review.whamcloud.com/1751
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-335 build: Misc fixes to support SuSE platforms
James Simmons [Tue, 29 Nov 2011 13:05:19 +0000 (08:05 -0500)]
LU-335 build: Misc fixes to support SuSE platforms

Minor cleanups to the lustre base which only showed up when building
for a SuSE platform.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I8708c1074b1adf87bd466c6910231e8edcbdc032
Reviewed-on: http://review.whamcloud.com/1678
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoLU-668 mdd: Rename MDS_*_FL to LUSTRE_*_FL and update usage
Brian Behlendorf [Wed, 24 Aug 2011 16:58:20 +0000 (09:58 -0700)]
LU-668 mdd: Rename MDS_*_FL to LUSTRE_*_FL and update usage

Fully remove MDS_*_FL and replace them with LUSTE_*_FL.  These
values are explictly not defined using LDISKFS_*_FL as was
done in mdd_internal.h to avoid a dependency on ldiskfs.h.

"These flags are part of the wire protocol.  We already have
portable definitions of these as "MDS_APPEND_FL", et. al.
in lustre_idl.h.  Since MDS_*_FL is no longer used in the
Lustre code (in preference to LUSTRE_*_FL), it makes sense
to just rename these in lustre_idl.h, and their corresponding
uses in wire*.c."
    -- Andreas

This was originally filed as Lustre bugzilla 22408.

Change-Id: Ib606bd43a93fc7c53f1660cc63751ec4ff9a76ed
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/1349
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-839 tests: test_52 fails with loop devices MRP-233
Andriy Skulysh [Wed, 5 Oct 2011 13:53:24 +0000 (16:53 +0300)]
LU-839 tests: test_52 fails with loop devices MRP-233

During loop mount actual device is replaced with /dev/loopX
Use mount path as umount parameter.

Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Change-Id: Ic0561ccfd52036d7ed18e05848be7b4342f4cc62
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Bruce Korb <bruce_korb@xyratex.com>
Reviewed-on: http://review.whamcloud.com/1694
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-665 mds: Reduce MDS-OSS connection flags
Li Wei [Fri, 9 Sep 2011 13:13:25 +0000 (21:13 +0800)]
LU-665 mds: Reduce MDS-OSS connection flags

Some connection flags MDSs send to OSSs are unnecessary or misleadingly
implying features not (yet) implemented by current MDSs.  This patch
removes the following ones:

  - OBD_CONNECT_64BITHASH.  MDSs don't send MDS_READPAGE or FLD_QUERY
    requests to OSSs.

  - OBD_CONNECT_BRW_SIZE.  MDSs don't do bulk I/O with OSSs.

  - OBD_CONNECT_CKSUM.  Ditto.

  - OBD_CONNECT_FID.  MDSs don't support OST FIDs.

Change-Id: If94f13cbb0a45b18f87163cfd0936566c67630e4
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1375
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-16 idl: fix obd_connect_data padding comments
Andreas Dilger [Thu, 29 Sep 2011 23:48:51 +0000 (17:48 -0600)]
LU-16 idl: fix obd_connect_data padding comments

Fix incorrect comments about 2.2 addition new padding fields
in obd_connect_data, since this was landed in 2.1 after all.
This doesn't really affect 2.1, since it is self-evident that
those fields are in 2.1, but may be relevant in future releases.

Add these new fields to wiretest/wirecheck as well.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I0508934629dd028371211453c405b9c0a7cc9880
Reviewed-on: http://review.whamcloud.com/1447
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-846 docs: add lfs_migrate.1 to distributed RPMs
Andreas Dilger [Tue, 15 Nov 2011 09:12:37 +0000 (02:12 -0700)]
LU-846 docs: add lfs_migrate.1 to distributed RPMs

The lfs_migrate.1 map page needs to be installed so that users
more are aware of this command and how to use it.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I9bb586496abc101c2de955664fd95b3b20a23818
Reviewed-on: http://review.whamcloud.com/1701
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Richard Henwood <rhenwood@whamcloud.com>
8 years agoLU-527 build: update ChangeLog for recent releases
Andreas Dilger [Thu, 17 Nov 2011 22:47:23 +0000 (15:47 -0700)]
LU-527 build: update ChangeLog for recent releases

Update the lustre/ChangeLog:
- list supported kernel versions in descending order so that it is
  more clear which is the newest and oldest versions.
- change "Patchless Client" URL (which is very old news) to point
  to the "Lustre Support Matrix" page.
- update actual release date of Lustre 2.1

Update the lnet/ChangeLog:
- remove mention of old and obsolete LNDs entirely
- move some LNDs to "Available but unsupported:" for clarity
- indicate Lustre 2.1.0 was released
- add TBD Lustre 2.2.0 release block

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I623d9c0693763dce7448b5829a1ca16ee92ab048
Reviewed-on: http://review.whamcloud.com/1710
Tested-by: Hudson
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-322 tests: Pool test fixes for large number of OSTs
James Simmons [Wed, 30 Nov 2011 15:07:18 +0000 (10:07 -0500)]
LU-322 tests: Pool test fixes for large number of OSTs

This patch fixes issues with large numbers of OSTs with the
ost-pools test. We need to use the hexidecimal numbers for
the pool args since the OSTs UUID are named with hex numbers.
Curently the test do pass but errors can be seen in the logs
when more than 9 OSTs exist.

Change-Id: I2bed80a1c55fc7cd405dc530876ef517a380c423
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/251
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
8 years agoLU-820 Increase LU_CDEBUG_LINE so that osc page messages fit.
Oleg Drokin [Thu, 3 Nov 2011 03:41:09 +0000 (23:41 -0400)]
LU-820 Increase LU_CDEBUG_LINE so that osc page messages fit.

LU_CDEBUG_LINE at 255 does not quite fit osc-page message out of
osc_page_print that is quite long.
As a result we get annoying "does not end in newline" console messages
when this happens.

Doubling LU_CDEBUG_LINE certainly should be enough.

Change-Id: Iec8635d6578e192d3b33643c4b1dab1dae2be6b4
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1642
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-883 commit: commit-msg rewrite
Bruce Korb [Tue, 6 Dec 2011 15:41:38 +0000 (07:41 -0800)]
LU-883 commit: commit-msg rewrite

 1. do global initializations in function.
    collect the read only and state monitoring initializations
    to one place where they can be easily identified.

 2. Move the signoff and changeid code to functions.
    Have them call a "ck_wrapup" function to validate
    the processing state for doing the summary/changeid/etc.
    change-id: may now appear before signed-off-by:

 3. Move the wrap up validations to the first-time-through-wrapup
    code in ck_wrapup.

 4. add a function for handling innocuous tag lines.
    Only call "ck_wrapup".

 5. Remove all $LINE echoing to the end of the case statement.
    Use "break" and/or "continue" to bypass line echo.

 6. use [ ${#foo} -gt 0 ] in preference to [ $foo ].
    This scriptlett will echo "no":
      $ f='! -z' ; [ $f ] && echo yes || echo no
    You could quote "$f", but directly checking length more
    correctly represents the intent.

 7. Removed conditions for setting HAS_LAST_BLANK=true because
    the conditions were written to be *ALWAYS* true.
      foo=false
      [ $foo ] && echo hi there
    will always echo out, "hi there".

 8. eliminate the convoluted and slightly wrong state management
    for trying to identify a "diff" block.  Instead, just read
    in the next line in that case clause and either break out
    of the read loop or echo out both of the lines.

 9. Do not fork and exec a bunch of programs when ${#LINE} will
    directly tell you how many characters are in the line.

10. do default line processing in a function, too.  Makes regex
    code selection much easier to understand.  Also allowed
    me to remove the ";&" case statement fall-through construct.
    Removed $HAS_SIGNOFF check since $IS_WRAPPING_UP is tested
    upon function entry.

11. emacs editor hints.

12. TODO: read the first two lines outside of the loop and
    verify that they are up to snuff.  Then remove a bunch of
    checks scattered about the code.  Line counting, etc., etc.

Signed-off-by: Bruce Korb <bruce_korb@xyratex.com>
Change-Id: I30a4a9b77b82af9f9b965823487001cbd5c28230
Reviewed-on: http://review.whamcloud.com/1764
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoLU-810 changelog: Fix hsm_get_cl_xxx() helpers
Aurelien Degremont [Fri, 4 Nov 2011 22:01:59 +0000 (23:01 +0100)]
LU-810 changelog: Fix hsm_get_cl_xxx() helpers

Fix helpers for extracting information from HSM changelog records.

HSM records in changelog contain additionnal information from standard
records. This includes HSM event, error code and some flags.
Macros helpers exist to help user-space tools, like Policy Engine, to
extract them. Those helpers were broken, this fixes them.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: I7ba1e6a3ec7635b646f7a2dfa8173bf90529fbd9
Reviewed-on: http://review.whamcloud.com/1651
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoLU-847 quota: New quota tests to exercise accounting
Niu Yawei [Thu, 15 Sep 2011 02:37:54 +0000 (19:37 -0700)]
LU-847 quota: New quota tests to exercise accounting

three tests are added in sanity-quota.sh:
- basic disk usage tracking for user & group;
- disk usage transfer for user & group;
- disk usage across restart for user & group;

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I605370db52f07875f725f48d7b0ce1bab9af80b3
Reviewed-on: http://review.whamcloud.com/1380
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
8 years agoLU-651 osc: suppress message in can_merge_pages()
Bobi Jam [Sun, 2 Oct 2011 08:08:56 +0000 (16:08 +0800)]
LU-651 osc: suppress message in can_merge_pages()

Thottle messages if adjacent brw pages are not mergeable with
different OBD_BRW_NOQUOTA flags.

Change-Id: I22ce6f8807e2541d3e6b3c9631f60faa36baa81a
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1328
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-663 kernel: Some arch do not have NUMA features anymore
Gregoire Pichon [Wed, 7 Sep 2011 14:55:04 +0000 (16:55 +0200)]
LU-663 kernel: Some arch do not have NUMA features anymore

Some architectures, especially x86_64, do not have cpu_to_node()
defined as a macro, and node_to_cpumask() exported by the kernel
anymore.

The cpu_to_node() routine is defined either as a macro, as an inline
routine using another exported symbol, or as an exported symbol.
Anyway, the kernel defines this service since at least version
2.6.12.

The node_to_cpumask() routine has been replaced by cpumask_of_node()
for x86 architectures since kernel version 2.6.30.

The set_cpus_allowed() routine is not defined if
CONFIG_CPUMASK_OFFSTACK=y since kernel version 2.6.32.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Change-Id: If81269f403f888d4cde89c6fda5a8d7e10ea70b0
Reviewed-on: http://review.whamcloud.com/1345
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
8 years agoLU-506 kernel: FC15 - blkdev_get_by_dev() used instead of open_by_devnum().
yangsheng [Mon, 5 Dec 2011 16:17:17 +0000 (00:17 +0800)]
LU-506 kernel: FC15 - blkdev_get_by_dev() used instead of open_by_devnum().

Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: I9d633ba5c3004fd23de9522ebc8089792b96ed2c
Reviewed-on: http://review.whamcloud.com/1800
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-717 ldiskfs: MRP-222 Replace sysname with nodename in MMP
Nikitas Angelinas [Mon, 5 Dec 2011 22:31:12 +0000 (22:31 +0000)]
LU-717 ldiskfs: MRP-222 Replace sysname with nodename in MMP

sysname holds "Linux" by default, i.e. what appears when doing a
"uname -s"; nodename should be used to print the machine's hostname,
i.e. what is returned when doing a "uname -n" or "hostname", and what
gethostname(2)/sethostname(2) manipulate, in order to notify the
administrator of the node which is contending to mount the
filesystem.

Andreas says this was introduced when porting the MMP patches from
RHEL5 to RHEL6, and then also pushed upstream to ext4; a patch for
upstream ext4 has already been submitted.

Signed-off-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Change-Id: I207bf145d114a9981b5a6add4bbf92ca76f71840
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-on: http://review.whamcloud.com/1419
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
8 years agoLU-506 kernel: FC15 - tcp_sendpage() uses struct sock.
yangsheng [Thu, 8 Dec 2011 00:10:20 +0000 (08:10 +0800)]
LU-506 kernel: FC15 - tcp_sendpage() uses struct sock.

Since 2.6.36 tcp_sendpage() uses 'struct sock' as 1st argument
instead of 'struct socket'.

Change-Id: I1641541e3e52f3f47c2dfeb63a5311f5f9a0634a
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1739
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
8 years agoLU-887 mgc: prevent client IR with old server
Bobi Jam [Sat, 3 Dec 2011 14:21:46 +0000 (22:21 +0800)]
LU-887 mgc: prevent client IR with old server

Prevent IR enabled client start IR handling with IR unawared MGS
server.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I9773eafa437358dbf4988e0fddd490b0daf59358
Reviewed-on: http://review.whamcloud.com/1798
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>