Whamcloud - gitweb
fs/lustre-release.git
6 years agoLU-3470 llog: fix return value of llog_alloc_handle 44/6644/3
Li Xi [Fri, 14 Jun 2013 09:09:13 +0000 (17:09 +0800)]
LU-3470 llog: fix return value of llog_alloc_handle

llog_open() calls llog_alloc_handle() taking NULL as the error return
value. But llog_alloc_handle() returns ERR_PTR(-ENOMEM) instead when
error.

Signed-off-by: Li Xi <pkuelelixi@gmail.com>
Change-Id: Id0e9d94107776f65bf6fdaba21988bab1882d3b3
Reviewed-on: http://review.whamcloud.com/6644
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3553 tests: volatile file test fails interop testing 87/6887/3
Bob Glossman [Wed, 3 Jul 2013 20:22:59 +0000 (13:22 -0700)]
LU-3553 tests: volatile file test fails interop testing

There is no volatile file support in servers before v2.3.60.
Add a version check and skip sanity test 185 entirely on old servers
to allow interop testing of 2.4+ clients on 2.3 servers.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: If6aef3a782307b5fe659ffcb8a8f8182f83354bd
Reviewed-on: http://review.whamcloud.com/6887
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-2800 autoconf: remove LC_SET_CPUS_ALLOWED test 84/5384/7
James Simmons [Wed, 10 Jul 2013 19:50:54 +0000 (15:50 -0400)]
LU-2800 autoconf: remove LC_SET_CPUS_ALLOWED test

set_cpus_allowed_ptr replaced set_cpus_allowed in v2.6.32.

We can remove the test and dead code.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I684589fd13b52a79fbe4aba6229d89273ff3d9da
Reviewed-on: http://review.whamcloud.com/5384
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2800 autoconf: remove LC_INVALIDATE_BDEV_2ARG test 45/5345/7
James Simmons [Wed, 10 Jul 2013 19:42:55 +0000 (15:42 -0400)]
LU-2800 autoconf: remove LC_INVALIDATE_BDEV_2ARG test

invalidate_bdev has taken one argument since v2.6.22
We can remove the test and the dead code.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Change-Id: I535f1cbe1c46fb5c98d5de046b85eb8365084d7b
Reviewed-on: http://review.whamcloud.com/5345
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2800 autoconf: remove LIBCFS_HAVE_IS_COMPAT_TASK test 93/5393/5
James Simmons [Wed, 10 Jul 2013 19:51:55 +0000 (15:51 -0400)]
LU-2800 autoconf: remove LIBCFS_HAVE_IS_COMPAT_TASK test

is_compat_task has been defined on all arches since v2.6.29.
We can remove the test and dead code.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ieffc3b32611e00f2a19aa2645205ec6e1cf57a20
Reviewed-on: http://review.whamcloud.com/5393
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2800 autoconf: remove vectored fops tests 43/5343/7
James Simmons [Wed, 10 Jul 2013 19:41:47 +0000 (15:41 -0400)]
LU-2800 autoconf: remove vectored fops tests

file_operations.readv/writev have been removed since v2.6.19
We can remove the test and the dead code.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I6b4bd25d769c0ea2486faaca70e0945552c3b2cd
Reviewed-on: http://review.whamcloud.com/5343
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3544 nfs: writing to new files will return ENOENT 20/6920/4
Patrick Farrell [Thu, 11 Jul 2013 16:06:27 +0000 (11:06 -0500)]
LU-3544 nfs: writing to new files will return ENOENT

This happend with SLES11SP2 Lustre client, which in turn acts as an
NFS server, exporting a subtree of an Lustre fs through NFS.

We detected that whenever we are writing to a new file using, fx,
'echo blah > newfile', it will return ENOENT error. We found
out that this was caused by the anonymous dentry. In SLESS11SP2,
anonymous dentries are assigned '/' as the name, instead of an
empty string. When MDT handles the intent_open call, it will look
up the obj by the name if it is not an empty string, and thus
couldn't find it.

As MDS_OPEN_BY_FID is always set on this request, we never need
to send the name in this request.  The fid is already available
and should be used in case the file has been renamed.

Signed-off-by: Cheng Shao <cheng_shao@xyratex.com>
Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: Ia8bd6f2814d05350d0a197df8a3ffd9729e2081b
Reviewed-on: http://review.whamcloud.com/6920
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3079 kernel: 3.9 hlist_for_each_entry uses 3 args 98/5898/6
James Simmons [Wed, 15 May 2013 13:18:19 +0000 (09:18 -0400)]
LU-3079 kernel: 3.9 hlist_for_each_entry uses 3 args

In 3.9 hlist_for_each_entry use 3 args since commit

commit b67bfe0d42cac56c512dd5da4b1b347a23f4b70a
Author: Sasha Levin <sasha.levin@oracle.com>
Date:   Wed Feb 27 17:06:00 2013 -0800

    hlist: drop the node parameter from iterators

Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I8f38d562607de21771b03575e37cc0498867a570
Reviewed-on: http://review.whamcloud.com/5898
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2800 autoconf: remove topology checks 36/5336/7
James Simmons [Wed, 10 Jul 2013 19:27:04 +0000 (15:27 -0400)]
LU-2800 autoconf: remove topology checks

The topology API has been stable since 2.6.32, so we don't need to
check for it anymore.

The options defined by a series of tests in LC_EXPORT_NODE_TO_CPUMASK
and LC_EXPORT_CPUMASK_OF_NODE look like this:
HAVE_CPUMASK_OF_NODE=1 since v2.6.29
HAVE_NODE_TO_CPUMASK=0 since v2.6.29
HAVE_CPUMASK_COPY=1 since v2.6.28
HAVE_CPUMASK_SIZE=1 since v2.6.28
HAVE_TOPOLOGY_THREAD_SIBLINGS=0 since v2.6.32
HAVE_TOPOLOGY_CORE_SIBLINGS=0 since v2.6.32
HAVE_TOPOLOGY_THREAD_CPUMASK=1 since v2.6.30
HAVE_TOPOLOGY_CORE_CPUMAS=1K since v2.6.30
HAVE_CPU_TOPOLOGY=1 since v2.6.12

Let's eliminate all those tests and remove the dead code.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I9924eb496508f560bb7a38dfbcf5105c3713185e
Reviewed-on: http://review.whamcloud.com/5336
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2059 llog: MGC to use OSD API for backup logs 49/5049/19
Mikhail Pershin [Sun, 3 Mar 2013 20:06:41 +0000 (00:06 +0400)]
LU-2059 llog: MGC to use OSD API for backup logs

MGC uses lvfs API to access local llogs blocking removal of old code

- MGS is converted to use OSD API for local llogs
- llog_is_empty() and llog_backup() are introduced
- initial OSD start initialize run ctxt so llog can use it too
- shrink dcache after initial scrub in osd-ldiskfs to avoid holding
  data of unlinked objects until umount.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I137e38abb0e93c12406c6610c0922f4294e67290
Reviewed-on: http://review.whamcloud.com/5049
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2145 server: use unified request handler for MGS 26/4826/15
Mikhail Pershin [Thu, 13 Dec 2012 18:07:52 +0000 (22:07 +0400)]
LU-2145 server: use unified request handler for MGS

- Unify request handler. It finds target for particular request and
  calls appropriate handler for it. Generic handlers are moved to
  the unified target code. The tgt_session_info is introduced to
  store all request-related data and passed to all handlers.
- Pack reply in llog server functions early and use err_serious()
- remove obsoleted llog_origin_handle_cancel(), it is not used
  anymore
- remove push_ctxt/pop_ctxt from llog server function, it is based
  on OSD now.

Change-Id: Idded90d8112bcab74de9a58e7885fa17dd3340b8
Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Reviewed-on: http://review.whamcloud.com/4826
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
6 years agoLU-3264 tests: support failover testing with ZFS 29/6429/4
Nathaniel Clark [Wed, 10 Jul 2013 15:42:42 +0000 (11:42 -0400)]
LU-3264 tests: support failover testing with ZFS

This patch improves test-framework.sh to support failover testing with
ZFS under shared storage configuration.

After formatting a ZFS target, "cachefile=none" property will be set
on the ZFS storage pool so that the pool is not automatically imported
on system startup. And then the pool will be exported so as to leave
the import and export operations handled by mount_facet() and stop().

For SOFT failure mode (unmount and mount), "zpool export …" will be
run on the active server node to export the ZFS storage pool, and
"zpool import -f …" will be run on the failover partner node to import
the pool.

For HARD failure mode (power off and on), since the "cachefile=none"
property has been set on the ZFS storage pool on the active server
node, after the node is power-cycled, the pool will not be imported.
Then on the failover partner node, "zpool import -f …" can be run to
import the pool.

This is a reworked patch with fixes merged in.

Formerly Change-Id: I6b9646cb36f7fa4924af03a055ccb137187843a5
Formerly Reviewed-on: http://review.whamcloud.com/6258
Formerly Change-Id: I63ac141fdefcace99a1cf7c366e15f0067fa2a56
Formerly Reviewed-on: http://review.whamcloud.com/6358
Formerly Change-Id: I83678fd8b67de87f5174017634f108e6ae5b30e0
Formerly Reviewed-on: http://review.whamcloud.com/6408

