Whamcloud - gitweb
fs/lustre-release.git
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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

11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 years agoLU-1756 kernel: cleanup lustre_compat25.h
Peng Tao [Thu, 16 Aug 2012 07:59:21 +0000 (15:59 +0800)]
LU-1756 kernel: cleanup lustre_compat25.h

1. unused functions:
   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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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
11 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>
11 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>
11 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>
11 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>
11 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>
11 years agoLU-1279 revert: Silence modprobe ptlrpc output in mount.lustre
Andreas Dilger [Wed, 5 Dec 2012 22:08:21 +0000 (15:08 -0700)]
LU-1279 revert: Silence modprobe ptlrpc output in mount.lustre

This reverts commit 20e5b84f086a5e45e2692a239e2f74a37d580774.
This reverts commit d8d9b78a5c08eb1d938ab9e3bdaf7f756bfbb5ec.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I2ffdf18227c3a423096f765608592ccf8391cab0
Reviewed-on: http://review.whamcloud.com/4750
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1187 tests: Add DNE tests to conf sanity.
wangdi [Sun, 18 Nov 2012 21:24:20 +0000 (13:24 -0800)]
LU-1187 tests: Add DNE tests to conf sanity.

1. 32c: upgrade 2.1/1.8 to DNE.
2. 70/71: start targets in mixed order for DNE.
3. Add start_mds to start all of MDTs during the test.
4. Fix writeconf to erase the config for all targets.

Change-Id: I62e9173d53b96082059b1faf7e0455d0c07eb967
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4367
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>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1187 tests: add DNE test cases in replay-single
wangdi [Sun, 18 Nov 2012 21:21:05 +0000 (13:21 -0800)]
LU-1187 tests: add DNE test cases in replay-single

Add DNE test cases 80(remote create) and 81(remote unlink)
in replay-single.

Change-Id: I7609139357de4bfc7a08ca30e24faa8bc11b096d
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4362
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>
11 years agoLU-279 tests: Ensure lgetxattr is consistent
Prakash Surya [Fri, 13 May 2011 15:48:36 +0000 (08:48 -0700)]
LU-279 tests: Ensure lgetxattr is consistent

* Added the lgetxattr_size_check.c program to compare the size returned
  by lgetxattr() when passed zero size buffers and non zero size buffers
* Sanity test 17l was added to make use of this new test program and
  ensure that the values returned by lgetxattr remain consistent

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: Id46dbe888d42b058e02ec32b6d1612705d7f6349
Reviewed-on: http://review.whamcloud.com/547
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>
11 years agoLU-1710 lvb: variable sized LVB support
Jinshan Xiong [Thu, 6 Dec 2012 17:03:27 +0000 (09:03 -0800)]
LU-1710 lvb: variable sized LVB support

Originally, the LVB on wire is fixed sized only for transferring
object {m/a/c}time and block/size information.

But with introducing layout lock, new quota and nanosecond features
in the near futures, such fixed sized on wire LVB structure cannot
match the requirements from these new features.

So change on wire protocol to allow variable sized LVB transerred
between nodes.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ifcd2d303495d2b3d1c09c38af823d246fff196fa
Reviewed-on: http://review.whamcloud.com/3965
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1187 tests: Add DNE tests cases in replay-dual
wangdi [Sun, 18 Nov 2012 21:18:04 +0000 (13:18 -0800)]
LU-1187 tests: Add DNE tests cases in replay-dual

Add 22(remote creation) and 23(remote unlink) in
replay-dual for DNE.

Change-Id: Ife1e6e67f0ffbf7fefab7c605c28381dc1c3ed88
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4361
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>
11 years agoLU-1187 tests: define MGSDEV in right way.
wangdi [Sat, 8 Dec 2012 22:23:23 +0000 (14:23 -0800)]
LU-1187 tests: define MGSDEV in right way.

For Combined mgs/mds, MGSDEV definition should be same for
LDISKFS and ZFS.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I107990a97e7daa0d72be874125ced65f3ed6c337
Reviewed-on: http://review.whamcloud.com/4774
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1994 kernel: 3.4 kmap_atomic has one argument
yangsheng [Wed, 5 Dec 2012 19:50:39 +0000 (03:50 +0800)]
LU-1994 kernel: 3.4 kmap_atomic has one argument

kernel 3.4 kmap_atomic removes second argument by commit 1ec9c5ddc17.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I6471291fd881c9e76833654602fa4b18fd1f1028
Reviewed-on: http://review.whamcloud.com/4384
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>
11 years agoLU-2449 Postpone fixing of . and .. hadling in ZFS again
Oleg Drokin [Sun, 9 Dec 2012 03:24:16 +0000 (22:24 -0500)]
LU-2449 Postpone fixing of . and .. hadling in ZFS again

 I totally forgot about it and so it broke again with the new tag.

Change-Id: I1e116ab950a615e10e6db3d23ac5fe1b3484f24e
Signed-off-by: Oleg Drokin <green@whamcloud.com>
11 years agoNew tag 2.3.57 2.3.57 v2_3_57 v2_3_57_0
Oleg Drokin [Sun, 9 Dec 2012 03:02:05 +0000 (22:02 -0500)]
New tag 2.3.57

