Whamcloud - gitweb
fs/lustre-release.git
7 years agoLU-709 build: remove old userspace-OSS configure
Andreas Dilger [Tue, 6 Nov 2012 22:47:13 +0000 (15:47 -0700)]
LU-709 build: remove old userspace-OSS configure

Remove the old and obsolete userspace-OSS configure options.  These
are not used anywhere in the code, and are not intended to be needed
any time in the near future.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I9b50dbd4f22ad07696be7b3a39cbf87ab5500c1e
Reviewed-on: http://review.whamcloud.com/4828
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-992 kernel: deprecate RHEL5 server support for master
yangsheng [Fri, 21 Dec 2012 04:46:29 +0000 (12:46 +0800)]
LU-992 kernel: deprecate RHEL5 server support for master

Remove patches relate to RHEL5 server support.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I694c9bbe0b6713119501392540c9cf5c6f8e53f3
Reviewed-on: http://review.whamcloud.com/4865
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
7 years agoLU-2337 scripts: init script to not use -d with zpool import
Ned Bass [Tue, 27 Nov 2012 19:06:43 +0000 (11:06 -0800)]
LU-2337 scripts: init script to not use -d with zpool import

The zpool import command shipped with ZFS on Linux now searches the
following directories for devices (in order), eliminating the need for
the zpool import -d option in the lustre init script.

  /dev/disk/by-vdev   - Custom rules, use first if they exist
  /dev/disk/zpool     - Custom rules, use first if they exist
  /dev/mapper         - Use multipath devices before components
  /dev/disk/by-uuid   - Single unique entry and persistent
  /dev/disk/by-id     - May be multiple entries and persistent
  /dev/disk/by-path   - Encodes physical location and persistent
  /dev/disk/by-label  - Custom persistent labels
  /dev                - UNSAFE device names will change

The command formerly only searched /dev by default, so the init script
used the -d option to give precedence to preferred locations such as
/dev/mapper.  However this approach is error-prone on systems where
/dev/mapper exists but doesn't contain the zpool member devices.  With
this change the default script behavior should work on systems using
any of the above directories.

Also print an error message if zpool import fails, and remove an
unused variable from an unrelated function.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I257da17328bec84aa568a61a40cdb374535aa935
Reviewed-on: http://review.whamcloud.com/4686
Tested-by: Hudson
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2361 quota: allow upgraded fs to start w/o spc accounting
Johann Lombardi [Wed, 21 Nov 2012 09:56:46 +0000 (10:56 +0100)]
LU-2361 quota: allow upgraded fs to start w/o spc accounting

All filesystems upgraded to 2.4 should run tunefs.lustre --quota to
have functional space accounting. If not done, we still allow the
filesystem to be started, but print an error on the console if the
administrator tries to enable quota.

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: I98ff2cf5e5c381353b219679b935bc0584b033cc
Reviewed-on: http://review.whamcloud.com/4642
Tested-by: Hudson
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2164 utils: mkfs.lustre segfaults if no "/" in dataset name
Ned Bass [Wed, 7 Nov 2012 20:46:13 +0000 (12:46 -0800)]
LU-2164 utils: mkfs.lustre segfaults if no "/" in dataset name

mkfs.lustre incorrectly assumes that the libzfs function
zfs_name_valid() disallows filesystem names without a "/", and so uses
the result of strrchr(pool, '/') without a NULL check.  In fact
dataset names without a / are permitted, as in the case of commands
like

   zfs get all tank

where a pool tank is treated like a dataset.  The leads to a segfault
if mkfs.lustre is given a dataset name without a /.  Since lustre
datasets are always created as children of a pool, add a separate
check for a missing slash and print an error if it's missing.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: Ic7bede9ca19d646f64d2f166f189fa6822a70fe3
Reviewed-on: http://review.whamcloud.com/4490
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-2395 ofd: Maintain per-export {read,write}_bytes counters
John L. Hammond [Tue, 27 Nov 2012 20:28:20 +0000 (14:28 -0600)]
LU-2395 ofd: Maintain per-export {read,write}_bytes counters

Add handling of these counters to ofd_counter_incr() and add a test to
sanity to ensure that they work as intended.

Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Change-Id: I49e237a6387b8ece1aecd63987ad4a75897b430b
Reviewed-on: http://review.whamcloud.com/4687
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-2317 mgs: both callbacks are to be fixed
Vitaly Fertman [Mon, 17 Dec 2012 19:48:44 +0000 (23:48 +0400)]
LU-2317 mgs: both callbacks are to be fixed

The commit ORNL-27 introduced a new lock enqueue which drops a
reference on it in the blocking callbacks. however, it turned out
to be racy as if a lock is taken quickly, callback is called twice,
from enqueue completion and from conflicting lock cancel, and lock
reference is decremented twice.  LU-1259 tried to fix it, but only
for 1 callback.

Fix it for mgs_completion_ast_config as well.

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Xyratex-bug-id: MRP-792
Change-Id: I49207cfae230318da3b6dcbe3a63c14d8d94a244
Reviewed-on: http://review.whamcloud.com/4744
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2469 tests: use MDS/OSTDEV and MDS/OSTDEVBASE with zfs
Nathaniel Clark [Tue, 18 Dec 2012 19:05:55 +0000 (14:05 -0500)]
LU-2469 tests: use MDS/OSTDEV and MDS/OSTDEVBASE with zfs

Add support for using MDSDEVn, OSTDEVn, MDSDEVBASE and OSTDEVBASE
variables when testing with zfs.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I89115ce935294cdbbd6620fec3f9dc3eb76f8960
Reviewed-on: http://review.whamcloud.com/4854
Tested-by: Hudson
Reviewed-by: Cliff White <cliff.white@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1756 kernel: cleanup lustre_compat25.h
Peng Tao [Tue, 30 Oct 2012 09:15:02 +0000 (17:15 +0800)]
LU-1756 kernel: cleanup lustre_compat25.h

Use cpumask_of_node() rather than node_to_cpumask().
cpumask_of_node() is availabe in latest kernel, while
node_to_cpumask() isn't.

Also fix how cpumask_of_node() is detected. Some OFED
backports cpumask_of_node() and put it in private
include/linux/cpumask.h.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I770fcb549c354c2c925c821d2a8920d867274d7a
Reviewed-on: http://review.whamcloud.com/4588
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
7 years agoLU-2414 tests: fix job # substitution in replay_barrier
Nathaniel Clark [Fri, 30 Nov 2012 16:56:51 +0000 (11:56 -0500)]
LU-2414 tests: fix job # substitution in replay_barrier

The extra % in front of ${!svc} can cause erronious substitution by
bash, as in If ${!svc} resolves to something like nlc then the %n
becomes job number 0 so the filesystem is 0lc and that fails.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I4a0b0db86e960a33dab95b2e7ca4aed7fce4a55d
Reviewed-on: http://review.whamcloud.com/4725
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2056 mdd: create transaction before locking object
Hongchao Zhang [Sun, 30 Dec 2012 12:37:41 +0000 (20:37 +0800)]
LU-2056 mdd: create transaction before locking object

OSD requires transactions to be created before locking the object.
however, mdd_close has a rare call path violating this rule.

Signed-off-by: Liang Zhan <liang@whamcloud.com>
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: Ibf7930338c3d1216b6ec1e0c51403ab4b8f3b940
Reviewed-on: http://review.whamcloud.com/4461
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-2526 quota: writer proper size in test_9
Niu Yawei [Thu, 27 Dec 2012 03:05:28 +0000 (22:05 -0500)]
LU-2526 quota: writer proper size in test_9

