LU-4050 llite: NFS reexport issue

Suppress erroneous/confusing messages when NFS
is out of sync and requests old data.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Idf382769fe3b5b502ca6f545fab6b72fcc62527c
Reviewed-on: http://review.whamcloud.com/7850
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-1199 rpm: remove SLES10 support

SLES10 is out of scope for Lustre 2.4 so we can drop
the spec file hacks.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I94ea2164a4b339ab26825058678b54859d2617a8
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3963 lnet: convert cfs_atomic primitives

This patch convers all cfs_atomic primitives in lnet/
directory.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I81426bd7a8a1a97ea5f198d99193649fbbf5389a
Reviewed-on: http://review.whamcloud.com/7070
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3996 mgs: Don't close llog that we failed to open

Attempting to do so leads to a crash:
LustreError: 8136:0:(llog_osd.c:241:llog_osd_read_header()) MGS-osd: error reading log header from [0xa:0xa:0x0]: rc = -14
LustreError: 8136:0:(mgs_llog.c:1386:record_start_log()) MGS: can't start log lustre-params: rc = -14
BUG: unable to handle kernel NULL pointer dereference at 00000000000000b8
IP: [<ffffffffa07f9e99>] llog_handle_put+0x9/0x70 [obdclass]
PGD 8120c8067 PUD 7b8c65067 PMD 0
Oops: 0000 [#1] SMP
...
Call Trace:
 [<ffffffffa07f9f5d>] llog_close+0x5d/0x190 [obdclass]
 [<ffffffffa0e98e8d>] mgs_write_log_direct_all+0x28d/0x7a0 [mgs]
 [<ffffffffa06c8951>] ? libcfs_debug_msg+0x41/0x50 [libcfs]
 [<ffffffffa0e99d3d>] mgs_write_log_param+0x99d/0x2980 [mgs]
 [<ffffffff81167610>] ? cache_alloc_refill+0x1c0/0x240
 [<ffffffffa0ea00b0>] mgs_setparam+0xde0/0x11a0 [mgs]
 [<ffffffffa0e8c7e2>] mgs_iocontrol+0x10c2/0x16e0 [mgs]
 [<ffffffffa07f70a7>] ? obd_ioctl_getdata+0x477/0x1120 [obdclass]
 [<ffffffffa080e344>] class_handle_ioctl+0x12e4/0x1e70 [obdclass]
 [<ffffffffa06c8951>] ? libcfs_debug_msg+0x41/0x50 [libcfs]
 [<ffffffffa07f62ab>] obd_class_ioctl+0x4b/0x190 [obdclass]
 [<ffffffff81195352>] vfs_ioctl+0x22/0xa0
 [<ffffffff811954f4>] do_vfs_ioctl+0x84/0x580
 [<ffffffff81195a71>] sys_ioctl+0x81/0xa0
 [<ffffffff8100b072>] system_call_fastpath+0x16/0x1b

Change-Id: I2bd72c130a0530cc9d218556b5b6cc9c14efc2ea
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/7742
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-4066 test: use $LUSTRE to locate server modules

In test-framework.sh's init_test_env look for $LUSTRE/mdt/mdt.ko
rather than `$dirname $0`/../mdt/mdt.ko to determine if the server
modules are present when they cannot be found in /lib/modules.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ib16eee4d7811afcb310c7b0fd4a401ea5af2e7ad
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3373 tests: small fixes for sanity tests

--test_24d fix typo
--test_24A cleanup work directory in advance
--test_27k make up message more clear
--test-framework enforce LANG to en_US

Signed-off-by: yang sheng <yang.sheng@intel.com>
Change-Id: I61c227028b44a198482b4e5c9a9f715af08c3e5f
Reviewed-on: http://review.whamcloud.com/7948
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1199 obdclass: build and install llog_test.ko properly

There's a hack in lustre.spec.in to copy the llog_test.ko module into
/lib/modules.

It's only needed because that module is built unconditionally and
is expected to only be installed if --enable-tests is configured.

The right way to do this is to only build it at all if --enable-tests
is configured and installation comes automatically,

The conditional in the spec file for --enable-tests already exists,
so it will be packaged correctly without the hack.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I2705848e11a96ab6769ebba4481d2d0621f53d3e
Reviewed-on: http://review.whamcloud.com/5493
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Stephen Champion <schamp@sgi.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1458 tests: wait for dbench to start

Use wait_for_function instead of just guessing that 20s will be long
enough for dbench to start.  Wait for up to 6min in 5 second
intervals.  This also ensures that dbench will run for a little while
after it starts.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ic9c61b487c4013cccd620491d617c10e2206fd62
Reviewed-on: http://review.whamcloud.com/7914
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4012 gss: upcall fails due to removed generic cache calls

With Linux kernel version >= 3.4.X the generic cache registering
routines cache_register(), cache_unregister() are removed.
This effects the GSS upcall routines for the Kerberos
support in Lustre. Before (Linux kernel <= 3.2.X) the
generic routines were coded as:
int cache_register(struct cache_detail *cd)
{
        return cache_register_net(cd, &init_net);
}
void cache_unregister(struct cache_detail *cd)
{
        cache_unregister_net(cd, &init_net);
}
To keep compatibility with former kernel versions,
cache_register_net() and cache_unregister_net() can
be applied instead, rather than the old and
removed cache_register() and cache_unregister().

Signed-off-by: Thomas Stibor <thomas@stibor.net>
Change-Id: I3eb012a1883c463ecafe3646e7e706ab96d91c5c
Reviewed-on: http://review.whamcloud.com/7770
Tested-by: Jenkins
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andrew Korty <ajk@iu.edu>
LU-4156 wireshark: Fix build against wireshark 1.10.x

Some of the API changes that were depricated in 1.6 and 1.8 have been
removed in 1.10.  This patch uses the new API calls (these work in 1.6
and later).

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I83a469b973007a58d81b2460eec9da418c172b4a
Reviewed-on: http://review.whamcloud.com/8079
Tested-by: Jenkins
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Frank Heckes <Frank.Heckes@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-20 kernel: remove obsolete kernel patches

The jbd2-jcberr and lustre_version patches have been obsoleted since
Lustre 2.2.  They were kept around to allow transitioning between
Lustre 1.8/2.1 and 2.4/2.5 but can be removed from Lustre 2.6 since
this does not allow a direct upgrade path anyway.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I5406272fe22580e48679c18dea562001d23ebbe5
Reviewed-on: http://review.whamcloud.com/7881
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4181 tests: disable lnet_selftest.sh for DNE.

Disable lnet_selftest for DNE to make review pass with DNE.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ie4abd794d0184955af84752f0a9c64181b85f1ec
Reviewed-on: http://review.whamcloud.com/8130
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
LU-2353 tests: Introduce back end mount/unmount helpers

Some tests need to access back end file systems directly.  Currently,
for ldiskfs targets, they either mount the devices as ldiskfs or
invoke the ldiskfs-specific debugfs tool; for ZFS targets, they simply
skip forward.  Many of them could actually work on both back end
types.  Since the mount/unmount procedures diff for ldiskfs and ZFS
back ends, this patch introduces a pair of generic helpers,
mount_fstype()/unmount_fstype(), to hide the differences from tests.
Then, sanity 27z is adapted to work with ZFS targets using the new
helpers, as an example.

Test-Parameters: mdsfilesystemtype=zfs ostfilesystemtype=zfs mdtfilesystemtype=zfs
Change-Id: I0b6b358b147240519f28852ba2c8fea85c09aab3
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/5785
Tested-by: Jenkins
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3889 tests: fix parallel-scale typo and allow overrides

This fixes a typo introduced by change #7778.  This also allows
overriding all variables that are set lower due to SLOW=no, which is
forced for ZFS tests.  This will allow values specified by caller for
all variables even when testing on ZFS.

Test-Parameters: envdefinitions=SLOW=yes mdtfilesystemtype=zfs mdsfilesystemtype=zfs ostfilesystemtype=zfs testlist=parallel-scale
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I5b585ffa28c9f7d729d5169ff96c383cc0af38d3
Reviewed-on: http://review.whamcloud.com/8234
Reviewed-by: Cliff White <cliff.white@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
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.
Add *ZFSDEVn variable for specifying ZFS format devices.
Remove use of *DEVn use outside of test-framework.sh

MDSDEV et al. specify physical device formatted.

Formerly Change-Id I89115ce935294cdbbd6620fec3f9dc3eb76f8960

Test-Parameters: mdsfilesystemtype=zfs ostfilesystemtype=zfs  mdtfilesystemtype=zfs testlist=sanity
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: If6506995d9d61f9c97827f45071f0d317c7a09f9
Reviewed-on: http://review.whamcloud.com/5016
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2059 tests: Skip insanity/10 on ZFS

This test fails in the same as all the other LU-2059 skipped tests,
trying to start OST with MDS down causes OST to hang.

Test-Parameters: osscount=2 mdscount=2 mdsfilesystemtype=zfs mdtfilesystemtype=zfs ostfilesystemtype=zfs testlist=insanity
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I29cec88c0f3f5eb4ffef0117363b0862f44dd61a
Reviewed-on: http://review.whamcloud.com/8316
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
LU-4305 tests: mkdir instead of test_mkdir in 39P

In sanity 39p, it should use mkdir, instead of
test_mkdir to avoid creating remote directory before
the real "lfs mkdir -i".

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: If5a09bf4bdadd1f27d66e9d7b252ae0f4ee071fb
Reviewed-on: http://review.whamcloud.com/8383
Tested-by: Jenkins
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
LU-4322 tests: disable sanity 101a in DNE

Disable sanity 101a in DNE test for now.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I67531bf9f1fb75b8cd6684d864793a612e1d1cf4
Reviewed-on: http://review.whamcloud.com/8428
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
LU-4316 mdt: Do not grant Layout lock for remote file

Do not grant layout lock for remote file, because only
the MDT, where the file/dir resides, should grant the
LAYOUT lock.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I174d54f3ce5b7c69cb35aa63f4322b743ea677e8
Reviewed-on: http://review.whamcloud.com/8406
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
LU-3867 utils: llapi_create_volatile_idx uses 0 instead idx

If llapi_create_volatile_idx() is passed an MDT index other than
-1, it always uses 0 as the MDT index rather than the one provided.

This patch removes the use of LUSTRE_VOLATILE_IDX and uses
LUSTRE_VOLATILE_HDR with the MDT index instead, uses the provided
MDT index in the volatile file name and uses base 16 when reading
the MDT index from the file name using strtoul.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Signed-off-by: Bobbie Lind <bobbie.j.lind@intel.com>
Change-Id: I27e2beb8524683aba07c48297614dd02d7957af4
Reviewed-on: http://review.whamcloud.com/7613
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>