Test-Parameters: envdefinitions=PTLDEBUG=-1,DEBUG_SIZE=128 mdtfilesystemtype=zfs mdsfilesystemtype=zfs ostfilesystemtype=zfs clientdistro=el6 serverdistro=el6 clientarch=x86_64 serverarch=x86_64 clientcount=4 osscount=2 mdscount=2 austeroptions=-R failover=true useiscsi=true testlist=recovery-double-scale
Signed-off-by: Jian Yu <jian.yu@intel.com>
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I6d2fffede5de7a7d4a6bde3d62dd7c6cb60f63fa
Reviewed-on: http://review.whamcloud.com/6429
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2901 ldlm: fix resource/fid check, use DLDLMRES 92/6592/5
Andreas Dilger [Fri, 7 Jun 2013 22:31:51 +0000 (16:31 -0600)]
LU-2901 ldlm: fix resource/fid check, use DLDLMRES

In ll_md_blocking_ast() the FID/resource comparison is incorrectly
checking for fid_ver() stored in res_id.name[2] instead of name[1]
changed since http://review.whamcloud.com/2271 (commit 4f91d5161d00)
landed.  This does not impact current clients, since name[2] and
fid_ver() are always zero, but it could cause problems in the future.

In ldlm_cli_enqueue_fini() use ldlm_res_eq() instead of comparing
each of the resource fields separately.

Use DLDLMRES/PLDLMRES when printing resource names everywhere.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I7b45d382d2ee87c1df813ebdd9c7f21029500c1e
Reviewed-on: http://review.whamcloud.com/6592
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
6 years agoLU-3093 lnet: Fix assert on empty group in selftest module 92/6092/16
Amir Shehata [Wed, 10 Jul 2013 17:45:35 +0000 (10:45 -0700)]
LU-3093 lnet: Fix assert on empty group in selftest module

The core of the issue is that the selftest module doesn't sanitize its
own API, but it depends on lst utility to do such checks.  As a result
this issue manifests itself in this particular LU through an assert
on an empty group.  If the NID is misspelled then an empty group is
added.  An error output is provided, but if that's never checked in a
batch script, as is the case with this issue, then the script will try
to add an empty group to a test to run in a batch, and that will cause
an assert

The fix is two fold.  Ensure that lst utility checks that a group is
added with at least one node.  If not the group is subsequently
deleted.  And the add_test command would fail, since the group no
longer exists.

The second fix is to ensure that the kernel module itself sanitizes
its own API in this particular case, so that if a different utility is
used other than lst to communicate with the selftest kernel module
then this error would be caught.  This fix looks up the batch and the
groups, src and dst, in the ioctl handle and sanitizes that input at
this point.  If the group looked up either doesn't exist or doesn't
have at least one ACTIVE node, then the command fails.

NOTE:there are many other cases in the code where the selftest kernel
module doesn't check for sanity of the input, but depends totally on
the lst module to do such checks.  Particularly around length of
strings passed in.  Thus it is possible to crash the selftest module
if someone tries to create another userspace app to communicate with
the selftest kernel module without ensuring sanity of the params sent
to the kernel module.  In effect, it's always assumed that lst is the
front end for selftest and no other front end is to be used.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: If2e59c1fadf8bd6cac759ea8fa761be386e71bd3
Reviewed-on: http://review.whamcloud.com/6092
Tested-by: Hudson
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2919 hsm: Implementation of exclusive open 30/6730/18
Jinshan Xiong [Fri, 12 Jul 2013 20:07:11 +0000 (13:07 -0700)]
LU-2919 hsm: Implementation of exclusive open

In this patch, a framework of lease is implemented. However,
only exclusive lease is supported right now.

To apply a lease, MDS_OPEN_LEASE must be set to open the file, EX
mode open lock is returned to the client side to hold a lease. From
that time on, if this file is opened again by other processes, the
open lock will be revoked so the client who holds the lease will
know the lease is already broken by checking that open lock.

To release a lease, normal close is used. The client will revoke the
open lock before sending CLOSE request.

Lease can be applied in two ways. ll_lease_open()/close() can be
called directly if the lease holder is in kernel space; or if the
lease holder lives in user space, it has to open the file first and
then use ioctl() with command LL_IOC_SET_LEASE to apply a lease. The
lease holder has to poll the lease status itself.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I181edbb0b31fcf60858656170528d2ffda9c9bb6
Reviewed-on: http://review.whamcloud.com/6730
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3340 mdt: HSM memory requests management 30/6530/10
jcl [Mon, 3 Jun 2013 14:12:24 +0000 (16:12 +0200)]
LU-3340 mdt: HSM memory requests management

HSM coordinator keeps an in memory list of running
requests send to the agents. This list keep track
of the progress of the data movement.
This patch implements the helpers used to create
add remove update component of this list.

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I6b68a1342ad485792037607ce84039a0b085d72e
Reviewed-on: http://review.whamcloud.com/6530
Tested-by: Hudson
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3474 mdd: mdd_links_read() to return linkea_init() errors 76/6676/5
Bruno Faccini [Thu, 4 Jul 2013 08:13:40 +0000 (10:13 +0200)]
LU-3474 mdd: mdd_links_read() to return linkea_init() errors

ASSERTION(ldata->ld_leh != ((void *)0)) can be triggered in
linkea_links_find() due to earlier mdd_links_read() call
missing to return linkea_init() errors and thus preventing
to detect that ld_leh is not populated.
Plus a few error handling fixes to avoid unnecessary msgs
and also prevent early return.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I35b1076d8eb036dd600e0fda711417634590b9df
Reviewed-on: http://review.whamcloud.com/6676
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3233 llite: use correct FID in ll_och_fill() 95/6695/2
John L. Hammond [Wed, 19 Jun 2013 00:50:56 +0000 (19:50 -0500)]
LU-3233 llite: use correct FID in ll_och_fill()

When ll_intent_file_open() is called on a file with a stale dentry,
ll_och_fill() may incorrectly use the FID from the struct
ll_inode_info rather than the FID from the response body (which is the
correct FID for the close). Fix this, remove the ll_inode_info
parameter from ll_och_fill(), and move the call to ll_ioepoch_open()
from ll_och_fill() to ll_local_open().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ic4c97d82259b4b922e8b5be235d2db188406bc06
Reviewed-on: http://review.whamcloud.com/6695
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3233 mdt: validate open handle cookies 38/6938/3
John L. Hammond [Wed, 10 Jul 2013 20:45:18 +0000 (15:45 -0500)]
LU-3233 mdt: validate open handle cookies

Add a const void *h_owner member to struct portals_handle. Add a const
void *owner parameter to class_handle2object() which must be matched
by the h_owner member of the handle in addition to the cookie.  Adjust
the callers of class_handle2object() accordingly, using NULL as the
argument to the owner parameter, except in the case of
mdt_handle2mfd() where we add an explicit mdt_export_data parameter
which we use as the owner when searching for a MFD. When allocating a
new MFD, pass a pointer to the mdt_export_data into mdt_mfd_new() and
store it in h_owner. This allows the MDT to validate that the client
has not sent the wrong open handle cookie, or sent the right cookie to
the wrong MDT.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I4c26504d808db0c27cfc2f8ebcf7e1fa19719170
Reviewed-on: http://review.whamcloud.com/6938
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
6 years agoLU-3559 utils: mgs has no index 04/6904/3
Sebastien Buisson [Fri, 5 Jul 2013 11:33:16 +0000 (13:33 +0200)]
LU-3559 utils: mgs has no index

An MGS formatted with Lustre 2.1 does not have any index.
So mount.lustre must not require an index when starting
an MGS.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I12c1a2511509c4d34ef60a0ed937dda9e5fba4e4
Reviewed-on: http://review.whamcloud.com/6904
Tested-by: Hudson
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
6 years agoLU-3432 llite: Access to released file trigs a restore 37/6537/13
jcl [Mon, 3 Jun 2013 15:01:51 +0000 (17:01 +0200)]
LU-3432 llite: Access to released file trigs a restore

When a client accesses data in a released file,
or truncate it, client must trig a restore request.
During this restore, the client must not glimpse and
must use size from MDT. To bring the "restore is running"
information on the client we add a new t_state bit field
to mdt_info which will be used to carry transient file state.
To memorise this information in the inode we add a new flag
LLIF_FILE_RESTORING.

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I4f3cde9cb247760075f6872b1d1c299ef369a7ae
Reviewed-on: http://review.whamcloud.com/6537
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3478 iokit: fix sgpdd-survey scripts (output and plotting) 80/6680/3
Gregoire Pichon [Mon, 17 Jun 2013 14:32:10 +0000 (16:32 +0200)]
LU-3478 iokit: fix sgpdd-survey scripts (output and plotting)

The sgpdd-survey script does not provide minimal and maximal bandwidth
of sgp_dd instances. This is important to be able to identify if low
LUNs are present. This patch updates the output to display this
information, similarly to obdfilter-survey.

The plot-sgpdd script is updated to handle this output format
change. It is also reorganized to simplify operation handling.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Change-Id: Ie6ad57951dff8c8b2871457652a94df6dccbc491
Reviewed-on: http://review.whamcloud.com/6680
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Bobbie Lind <bobbie.j.lind@intel.com>
Reviewed-by: Cliff White <cliff.white@intel.com>
Tested-by: Cliff White <cliff.white@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3568 contrib: ignore initial comments 21/6921/4
Bruce Korb [Thu, 11 Jul 2013 18:16:06 +0000 (11:16 -0700)]
LU-3568 contrib: ignore initial comments

Sometimes, git likes to insert "git status" commentary
at the top of an auto-generated commit message starter
file. If the committer carelessly neglects to remove
the stuff, the script thinks the message has a missing
commit summary line.