Write proper size (4.5G) in test_9 of s-q.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I5233368bbfb47e926c852baf413791ee043acded
Reviewed-on: http://review.whamcloud.com/4892
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
7 years agoLU-2446 build: Update Whamcloud copyright messages to Intel
Keith Mannthey [Fri, 4 Jan 2013 03:34:24 +0000 (19:34 -0800)]
LU-2446 build: Update Whamcloud copyright messages to Intel

Update script to assign all Whamcloud copyrights to Intel and add
copyrights to files that have been edited by Whamcloud since
2010-06-01.

Changes to the script include:
  Ability to exclude some previous commits.
  Intel Authors now reconized
  Ability to deal with a few common forms in the Intel Copyright
  Xyratex Copyright aware
  Updated user messages
  Detects Git non-linear year issues.

Signed-off-by: Keith Mannthey <keith@whamcloud.com>
Change-Id: I8c817e6564ea51b88223f954af8b838d713c9a44
Reviewed-on: http://review.whamcloud.com/4811
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
7 years agoLU-2446 build: Update Whamcloud copyright messages for Intel
Keith Mannthey [Fri, 4 Jan 2013 02:48:41 +0000 (18:48 -0800)]
LU-2446 build: Update Whamcloud copyright messages for Intel

Update the copyright messages for master branch for Intel.

This is the result of the updatecw.sh script.

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: Id8dc454e7a5b6dffef64aa6efefeaaaea966d780
Reviewed-on: http://review.whamcloud.com/4812
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
7 years agoLU-2446 build: Update Whamcloud copyright messages for Intel
Keith Mannthey [Fri, 4 Jan 2013 01:56:25 +0000 (17:56 -0800)]
LU-2446 build: Update Whamcloud copyright messages for Intel

Update the copyright messages for master branch for Intel.

These are the manual changes required.
Issues addressed:
  The addition of the GPL to two header files
  Updating the Man page copyrights
  Dealing with nonlinear year issues in git
  Removal of a double copyright
  Careful addition of Intel copyrights in a tricky spots

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: Iaf8bd9f2a7e38c265c86c477fdf51607c1590b86
Reviewed-on: http://review.whamcloud.com/4948
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
7 years agoLU-2504 procfs: Call put_cpu() if stats alloc fails
John L. Hammond [Mon, 17 Dec 2012 23:34:57 +0000 (17:34 -0600)]
LU-2504 procfs: Call put_cpu() if stats alloc fails

Call put_cpu() if lprocfs_stats_alloc_one() fails in
lprocfs_stats_lock().

Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Change-Id: I12c3eb9ecbbef3086493d63c300ddb853d86dd98
Reviewed-on: http://review.whamcloud.com/4845
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2503 libcfs: Call lbug_with_loc() in LASSERT()
John L. Hammond [Mon, 17 Dec 2012 23:07:27 +0000 (17:07 -0600)]
LU-2503 libcfs: Call lbug_with_loc() in LASSERT()

LASSERT() declares a msgdata which can be passed to lbug_with_loc()
instead of calling LBUG() thereby saving /millions/ of bytes.  Also
remove unused libcfs_assertion_failed().

Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Change-Id: Iac267c7804b5e18f687f47b2eea585c655e7bb21
Reviewed-on: http://review.whamcloud.com/4844
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-2351 tests: remote_node works wrong
Kyrylo Shatskyy [Thu, 8 Nov 2012 10:55:33 +0000 (12:55 +0200)]
LU-2351 tests: remote_node works wrong

The test-framework's remote_node works wrong for host names with any
suffixes.

To resolve this the host identification has been switch to IP address.
Target node address is compared with address on each interface
of the local host. Assume host remote if it is unable to resolve
its IP address. Results of comparison are cached in global variables
in order to suppress host resolution overhead.

Signed-off-by: Kyrylo Shatskyy <kyrylo_shatskyy@xyratex.com>
Xyratex-bug-id: MRP-629
Reviewed-by: Alexander Lezhoev <Alexander_Lezhoev@xyratex.com>
Reviewed-by: Roman Grigoryev <Roman_Grigoryev@xyratex.com>
Reviewed-by: Bruce Korb <Bruce_Korb@xyratex.com>
Change-Id: I6128650ac8c5cc2759f9ff53856b5ffdf3222aa4
Reviewed-on: http://review.whamcloud.com/4609
Reviewed-by: Bruce Korb <bruce_korb@xyratex.com>
Reviewed-by: Alexander Lezhoev <alexander_lezhoev@xyratex.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2489 cfs: Use vfs_write() in cfs_user_write()
John L. Hammond [Thu, 13 Dec 2012 18:18:48 +0000 (12:18 -0600)]
LU-2489 cfs: Use vfs_write() in cfs_user_write()

cfs_user_write() calls filp->f_op->write() which does not check the
mode of filp.  Call vfs_write() instead.

Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Change-Id: I0cbb2e88d813fe53ce9d625c4299fc5277d246f5
Reviewed-on: http://review.whamcloud.com/4824
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
7 years agoLU-2566 tests: delete obsolete kernel version check
Bob Glossman [Fri, 4 Jan 2013 01:39:56 +0000 (17:39 -0800)]
LU-2566 tests: delete obsolete kernel version check

Since the kernel version check that leads to the reported problem
is obsolete it is simplest to just delete the check

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I190e9d71877268600c877fa156e8911f84f56beb
Reviewed-on: http://review.whamcloud.com/4947
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1187 test: add dne test to insanity.sh
wangdi [Sun, 18 Nov 2012 21:34:23 +0000 (13:34 -0800)]
LU-1187 test: add dne test to insanity.sh

1. Add test_10 (fail MDT0/OST/MDT1) and
test_11(fail MDT0/client/MDT1), test_12(MDTs/OSTs/Clients),
test_13(MDTs/Clients/OSTs) and test_14(OSTs/Clients/MDTs).

2. Replace fail SINGLEMDS with fail all MDTs to
fully test DNE.

Change-Id: Ic3cae011d6ede5b0b9616608cc840a0565777ecd
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4319
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
7 years agoLU-2127 osc: fix wrong osc_announce_cached() msgs
Bruno Faccini [Wed, 10 Oct 2012 17:23:44 +0000 (19:23 +0200)]
LU-2127 osc: fix wrong osc_announce_cached() msgs

In osc_announce_cached() wrong signed/unsigned comparison has been fixed with
a cast.

Unlikely conditions have also been specified, along with some changes to comply
coding rules.

Signed-off-by: Bruno Faccini <bfaccini62@gmail.com>
Change-Id: I8f8f2bdfc673d31054b4db2063d32c3dc34100d8
Reviewed-on: http://review.whamcloud.com/4246
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-2288 build: Support build-id links for kernel modules
John L. Hammond [Fri, 9 Nov 2012 22:06:39 +0000 (16:06 -0600)]
LU-2288 build: Support build-id links for kernel modules

Follow RHEL practice of making kernel modules executable so that their
build-id links are installed and perf an other tools can find
their debuginfo thereby.

Change-Id: I1a288fda0948424b85a61cf4294319dbbe05dd81
Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Reviewed-on: http://review.whamcloud.com/4491
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Reviewed-by: Keith Mannthey <kemannthey@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2492 obdclass: lu_object_find_at() waits forever
Bobi Jam [Sat, 5 Jan 2013 00:52:22 +0000 (08:52 +0800)]
LU-2492 obdclass: lu_object_find_at() waits forever

In htable_lookup(), cfs_hash_bd_lookup_locked() could add an object
refcount and it messes with lu_object_put(), and the object's supposed
last holder will miss the change to free the object, leaving an 0
referred object in the hash table, and keeps lu_object_find_at()
waiting forever.