Change-Id: I79f6a73e4e711646f7b6b1551fdc1f460aeaae1c

11 years agoLU-2284 tests: clear limits before testing
Niu Yawei [Fri, 7 Dec 2012 08:08:50 +0000 (03:08 -0500)]
LU-2284 tests: clear limits before testing

The quota limits left over from other tests which has quota enabled
could confuse the sanity-quota, so we'd clear all the before testing.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ie24e6891d920a0c7fa6ffc29ee8ff9400b8636af
Reviewed-on: http://review.whamcloud.com/4766
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2304 lov: check enq flags when matching top lock
Jinshan Xiong [Wed, 21 Nov 2012 18:10:42 +0000 (10:10 -0800)]
LU-2304 lov: check enq flags when matching top lock

cld_enq_flags must be checked when matching top lock, otherwise
if a sublock is missing then it will be reenqueued with wrong enq
flags.

For LU-2304, a previous truncate to zero lock(with CEF_DISCARD_DATA)
flags was matched by not-to-zero truncate and then wrongly reenqueued
with discard flag. This caused dirty pages to be discarded on the
other clients.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I290df2fdb9453c2fd7c8c3d3e7289e60bae9b095
Reviewed-on: http://review.whamcloud.com/4651
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>
11 years agoLU-797 tests: process lfs df output properly
Niu Yawei [Thu, 29 Nov 2012 09:59:40 +0000 (04:59 -0500)]
LU-797 tests: process lfs df output properly

There is a space in the "filesystem summary" of lfs df output,
which could cause trouble for the parsing script, test_23b of
ost-pool.sh is an example.

We introduced lfs_df() function to remove this space internally,
this will allow fixing the "lfs df" output line in the future.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I524d42a5e792a1b29db52166e92624bf42312c3f
Reviewed-on: http://review.whamcloud.com/4705
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>
11 years agoLU-1337 llite: kernel 3.4 converts d_alloc_root to d_make_root
Liu Xuezhao [Tue, 30 Oct 2012 09:14:02 +0000 (17:14 +0800)]
LU-1337 llite: kernel 3.4 converts d_alloc_root to d_make_root

kernel 3.4 converts d_alloc_root to d_make_root.
(kernel commit 32991ab305ace7017c62f8eecbe5eb36dc32e13b)

Add LC_HAVE_D_MAKE_ROOT/HAVE_D_MAKE_ROOT to ckeck it.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I7ff1f0eff25495b655e650997016377ca0a200aa
Reviewed-on: http://review.whamcloud.com/3580
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1337 llite: kernel 3.4 touch_atime switchs to 1 argument
Liu Xuezhao [Mon, 8 Oct 2012 08:54:30 +0000 (16:54 +0800)]
LU-1337 llite: kernel 3.4 touch_atime switchs to 1 argument

touch_atime switchs to use 1 argument of  struct path since
kernel 3.4 (commit 68ac1234fb949b66941d94dce4157742799fc581).

Add LC_TOUCH_ATIME_1ARG/HAVE_TOUCH_ATIME_1ARG to check it.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I1a0478459538376761b96e1dc65328eeeef60d0f
Reviewed-on: http://review.whamcloud.com/3578
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1337 llite: 3.3 changes super_operations/inode_operations
Liu Xuezhao [Wed, 31 Oct 2012 07:43:54 +0000 (15:43 +0800)]
LU-1337 llite: 3.3 changes super_operations/inode_operations

1. Kernel 3.3 switchs super_operations to use dentry as parameter
   (kernel commit 34c80b1d93e6e20ca9dea0baf583a5b5510d92d4).
   Add LC_SUPEROPS_USE_DENTRY/HAVE_SUPEROPS_USE_DENTRY to check it.
2. Kernel 3.3 switchs inode_operations to use umode_t as parameter
   (kernel commit 1a67aafb5f72a436ca044293309fa7e6351d6a35).
   Add LC_INODEOPS_USE_UMODE_T/HAVE_INODEOPS_USE_UMODE_T to check it.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I7564506cf4365c8da113a81058f68b9ef8b092a4
Reviewed-on: http://review.whamcloud.com/3581
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1346 libcfs: replace libcfs wrappers with kernel API
Andreas Dilger [Tue, 4 Dec 2012 20:44:31 +0000 (13:44 -0700)]
LU-1346 libcfs: replace libcfs wrappers with kernel API

The libcfs kernel portability library had wrappers for many low-level
kernel functions (locking, bit operations, etc) that were simple
wrappers around Linux kernel functions.  This provides no value for
Linux clients and clients for other kernels are not under development.

Remove the cfs_ prefix from these simple wrapper functions.  For other
kernels, they will need to use the Linux kernel API for portability.

Affected primitives:
spinlock_t, spin_lock_init, spin_lock, spin_unlock, spin_lock_bh,
spin_lock_bh_init, spin_unlock_bh, spin_trylock, spin_is_locked,
spin_lock_irq, spin_unlock_irq, read_lock_irqsave, write_lock_irqsave,
read_lock_irqrestore, write_lock_irqrestore, spin_lock_irqsave,
spin_unlock_irqrestore, SPIN_LOCK_UNLOCKED