* contrib/tests/test-commit-msg.sh: pass through xtrace setting
* contrib/tests/commit.ok_commit: This message with cruft
* contrib/commit-msg: use a flag instead of a line number to see
  if we still need to process the summary line.

Signed-off-by: Bruce Korb <bruce_korb@xyratex.com>
Reviewed-by: Cheng Shao <cheng_shao@xyratex.com>
Xyratex-bug-id: MRP-1160
Change-Id: I46e2951f2e28cbbf53bf2e96e420ddcea7c0d991
Reviewed-on: http://review.whamcloud.com/6921
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-2665 mdc: Keep resend FLocks 15/6415/2
Bruno Faccini [Wed, 22 May 2013 09:50:03 +0000 (11:50 +0200)]
LU-2665 mdc: Keep resend FLocks

FLocks requests (particulary F_UNLCKs) can't be trashed
upon comm problems with Server/MDS nor upon kill/exit,
thus we need to keep retry/send.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I8faa331712abeadee46eabe111ee1c23a05840d5
Reviewed-on: http://review.whamcloud.com/6415
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3268 lod: return root LOV EA in little-endian 85/6285/2
John L. Hammond [Wed, 8 May 2013 02:46:39 +0000 (21:46 -0500)]
LU-3268 lod: return root LOV EA in little-endian

In lod_xattr_get() when constructing LOV EA to return for the
filesystem root, store members in little-endian byte order for
consistency with EAs from disk.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Id76da869e14ff71b8af21fe2b1d66abd54da0a2d
Reviewed-on: http://review.whamcloud.com/6285
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoNew tag 2.4.52 2.4.52 v2_4_52 v2_4_52_0
Oleg Drokin [Thu, 11 Jul 2013 17:47:00 +0000 (13:47 -0400)]
New tag 2.4.52

Change-Id: I5994d7d0e9f8c19d864ce7aad805603de2242665

6 years agoLU-2686 kernel: Kernel update for 3.7.2-201.fc18 74/5974/7
yangsheng [Wed, 10 Jul 2013 05:52:41 +0000 (13:52 +0800)]
LU-2686 kernel: Kernel update for 3.7.2-201.fc18

Add uapi header to include search path

Signed-off-by: yang sheng <yang.sheng@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Id90e091fef63ebf5bb8e7765969aa3148cc31aa2
Reviewed-on: http://review.whamcloud.com/5974
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3572 mgs: build failure seen in SLES SP2 server build 37/6937/3
Bob Glossman [Wed, 10 Jul 2013 18:50:01 +0000 (11:50 -0700)]
LU-3572 mgs: build failure seen in SLES SP2 server build

Fix uninitialized variable error introduced into SLES11 SP2 server
builds by a recent commit.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I2d302fae77f7ea6f802f5dded570cbbb01d0e13a
Reviewed-on: http://review.whamcloud.com/6937
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3513 tests: sanity 54a, 64b: remove useless check 82/6782/3
James Nunez [Tue, 9 Jul 2013 22:34:32 +0000 (16:34 -0600)]
LU-3513 tests: sanity 54a, 64b: remove useless check

Tests sanity 54a, 64b are skipped if started not from lustre/tests
directory because of incorrect check that $SOCKSERVER, $SOCKCLIENT,
oos.sh exist.

Patch removes the check of the files which are part of lustre/tests.
Error messages are added to indicate what went wrong.

Signed-off-by: Elena Gryaznova <elena_gryaznova@xyratex.com>
Xyratex-bug-id: MRP-982
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I629d8085da393fa9c986076a9913296696444ad0
Reviewed-on: http://review.whamcloud.com/6782
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3543 quota: minor fix in s-q test_7c 51/6851/3
Niu Yawei [Tue, 2 Jul 2013 02:41:35 +0000 (22:41 -0400)]
LU-3543 quota: minor fix in s-q test_7c

'do_facet' is missed when setting 'force_reint'.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I92e43f98e4e574e31af21f890454d7150c7c35f0
Reviewed-on: http://review.whamcloud.com/6851
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3219 tests: add version check code to sanityn test 71 85/6585/4
Jian Yu [Fri, 7 Jun 2013 08:09:17 +0000 (16:09 +0800)]
LU-3219 tests: add version check code to sanityn test 71

This patch adds Lustre version check codes into sanityn test
71 to make the test work with servers which do not have the
following patch:

Lustre-commit: 58444c4e9bc58e192f0bc0c163a5d51d42ba4255
Lustre-change: http://review.whamcloud.com/6127
or
Lustre-commit: 6a4ea7d154b6c016f482662463c9d2186176fee0
Lustre-change: http://review.whamcloud.com/6377

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 serverjob=lustre-b2_1 serverbuildno=191 \
testlist=sanityn

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: Ide9d42d4634f51110cb7036e43060b591ed970eb
Reviewed-on: http://review.whamcloud.com/6585
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3568 contrib: ignore initial commit msg comments 28/6928/2
Bruce Korb [Tue, 9 Jul 2013 16:55:41 +0000 (09:55 -0700)]
LU-3568 contrib: ignore initial commit msg comments

Indent with tabs.

Signed-off-by: Bruce Korb <bruce_korb@xyratex.com>
Reviewed-by: Cheng Shao <cheng_shao@xyratex.com>
Xyratex-bug-id: MRP-1160
Change-Id: Ib07900845fee92a3c0d3ed3cc60739d872294eae
Reviewed-on: http://review.whamcloud.com/6928
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3507 tests: fix sanity test_60a to check run-llog.sh on mgs 80/6780/2
Elena Gryaznova [Wed, 26 Jun 2013 12:42:32 +0000 (16:42 +0400)]
LU-3507 tests: fix sanity test_60a to check run-llog.sh on mgs

Test sanity 60a is skipped if started not from lustre/tests directory.
Test checks run-llog.sh on client, while run-llog.sh is ran on mgs.

This patch checks that run-llog.sh exists on mgs.

Signed-off-by: Elena Gryaznova <elena_gryaznova@xyratex.com>
Xyratex-bug-id: MRP-732
Change-Id: I8692e318bb623a8ed9fbaa2a6695c87dc8efeb9e
Reviewed-on: http://review.whamcloud.com/6780
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3305 quota: avoid unnecessary dqget/dqput calls 40/6440/5
Niu Yawei [Fri, 24 May 2013 03:49:03 +0000 (23:49 -0400)]
LU-3305 quota: avoid unnecessary dqget/dqput calls

Because of the global lock contention inside the dqget()/dqput(),
we'd try to avoid dqget()/dqput() calls in dquot_initialize().

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I4335d880f3b912f3de70816a9bd87841605f8907
Reviewed-on: http://review.whamcloud.com/6440
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3335 scrub: purge inconsistenct objects after OI scrub 97/6697/10
Fan Yong [Sat, 15 Jun 2013 09:29:18 +0000 (17:29 +0800)]
LU-3335 scrub: purge inconsistenct objects after OI scrub

When OI scrub repaired the found inconsistency, it needs to purge the
old object out of cache; otherwise, others may still use those cached
stale information.

Test-Parameters: testlist=sanity-scrub
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Id3607c38952da9bfec01139743e817c95a854047
Reviewed-on: http://review.whamcloud.com/6697
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@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>
6 years agoLU-3339 mdt: HSM on disk actions record 29/6529/8
jcl [Mon, 3 Jun 2013 14:03:36 +0000 (16:03 +0200)]
LU-3339 mdt: HSM on disk actions record

HSM coordinator memorizes all actions in a llog
This patch implements the methods needed to create
update display these records.

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I58bdbbd52a75a841c30e4477f3cb4c942d6d2a20
Reviewed-on: http://review.whamcloud.com/6529
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-1347 style: removes obsolete EXPORT_SYMTAB macros v2 39/6739/2
Keith Mannthey [Fri, 21 Jun 2013 20:28:45 +0000 (13:28 -0700)]
LU-1347 style: removes obsolete EXPORT_SYMTAB macros v2

EXPORT_SYMTAB is obsolete after 2.4 kernel, this patch removes
EXPORT_SYMTAB from the source code again.

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: Idac9983d42b2c3e645def54628b6bc34d28aa3af
Reviewed-on: http://review.whamcloud.com/6739
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Liu Xuezhao <xuezhao.liu@emc.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3547 tests: skip unsupported subtest on old servers 79/6879/2
Bob Glossman [Wed, 3 Jul 2013 15:42:13 +0000 (08:42 -0700)]
LU-3547 tests: skip unsupported subtest on old servers

chmod of .lustre/fid is unsupported on servers older than v2.4.
Add a version check to skip the unsupported op in sanity test 154a
on old servers for interop testing of 2.4+ clients on 2.3 servers.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I353c93e8d1501944cad8f638de69a0432539249f
Reviewed-on: http://review.whamcloud.com/6879
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3421 grant: more aggressively book space for precreate 46/6546/3
Johann Lombardi [Tue, 4 Jun 2013 15:46:29 +0000 (17:46 +0200)]
LU-3421 grant: more aggressively book space for precreate

- ofd_grant() should not round sub-block allocation to 0.
- ofd_grant_create() should be more aggressive in reserving space.
  Precreation should try to always have enough grant space to process
  a very large preallocation request.

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: I5803b2d5fae216edcaae124d3b50b589c02e7251
Reviewed-on: http://review.whamcloud.com/6546
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
6 years agoLU-2800 autoconf: remove obsolete autoconf options 05/5505/11
James Simmons [Tue, 2 Jul 2013 12:39:50 +0000 (08:39 -0400)]
LU-2800 autoconf: remove obsolete autoconf options