In this patch, we do not take the refcount of the dying object
in htable_lookup().

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I4bd57e944bf9167d70d97845be55241b538872df
Reviewed-on: http://review.whamcloud.com/3439
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2489 mdc: Restrict access to hsm_nl file
John L. Hammond [Thu, 13 Dec 2012 18:24:45 +0000 (12:24 -0600)]
LU-2489 mdc: Restrict access to hsm_nl file

Disallow ordinary users from writing to /proc/fs/lustre/mdc/*/hsm_nl
to prevent denials of service.

Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Change-Id: Ibd37cb9365bc4583fa964b18c3d87f264d1ca33d
Reviewed-on: http://review.whamcloud.com/4825
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2432 ptlrpc: alloc_rqbd spin on vmap_area_lock
Liang Zhen [Tue, 1 Jan 2013 08:23:09 +0000 (16:23 +0800)]
LU-2432 ptlrpc: alloc_rqbd spin on vmap_area_lock

vmalloc based allocations can potentially take a very long time to
complete due to a regression in the kernel. As a result, MDS service
threads might lock up for certain periods of time while all of the
cores spin on the vmap_area_lock down in ptlrpc_alloc_rqbd.

Tihs patch only allow one thread of each CPT to enter rqbd
alloation path.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I4ba442801859ae58cf8e8dd8ae18af1062379639
Reviewed-on: http://review.whamcloud.com/4939
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2190 mountconf: zfs processes mount parameters
Lai Siyao [Wed, 5 Dec 2012 02:32:43 +0000 (10:32 +0800)]
LU-2190 mountconf: zfs processes mount parameters

Add zfs support to store/fetch lustre mount parameters into/from
dataset properties.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I1ca6255cc19ef99727c639432741164993b09bd8
Reviewed-on: http://review.whamcloud.com/4732
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-2043 iokit: sgpdd-survey support for multiple servers
Gregoire Pichon [Fri, 28 Sep 2012 12:17:51 +0000 (14:17 +0200)]
LU-2043 iokit: sgpdd-survey support for multiple servers

This patch is an improvement to sgpdd-survey script that
allows measurement of raw storage bandwidth of multiple
servers sharing storage arrays.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Change-Id: I2506818303ae26cc1a378f3a0da0e081582f988d
Reviewed-on: http://review.whamcloud.com/4122
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2360 ptlrpc: a few fixes for req_history read
Liang Zhen [Sun, 23 Dec 2012 09:53:29 +0000 (17:53 +0800)]
LU-2360 ptlrpc: a few fixes for req_history read

This patch fixed a few issues in seq_file operations of ptlrpc
request history:
- start() function always start from CPT 0 despite of start position,
  this might cause endless read.
- ptlrpc history sequence can't be directly used as read position of
  seq_file, because seq_read() can increase position to indicate
  reading of the next element, this will actually change CPT ID of
  sequence, which means it's possible that next() will never be able
  to finish iteration of requests on a CPT in some case.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I3ee4e06d3b93dcc61bfd910725d4cab87b555511
Reviewed-on: http://review.whamcloud.com/4888
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
7 years agoLU-2104 recovery: keep valid obd_stale_clients during recovery
Mikhail Pershin [Tue, 20 Nov 2012 18:01:23 +0000 (22:01 +0400)]
LU-2104 recovery: keep valid obd_stale_clients during recovery

- in class_fail_export() update obd_stale_clients counter if
  recovery is in progress. That fixes endless recovery issues.
- class_disconnect_stale_exports() should check exp_failed and
  exclude such exports from being evicted once more.
- set obd_no_conn flag in ofd_prepare() like mdt does.
- remove check for obd_no_conn from check_for_clients(). That is
  extra check as we don't allow any client to connect while
  obd_no_conn is set

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I439a1edd49a9c51f42df4c423d7c165468a3d38d
Reviewed-on: http://review.whamcloud.com/4636
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-2237 tests: new test for re-recreating last_rcvd
Fan Yong [Tue, 11 Dec 2012 23:25:46 +0000 (07:25 +0800)]
LU-2237 tests: new test for re-recreating last_rcvd

To verify that the lost "last_rcvd" file can be re-created
when server mount.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I3eca382f37aa983bed89418c5b5d997d594fd1f3
Reviewed-on: http://review.whamcloud.com/4455
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-2515 quota: handle OBD_QC_CALLBACK for interoperability
Niu Yawei [Fri, 21 Dec 2012 04:07:18 +0000 (23:07 -0500)]
LU-2515 quota: handle OBD_QC_CALLBACK for interoperability

Add back the OBD_QC_CALLBACK handler, to make 2.4 client interop
with old servers.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Idf5614d1755c87146e2f99cc07dd70f1395733e6
Reviewed-on: http://review.whamcloud.com/4878
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
7 years agoLU-2569 test: use xattr.h from sys.
Richard Henwood [Thu, 3 Jan 2013 22:37:09 +0000 (16:37 -0600)]
LU-2569 test: use xattr.h from sys.

glibc now provides sys/xattrs.h. This is used over the
old attr/xattr.h originally provided by SGI.

Signed-off-by: Richard Henwood <richard.henwood@intel.com>
Change-Id: Ie3ca5b53e8a1a71ac2b51431780c5dbc19e18594
Reviewed-on: http://review.whamcloud.com/4946
Tested-by: Hudson
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1187 tests: add create remote directory to racer
wangdi [Sun, 18 Nov 2012 21:26:54 +0000 (13:26 -0800)]
LU-1187 tests: add create remote directory to racer

Add create remote directory to racer

Test-Parameters: envdefinitions=SLOW=yes testlist=racer
Change-Id: Iac666d78ac8696dd4fd3e0318d105bb0040d10f8
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4365
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1199 build: Refactor ldiskfs's build system
Christopher J. Morrone [Thu, 29 Nov 2012 22:05:39 +0000 (14:05 -0800)]
LU-1199 build: Refactor ldiskfs's build system

Lustre has a complicated build system that combines automake
files and the kernel's Makefile.in build system in a rather
serpentine system that has long chains of makefile includes,
making it very difficult for the reader to ever know exactly
which targets and reles will either be required or  available
under any specific set of conditions.

The good news is that none of that is required by ldiskfs
because ldiskfs is only built for kernel-space Linux.
We only need one fairly straight forward build path.

To simplify the build system, we:

- Remove Rules.in
- Remove all autoMakefile.am files
- Remove confusing build/Makefile
- Combine the three .m4 files into one, since
  that was just a hold-over from Lustre's build system.
- Cleanup and improve some of the m4 macros
- Remove the multi-level build/ subdirectory tree
  and replace with single-level config subdirectory.
- Fix the ldiskfs debuginfo package (actually contains
  the patched source of ldiskfs!)
- Simplify autogen.sh
- Update .gitignore files

Change-Id: I9e6112c150c1e0f9076d5e689b69534eab7a964b
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4728
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-718 mds: new MDS layer.
wangdi [Thu, 26 Sep 2013 08:36:35 +0000 (01:36 -0700)]
LU-718 mds: new MDS layer.

Pull out ptlrpc service from MDT and create new MDS layer.

Change-Id: Ib8a5d22c1f85d086f6ed37e4c46c7aa0e3c4b03a
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4354
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2501 osc: hold cli list lock for osc_exit_cache
Jinshan Xiong [Sun, 16 Dec 2012 17:42:13 +0000 (09:42 -0800)]
LU-2501 osc: hold cli list lock for osc_exit_cache

Somehow it's not held before which hit the assert.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I48e50c3e8df197ed5d17ceecf41e995cc7d87f69
Reviewed-on: http://review.whamcloud.com/4834
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1199 build: Untangle the ldiskfs build system from lustre 09/4409/10
Christopher J. Morrone [Mon, 26 Nov 2012 21:38:35 +0000 (13:38 -0800)]
LU-1199 build: Untangle the ldiskfs build system from lustre

Make ldiskfs have its own independant build system, with no
sharing of files from higher up the tree in lustre.  To begin
with, this means some minor duplication of functions in build
scripts.  However, it is my opinion that the simpicity that
is gained by having a clear separation of the build systems
far outweighs the costs of some initial duplication.  It
also opens up the possibility of easily moving ldiskfs into
its own separate git repo should we choose to do so in the
future.

The separation of the build systems began by removing the
ldiskfs/build->lustre/build symbolic link, and making a
complete copy of the lustre/build tree into ldiskfs/build.
Then I iterated on removing everything from ldiskfs/build
that was unnecessary to build ldiskfs.

Since lustre's build/autogen.sh is no longer shared between
two build systems, I removed the wrapper autogen.sh scripts
and made the upper-level autogen.sh in both lustre and
ldiskfs full-fledged scripts.  This meant making a minor
change to remove bash specific language (pushd/popd).

Now the ldiskfs subtree is capable of being built completely
absent of the lustre tree.  There are no doubt more things
that can be trimmed and cleaned up, but that much is now
complete.

Also, along the way I noted build/Makefile is being ignored
by git, even though it is part of the source tree, and not
auto-generated by the build system.  I added "!Makefile" to
.gitignore in the lustre/build directory so that it is no
longer ignored.

Change-Id: I98e437a0da897680e3ea6f21f15bcd6287367166
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4409
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
7 years agoLU-2148 mount: Kernel update for latest FC18 kernel
yangsheng [Sat, 22 Dec 2012 20:14:49 +0000 (04:14 +0800)]
LU-2148 mount: Kernel update for latest FC18 kernel

Upstream kernel has hidden the mount gut. So get rid
of mount.h dependence. Then we can build patchless
client using kernel-devel rpms for FC18.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I53c6b56cee8276afc2a5ebc61d9199fbef1edfc9
Reviewed-on: http://review.whamcloud.com/4741
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
7 years agoLU-1994 llite: atomic_open support
Peng Tao [Tue, 28 Aug 2012 01:53:27 +0000 (09:53 +0800)]
LU-1994 llite: atomic_open support

v3.6 adds iop->atomic_open, to facilitate atomic lookup/create/open.
In the meantime, struct open_intent is removed from nameidata, and
->lookup()/->create() on longer carries intent data. So Lustre has
to support atomic_open in order to preserve intent functionality.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Ibf4eee5a98c7a86417dc22b0075f647600328668
Reviewed-on: http://review.whamcloud.com/4387
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agonew tag 2.3.58 2.3.58 v2_3_58 v2_3_58_0
Oleg Drokin [Mon, 31 Dec 2012 21:38:29 +0000 (16:38 -0500)]
new tag 2.3.58

Change-Id: I69ef99e4ef58b9b88fc20dc5c94314520f8a98b2

7 years agoLU-1187 fld: fix fldb proc after moving range lookup to fld.
wangdi [Wed, 25 Sep 2013 23:58:35 +0000 (16:58 -0700)]
LU-1187 fld: fix fldb proc after moving range lookup to fld.

Read fldb entries from index file directly, instead of cache, because
it might conflict with cache merging process.

Also a few fixes to make both ldiskfs and ZFS work for fldb procfs.

Change-Id: I2b8d0014b0ed0fe64c36f884f90862e720fe38e4
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4350
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: John Hammond <jhammond@tacc.utexas.edu>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2240 fld: Move range lookup to fld.
wangdi [Wed, 25 Sep 2013 23:57:01 +0000 (16:57 -0700)]
LU-2240 fld: Move range lookup to fld.

Because ZFS does not support range lookup in a ZAP, we will move
range lookup  to FLD, and do an in-memory lookup there.  The FLD
entries are still stored in an index on disk, but this is just a
container and is not used for searching anymore.

It is expected the FLD will always be able to fit in RAM.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: If8cadcc30743e6d63ba779a430bc585af29d51fe
Reviewed-on: http://review.whamcloud.com/4396
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2291 tests: add "lfs setstripe" to racer
Andreas Dilger [Tue, 6 Nov 2012 19:22:08 +0000 (12:22 -0700)]
LU-2291 tests: add "lfs setstripe" to racer

During the file_create.sh test, instead of just creating the file with
default striping use "lfs setstripe -c ${{RANDOM % OSTCOUNT}}" to both
exercise the "lfs setstripe" path under load, as well as make the
file IO spread across multiple OSTs.

Test-Parameters: envdefinitions=SLOW=yes testlist=racer
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I26020d516388af0bb95d320c0f2a364395bd0b12
Reviewed-on: http://review.whamcloud.com/4478
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2505 osc: use GFP_ATOMIC for ll_dirty_page_discard_warn()
Jinshan Xiong [Wed, 19 Dec 2012 17:12:23 +0000 (09:12 -0800)]
LU-2505 osc: use GFP_ATOMIC for ll_dirty_page_discard_warn()

Because it can be called inside client obd list lock as follows:

        ll_dirty_page_discard_warn at ffffffffa0a3d252 [lustre]
        vvp_page_completion_common at ffffffffa0a7adfc [lustre]
        vvp_page_completion_write_common at ffffffffa0a7ae6b [lustre]
        vvp_page_completion_write at ffffffffa0a7b83e [lustre]
        cl_page_completion at ffffffffa05eed8f [obdclass]
        osc_completion at ffffffffa0880812 [osc]
        osc_ap_completion at ffffffffa086a544 [osc]
        brw_interpret at ffffffffa0876d69 [osc]

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I04a4cc1142e019d39dccf2c1f3084c0298acff9d
Reviewed-on: http://review.whamcloud.com/4870
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-2500 osp: osp_precreate_timeout_condition() to return 1
Alex Zhuravlev [Tue, 18 Dec 2012 12:22:42 +0000 (16:22 +0400)]
LU-2500 osp: osp_precreate_timeout_condition() to return 1

so that l_wait_even() in osp_precreate_reserve() can expire.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Iee7f9e2195103b25647a41d95a13c3bc4d3dd344
Reviewed-on: http://review.whamcloud.com/4846
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2285 osp: Block new reservations during orphan recoveries
Li Wei [Thu, 15 Nov 2012 10:26:27 +0000 (18:26 +0800)]
LU-2285 osp: Block new reservations during orphan recoveries

If a thread reserves a pre-created object during an orphan recovery,
it may get an orphan that is being destroyed by the orphan cleanup
request.  This patch introduces a new flag, opd_pre_recovering, to
indicate an OSP is doing orphan recovery and makes sure new
reservations are blocked at least until the orphan recovery is done.

Change-Id: If011de57d0e365768ea28a705c864388eaed76d4
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/4590
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-2490 mdd: mdd_links_rename() be quiet in regular cases
Alex Zhuravlev [Mon, 17 Dec 2012 06:45:56 +0000 (10:45 +0400)]
LU-2490 mdd: mdd_links_rename() be quiet in regular cases

when LINKEA is overflowed or some link can not be found in
LINKEA due to previous overflow.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I6bc8000df4af61031fd0c51c7d9d05c248f0d777
Reviewed-on: http://review.whamcloud.com/4838
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2485 lod: initialize v3 to actual buf
Alex Zhuravlev [Wed, 12 Dec 2012 18:26:19 +0000 (22:26 +0400)]
LU-2485 lod: initialize v3 to actual buf

and do not pass v3=NULL to lustre_swab_lov_user_md_v3()

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I7ad7898a736833ac86e0188248c2222a7652f41a
Reviewed-on: http://review.whamcloud.com/4814
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1434 utils: Update Makefile to work out of the box
Nathaniel Clark [Mon, 17 Dec 2012 17:21:29 +0000 (12:21 -0500)]
LU-1434 utils: Update Makefile to work out of the box

Add ability to install plugins into user's home directory if not root.
Build using pkg-config for wireshark.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I5b3f5d6df7e5f1de9681645f7f2f4d01800b40cd
Reviewed-on: http://review.whamcloud.com/4851
Tested-by: Hudson
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-1434 utils: Update Wireshark support for LNet and Lustre
Doug Oucharek [Thu, 25 Oct 2012 22:19:43 +0000 (15:19 -0700)]
LU-1434 utils: Update Wireshark support for LNet and Lustre

There was work previously done to create two plugins for Wireshark to
decode LNet and Lustre headers. That work is started was
lustre/contrib as the files packet-lnet.c and packet-lustre.c.

Attempting to build these plugins revealed that Wireshark's API for
dissectors has changed such they no longer build/run. This change
fixes the plugins so they work with the latest stable Wireshark
release: 1.6.8. It also adds logic to allow the plugins to decode
Infiniband packets captured with ibdump.

Note: The LNet decoding appears to be correct, the Lustre decoding
does have problems which will be addressed in future patches.

Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Change-Id: I2fbadf1c8baef1df2c50754646cd9c1f6b30f8e8
Reviewed-on: http://review.whamcloud.com/4393
Tested-by: Hudson
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-1994 llite: don't release nd->path in ll_follow_link
yangsheng [Wed, 19 Dec 2012 08:07:19 +0000 (16:07 +0800)]
LU-1994 llite: don't release nd->path in ll_follow_link

For 3.6 kernel, .follow_link is not allowed to release nd,
as VFS handles itself on error path. So we change to not do
it and report error via nd_set_link().

For all kernels, if ll_follow_link returns NULL and set
error via nd_set_link, VFS will release nd->path in
__vfs_follow_link(). This also matches most in-kernel fs
behavior.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: yang sheng <yang.sheng@intel.com>
Change-Id: I13b7e00822b983c47183ee38357e4490bea3c52c
Reviewed-on: http://review.whamcloud.com/4487
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1337 llite: support SEEK_HOLE and SEEK_DATA
yangsheng [Tue, 18 Dec 2012 04:21:36 +0000 (12:21 +0800)]
LU-1337 llite: support SEEK_HOLE and SEEK_DATA

kernel 3.1 introduced SEEK_HOLE and SEEK_DATA. llite should
handle them as required by vfs. For now, we can just consider
whole file is data.

Also fix race between concurrent SEEK_CURs by taking f_lock
in SEEK_CUR, as implemented since kernel commit ef3d0fd27.
Before that, kernel handled the race by taking i_mutex.

Kernel introduced f_lock to protect f_flags when dropping BKL
in kernel commit db1dd4d3. Later, f_lock is extended to protect
Protects f_ep_links, f_flags, and f_pos vs i_size in lseek
SEEK_CUR.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I944102f20ab1ca1083a16d41e95802d6b8bda15d
Reviewed-on: http://review.whamcloud.com/4579
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
7 years agoLU-1187 tests: Add test_mkdir in sanity for DNE.
wangdi [Wed, 14 Nov 2012 20:02:43 +0000 (12:02 -0800)]
LU-1187 tests: Add test_mkdir in sanity for DNE.

1. Replace mkdir with test_mkdir, which will create local or
remote directory according to its testnum, i.e. choose the
mdt index by testnum % mdt_count, then create directory
by lfs mkdir.

2. Some cleanups replace dxx/fxx with $tdir/$tfile, remove
"--skip" in SKIP message.

Change-Id: I7d5396ddb50c7414f78a76c20772a06da438f4e0
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4359
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-2471 tests: Fix facet_type() to recognise names like mds1_2
Li Wei [Tue, 18 Dec 2012 14:40:49 +0000 (22:40 +0800)]
LU-2471 tests: Fix facet_type() to recognise names like mds1_2

In conf-sanity 24a, mdsdevname() and mdsvdevname() are given facet
numbers like "1_2".  This causes facet_type() to be given facet names
like "mds1_2", which it can not return the facet type "MDS".  This
patch fixes facet_type() to handle names like "mds1_2" properly.

Signed-off-by: Li Wei <wei.g.li@intel.com>
Change-Id: I0203add5f6fdf089d5061ee48c6efca449db1a96
Reviewed-on: http://review.whamcloud.com/4849
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2463 security: osd_mknod shouldn't alter mode after creation
Lai Siyao [Fri, 14 Dec 2012 02:25:08 +0000 (10:25 +0800)]
LU-2463 security: osd_mknod shouldn't alter mode after creation

ldiskfs osd_mknod() calls init_special_inode() after creation, which
will update inode->i_mode, don't use the mode from client because
mode is decided at creation time.

Test-Parameters: envdefinitions=SLOW=yes testlist=posix
Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: Id11c00bf57903e210fc96d33437dd3ece6f2e171
Reviewed-on: http://review.whamcloud.com/4829
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1187 tests: Add DNE test cases in sanity.
wangdi [Wed, 14 Nov 2012 20:00:21 +0000 (12:00 -0800)]
LU-1187 tests: Add DNE test cases in sanity.

1. test_17n: e2fsck check MDTs after remote ops.
2. test_24[x-z]: rename and link validation under remote dir.
3. test_33d openfile and chmod under remote dir.
4. test_230 create/unlink remote dir.

Change-Id: Id0587ab8f7a3daa6ba85ce5255cbd13e6189bd6f
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4358
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-1187 tests: sanity fixes for multiple MDT
wangdi [Mon, 12 Nov 2012 22:44:30 +0000 (14:44 -0800)]
LU-1187 tests: sanity fixes for multiple MDT

1. test_27y: deactive/degrade OSCs on all of MDTs, the original
implementation just assume there will be only 1 MDT.
2. test_39l: set atime_diff on MDT0 during the test.
3. test_129: set max_dir_size on all of MDTs.
4. remove test_55bb which is invalid for current DNE.

Signed-off-by: wang di <di.wang@whamcloud.com>
Change-Id: Idc31b078afd23f9834de2218c88e8167785ea854
Reviewed-on: http://review.whamcloud.com/4523
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-1187 tests: Add DNE tests into recovery-small.
wangdi [Wed, 14 Nov 2012 20:42:22 +0000 (12:42 -0800)]
LU-1187 tests: Add DNE tests into recovery-small.

Add DNE tests in recovery-small 110[a-f].

Change-Id: I80a6d02b65bcd55fce9938be6251dd7e9cfbe802
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4360
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-20 build: fix confirmpatches, remove old patches
Andreas Dilger [Mon, 3 Dec 2012 07:02:26 +0000 (00:02 -0700)]
LU-20 build: fix confirmpatches, remove old patches

Update both confirmpatches.sh and clearpatches.sh scripts to take
a command line argument of the patch directory to check.  Add
options "-h" for help, and "-v" for verbose.

Update confirmpatches.sh to ignore comment lines in patch series.

Update clearpatches.sh to have a "-d" option to delete the patches
it found to be unused.

Remove unused kernel/ldiskfs patches found from running clearpatches.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Id5a1de13930f1c428a13d6816e68db40ce61cab0
Reviewed-on: http://review.whamcloud.com/4755
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1419 lnet: Add support for Cray's Gemini interconnect
James Simmons [Wed, 5 Dec 2012 18:54:39 +0000 (13:54 -0500)]
LU-1419 lnet: Add support for Cray's Gemini interconnect

This patch adds LNET support to use Cray's Gemini
interconnect on their newer systems. The gnilnd was
originally based off of the ralnd.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Chris Horn <hornc@cray.com>
Signed-off-by: Cory Spitz <spitzcor@cray.com>
Change-Id: Ia98a44f4f3d68773438d820c49fe554a3d551dc5
Reviewed-on: http://review.whamcloud.com/3381
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2450: Do not store and use unreferenced oap pointers
Oleg Drokin [Sun, 16 Dec 2012 20:21:49 +0000 (15:21 -0500)]
LU-2450: Do not store and use unreferenced oap pointers

osc_extent_finish looks for the last oap to see if it was a partial
write or not, and does it by storing a pointer to it, but by the time
we need the offsets from this OAP, it might have already been freed
because completion was called.
Change the code to store oap offset and byte count instead.

Change-Id: Id52743e701d9b090907eb42ff4648c589193f000
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4835
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1914 ldlm: add doxygen comments
Ned Bass [Thu, 13 Sep 2012 19:17:56 +0000 (12:17 -0700)]
LU-1914 ldlm: add doxygen comments

Update original patch from bugzilla b=20943 written by Oleg Drokin for
master.  Extensively document functions, data structures and
subsystems in the ldlm module.  Make various improvements to language
and formatting of existing comments.  Complete conversion of major
struct definitions to tab indentation.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Oracle-bug-id: b=20943
Change-Id: I10086a1be943b2b473f90129bc2d6abab31d9bd7
Reviewed-on: http://review.whamcloud.com/3985
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2100 ofd: small batched precreation on a small system
Alex Zhuravlev [Mon, 15 Oct 2012 09:53:29 +0000 (13:53 +0400)]
LU-2100 ofd: small batched precreation on a small system

on a small system (like NAME=local configuration) ldiskfs
transactions can not accept many changes. with batched
precreation in OFD, the default value of 128 objects may
lead to warnings and transaction overflow. to prevent this
OFD checks fs and if it's small (OFD_PRECREATE_SMALL_FS
= 1GB), then initial number of objects to precreate in a
single transaction is set to OFD_PRECREATE_BATCH_SMALL=8.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Id9b9c4b6abd76df69787777cc52380d71fdf5a86
Reviewed-on: http://review.whamcloud.com/4274
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
7 years agoLU-1994 kernel: 3.6 dentry_open uses struct path as first arg
Peng Tao [Tue, 28 Aug 2012 16:08:17 +0000 (00:08 +0800)]
LU-1994 kernel: 3.6 dentry_open uses struct path as first arg

3.6 dentry_open uses struct path as first argument.
see kernel commit 765927b2 for details.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Ib69021356b1483abfcc49f644260b1dcbb57f76b
Reviewed-on: http://review.whamcloud.com/4386
Tested-by: Hudson
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-1994 kernel: kernel 3.6 changes i_dentry/d_alias to hlist
yang sheng [Wed, 5 Dec 2012 19:57:22 +0000 (03:57 +0800)]
LU-1994 kernel: kernel 3.6 changes i_dentry/d_alias to hlist

kernel 3.6 changes i_dentry/d_alias from list to hlist.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: If05f01fe6fe34225ec24b90bf85eb9e9e80f44f3
Reviewed-on: http://review.whamcloud.com/4385
Tested-by: Hudson
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-1994 kernel: 3.5 kernel encode_fh passes in parent inode
Peng Tao [Thu, 23 Aug 2012 05:55:46 +0000 (13:55 +0800)]
LU-1994 kernel: 3.5 kernel encode_fh passes in parent inode

Changed by upsteam commit b0b0382b.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I6d7223b934bfe4151371744ad72bdab6b170c700
Reviewed-on: http://review.whamcloud.com/3757
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
7 years agoLU-1994 llite: kernel 3.5 renames end_writeback to clear_inode
yang sheng [Wed, 5 Dec 2012 19:38:15 +0000 (03:38 +0800)]
LU-1994 llite: kernel 3.5 renames end_writeback to clear_inode

kernel commit dbd5768f8 renames end_writeback to clear_inode,
which used to exist for ~2.6.36 kernels.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I2435e820092085c0fb55539818f4bad9e48ff386
Reviewed-on: http://review.whamcloud.com/3756
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-2329 quota: wait longer in test_7c
Niu Yawei [Tue, 4 Dec 2012 09:25:17 +0000 (04:25 -0500)]
LU-2329 quota: wait longer in test_7c

In test_7c of s-q, we'd wait longer than usual to make sure
the reintegration triggered by quota wb thread is done.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I977b3a03a0e57424a531df13fed5550a753f41c2
Reviewed-on: http://review.whamcloud.com/4739
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
7 years agoLU-1741 test: fix conf_sanity test_18 test case
Bobi Jam [Tue, 14 Aug 2012 11:35:35 +0000 (19:35 +0800)]
LU-1741 test: fix conf_sanity test_18 test case

* We need always check block device's size bigger than its minimum
  requirement.

* Correct code indentation for formatall().

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I884287f43a2d1499a5be986e7d57d8d1a3827a24
Reviewed-on: http://review.whamcloud.com/3632
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2302 scripts: prevent lfs_migrate data disclosure
Daniel Kobras [Wed, 28 Nov 2012 17:57:34 +0000 (09:57 -0800)]
LU-2302 scripts: prevent lfs_migrate data disclosure

Tighten umask to make sure temporary rsync files are created
with strict permissions that don't grant access to unprivileged
users.

Signed-off-by: Daniel Kobras <d.kobras@science-computing.de>
Change-Id: Ie662edfd615a24ce08cbddb9347f197de41d4d27
Reviewed-on: http://review.whamcloud.com/4699
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
7 years agoLU-2302 scripts: null-terminated file lists in lfs_migrate
Daniel Kobras [Wed, 28 Nov 2012 18:12:24 +0000 (10:12 -0800)]
LU-2302 scripts: null-terminated file lists in lfs_migrate

New option -0 allows to use a null-terminated list of file names
on stdin. Changed internal lfs find to use null-terminates lists.

Signed-off-by: Daniel Kobras <d.kobras@science-computing.de>
Change-Id: Iccd928a766968a7513833035684d41a1060c4a4d
Reviewed-on: http://review.whamcloud.com/4700
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
7 years agoLU-2302 scripts: fix lfs_migrate with non-English locale
Daniel Kobras [Wed, 28 Nov 2012 17:47:18 +0000 (09:47 -0800)]
LU-2302 scripts: fix lfs_migrate with non-English locale

Parsing of stat output assumes an English locale. Make sure
this is always the case.

Signed-off-by: Daniel Kobras <d.kobras@science-computing.de>
Change-Id: I66acd6eb49cac749db701b97a5a375dc3b141a01
Reviewed-on: http://review.whamcloud.com/4697
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
7 years agoLU-2371 ptlrpc: get new xid for resend on EINPROGRESS
Johann Lombardi [Fri, 30 Nov 2012 14:16:41 +0000 (15:16 +0100)]
LU-2371 ptlrpc: get new xid for resend on EINPROGRESS

Allocate new xid for ptlrpc resend on EINPROGRESS to avoid MDT's reply
recontruction code which will cause EINPROGRESS to always been replied
on subsequent resent.
Also fix non-intent creation path to set rq_no_retry_einprogress.

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: Id423142e4440952777b74a834e2b4fa38c338280
Reviewed-on: http://review.whamcloud.com/4719
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
7 years agoLU-2388 statahead: don't statahead if it's stopped
Lai Siyao [Fri, 30 Nov 2012 07:45:55 +0000 (15:45 +0800)]
LU-2388 statahead: don't statahead if it's stopped

Statahead may be stopped but lli->lli_sai is not NULL(inflight
statahead RPCs), so check lli->lli_opendir_key before accessing
statahead data.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I4bcd4da0dc2913697473bf85ff6e502df43ce5a2
Reviewed-on: http://review.whamcloud.com/4718
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2361 quota: keep slave's glb idx consistent with master's
Johann Lombardi [Tue, 20 Nov 2012 15:55:28 +0000 (16:55 +0100)]
LU-2361 quota: keep slave's glb idx consistent with master's

Issue glimpse callback and bump global version each time quota
settings are modified in the global index. This way, the global
recovered if required.

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: I91c11b8bce68c8f96289588e612295ece7664c3f
Reviewed-on: http://review.whamcloud.com/4632
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Hudson
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2346 quota: set default grace time
Niu Yawei [Fri, 16 Nov 2012 13:45:48 +0000 (08:45 -0500)]
LU-2346 quota: set default grace time

Set default grace time as MAX_IQ_TIME or MAX_DQ_TIME.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I8f57e5483cdf0948532d3185fdf43c6efec73233
Reviewed-on: http://review.whamcloud.com/4598
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
7 years agoLU-2358 procfs: Implement /proc/fs/lustre/mgs/MGS/fstype as symlink
John L. Hammond [Tue, 20 Nov 2012 17:33:04 +0000 (11:33 -0600)]
LU-2358 procfs: Implement /proc/fs/lustre/mgs/MGS/fstype as symlink

Add symlinks:
  /proc/fs/lustre/mgs/MGS/osd    -> ../../osd-ldiskfs/lustre-MDT0000
  /proc/fs/lustre/mgs/MGS/fstype -> osd/fstype
  /proc/fs/lustre/mgs/MGS/mntdev -> osd/mntdev
Remove unused lprocfs_rd_fstype().

Change-Id: Ic5cce7cf31962c7d6ea97c5d3117fba81539cb68
Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Reviewed-on: http://review.whamcloud.com/4635
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-1287 mountconf: write failover nid config correctly
Lai Siyao [Thu, 14 Jun 2012 10:21:00 +0000 (18:21 +0800)]
LU-1287 mountconf: write failover nid config correctly

Once OST starts before MDT, MDT needs steal OSC config from client
config, but both target nids and failover nids are stored as the
same type of config LCFG_ADD_UUID. To handle this correctly, all
LCFG_ADD_UUID before LCFG_SETUP is treated as target nids, while
after as failover nids. NB this implies that records should be
written into config file in fixed order.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I42d014911edad1bc53bb1a66def160ee0da3e670
Reviewed-on: http://review.whamcloud.com/3107
Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1632 fid: remove fid_delete in delete_inode procedure
wangdi [Wed, 18 Jul 2012 09:17:27 +0000 (02:17 -0700)]
LU-1632 fid: remove fid_delete in delete_inode procedure

Remove fid_delete in delete_inode procedure, which is
completely obsolete in 2.x infrastructure , especially
when lmv layer is not being created during upgrade,
because it will cause the client fid space to be zero
out whenever an inode is being deleted.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I4002945603790f8dda3e33847160c13afb7b41a4
Reviewed-on: http://review.whamcloud.com/3434
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2363 lod: Fix statfs entries in lod procfs
John L. Hammond [Mon, 26 Nov 2012 21:46:07 +0000 (15:46 -0600)]
LU-2363 lod: Fix statfs entries in lod procfs

Factor toplevel lod procfs out of lod_pools_{init,fini}.  Support
lod statfs entries using osd methods.

Change-Id: I27f8c1441079ad455a03f16abb05491fd655d2e3
Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Reviewed-on: http://review.whamcloud.com/4637
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <kemannthey@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-1756 kernel: cleanup lustre_compat25.h
Peng Tao [Thu, 16 Aug 2012 07:59:21 +0000 (15:59 +0800)]
LU-1756 kernel: cleanup lustre_compat25.h

1. unused functions:
   KIOBUF_GET_BLOCKS()
2. container_of() always defined
3. place linux/mpage.h at where it is needed

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I3369572fbd8aef2a5ad4881ec3f0f67c11772881
Reviewed-on: http://review.whamcloud.com/3687
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liu Xuezhao <xuezhao.liu@emc.com>
7 years agoLU-1484 kernel: fix build error with 2.6.18 kernel
Peng Tao [Thu, 15 Nov 2012 11:17:20 +0000 (19:17 +0800)]
LU-1484 kernel: fix build error with 2.6.18 kernel

When crossing building 2.6.18 kernel, I always got following
errors:
lustre-release/libcfs/include/libcfs/params_tree.h:107:2:
   error: #error proc_dir_entry->deleted is conflicted
   with proc_dir_entry->pde_users

It is because after commit 76bf16d1, HAVE_PROCFS_USERS and
HAVE_PROCFS_DELETED can both be true on old kernels with
backported code.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I2b420f401f221c619b9643acee2ff54057af0fc9
Reviewed-on: http://review.whamcloud.com/4589
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
7 years agoLU-1887 ptlrpc: grant shrink rpc format is special
Lai Siyao [Mon, 15 Oct 2012 07:02:19 +0000 (00:02 -0700)]
LU-1887 ptlrpc: grant shrink rpc format is special

Grant shrink rpc is packed in OST_SET_INFO request, but its format is
different from others.

Change-Id: I8b3398d534fbae683722f942403e031c68023b16
Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4277
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1924 build: configure can not find libgssapi_krb5.so
Thomas Stibor [Wed, 24 Oct 2012 10:20:31 +0000 (12:20 +0200)]
LU-1924 build: configure can not find libgssapi_krb5.so

./configure --enable-gss cannot find on Debian amd64/x86_64
wheezy the file libgssapi_krb5.so although it
exists in the directory /usr/lib/x86_x64-linux-gnu.
Probably some other amd64/x86_64 Linux distributions
are effected as well.

Signed-off-by: Thomas Stibor <thomas@stibor.net>
Change-Id: Ife12e11224db4ef64adbcedb31cc1c07cf1c9b2e
Reviewed-on: http://review.whamcloud.com/4378
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-398 libcfs: Add libcfs heap, a binary heap implementation
Nikitas Angelinas [Tue, 30 Oct 2012 15:46:39 +0000 (15:46 +0000)]
LU-398 libcfs: Add libcfs heap, a binary heap implementation

The heap can be used to build and maintain sorted arrays and lists,
and prioritized queues of large numbers of elements, with minimal
insertion and removal time. The first user for the data structure are
NRS policies, which use it to maintain prioritized queues of RPCs at
PTLRPC services.

There is no 'search' operation, but the data type aims to be useful
in cases where performing searches on the data set is not required,
and instead the lowest priority element is usually removed from the
data set for consumption.

Original-author: Eric Barton <eeb@whamcloud.com>
Original-author: Liang Zhen <liang@whamcloud.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Change-Id: Ifd293d0a8201e45bd6030d7a16ce0be691f79cb9
Oracle-bug-id: b=13634
Xyratex-bug-id: MRP-73
Reviewed-on: http://review.whamcloud.com/4412
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2016 mdd: add layout swap between 2 objects
jcl [Thu, 4 Oct 2012 19:51:49 +0000 (21:51 +0200)]
LU-2016 mdd: add layout swap between 2 objects

This patch add a new method in mdd to swap the layouts between
2 lustre objects.
The 2 objects have to be of the same type.

Change-Id: I26dfef2745eac67168aeceac196453c5126148fd
Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-on: http://review.whamcloud.com/4189
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-744 obdclass: revise cl_page refcount
Jinshan Xiong [Fri, 7 Dec 2012 18:06:49 +0000 (10:06 -0800)]
LU-744 obdclass: revise cl_page refcount

By holding a refcount for radix tree, we can remove a couple of
spin lock and atomic operation for cl_page.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I9440d6b86a63d00ce716cb11676101acca07d535
Reviewed-on: http://review.whamcloud.com/4617
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2194 tests: Wait for reconnect in recovery-small/19
Nathaniel Clark [Wed, 21 Nov 2012 20:09:54 +0000 (15:09 -0500)]
LU-2194 tests: Wait for reconnect in recovery-small/19

Fully wait for clients to reconnect before checking if evicted.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I332d9b43344eb2c7c883fc28adfbbfb4eeb8a0d0
Reviewed-on: http://review.whamcloud.com/4652
Tested-by: Hudson
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2378 lma: move HSM & SOM attributes to dedicated xattrs
Johann Lombardi [Fri, 23 Nov 2012 14:23:29 +0000 (15:23 +0100)]
LU-2378 lma: move HSM & SOM attributes to dedicated xattrs

Reduce LMA to its minimum and move HSM & SOM attributes to dedicated
on-disk extented attributes. This is more consistent with the MDS
layering (HSM, LMA & SOM are managed in different layers) and avoids
locking + read/modify/write in many cases.

As far as interoperability is concerned, the old code works just fine
if it reads a smaller LMA size and the new code retries with a
larger buffer on ERANGE error.

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: Id4ee465ea69820229f7214d800821864330a8aec
Reviewed-on: http://review.whamcloud.com/4746
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-2156 debug: quiet overly verbose console errors
Andreas Dilger [Wed, 17 Oct 2012 18:42:17 +0000 (12:42 -0600)]
LU-2156 debug: quiet overly verbose console errors

A number of error messages are printed on the console that do not
represent error conditions, or print the message in an overly
confusing manner.  One in an ongoing series of patches to clean
up the console errors.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie830cfb49e390ca4da1f4b9ed7187d421e74f12f
Reviewed-on: http://review.whamcloud.com/4286
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Hudson
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1403 ucred: ucred cleanup
Vitaly Fertman [Sun, 9 Dec 2012 21:26:51 +0000 (01:26 +0400)]
LU-1403 ucred: ucred cleanup

Add ucred_check() and ucred_assert() methods to ensure ucred is
installed and/or initialised everywhere.

As echo client may be sitting on mdd it needs to initialize md_ucred
too. As echo client may be sitting on osc without mdd module loaded,
make md_ucred a common key, move it to lu_object.

Reviewed-by: Alexander Zarochentsev <Alexander_Zarochentsev@xyratex.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Xyratex-bug-id: MRP-484
Change-Id: I9c4aaa31148ff10e4a609393a0cf018cdf731d9c
Reviewed-on: http://review.whamcloud.com/2733
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-744 obdclass: revise percpu stats of lprocfs_stats
Jinshan Xiong [Mon, 5 Nov 2012 21:18:52 +0000 (13:18 -0800)]
LU-744 obdclass: revise percpu stats of lprocfs_stats

Atomic doesn't scale well and there is an atomic counter to remember
if updating stats is on going. This will introduce performance
problem if the percpu stats is used in a highly contended code.

I'll remove that atomic counter in this patch, this is okay as percpu
counter is not accurate essentially.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I5c7a094b78ab53798266d48d56f3a16e7c7d436f
Reviewed-on: http://review.whamcloud.com/4472
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
7 years agoLU-744 obdclass: revise stats for cl_object cache
Jinshan Xiong [Fri, 7 Dec 2012 18:01:53 +0000 (10:01 -0800)]
LU-744 obdclass: revise stats for cl_object cache

It turns out that atomic doesn't scale well for highly contented
cl_page stats. Enable it only when CONFIG_DEBUG_PAGESTATE_TRACKING
is turned on.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I0163f65557135759f100fddde70c7e3ee2e45aed
Reviewed-on: http://review.whamcloud.com/4519
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
7 years agoLU-797 tests: improve test_23b of ost-pools.sh
Niu Yawei [Tue, 6 Nov 2012 04:02:23 +0000 (23:02 -0500)]
LU-797 tests: improve test_23b of ost-pools.sh

- fail the test once the written space is greater than the
  available space.
- use it's own maxfree limit, and increase the limit a lot.
- terminate the test when the write speed is too slow.

Test-Parameters: envdefinitions=SLOW=yes testlist=ost-pools
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ib7deca89ebd7267fa7be0a51ceac01fe3cb2df65
Reviewed-on: http://review.whamcloud.com/4474
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Hudson
7 years agoLU-1229 tests: fix set module parameters from modprobe.conf
James Simmons [Thu, 6 Dec 2012 16:08:29 +0000 (11:08 -0500)]
LU-1229 tests: fix set module parameters from modprobe.conf

Currently the test framework can't process multiple options
on separate lines for the same module from the module config
file. Once those parameters are collected they are supposed
to be stored in the MODOPT_X shell variable to be used later
to reload the modules but this was not being done. This patch
address both of these issues.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Change-Id: I08a6a562009c44e2a00ee5d489815164f638954d
Reviewed-on: http://review.whamcloud.com/2342
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1538 tests: allow SLOW from environment for auster
Andreas Dilger [Fri, 19 Oct 2012 23:26:56 +0000 (17:26 -0600)]
LU-1538 tests: allow SLOW from environment for auster

Allow "SLOW=yes" to be passed from the environment when running
auster via acceptance-small.sh.  Otherwise, it overrides the value
passed from the environment.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I646adad77ade050c80e0da174dedb25d23500c1e
Reviewed-on: http://review.whamcloud.com/4707
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2406 tests: remove USE_OFD from test-framework
Andreas Dilger [Fri, 30 Nov 2012 23:45:48 +0000 (16:45 -0700)]
LU-2406 tests: remove USE_OFD from test-framework

Remove the old USE_OFD from test-framework.sh, since this is no
longer needed for master, but it confuses interop testing when
run with b2_3 (where it hits LU-1883 and causes random failures).

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I417ac3eb5b2cbb8b4cebfc5d7f3cd2cab1b0974d
Reviewed-on: http://review.whamcloud.com/4727
Tested-by: Hudson
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1861 osd: set proper type for compatibility files
Mikhail Pershin [Sun, 25 Nov 2012 19:50:02 +0000 (23:50 +0400)]
LU-1861 osd: set proper type for compatibility files

The compatibility code in osd-ldiskfs uses osd_compat_add_entry()
to add dir entry for system files, but doesn't type in directory
entry properly so e2fsch complains about that.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I8b1529b3303fba311432f4aa79d71afb6dc992d7
Reviewed-on: http://review.whamcloud.com/4669
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-2333 utils: mount.lustre to ignore fsname
Alex Zhuravlev [Thu, 15 Nov 2012 17:39:23 +0000 (21:39 +0400)]
LU-2333 utils: mount.lustre to ignore fsname

if MGS is the only service on a given device, then it's OK
to have empty fsname: fsname does not apply to MGS generally.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Ie2269c46280b1ef2504fc73a61cc1d28ff2261fc
Reviewed-on: http://review.whamcloud.com/4592
Tested-by: Hudson
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>