rw_semaphore, init_rwsem, down_read, down_read_trylock, up_read,
down_write, down_write_trylock, up_write, fini_rwsem, DECLARE_RWSEM

semaphore, rw_semaphore, init_completion_module, call_wait_handler,
wait_handler_t, mt_completion_t, mt_init_completion,
mt_wait_for_completion, mt_complete, mt_fini_completion, mt_atomic_t,
mt_atomic_read, mt_atomic_set, mt_atomic_dec_and_test, mt_atomic_inc,
mt_atomic_dec, mt_atomic_add, mt_atomic_sub

rw_lock_t, rwlock_init, read_lock, read_unlock,
read_unlock_irqrestore, write_lock, write_unlock, write_lock_bh,
write_unlock_bh, RW_LOCK_UNLOCKED

completion_t, DECLARE_COMPLETION, INIT_COMPLETION, complete,
COMPLETION_INITIALIZER, init_completion, wait_for_completion,
wait_for_completion_interruptible, complete_and_exit, fini_completion

semaphore_t, DEFINE_SEMAPHORE, sema_init, up, down,
down_interruptible, down_trylock

mutex_t, DEFINE_MUTEX, mutex_init, mutex_lock, mutex_unlock,
mutex_lock_interruptible, mutex_trylock, mutex_is_locked,
mutex_destroy

lock_kernel, unlock_kernel

lock_class_key, lock_class_key_t, lockdep_set_class, lockdep_off,
lockdep_on, mutext_lock_nexted, spin_lock_nexted, down_read_nested,
down_write_nested

test_bit, set_bit, clear_bit, test_and_set_bit, test_and_clear_bit,
find_first_bit, find_first_zero_bit, find_next_bit,
find_next_zero_bit, ffz, ffs, fls

Change-Id: I36db204c703ed414504eaa9ba22e97ad7eb6cc2c
Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2829
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2393 tests: conf-sanity/32b ensure uniform sort ordering
Nathaniel Clark [Tue, 27 Nov 2012 17:58:53 +0000 (12:58 -0500)]
LU-2393 tests: conf-sanity/32b ensure uniform sort ordering

Different hosts can have different locales (sles vs. rhel), so do all
sorts on a single node to ensure uniform ordering.

Test-Parameters: clientdistro=sles11sp2 testlist=conf-sanity

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I9b10b8d482add2ac18f0fa51f8ec995c06e52cec
Reviewed-on: http://review.whamcloud.com/4685
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1783 tests: test failure on sanity, subtest 39l
Bob Glossman [Fri, 16 Nov 2012 16:40:08 +0000 (08:40 -0800)]
LU-1783 tests: test failure on sanity, subtest 39l

Failure of directory atime updates is due to bad build of mount.lustre in SLES.
Missing MS_* #defines led to mount.lustre being built in SLES
without conditional options and code related to atime mount options.
This caused all lustre mounts to be mounted with the option relatime.
Build fix puts back in all the supported options that were missing.
This mod also tears out the test skip put in previously to skip failing test,
since the test no longer fails.

Test-Parameters: clientdistro=sles11sp2 testlist=sanity

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I65876761065fc11c74a56bc4b5a6b7910c9d241e
Reviewed-on: http://review.whamcloud.com/4605
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
11 years agoLU-2297 test: fix replay-single test_74
Oleg Drokin [Mon, 3 Dec 2012 17:30:38 +0000 (12:30 -0500)]
LU-2297 test: fix replay-single test_74

unmount client before stopping OST, otherwise if client has dirty
data belongig to that OST, client umount will try to wait for
the data flushing back to the unavailable OST and waits forever
for the OST to come back.

Signed-off-by: Oleg Drokin <green@whamcloud.com>
Change-Id: I8af14134b5f417dfd96baef14e02d9f4c8912f6f
Reviewed-on: http://review.whamcloud.com/4717
Tested-by: Hudson
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
11 years agoLU-2373 kernel: Kernel update [RHEL6.3 2.6.32-279.14.1.el6]
James Simmons [Wed, 21 Nov 2012 19:21:46 +0000 (14:21 -0500)]
LU-2373 kernel: Kernel update [RHEL6.3 2.6.32-279.14.1.el6]

Update RHEL6.3 kernel to 2.6.32-279.14.1.el6.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I8dbb8c87d7e86ff0ccff2ccfb30f28e9f2a48827
Reviewed-on: http://review.whamcloud.com/4131
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1650 obdclass: find the lock by index of subpage
Jinshan Xiong [Wed, 28 Nov 2012 18:04:42 +0000 (10:04 -0800)]
LU-1650 obdclass: find the lock by index of subpage

In check_and_discard_cb(), subpage's index should be used to find if
there exists another lock to cover the same page.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Id8e1da89ef81fad4c7917360d591fc7bd1309a00
Reviewed-on: http://review.whamcloud.com/4673
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>