This commit combines 53 previous commits that only remove tests and
the corresponding dead code. The only exceptions are whitespace
removal in lustre/autoconf/lustre-core.m4 and removal of dead code
shrinking an if/else in lustre/llite/dir.c.

Summary follows:

autoconf: remove d_rehash_cond and __d_rehash tests

- d_rehash_cond and __d_rehash were never exported in a mainline
  release.

- A check of the RHEL6 and SLES11 SP2 sources shows they don't export
  them either.

autoconf: remove LC_TASK_CLENV_STORE

- LC_TASK_CLENV_STORE checks to see if task_struct->tux_info exists.

- That was only the case on RHEL5, so we can drop it. The rest of the
  code is untouched since liblustre uses the same infrastructure.

autoconf: remove filemap_populate, vm_ops->fault tests

- filemap_populate and the vm_ops->fault have been deprecated or
  removed since v2.6.23.

autoconf: remove LC_UMOUNTBEGIN_HAS_VFSMOUNT test

- super_operations.umount_begin has taken a super_block since v2.6.26.

autoconf: remove LC_CANCEL_DIRTY_PAGE test

- cancel_dirty_page was added in v2.6.20

autoconf: remove crypto API checks

- The block_cipher, hash_desc, and blkcipher_desc APIs have been
  added since v2.6.19.

autoconf: remove LC_KERNEL_SPLICE_READ test

- file_operations.splice_read has upstream since v2.6.23.

autoconf: remove LC_KERNEL_SENDFILE test

- file_operations.sendfile has been removed since v2.6.23.

- RHEL4 versions had both APIs, but RHEL4 has been out of scope
  for some time.

autoconf: remove LC_HAVE_EXPORTFS_H test

- <linux/exportfs.h> has been in the upstream kernel since v2.6.23.

autoconf: remove unused LC_EXPORTFS_DECODE_FH test

- exportfs_decode_fh has been upstream since v2.6.23.

autoconf: remove unused LC_HAVE_MMTYPES_H test

- <linux/mm_types.h> has been upstream since v2.6.24.

autoconf: remove LC_FH_TO_DENTRY test

- export_operations.fh_to_dentry has been upstream since v2.6.24.

autoconf: remove LC_EXPORT_BDI_INIT test

- bdi_init has been in the upstream kernel since v2.6.24.

autoconf: remove LC_PGMKWRITE_USE_VMFAULT test

- vm_ops->page_mkwrite has taken a vm_fault pointer since v2.6.27.

autoconf: remove LC_PGMKWRITE_COMPACT

- The vm_operation_struct._pmkw variant of page_mkwrite never
  existed upstream.

autoconf: remove LC_TRYLOCKPAGE test

- trylock_page has been in the upstream kernel since v2.6.27.

autoconf: remove unused LC_READ_INODE_IN_SBOPS test

- super_operations->read_inode hasn't been in the upstream kernel
  since v2.6.26.

autoconf: remove LC_EXPORT_INODE_PERMISSION test

- inode_permission has been in the upstream kernel since v2.6.27.

autoconf: remove LC_VFS_DQ_OFF test

- vfs_dq_off was in the upstream kernel from v2.6.27..v2.6.33

- Commit 86097b23 (LU-2642 quota: update quota APIs) introduced
  support for the APIs used in v2.6.34.

autoconf: remove LC_SB_HAS_QUOTA_ACTIVE test

- sb_has_quota_active has been in the upstream kernel since v2.6.29.

autoconf: remove LC_BDI_NAME test

- backing_dev_info.name has been in the upstream kernel since v2.6.32.

autoconf: remove LC_EXPORT_ADD_TO_PAGE_CACHE_LRU test

- add_to_page_cache_lru has been in the upstream kernel since v2.6.30.

- Also remove the now unused LC_PAGEVEC_LRU_ADD_FILE test.

autoconf: remove LC_SB_ANY_QUOTA_ACTIVE test

- sb_any_quota_active has been removed from the upstream kernel
  since v2.6.27.

autoconf: remove LC_BLK_QUEUE_LOG_BLK_SIZE test

- blk_queue_logical_block_size replaced blk_queue_hardsect_size
  in v2.6.31.

autoconf: remove LC_VFS_INODE_NEWSIZE_OK test

- inode_newsize_ok has been upstream since v2.6.32.

autoconf: remove LC_CACHE_UPCALL test

- cache_detail.cache_request was renamed to cache_detail.cache_upcall
  in v2.6.32.

autoconf: remove LC_REQUEST_QUEUE_LIMITS test

- request_queue.limits has been upstream since v2.6.32.

autoconf: remove LC_EXPORT_BDI_REGISTER test

- bdi_register has been upstream since v2.6.32.

autoconf: remove LC_SB_BDI test

- super_block.s_bdi was added to the upstream kernel in v2.6.32.

autoconf: remove LC_BLK_QUEUE_MAX_SECTORS test

- blk_queue_max_sectors was replaced with blk_queue_max_hw_sectors
  in v2.6.32.

autoconf: remove LC_EXPORT_GENERIC_ERROR_REMOVE_PAGE test

- generic_error_remove_page has been upstream since v2.6.32.

autoconf: remove LC_EXPORT_ACCESS_PROCESS_VM test

- access_process_vm has been exported from the kernel since v2.6.24.

autoconf: remove LC_SELINUX_IS_ENABLED test

- selinux_is_enabled has been in the upstream kernel since v2.6.32.

autoconf: remove LC_D_OBTAIN_ALIAS test

- d_obtain_alias has been upstream since v2.6.28.

autoconf: remove LC_WRITE_BEGIN_END test

- address_space_operations.write_begin/end have been upstream
  since v2.6.29.

autoconf: remove LC_DENTRY_OPEN_4ARGS test

- dentry_open took 4 arguments between v2.6.29..v3.5.

- The new 3 argument version is tested with LC_DENTRY_OPEN_USE_PATH.

autoconf: remove LIBCFS_TASKLIST_LOCK test

- tasklist_lock hasn't been exported since v2.6.18.

autoconf: remove LIBCFS_DIGEST_SETKEY_FLAGS test

- digest_alt.dia_setkey took 4 arguments from v2.6.18..v2.6.32.

- The code protected by this test was made obsolete by the
  LIBCFS_STRUCT_SHASH_ALG test.

autoconf: remove LIBCFS_KMEM_CACHE_DESTROY_INT test

- kmem_cache_destroy has returned void since v2.6.19.

autoconf: remove LIBCFS_3ARGS_INIT_WORK test

- INIT_WORK has taken two arguments since v2.6.20.

autoconf: remove LIBCFS_2ARGS_REGISTER_SYSCTL test

- register_sysctl_table has taken one argument since v2.6.21.

autoconf: remove LIBCFS_KMEM_CACHE_CREATE_DTOR tests

- kmem_cache_create hasn't had a dtor argument since v2.6.22.

autoconf: remove LC_REGISTER_SHRINKER test

- register_shrinker has been upstream since v2.6.23.

autoconf: remove LIBCFS_SCATTERLIST_SETPAGE test

- sg_set_page has been upstream since v2.6.24.

autoconf: remove LIBCFS_SCATTERLIST_INITTABLE test

- sg_init_table has been upstream since v2.6.24.

autoconf: remove unused LIBCFS_NETWORK_NAMESPACE test

- init_net has been upstream since v2.6.24.

autoconf: remove unused LIBCFS_SEM_COUNT test

- semaphores haven't used an atomic since v2.6.25.

autoconf: remove LIBCFS_CRED_WRAPPERS test

- The cred wrappers have been upstream since v2.6.29.

autoconf: remove LIBCFS_STRUCT_CRED_IN_TASK test

- struct cred has been a member of task_struct since v2.6.29.

autoconf: remove LIBCFS_STRUCT_SHASH_ALG test

- struct shash_alg has been upstream since v2.6.29.

autoconf: remove LIBCFS_FUNC_UNSHARE_FS_STRUCT test

- unshare_fs_struct has been upstream since v2.6.30.

autoconf: remove LIBCFS_HAVE_SET_MEMS_ALLOWED test

- set_mems_allowed has been upstream since v2.6.31.

We can remove the tests and dead code.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I1e8c24bfc8e86169543ac41939d4d33317665b14
Reviewed-on: http://review.whamcloud.com/5505
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3503 test: only create single directory by test_mkdir() 96/6796/5
Emoly Liu [Tue, 7 May 2013 16:12:27 +0000 (00:12 +0800)]
LU-3503 test: only create single directory by test_mkdir()

Force test_mkdir() to create single directory instead of
multiple directories.

Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: I222f2bc5e6578b1cd8c4049a10f5ca1790c2c5ad
Reviewed-on: http://review.whamcloud.com/6796
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Robert Read <robert.read@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3499 kernel: kernel update [SLES11 SP2 3.0.80-0.5] 05/6805/4
Bob Glossman [Mon, 24 Jun 2013 18:06:29 +0000 (11:06 -0700)]
LU-3499 kernel: kernel update [SLES11 SP2 3.0.80-0.5]

Update of config and build file to new kernel version.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I1c65cff0fde98e602b0e50af05091610d20777bd
Reviewed-on: http://review.whamcloud.com/6805
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3483 llite: Null deref in ll_revalidate_nd on NFSmount 15/6715/5
Patrick Farrell [Thu, 20 Jun 2013 22:42:09 +0000 (17:42 -0500)]
LU-3483 llite: Null deref in ll_revalidate_nd on NFSmount

In calls to ll_revalidate_nd, the nameidata pointer nd is
sometimes null.  The core code of the function tests for
this case and handles it by calling ll_node_revalidate_it.
However, immediately before that code, there is a test to
see if the LOOKUP_RCU flag is set in nd->flags.  This test
does NOT check to see if the nd pointer is null.  Per
the comment, LOOKUP_RCU was added in kernel 2.6.38, and
this code is #ifdefed accordingly.
The fix is to test if nd is null in the LOOKUP_RCU check.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I2b5d1718721f76943c3998f359dc83ad3a1590e6
Reviewed-on: http://review.whamcloud.com/6715
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2744 build: fix 'data race condition' issues 71/6571/4
Sebastien Buisson [Thu, 6 Jun 2013 12:38:03 +0000 (14:38 +0200)]
LU-2744 build: fix 'data race condition' issues

Fix 'data race condition' defects found by Coverity version
6.5.0:
Data race condition (MISSING_LOCK)
Accessing variable without holding lock. Elsewhere,
this variable is accessed with lock held.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Ie23e735c630b45006e02f6dd04e682dabffb844f
Reviewed-on: http://review.whamcloud.com/6571
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoRevert "LU-3427 build: fix 'error handling' issues" 32/6932/2
Oleg Drokin [Wed, 10 Jul 2013 03:08:06 +0000 (03:08 +0000)]
Revert "LU-3427 build: fix 'error handling' issues"

This reverts commit a61a1867d763681b3470b6f6ca9535596855d8cc

Whoops, this breaks build now

Change-Id: I3412d42c7cc8a4c6bea253b5dcbda110f4ca0882
Reviewed-on: http://review.whamcloud.com/6932
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2744 build: fix 'data race condition' issues 69/6569/4
Sebastien Buisson [Thu, 6 Jun 2013 12:36:36 +0000 (14:36 +0200)]
LU-2744 build: fix 'data race condition' issues

Fix 'data race condition' defects found by Coverity version
6.5.0:
Data race condition (MISSING_LOCK)
Accessing variable without holding lock. Elsewhere,
this variable is accessed with lock held.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I9c5eac037030f9f2fc49a26aaf2e1a125a2a0993
Reviewed-on: http://review.whamcloud.com/6569
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2407 tests: remove the leading space in the fake nid 79/6779/2
Jian Yu [Wed, 26 Jun 2013 09:22:56 +0000 (17:22 +0800)]
LU-2407 tests: remove the leading space in the fake nid

This patch fixes conf-sanity test_35a() and test_35b() to remove
the leading space ahead of the fake failover nid.

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 serverjob=lustre-b2_3 serverbuildno=41 \
testlist=conf-sanity

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I2dd5b0274abc2aea7a5e7ee3599fbef7bcb16037
Reviewed-on: http://review.whamcloud.com/6779
Tested-by: Hudson
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2987 llite: rcu-free inode 63/5763/5
James Simmons [Tue, 25 Jun 2013 16:07:13 +0000 (12:07 -0400)]
LU-2987 llite: rcu-free inode

Since 2.6.38, inode.i_rcu was added and file system .destroy_inode
should rcu-free inodes.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Idc12c94fd1bf9c99756c9bcb2d07f3061e6dad5a
Reviewed-on: http://review.whamcloud.com/5763
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org>
6 years agoLU-3484 llite: Anonymous dentry incorrectly identified as root 26/6726/5
Patrick Farrell [Tue, 25 Jun 2013 15:56:10 +0000 (10:56 -0500)]
LU-3484 llite: Anonymous dentry incorrectly identified as root

When exporting Lustre via NFS on SLES11SP2, this check incorrectly identifies
anonymous dentries as root dentries.  This is due to a change in SLES11SP2
which makes the d_name.name for anonymous dentries the same as that for root
dentries.  (Details in LU-3484.)

This changes the check to directly compare the value of the dentry pointer
to the root dentry pointer found in the superblock, rather than using the name.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I18a60a7610b02d1b0580f9a0af4aeb81b5cca9b1
Reviewed-on: http://review.whamcloud.com/6726
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org>
6 years agoLU-2655 obdclass: selinux support 35/5135/8
Alexey Lyashkov [Sun, 20 Jan 2013 04:42:22 +0000 (06:42 +0200)]
LU-2655 obdclass: selinux support

add ability to start lustre targers on selinux enabled nodes
provide a fake xattr functions for a lustre mounts,
add security context to mkfs mountpoint.

Xyratex-bug-id: MPR-558
Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Change-Id: Iee8701912e71da21eb7e2417ebdc123f88ab86fa
Reviewed-on: http://review.whamcloud.com/5135
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>
6 years agoLU-3446 mdd: changelog index to survive MDT restart 42/6642/4
Ned Bass [Thu, 13 Jun 2013 22:41:12 +0000 (15:41 -0700)]
LU-3446 mdd: changelog index to survive MDT restart

If all changelog records are cleared the current changelog index is
initialized to zero when the MDT starts. This confuses applications
that rely on the index to track their position in the changelog
history. To avoid this, initialize the current index from the
registered user with the highest end record index.

Add a sanity.sh regression test. Update changelog test function
test_160() and its helpers according to current style guidelines.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I841bbf84c718bac560b6eea4b18de9918b889a90
Reviewed-on: http://review.whamcloud.com/6642
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: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3173 build: Incorrect detection of ldiskfs series to use 56/6056/9
Dmitry Eremin [Wed, 29 May 2013 17:30:15 +0000 (21:30 +0400)]
LU-3173 build: Incorrect detection of ldiskfs series to use

Extract correct upstream kernel release for RHEL kernels and
form it into RHEL_KERNEL_VERSION as
$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)-$(RHEL_RELEASE)
Then use this string for correct ldiskfs series selection.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Idda0a4b02a5090b7be6fb81b8f98175559e575aa
Reviewed-on: http://review.whamcloud.com/6056
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
6 years agoLU-3460 quota: don't schedule adjust when qsd stopped 31/6731/2
Niu Yawei [Fri, 21 Jun 2013 08:05:25 +0000 (04:05 -0400)]
LU-3460 quota: don't schedule adjust when qsd stopped

When the qsd is stopped, we should not schedule quota adjust or
index update anymore, because the writeback thread has been stopped,
and those scheduled requests will never be processed.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I33e0bbc7eb22be8a7edbc031f36ceff666575ebe
Reviewed-on: http://review.whamcloud.com/6731
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
6 years agoLU-3334 quota: use different names for reint threads 41/6341/5
Niu Yawei [Wed, 15 May 2013 03:32:17 +0000 (23:32 -0400)]
LU-3334 quota: use different names for reint threads

Use different thread names for the quota reint threads.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I54a4d074106e6f0fa9a21a0fd91a9096c54035f4
Reviewed-on: http://review.whamcloud.com/6341
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3021 ldiskfs: to not verify preallocation in umount path 83/5883/4
James Simmons [Fri, 14 Jun 2013 11:44:17 +0000 (07:44 -0400)]
LU-3021 ldiskfs: to not verify preallocation in umount path

When recovery test is running, device rdonly flag is set and all
updates will be erred out so on-disk data can be inconsistent with
memory data.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I69d3fa462c69f5f85978265075165b488661e863
Reviewed-on: http://review.whamcloud.com/5883
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2489 hsm: remove hsm_nl proc file 56/6656/2
John L. Hammond [Fri, 14 Jun 2013 19:25:21 +0000 (14:25 -0500)]
LU-2489 hsm: remove hsm_nl proc file

Remove the file /proc/fs/lustre/mdc/*/hsm_nl which was introduced "for
testing purposes."

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I646c74de00084a54d528b059633512381e7097f0
Reviewed-on: http://review.whamcloud.com/6656
Tested-by: Hudson
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3403 llite: error of listxattr when buffer is small 63/6463/8
Keith Mannthey [Tue, 18 Jun 2013 16:36:31 +0000 (09:36 -0700)]
LU-3403 llite: error of listxattr when buffer is small

According to the standard, listxattr(2) should return -1
and errno should be set to ERANGE if the size of the list
buffer is too small to hold the result. However ll_listxattr()
will return a value bigger than the size of buffer in some cases.

Let's assume listxattr(2) returns SIZE when it is called with a
large enough list buffer. If it's called again with a list buffer
whose size is smaller than SIZE but bigger than (SIZE - 12), then
listxattr(2) will return SIZE too. This patch fixes the problem.
Original patch by Li Xi <pkuelelixi@gmail.com>

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: Ifb29ae900a5ee57dfde8781f7a008b6129c7bf91
Reviewed-on: http://review.whamcloud.com/6463
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Xi <pkuelelixi@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3427 build: fix 'error handling' issues 10/6510/5
Sebastien Buisson [Fri, 31 May 2013 14:02:09 +0000 (16:02 +0200)]
LU-3427 build: fix 'error handling' issues

Fix 'error handling' issues found by Coverity version 6.5.1:
Unchecked return value (CHECKED_RETURN)
Calling function without checking return value.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Id0d7c6f5fdddcc5ba9b78f9410f30d9bfc39dac8
Reviewed-on: http://review.whamcloud.com/6510
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3441 build: Allow for native KNC compilation 58/6558/2
Chris Horn [Wed, 5 Jun 2013 19:52:50 +0000 (14:52 -0500)]
LU-3441 build: Allow for native KNC compilation

The cross-compilation support (LU-2752) assumes that K1OM will
only be built in a cross-compile environment. To allow for
native compilation we only perform the cross compilation check
if $cross_compile is defined to yes.

Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: I93fd9c2f7d29dd9567cfcd93013df09271d65dc2
Reviewed-on: http://review.whamcloud.com/6558
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-1199 build: Fix paths after move to contrib dir 97/6497/2
Dmitry Eremin [Thu, 30 May 2013 14:37:12 +0000 (18:37 +0400)]
LU-1199 build: Fix paths after move to contrib dir

Fix usage of lbuild's support files from the directory where
lbuild and support files are realy palced.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ie0bb4f98ee0adcbf1643b15a9d131f69a47b7360
Reviewed-on: http://review.whamcloud.com/6497
Tested-by: Hudson
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3435 util: Improvement to error logging for l_getidentity 33/6533/3
Patrick Farrell [Tue, 4 Jun 2013 18:19:24 +0000 (13:19 -0500)]
LU-3435 util: Improvement to error logging for l_getidentity

The LU-2107 patch to l_getidentity does not set the data->idd_err
value to errno, and does not log the uid when getgrouplist() fails.
This patch fixes both of those concerns.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I8a5715bada61a4c69d4d875b60097f9414a25f1c
Reviewed-on: http://review.whamcloud.com/6533
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3413 scrub: NOT create new files in test_11 during scrub 85/6485/5
Fan Yong [Sat, 25 May 2013 06:18:40 +0000 (14:18 +0800)]
LU-3413 scrub: NOT create new files in test_11 during scrub

In sanity-scrub test_11, there may be new files created between two
cycles OI scrub. The test scripts cannot distinguish whether the OI
scrub skipped objects are new created or caused by OI scrub issues.

So we umount the clients after the test environment preparation to
prevent new files to be created from client during OI scrub.

On the other hand, enable full debug to check whether some internal
files creating during the OI scrub.

Test-Parameters: testlist=sanity-scrub,sanity-lfsck

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ie1bdebd12ea456bab07bd4c3a55776fa9451144e
Reviewed-on: http://review.whamcloud.com/6485
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3101 mgs: deregister the mount for failed case 35/6035/5
Hongchao Zhang [Sun, 28 Apr 2013 10:12:58 +0000 (18:12 +0800)]
LU-3101 mgs: deregister the mount for failed case

in server_start_mgs, the mount of MGS should be put if MGS
failed to start up.

Change-Id: I03c7c3c8e0c578391b637fe0bcdf48da5e318db8
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/6035
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-2904 llite: return valid fsid for statfs 93/6493/3
Fan Yong [Sun, 19 May 2013 17:00:21 +0000 (01:00 +0800)]
LU-2904 llite: return valid fsid for statfs

Lustre uses 64-bits inode number to identify object on client side.
When re-export Lustre via NFS, NFS will detect whether support fsid
via statfs(). For the non-support case, it will only recognizes and
packs low 32-bits inode number in nfs handle. Such handle cannot be
used to locate the object properly.

To avoid patch linux kernel, Lustre client should generate fsid and
return it via statfs() to up layer.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ie292b26726a1b2aa7a763ef7c0507e3ed089323b
Reviewed-on: http://review.whamcloud.com/6493
Tested-by: Hudson
Tested-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3220 quota: warning on setting small limits 82/6182/4
Niu Yawei [Sat, 27 Apr 2013 05:07:32 +0000 (01:07 -0400)]
LU-3220 quota: warning on setting small limits

When user try to set quota limits smaller than the minimal qunit
size (1M bytes for block limit, 1K inodes for inode limit), we'd
warn user that limit is too small.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I26e2e682500628211e2f2bedf65e534f3b214422
Reviewed-on: http://review.whamcloud.com/6182
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
6 years agoLU-2200 obdclass: be more careful processing server name 97/6197/15
Nathaniel Clark [Sat, 27 Apr 2013 03:54:04 +0000 (23:54 -0400)]
LU-2200 obdclass: be more careful processing server name

Because whole options line gets passed to exclude processing, don't
search from end of passed in argument to determine fsname at
beginning.

Re-enable conf-sanity/32 but do replace_nids on IB.

Test-Parameters: nettypes=o2ib testlist=conf-sanity
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ibc43417cb71581198e3516c1e431c0d3f668f1e0
Reviewed-on: http://review.whamcloud.com/6197
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3357 mgs: Initialize uuid of llogs created by replace_nids 95/6395/2
Nathaniel Clark [Mon, 20 May 2013 14:03:38 +0000 (10:03 -0400)]
LU-3357 mgs: Initialize uuid of llogs created by replace_nids

Initialize "Target uuid" with same data as in record_start_log().

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: If7f49eda6bf2f4143d86b71392e215528ebcbf92
Reviewed-on: http://review.whamcloud.com/6395
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3375 test: use available mdc for replay-single test_44 25/6425/3
Emoly Liu [Tue, 16 Apr 2013 13:24:44 +0000 (21:24 +0800)]
LU-3375 test: use available mdc for replay-single test_44

This patch corrects that to only look for the available mdc device
whose status is "UP".

Test-Parameters: clientdistro=fc18 clientarch=x86_64 serverdistro=el6 serverarch=x86_64 testlist=replay-single envdefinitions=SLOW=yes
Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: Ia4013e68f44b0c1c5eb173b04af4c8c67e4961cf
Reviewed-on: http://review.whamcloud.com/6425
Tested-by: Hudson
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3404 build: fix 'incorrect expression' errors 65/6465/2
Sebastien Buisson [Mon, 27 May 2013 15:05:28 +0000 (17:05 +0200)]
LU-3404 build: fix 'incorrect expression' errors

Fix 'program hangs' defects found by Coverity version 6.5.1:
Array compared against 0 (NO_EFFECT)
Comparing an array to null is not useful.
Copy-paste error (COPY_PASTE_ERROR)
This line looks like a copy-paste error.
Self assignment (NO_EFFECT)
Assignment operation has no effect.
Side effect in assertion (ASSERT_SIDE_EFFECT)
Assignment has a side effect. This code will work differently in a
non-debug build. You might have intended to use a comparison instead.
Wrong sizeof argument (SIZEOF_MISMATCH)
Passing argument is suspicious.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Iad370305cb8540f7c1b918e53ceae32e9ccbba8f
Reviewed-on: http://review.whamcloud.com/6465
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3226 test: do some cleanup for sanity.sh test_43a/b 14/6414/3
Emoly Liu [Wed, 10 Apr 2013 02:34:55 +0000 (10:34 +0800)]
LU-3226 test: do some cleanup for sanity.sh test_43a/b

This patch includes the following minor fixes for sanity.sh
test_43a/b:
- to remove multiop after the current test and provide a clean env
for the next test;
- to do some style cleanup.

Test-Parameters: clientdistro=fc18 clientarch=x86_64 serverdistro=el6 serverarch=x86_64 testlist=sanity
Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: I86221d9dbf1188b553b3c65bb14298e62f19f820
Reviewed-on: http://review.whamcloud.com/6414
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3182 lmv: fix duplicate directory entries 05/6405/4
Ned Bass [Tue, 21 May 2013 01:50:47 +0000 (18:50 -0700)]
LU-3182 lmv: fix duplicate directory entries

In 4e57f6dd3a156e35ccb587fc5c003805dd73ecb7, I accidentally
introduced a new way for duplicate directory entries to be returned
from readdir().  That patch fails to properly decrement the nlupgs
counter when breaking out of the inner-for loop.  This accounting
error causes an extra iteration of the inner-for loop when processing
the next cfs page and a bad ldp_hash_end value is then saved in the
lu_dirpage.  To fix this, always decrement the nlupgs counter on
entry into the inner loop.

Note: this bug only affects architectures with > 4k-sized pages, e.g.
PowerPC.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I9fa0fd8f34081f834f1d8b4df633d6e08926dcc9
Reviewed-on: http://review.whamcloud.com/6405
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3304 tests: sanity-quota test_18 watchdog triggered 10/6310/3
James Nunez [Fri, 10 May 2013 14:15:50 +0000 (08:15 -0600)]
LU-3304 tests: sanity-quota test_18 watchdog triggered

sanity-quota test_18 is picking up watchdog messages from
prevous tests. The fix is clearing dmesg at the beginning
of test_18. This also allowed us to remove some of strings
that the awk command looking for, i.e. the subtest name.

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
testlist=sanity-quota

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I9a20bd2e374048f252219038df3590fef339a672
Reviewed-on: http://review.whamcloud.com/6310
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3253 mdt: use lu_object/device in mdt_object/device 22/6222/2
John L. Hammond [Wed, 1 May 2013 02:52:01 +0000 (21:52 -0500)]
LU-3253 mdt: use lu_object/device in mdt_object/device

Have MDT object/device include a LU object/device rather than an MD
object/device as the MDT layer does not define MD operations.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Icf48d8f1288895ba1ffecdf55f0d036df5961d6e
Reviewed-on: http://review.whamcloud.com/6222
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3348 test: use correct old path in racer's file_link.sh 51/6351/2
John L. Hammond [Wed, 15 May 2013 17:42:47 +0000 (12:42 -0500)]
LU-3348 test: use correct old path in racer's file_link.sh

In racer's file_link.sh the old path was not prefixed by the directory
used by racer. Since file_link.sh does not run out of this directory
no links were created. Fix this in by supplying the correct old path.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ifcbcc3d50c70faed7a99fa95217b08c8efe35791
Reviewed-on: http://review.whamcloud.com/6351
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>
6 years agoLU-2650 procfs: return -ENOMEM from lprocfs_register() 61/5161/5
John L. Hammond [Thu, 24 Jan 2013 22:54:36 +0000 (16:54 -0600)]
LU-2650 procfs: return -ENOMEM from lprocfs_register()

In lprocfs_register(), if proc_mkdir() fails then return
ERR_PTR(-ENOMEM) rather than NULL and hold _lprocfs_mutex for the
whole function.  In lprocfs_remove_nolock() return early if the entry
is an error pointer. Improve error handling around lprocfs_register()
in a few spots.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I8d452781afe4b7c174c3b5fac9f4f0e573a3d85c
Reviewed-on: http://review.whamcloud.com/5161
Tested-by: Hudson
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-2547 tests: EXCLUDE recovery-small/24b for ZFS 87/6587/3
Nathaniel Clark [Thu, 6 Jun 2013 20:41:16 +0000 (16:41 -0400)]
LU-2547 tests: EXCLUDE recovery-small/24b for ZFS

Exclude test because it fails in the same way as 24a and in theory
should be fixed simultaniously.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Iea5aaddf41b5765efce22cc7e32234cb1a8e49ae
Reviewed-on: http://review.whamcloud.com/6587
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3352 test: use correct nettype in conf-sanity.sh test_73 50/6550/4
Emoly Liu [Wed, 24 Apr 2013 23:23:17 +0000 (07:23 +0800)]
LU-3352 test: use correct nettype in conf-sanity.sh test_73

Use $NETTYPE instead of tcp to set failnode NID in conf-sanity.sh
test_73.

Test-Parameters: nettypes=o2ib testlist=conf-sanity
Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: Ibcc1e60c2369aafada28e7d7462cb7dbb1ce5043
Reviewed-on: http://review.whamcloud.com/6550
Tested-by: Hudson
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3449 tests: Trash track_declares_assert related errors 39/6639/4
Bruno Faccini [Tue, 18 Jun 2013 15:37:31 +0000 (17:37 +0200)]
LU-3449 tests: Trash track_declares_assert related errors

Do not care about track_declares_assert related errors (ie,
zfs, interop, ...).

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: Ie608ab0bd7fe3d02717931de1ba241638f5a124a
Reviewed-on: http://review.whamcloud.com/6639
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-1199 lbuild: Remove obsolete CVS functionality 62/5962/4
Christopher J. Morrone [Fri, 22 Feb 2013 01:41:06 +0000 (17:41 -0800)]
LU-1199 lbuild: Remove obsolete CVS functionality

Remove code from lbuild that is obsolete now that CVS is no longer
used by the Lustre project.  The following three command line
parameters are no longer used:

  -d
  --disable-datestamp
  --tag

The former two were removed completely.  The --tag remains, but
is now ignored by lbuild (except that is prints a warning about
the option being deprecated).   We need to allow --tag for now
to accomodate the Intel build farm which always passes in the
bogus option "--tag foo".

Change-Id: I68636f599937cec2ea9298a395df0c875762215e
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/5962
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>
6 years agoLU-3313 tests: Skip sanityn test_51b 40/6340/2
James Nunez [Wed, 15 May 2013 03:22:25 +0000 (21:22 -0600)]
LU-3313 tests: Skip sanityn test_51b

sanityn test_51b now checks the metadata server version and
will run the test for versions 2.3.59 and above. The test will be
skipped for all other server versions.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I040a77a3564e4801413ff342519ba10c54583e70
Reviewed-on: http://review.whamcloud.com/6340
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3546 mdt: reply error to client after version check 64/6864/4
Jinshan Xiong [Wed, 3 Jul 2013 09:25:04 +0000 (02:25 -0700)]
LU-3546 mdt: reply error to client after version check

This is missing from MDT implementation which will cause the client
to wait for reply forever.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I9e46d83f8db6b6ded57a284914a2ede88dd987f4
Reviewed-on: http://review.whamcloud.com/6864
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-1330 obdclass: add obd_target.h 78/2678/10
Liu Xuezhao [Mon, 17 Dec 2012 14:25:19 +0000 (22:25 +0800)]
LU-1330 obdclass: add obd_target.h

Move some server-side data structures form obd.h to obd_target.h.  To
remove some code dependencies use HAVE_SERVER_SUPPORT to protect some
llog/fsfilt_* functions.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I4e79f76220cc194c31ca4005ff6286a4a6bd72e9
Reviewed-on: http://review.whamcloud.com/2678
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
6 years agoLU-3474 mdt: mdt_links_read() to return linkea_init() errors 72/6772/3
Bruno Faccini [Wed, 26 Jun 2013 10:54:01 +0000 (12:54 +0200)]
LU-3474 mdt: mdt_links_read() to return linkea_init() errors

Handle linkea_init() errors.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I2095084d6fb1ba71d15c0b63c183a642ebcf4200
Reviewed-on: http://review.whamcloud.com/6772
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2903 tests: Increase zfs log size allowed in fs_log_size() 92/6692/2
Nathaniel Clark [Tue, 18 Jun 2013 19:50:58 +0000 (15:50 -0400)]
LU-2903 tests: Increase zfs log size allowed in fs_log_size()

The log size in ZFS has been seen to be as much as 384.  This should
allow the affected tests pass without false-negatives.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I9a1f4c25b9c14de0c3ea13f5064092fec86f7b46
Reviewed-on: http://review.whamcloud.com/6692
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3487 llite: handle io init failure in ll_fault_io_init() 35/6735/2
John L. Hammond [Fri, 21 Jun 2013 14:29:55 +0000 (09:29 -0500)]
LU-3487 llite: handle io init failure in ll_fault_io_init()

In ll_fault_io_init(), if cl_io_init() has failed then cleanup and
return an ERR_PTR(). This fixes an oops in the page fault handling
code when a partially initialized io is used. In ll_page_mkwrite0() do
not call cl_io_fini() on an ERR_PTR().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I04b1c1f3071413ba3fa53bbbfcb83fe325ed9050
Reviewed-on: http://review.whamcloud.com/6735
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3365 lmv: support DNE with HSM. 14/6714/6
Thomas Leibovici [Thu, 13 Jun 2013 10:54:45 +0000 (12:54 +0200)]
LU-3365 lmv: support DNE with HSM.

Send HSM requests to the appropriate MDT. Split lists of fids of HSM
actions into one list per MDT.
Move kuc registration/unregistration from MDC to LMV as this is not
MDT related.

Signed-off-by: Thomas Leibovici <thomas.leibovici@cea.fr>
Change-Id: Iecba75dccbf15abc667dcca4800113c70a824d5c
Reviewed-on: http://review.whamcloud.com/6714
Tested-by: Hudson
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-1346 libcfs: replace cfs_ memory wrappers 31/2831/13
Peng Tao [Mon, 17 Jun 2013 09:33:12 +0000 (17:33 +0800)]
LU-1346 libcfs: replace cfs_ memory wrappers

Replace memory relevant wrappers with kernel API.

Affected primitives:
CFS_PAGE_SIZE, CFS_PAGE_SHIFT, cfs_num_physpages,
cfs_copy_from_user, cfs_copy_to_user, cfs_page_address,
cfs_kmap/cfs_kunmap, cfs_get_page, cfs_page_count,
cfs_page_index, cfs_page_pin, cfs_page_unpin,
cfs_memory_pressure_get/set/clr, CFS_NUM_CACHEPAGES,
CFS_ALLOC_XXX flags, cfs_alloc/free, cfs_alloc/free_large,
cfs_alloc/free_page, CFS_DECL_MMSPACE, CFS_MMSPACE_OPEN,
CFS_MMSPACE_CLOSE, CFS_SLAB_XXX flags, cfs_shrinker_t,
cfs_set/remove_shrinker, CFS_DEFAULT_SEEKS, cfs_mem_cache_t,
cfs_mem_cache_alloc/free/create/destroy, cfs_mem_is_in_cache

manual changes:
1. cfs_alloc_flags_to_gfp() is removed
2. remove kmalloc/kfree etc. from linux-mem.c and linux-mem.h
3. remove page_address/kmap/kunmap etc. from linux-mem.h
4. remove page_cache_get/page_cache_release from echo_internal.h. They
are defined already in user-mem.h
5. change kmem_cache_create/destroy prototype to kernel's and modify
all callers to match them
6. define _SPL_KMEM_H and related macros to avoid using spl's
sys/kmem.h that redefines slab allocator
7. change kmem_virt to is_vmalloc_addr as provided by kernel, so that
we don't use any spl's sys/kmem.h functions
8. clean up include files a little bit in osd-zfs
9. various coding style cleanup

NUMA allocators(cfs_cpt_xxx) are not changed in this patch.
gnilnd is not converted, as requested by James Simmons.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Iadfbb0d5a0e31c78dd6c811e5ffdb468fa7e6f44
Reviewed-on: http://review.whamcloud.com/2831
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2662 build: pthread build issue 80/5180/4
Keith Mannthey [Wed, 30 Jan 2013 00:39:21 +0000 (16:39 -0800)]
LU-2662 build: pthread build issue

Adding strlcpy to lustre/utils/liblustreapi.c caused
unexpected build issues.

The build would fail with undefined refrence to
'pthread_create` in user-prim.c.

Adding the pthread flags to the makefile allow the
build to past. I am not sure this is the "BEST" way.

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: I62ac4d5c53a42411ef2e8ff37a455308cffed167
Reviewed-on: http://review.whamcloud.com/5180
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3420 scrub: trigger OI scrub properly 15/6515/4
Fan Yong [Fri, 24 May 2013 05:59:16 +0000 (13:59 +0800)]
LU-3420 scrub: trigger OI scrub properly

In osd_fid_lookup(), if the iget() cannot locate the backend inode
(return -ENOENT or -ESTALE) with the found ino#/gen in the OI file,
there may be three cases:

1) MDT file-level backup/restore caused the OI invalid.
2) Someone unlinked the object but NOT removed the OI mapping, such
   as mount target device as ldiskfs, and modify something directly.
3) Someone just removed the object between the osd_oi_lookup() and
   the iget(). It is normal.

Under such case we can lookup OI again to check whether related OI
mapping is still there or not. If not, it is 3rd case. Otherwise,
it is diffcult to distinguish the 2nd from the 1st case. Relatively
speaking, the 1st case is more common than the 2nd case, so trigger
OI scrub without further distinguish.

To reduce the 2nd case, the initial OI scrub will scan the local
objects set to remove those stale OI mappings, such as the entry
for "CATALOGS" after file-level backup/restore.

Another update is about mapping FID to inode for the object with
remote name entry. For example, dir1's name entry resides on the
MDT0. Its object resides on the MDT1. On the MDT1, do file-level
backup/resotre. And before the OI scrub finishing to rebuilt the
OI files on the MDT1, MDT0 send RPC to MDT1 to access dir1's obj
with dir1's FID. On the MDT1, the OI mapping for FID1 is invalid
yet. Under such case, we have two possible solutions:

a) The MDT1 returns -EINPROGRESS to the MDT0, and the MDT0 retry
   such RPC sometime later.

b) On the MDT1, There is the directory "/REMOTE_PARENT_DIR" hold
   all the objects which have remote name entries on other MDTs.
   The object name under the "/REMOTE_PARENT_DIR" is FID string.
   So when get invalid OI mapping, OSD can localte the inode via
   lookup the "/REMOTE_PARENT_DIR" with the given FID.

Compared the two solutions, a) will cause the MDT0 busy wait until
related OI mapping rebuilt. b) is relative better. And bacause the
MDT file-level backup/restore is rare case, it will not affect the
normal cases for FID to inode mapping.

In fact, from the OSD view, it does not know whether the object for
the given FID is referenced by some remote name entry or not, and
especially for DNE II, a multiple-linked object may have many name
entries reside on many MDTs.

To simplify the operation, OSD will not distinguish more, it just
lookup the "/REMOTE_PARENT_DIR". Usually, it only happened for the
RPC from other MDT during the OI scrub, or for the client side RPC
with FID only, such as FID to path, or from old connected client.

Test-Parameters: testlist=sanity-scrub
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I503bd1e2d5d5eb3976a46c385ae041d11d3b9c32
Reviewed-on: http://review.whamcloud.com/6515
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3337 build: add missing build files for sles11sp2 server 72/6272/40
Bob Glossman [Mon, 6 May 2013 18:44:56 +0000 (11:44 -0700)]
LU-3337 build: add missing build files for sles11sp2 server

Fix lbuild target and config files for sles11sp2 server builds

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I356d6d7412a5f6f1325a41bb77ba07dbe945b875
Reviewed-on: http://review.whamcloud.com/6272
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoNew tag 2.4.51 2.4.51 v2_4_51 v2_4_51_0
Oleg Drokin [Fri, 21 Jun 2013 22:10:03 +0000 (18:10 -0400)]
New tag 2.4.51

Change-Id: I3822651073eae215e838164d7759b946d27440e5
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-1330 fld: prepare FLD module for client server split 75/2675/16
Liu Xuezhao [Fri, 15 Mar 2013 00:01:06 +0000 (19:01 -0500)]
LU-1330 fld: prepare FLD module for client server split

Split FLD server from client, fld_{handler,index}.c are not compliled
unless server support is enabled.  Do not include dt_object.h or
lustre_mdt.h in lustre_fld.h and fix the minor breakages caused by
this elsewhere.  Generally cleanup includes in lustre/fld.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I60a43934f9aa391689e376f68d249b7244645713
Reviewed-on: http://review.whamcloud.com/2675
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-2335 lnet: remove empty file lnet/lnet/api-errno.c 80/5880/5
Peng Tao [Fri, 29 Mar 2013 02:49:56 +0000 (10:49 +0800)]
LU-2335 lnet: remove empty file lnet/lnet/api-errno.c

The file is empty. We can just remove it.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I7d46874dde5581d48ea582031df0f33a937870da
Reviewed-on: http://review.whamcloud.com/5880
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-1602 ldlm: Fix flock deadlock detection race 77/3277/7
Andriy Skulysh [Mon, 21 Jan 2013 21:15:23 +0000 (23:15 +0200)]
LU-1602 ldlm: Fix flock deadlock detection race

Deadlock isn't detected if 2 threads are trying to
grant 2 locks which deadlock on each other.
They call ldlm_flock_deadlock() simultaneously
and deadlock ins't detected.

The soulition is to add lock to blocking list before
calling ldlm_flock_deadlock()

Xyratex-bug-id: MRP-412
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-by: Bruce Korb <bruce_korb@xyratex.com>
Change-Id: I437c8b40a58de14bbac3da39d98d0f03d0f2e064
Reviewed-on: http://review.whamcloud.com/3277
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3448 llite: call simple_setattr() from ll_md_setattr() 43/6643/4
John L. Hammond [Fri, 14 Jun 2013 01:07:50 +0000 (20:07 -0500)]
LU-3448 llite: call simple_setattr() from ll_md_setattr()

This partially reverts the change from "LU-2482 layout: introduce new
layout for released files" by calling simple_setattr() from
ll_md_setattr() without ATTR_SIZE set. Doing so avoids failed
assertions in osc_page_delete(). Disable truncates on released files
and modify sanity 229 accordingly.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I201882a4ee42d8c63121477b6d7495cbb9701465
Reviewed-on: http://review.whamcloud.com/6643
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3461 kernel: Kernel update [RHEL6.4 2.6.32-358.11.1.el6] 15/6615/3
Bob Glossman [Wed, 12 Jun 2013 17:25:37 +0000 (10:25 -0700)]
LU-3461 kernel: Kernel update [RHEL6.4 2.6.32-358.11.1.el6]

Update RHEL6.4 kernel to 2.6.32-358.11.1.el6

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I08cbc8ab56f41e6de68ab7cfb8dec65ec56c398e
Reviewed-on: http://review.whamcloud.com/6615
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2686 kernel: sock_map_fd() replaced by sock_alloc_file() 73/5973/6
yangsheng [Mon, 8 Apr 2013 13:14:09 +0000 (21:14 +0800)]
LU-2686 kernel: sock_map_fd() replaced by sock_alloc_file()

Use sock_alloc_file() replace sock_map_fd()

Signed-off-by: yang sheng <yang.sheng@intel.com>
Change-Id: I04cbcd651689af6b82b48ba5d49ddbf99a6758bf
Reviewed-on: http://review.whamcloud.com/5973
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3166 build: Fix failed OFED event checking on OFED-3.5 48/6048/2
Shuichi Ihara [Sat, 13 Apr 2013 21:03:04 +0000 (06:03 +0900)]
LU-3166 build: Fix failed OFED event checking on OFED-3.5

compat driver's header for OFED-3.5 is missing to check
whether OFED events are defined in OFED-3.5.

Signed-off-by: Shuichi Ihara <sihara@ddn.com>
Change-Id: I46887fbd745dd59e492908418e16029a7b36c12a
Reviewed-on: http://review.whamcloud.com/6048
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Frank Heckes <Frank.Heckes@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2850 kernel: 3.8 upstream kills daemonize() 55/5655/13
Peng Tao [Fri, 14 Jun 2013 12:56:27 +0000 (08:56 -0400)]
LU-2850 kernel: 3.8 upstream kills daemonize()

kernel_thread() is a low level kernel function.
Instead of calling kernel_thread() and relying on daemonize()
to create new kernel threads, we should really switch to
kthread_run() and elimilate daemonize().

All callers are converted except for those in
lnet/klnds/gnilnd/gnilnd*, as requested by James.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I9f977bfc5d58192957d8c8d634204f4910edfa2a
Reviewed-on: http://review.whamcloud.com/5655
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2901 mdt: duplicate link names in directory 91/6591/4
Andreas Dilger [Fri, 7 Jun 2013 21:56:29 +0000 (15:56 -0600)]
LU-2901 mdt: duplicate link names in directory

When creating a hard link to a file, the MDT/MDD/OSD code does
not verify whether the target link name already exists in the
directory.  The ZFS ZAP code checks for duplicate entries. The
add_dirent_to_buf() function in ldiskfs only checks entries for
duplicates while it is traversing the leaf block looking for free
space.  Even if it scanned the whole leaf block, this would not
work for non-htree directories since there is no guarantee that
the name is being inserted into the same leaf block.

To fix this, link should check target object doesn't exist as
other creat operations.

Add sanity.sh test_31o with multiple threads racing to link a new
name into the directory, while ensuring that there is a free entry
in the leaf block that is large enough to hold the duplicate name.
This needs to be racy, because otherwise the client VFS will see
the existing name and not send the RPC to the MDS, hiding the bug.

Add DLDLMRES/PLDLMRES macros for printing the whole lock resource
name (including the name hash) in LDLM_DEBUG() messages in a format
similar to DFID/PFID so they can be found in debug logs more easily.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: Iaec6098332fe6b0f6a534f8dbecfb14f6f500c1e
Reviewed-on: http://review.whamcloud.com/6591
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>