Whamcloud - gitweb
fs/lustre-release.git
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 years agoLU-2479 ldiskfs: fix max_dir_size checking
James Simmons [Tue, 14 May 2013 14:39:12 +0000 (10:39 -0400)]
LU-2479 ldiskfs: fix max_dir_size checking

This patch fix max_dir_size checking and adds max_dir_size_kb
mount options according to ext4 main line patch
df981d03eeff7971ac7e6ff37000bfa702327ef1. Sanity test 129
changed to check directory size limits.

1) file creation without directory size increase
2) file creation after directory limit
3) file creation with disable limit

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Xyratex-bug-id: MRP-697
Change-Id: I3b8502c0b1fa77622a4a0da6ef8d33d4f8194f69
Reviewed-on: http://review.whamcloud.com/5140
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-2212 crypto: add crc32c module loading to libcfs
Alexander.Boyko [Mon, 22 Oct 2012 18:21:50 +0000 (22:21 +0400)]
LU-2212 crypto: add crc32c module loading to libcfs

This patch add automatically module loading for crc32c
when libcfs is starting.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Xyratex-bug-id: MRP-725
Change-Id: I3bd8a29cd05b25b77a57f6df254f3d39641d99a1
Reviewed-on: http://review.whamcloud.com/4372
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Shuichi Ihara <sihara@ddn.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
10 years agoLU-3096 tests: combine dependent sanity tests
Vladimir Saveliev [Sun, 28 Apr 2013 19:03:46 +0000 (23:03 +0400)]
LU-3096 tests: combine dependent sanity tests

Some tests can not run as expected when previous dependent test is not
ran.
This patch combines the following sanity tests:
    test 4 is removed as duplicate of test 1
    tests 6a, 6b to test 6a
    tests 6c, 6d to test 6c
    tests 6e, 6f to test 6e
Test 0 is renamed to test 0a to allow running it separately.

Signed-off-by: Vladimir Saveliev <vladimir_saveliev@xyratex.com>
Xyratex-bug-id: MRP-814
Change-Id: I4cc2a18ec7a95f5b0a3a67ff799077689d2e30d1
Reviewed-on: http://review.whamcloud.com/5929
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>
10 years agoLU-2850 kernel: 3.8 upstream removes vmtruncate()
Peng Tao [Fri, 17 May 2013 15:05:46 +0000 (11:05 -0400)]
LU-2850 kernel: 3.8 upstream removes vmtruncate()

vmtruncate() is removed since upstream commit b9f61c3.
Also truncate_setsize is not always available. So we
just open code it and use truncate_pagecache instead.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I9d4f43a5c181f16482b4caa021ba7a09ee52b600
Reviewed-on: http://review.whamcloud.com/5613
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2889 ptlrpc: Race between start and stop service threads
Hiroya Nozaki [Tue, 7 May 2013 03:22:32 +0000 (12:22 +0900)]
LU-2889 ptlrpc: Race between start and stop service threads

When ptlrpc_start_thread fails to create a new thread, it will
finalize and free a struct ptlrpc_thread created and used here.
Considering this, it can be a problem when ptlrpc_svcpt_stop_thread
is driven and handles the struct ptlrpc_thread right after or right
before failure of cfs_create_thread. Because this situation let
the both of ptlrpc_start_thread and ptlrpc_svcpt_stop_threads
access the freed ptlrpc_thread and cause OS panic. Or, it may
happen that ptlrpc_svcpt_stop_threads waits forever holding an
already-freed waitq.

This patch adds an error handling into ptlrpc_start_thread to fix
this problem.

Signed-off-by: Hiroya Nozaki <nozaki.hiroya@jp.fujitsu.com>
Change-Id: Ic25f40f8650c65e21abe4df127fc20f9c7d0fcd1
Reviewed-on: http://review.whamcloud.com/5552
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3063 osc: Check return code for lu_kmem_init
Keith Mannthey [Sat, 1 Jun 2013 03:06:30 +0000 (20:06 -0700)]
LU-3063 osc: Check return code for lu_kmem_init

lu_kmem_init can fail and returns has a return code.
Check for this return code in lu_kmem_init.

This issue was found during 2gb VM Racer testing

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: I4ca9d5bae212591d5109b2053940161f9e28baeb
Reviewed-on: http://review.whamcloud.com/6514
Tested-by: Hudson
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2696 utils: fix error message in rmtacl_notify()
Sebastien Buisson [Mon, 28 Jan 2013 13:40:35 +0000 (14:40 +0100)]
LU-2696 utils: fix error message in rmtacl_notify()

Print mnt->mnt_dir instead of fd in error message, and print
the ioctl type that failed.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Ia10c992e4f6ed1dbab86ccfea9d85ea2e0f81cf5
Reviewed-on: http://review.whamcloud.com/5187
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3195 tests: Interop 2.3.0<->2.3.63 sanity-quota test_6
James Nunez [Fri, 10 May 2013 14:44:00 +0000 (08:44 -0600)]
LU-3195 tests: Interop 2.3.0<->2.3.63 sanity-quota test_6

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

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I39b93916818b64560e82aa01d839d49c994693ce
Reviewed-on: http://review.whamcloud.com/6313
Tested-by: Hudson
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>
10 years agoLU-3095 build: fix 'memory corruption' errors
Sebastien Buisson [Wed, 3 Apr 2013 09:24:02 +0000 (11:24 +0200)]
LU-3095 build: fix 'memory corruption' errors

Fix 'memory corruption' defects found by Coverity version 6.5.1:
Unbounded source buffer (STRING_SIZE)
Passing string of unknown size to function which expects a string
of a particular size.
Write to pointer after free (USE_AFTER_FREE)
Dereferencing freed pointer.
Also fix leak of dentries.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I95a1f877025b2e3b58ace7ed86a82330f64c64a3
Reviewed-on: http://review.whamcloud.com/5926
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3453 mdt: check for packed reply in mdt_intent_opc()
John L. Hammond [Wed, 12 Jun 2013 18:15:14 +0000 (13:15 -0500)]
LU-3453 mdt: check for packed reply in mdt_intent_opc()

In mdt_intent_opc() check that the reply has been packed before trying
to adjust the lock policy result.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Iab2858bf26390e6c305fcca6b7b7e0bc1be32a71
Reviewed-on: http://review.whamcloud.com/6617
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-2915 lfsck: LFSCK 1.5 technical debts (3)
Fan Yong [Sun, 19 May 2013 09:40:39 +0000 (17:40 +0800)]
LU-2915 lfsck: LFSCK 1.5 technical debts (3)

This patch resolves some LFSCK 1.5 technical debts, including:
1) Check and remove repeated linkea entries.
2) Merge some "goto" branches to make the code more readable.
3) Some comments about object's nlink inconsistency processing.

Test-Parameters: testlist=sanity-scrub,sanity-lfsck
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ia2bf525cab6b94b87b7d88133393f9d2bb13031e
Reviewed-on: http://review.whamcloud.com/6344
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2915 lfsck: LFSCK 1.5 technical debts (2)
Fan Yong [Sun, 19 May 2013 04:26:37 +0000 (12:26 +0800)]
LU-2915 lfsck: LFSCK 1.5 technical debts (2)

This patch resolves some LFSCK 1.5 technical debts, including:
1) LFSCK does NOT hold spin_lock when call dt iteration API(s).
2) Remove the hack of using dt_it_ops::put() method for events
   notification to low layer otable-based iteration.

Test-Parameters: testlist=sanity-scrub,sanity-lfsck
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ie16161370ac218860a74b23d853c4c378adce4ec
Reviewed-on: http://review.whamcloud.com/6343
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3299 llite: force lvb_data update after layout change
jcl [Wed, 8 May 2013 12:49:07 +0000 (14:49 +0200)]
LU-3299 llite: force lvb_data update after layout change

When a file is restored the layout lock is first
associated with the released layout and after restore
it has to be assocaited with the new layout. This patch
forces lvb_data update in ll_layout_fetch() even if one
is present (case for released->normal state change)

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I9bc02955a8e005898db3dc4db530ee0d29b35ba1
Reviewed-on: http://review.whamcloud.com/6291
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
10 years agoLU-2914 lfsck: split LFSCK code from mdd to lfsck
Fan Yong [Thu, 9 May 2013 09:34:31 +0000 (17:34 +0800)]
LU-2914 lfsck: split LFSCK code from mdd to lfsck

The new LFSCK is used not only for namespace consistency verification,
but also for some other purposes, such as file layout consistency, DNE
consistency, and ect.

So it is more reasonable to move the new LFSCK code from mdd module to
another independent module -- lfsck, which can directly talk with lod,
local storage lib and ldlm. MDD (and OFD in next pahse) will register
as lfsck instance for related lfsck component(s), such as 'namespace'.
The lfsck processing will be independent from MDD, except the control:
start/stop/pause.

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

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ia6cd619d8972f4a51effa1fe48099fced6875ab9
Reviewed-on: http://review.whamcloud.com/6321
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3179 build: fix compilation error with gcc 4.7.2
Bob Glossman [Wed, 24 Apr 2013 13:43:35 +0000 (06:43 -0700)]
LU-3179 build: fix compilation error with gcc 4.7.2

use cast to resolve build warning from gcc 4.7.2

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I4356e621f5b9c687a6b76b12a93b664d542e1c79
Reviewed-on: http://review.whamcloud.com/6141
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2335 build: stop checking for XATTR_ACL_SIZE
Peng Tao [Wed, 31 Oct 2012 06:51:02 +0000 (14:51 +0800)]
LU-2335 build: stop checking for XATTR_ACL_SIZE

posix_acl_xattr_size() never changed in all kernels, liblustre
also implements the same as in kernel.
So XATTR_ACL_SIZE can be calculated at compile time and doesn't
need to be checked.

Removing it can reduce parameters that need to exist in Kconfig.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I64584f04055b06f26e1c08f834d4683f97841332
Reviewed-on: http://review.whamcloud.com/4644
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
10 years agoLU-2335 kernel: add CONFIG_ prefix to config values
Peng Tao [Wed, 31 Oct 2012 07:03:46 +0000 (15:03 +0800)]
LU-2335 kernel: add CONFIG_ prefix to config values

Kernel uses CONFIG_ prefix for all values that comes from
Kconfig. So do the same for Lustre.

Rename OBD_MAX_IOCTL_BUFFER to CONFIG_LUSTRE_OBD_MAX_IOCTL_BUFFER,
LNET_MAX_PAYLOAD to CONFIG_LNET_MAX_PAYLOAD, and INVARIANT_CHECK
to CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I3b1fdea02ba195ce7ff0793c218ac1f505243bb3
Reviewed-on: http://review.whamcloud.com/4646
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-1330 fid: prepare FID module for client server split
Liu Xuezhao [Wed, 3 Apr 2013 21:47:20 +0000 (16:47 -0500)]
LU-1330 fid: prepare FID module for client server split

Split FID server from client, fid_{handler,store,lib}.c are not
compliled unless server support is enabled.  Generally cleanup
includes in lustre/fid/ and reduce the need for client code to
directly or indirectly include {dt,md}_object.h.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ie25abffc41922d9f6001b9e38a8e39b387ccf660
Reviewed-on: http://review.whamcloud.com/2673
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
10 years agoLU-3107 build: fix 'code maintainability' errors
Sebastien Buisson [Thu, 4 Apr 2013 14:14:35 +0000 (16:14 +0200)]
LU-3107 build: fix 'code maintainability' errors

Fix 'code maintainability' issues found by Coverity version 6.5.1:
Unused pointer value (UNUSED_VALUE)
Pointer returned by function is never used.
Missing varargs init or cleanup (VARARGS)
va_end was not called for variable.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I5dd51c4332e966a5e4b274ff5c699a571931161c
Reviewed-on: http://review.whamcloud.com/5944
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3221 lov: remove set_fs() call from lov_getstripe()
John L. Hammond [Wed, 24 Apr 2013 21:13:08 +0000 (16:13 -0500)]
LU-3221 lov: remove set_fs() call from lov_getstripe()

lov_getstripe() calls set_fs(KERNEL_DS) so that it can handle a struct
lov_user_md pointer from user- or kernel-space.  This changes the
behavior of copy_from_user() on SPARC and may result in a misaligned
access exception which in turn oopses the kernel.  In fact the
relevant argument to lov_getstripe() is never called with a
kernel-space pointer and so changing the address limits is unnecessary
and so we remove the calls to save, set, and restore the address
limits.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Id23f429875c92f9d6ed5cd06cadd741d98c46074
Reviewed-on: http://review.whamcloud.com/6150
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
10 years agoLU-2082 osp: print address of object in osp_object_create()
John L. Hammond [Mon, 1 Apr 2013 15:22:05 +0000 (10:22 -0500)]
LU-2082 osp: print address of object in osp_object_create()

In osp_object_create() fix the debug and assert messages to print the
address of the OSP object under consideration rather than the address
of the function osp_obj().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I566e77c69ad486feac4a4d06a9af9e33f884d7e9
Reviewed-on: http://review.whamcloud.com/5903
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>
Reviewed-by: wangdi <di.wang@intel.com>
10 years agoLU-3059 obdclass: use a dummy structure for lu_ref_link
John L. Hammond [Tue, 2 Apr 2013 20:09:39 +0000 (15:09 -0500)]
LU-3059 obdclass: use a dummy structure for lu_ref_link

Move the definition of struct lu_ref_link to lu_ref.h.  If USE_LU_REF
is not defined then define it to be the empty struct.  Change the
return type of lu_ref_add() and lu_ref_add_atomic() to void.  Add
lu_ref_add_at() taking same arguments as lu_ref_add() togerther with a
pointer to a struct lu_ref_link and returning void.  Adjust all
structures containing a lu_ref_link pointer to contain a struct
lu_ref_link instead.  Use lu_ref_add_at() and lu_ref_del_at() to
handle embedded lu_ref_links.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I9d35b0dded24720dc332828b49d0b0a1cd51f620
Reviewed-on: http://review.whamcloud.com/5920
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3345 llapi: add user space method for lov_user_md
jcl [Wed, 15 May 2013 11:16:41 +0000 (13:16 +0200)]
LU-3345 llapi: add user space method for lov_user_md

move lov_mds_md_size from obd_lov.h to lustre_idl.h
to have it close to lov_mds_md definition.

add lov_user_md_size() to compute lum size so
llapi and user space utils do not use kernel internal
definitions/methods

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I01825efb4521bf90293239054a32fd66f85bcaf2
Reviewed-on: http://review.whamcloud.com/6345
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3415 quota: not enforce quota when accounting disabled
Niu Yawei [Thu, 30 May 2013 03:46:28 +0000 (23:46 -0400)]
LU-3415 quota: not enforce quota when accounting disabled

When quota accounting isn't enabled, don't try to enforce quota.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I9a74b7bfe6b2981adf501042efb6867a77ee4044
Reviewed-on: http://review.whamcloud.com/6492
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-2193 mdt: replace fid_build_from_res_name
Fan Yong [Fri, 24 May 2013 05:24:15 +0000 (13:24 +0800)]
LU-2193 mdt: replace fid_build_from_res_name

We miss to replace fid_build_from_res_name() with new
function fid_extract_from_res_name() in mdt_handler.c

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I74804c61361b6c03d4dccd732bce96d9b57f037b
Reviewed-on: http://review.whamcloud.com/6565
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-2782 mdt: add macros for fid string len
jcl [Thu, 7 Feb 2013 22:34:15 +0000 (23:34 +0100)]
LU-2782 mdt: add macros for fid string len

add 2 macros for the length of a fid string 0xSEQ:0xOID:0xVER
and it's brace version (FID_NOBRACE_LEN, and FID_LEN)

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: If257b7e12f43ea48bbdf6a6788d285d465c6a1bc
Reviewed-on: http://review.whamcloud.com/5299
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>
10 years agoLU-2482 layout: introduce new layout for released files
Jinshan Xiong [Wed, 29 May 2013 17:55:55 +0000 (10:55 -0700)]
LU-2482 layout: introduce new layout for released files

Released files now have a standard layout (with generation, pool, ...)
and a stripe count 0 and lmm_pattern flag LOV_PATTERN_F_RELEASED.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: Id2c3b95fdd304f803d391281a86927f5c93cb3b4
Reviewed-on: http://review.whamcloud.com/4816
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-1330 md: fix lu_ucred.c boilerplate
John L. Hammond [Mon, 1 Apr 2013 20:33:54 +0000 (15:33 -0500)]
LU-1330 md: fix lu_ucred.c boilerplate

In preparing Ie3a3cd99 (LU-1330 obdclass: splits server-side object
stack from client) the lu_ucred infrastructure was put in its own
file.  Fixup the boilerplate of this file to give the proper path,
short description, and authors.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I77d42539c625b390cca779cb426e0125ca782d44
Reviewed-on: http://review.whamcloud.com/5910
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-1812 kernel: 3.7/FC18 server patches
James Simmons [Thu, 2 May 2013 11:54:50 +0000 (07:54 -0400)]
LU-1812 kernel: 3.7/FC18 server patches

This patch extends lustre server support to FC18 running a
3.7.2-201 kernel with a ZFS backend. At this time ldiskfs
is not supported on FC18. This patch provides block level
performance optimizations and the ability to simulate fail
over for ldiskfs when it is provided. The jbd2-jcberr patch
was not ported to these new platforms for reasons described
in LU-433.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I2a86d7ca4e068686372eb74f85b1443d24e245c4
Reviewed-on: http://review.whamcloud.com/4649
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
10 years agoLU-2771 dlmlock: compress out unused space
Bruce Korb [Thu, 11 Apr 2013 19:24:54 +0000 (12:24 -0700)]
LU-2771 dlmlock: compress out unused space

* lustre/include/lustre_dlm.h: Remove all bit fields and the unused
  weighing callback procedure.  respell LDLM_AST_DISCARD_DATA as
  LDLM_FL_AST_DISCARD_DATA to match other flags.
* .gitignore: ignore emacs temporary files
* autogen.sh: rebuild the lock bits, if autogen is available.
* contrib/bit-masks/lustre_dlm_flags.def: define the ldlm_lock flags
* contrib/bit-masks/lustre_dlm_flags.tpl: template for emitting text
* contrib/bit-masks/Makefile: construct the .c and .h files
  The .c file is for constructing a crash extension and is not
  preserved.
* contrib/bit-masks/.gitignore: ignore built products
* lustre/contrib/wireshark/packet-lustre.c: use built files instead
  of local versions of the defines.

In the rest of the modified sources, replace flag field references
with bit mask references.

* lustre/osc/osc_lock.c: removed osc_lock_weigh, too

Signed-off-by: Bruce Korb <bruce_korb@xyratex.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Keith Mannthey <Keith.Mannthey@intel.com>
Change-Id: I104522e4012deb0dd8b9d12c2d1f3fd3851708cb
Reviewed-on: http://review.whamcloud.com/5312
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: <bruce.korb@gmail.com>
10 years agoLU-2850 compat: posix_acl_{to,from}_xattr take user_namespace
Jeff Mahoney [Wed, 20 Mar 2013 21:33:17 +0000 (17:33 -0400)]
LU-2850 compat: posix_acl_{to,from}_xattr take user_namespace

Commit 5f3a4a28 (v3.7) added a struct user_namespace argument to
posix_acl_{to,from}_xattr. Pretty much every caller just uses
&init_user_ns. We mask it off in user mode so we don't need to
create a fake structure only to ignore it.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Change-Id: I558a06941b364f241fd4423720957beeaf1d3cea
Reviewed-on: http://review.whamcloud.com/5768
Tested-by: Hudson
Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
10 years agoLU-2800 llite: introduce local getname()
Jeff Mahoney [Wed, 20 Mar 2013 01:18:32 +0000 (21:18 -0400)]
LU-2800 llite: introduce local getname()

Commit 8e377d15 (v3.7) unexported getname and putname. Although
getname was re-exported, putname was not. All we really need is
something to to allocate a buffer and copy it from userspace so
let's just use our own version. The down size is that we lose
the audit support in the original getname.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Change-Id: If44cd9f9d14f26f220d5f0c52e8b804a49d3cf92
Reviewed-on: http://review.whamcloud.com/5781
Tested-by: Hudson
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2924 Make quota namespace refcounting consistent
Oleg Drokin [Thu, 2 May 2013 04:50:24 +0000 (00:50 -0400)]
LU-2924 Make quota namespace refcounting consistent

It seems quota namespace is needlessly referenced on connect,
but that's not necessary as it could not go away until entire
obd goes away.
On the other hand this extra reference disturbs other logic
depending on empty namespace having zero refcount, so this patch
drops such extra referencing.

Change-Id: I62e04ef01a3673e4ffadc4204f3e1768e44fed18
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/6234
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
10 years agoLU-2924 Only wake up ldlm_poold as frequently as the check interval
Oleg Drokin [Thu, 21 Mar 2013 05:43:46 +0000 (01:43 -0400)]
LU-2924 Only wake up ldlm_poold as frequently as the check interval

We used to wake up ldlm poold every second, but that's overkill,
we should just see how much time is left until next closest recalc
interval hits and sleep this much.
This will make "per-second" client grant statistic not actually
per-second, but I don't think we need any precision in that code

Change-Id: I5c3f662c9b2b9112042f58b435c4bf4558ddfab3
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/5793
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-by: Hiroya Nozaki <nozaki.hiroya@jp.fujitsu.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
10 years agoLU-2924 ldlm: split client namespaces into active and inactive
Oleg Drokin [Thu, 7 Mar 2013 06:47:22 +0000 (01:47 -0500)]
LU-2924 ldlm: split client namespaces into active and inactive

The main reason behind this is ldlm_poold walks all namespaces currently
no matter if there are any locks or not. On large systems this could take
quite a bit of time, esp. since ldlm_poold is currently woken up once per
second.

Now every time a client namespace loses it's last resource it is placed
into an inactive list that is not touched by ldlm_poold as pointless.
On creation of a first resource in a namespace it is placed back into
the active list.

Change-Id: I15d9b731d922e073eb9e273c3e19e84cab377916
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/5624
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Hiroya Nozaki <nozaki.hiroya@jp.fujitsu.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
10 years agoLU-3200 mdc: layout lock rpc must not take rpc_lock
jcl [Mon, 15 Apr 2013 20:21:13 +0000 (22:21 +0200)]
LU-3200 mdc: layout lock rpc must not take rpc_lock

When a client issue an RPC to get a layout lock, it
must not hold rpc_lock because in case of a restore
the rpc can be blocking for a long time

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: Id9ea9be47669fd52c8d6e681090b4c911cfe2dc1
Reviewed-on: http://review.whamcloud.com/6115
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
10 years agoLU-2743 ptlrpc: Translate between host and network errnos
Li Wei [Thu, 14 Mar 2013 14:48:48 +0000 (22:48 +0800)]
LU-2743 ptlrpc: Translate between host and network errnos

Lustre puts system errors (e.g., ENOTCONN) on wire as numbers
essentially specific to senders' architectures.  While this is fine
for x86-only sites, where receivers share the same error number
definition with senders, problems will arise, however, for sites
involving multiple architectures with different error number
definitions.  For instance, an ENOTCONN reply from a sparc server will
be put on wire as -57, which, for an x86 client, means EBADSLT
instead.

To solve the problem, this patch defines a set of network errors for
on-wire or on-disk uses.  These errors correspond to a subset of the
x86 system errors and share the same number definition, maintaining
compatibility with existing x86 clients and servers.

Then, either error numbers could be translated at run time, or all
host errors going on wire could be replaced with network errors in the
code.  This patch does the former by introducing both generic and
field-specific translation routines and calling them at proper places,
so that translations for existing fields are transparent.
(Personally, I tend to think the latter way might be worthwhile, as it
is more straightforward conceptually.  Do we really need so many
different errors?  Should errors returned by kernel routines really be
passed up and eventually put on wire?  There could even be security
implications in that.)

Thank Fujitsu for the original idea and their contributions that make
this available upstream.

Change-Id: I98a1421e90f0ddd1d1b558d2c4afbebbd6dc42bd
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/5577
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Hiroya Nozaki <nozaki.hiroya@jp.fujitsu.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3411 osd: fsfilt_get_ops returns an error, not NULL
Alex Zhuravlev [Thu, 30 May 2013 11:23:02 +0000 (15:23 +0400)]
LU-3411 osd: fsfilt_get_ops returns an error, not NULL

osd_mount() should be able to recognize this properly.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Ife1f52cf264fd6041dfc01606c6e48e47f2f8ff0
Reviewed-on: http://review.whamcloud.com/6496
Tested-by: Hudson
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-3032 ptlrpc: race in pinger (use-after-free situation)
Dmitry Eremin [Fri, 12 Apr 2013 13:10:15 +0000 (17:10 +0400)]
LU-3032 ptlrpc: race in pinger (use-after-free situation)

The race is result of use-after-free situation:

~ ptlrpc_stop_pinger()          ~ ptlrpc_pinger_main()
---------------------------------------------------------------
thread_set_flags(SVC_STOPPING)
cfs_waitq_signal(pinger_thread) ...
...                             thread_set_flags(SVC_STOPPED)
l_wait_event(thread_is_stopped)
OBD_FREE_PTR(pinger_thread)
...                             cfs_waitq_signal(pinger_thread)
---------------------------------------------------------------

The memory used by pinger_thread might have been freed and
reallocated to something else, when ptlrpc_pinger_main()
used it in cvs_waitq_signal().

Signed-off-by: Li Wei <wei.g.li@intel.com>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I3516c7ece2b2e1e4e0b2e47acb0583c174a3e631
Reviewed-on: http://review.whamcloud.com/6040
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-2930 test: add tests for data version
jcl [Fri, 8 Mar 2013 13:39:51 +0000 (14:39 +0100)]
LU-2930 test: add tests for data version

This patch adds support of dataversion access in
multiop and use it to test dataversion on volatile
file.
It also adds a test in sanity.sh to validate dataversion works as
expected (changes between writes)

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I62c2b2124d225331873185d92f5c2404a74b1196
Reviewed-on: http://review.whamcloud.com/5660
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
10 years agoLU-3089 tests: Give ZFS more time to complete dd's
Nathaniel Clark [Tue, 30 Apr 2013 19:33:21 +0000 (15:33 -0400)]
LU-3089 tests: Give ZFS more time to complete dd's

Due to LU-2887 and ilk, give zfs more time to do disk transfers.  Also
cleanup test formatting.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ia22f2244ccec552046d2efeaeaa6e2194547c96c
Reviewed-on: http://review.whamcloud.com/6217
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2193 ldlm: print FID in lvbo_init(), lvbo_update
Andreas Dilger [Fri, 9 Nov 2012 09:47:47 +0000 (02:47 -0700)]
LU-2193 ldlm: print FID in lvbo_init(), lvbo_update

Print the namespace and OBD device name, as well as the first two
lock resource fields (typically the FID) if there is an error with
loading the object from disk.  This will be more important with
FID-on-OST and also the MDS.  Using fid_extract_from_res_name() isn't
possible in the LDLM code, since the lock resource may not be a FID.

Make fid_extract_quota_resid() argument order and name consistent
with other fid_*_res() functions, with FID first and resource second.

Fix a bug in ofd_lvbo_init() where NULL lvb is accessed on error.

Print FID in ofd_lvbo_update() CDEBUG() and CERROR() messages.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I7f323f15a5bf4a12865a64b2cd2bb0ebe68c6e78
Reviewed-on: http://review.whamcloud.com/4501
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3243 utils: print value in lctl set_param error
Andreas Dilger [Mon, 29 Apr 2013 21:46:56 +0000 (15:46 -0600)]
LU-3243 utils: print value in lctl set_param error

Print out the invalid value that was trying to be set via
"lctl set_param parameter=value", so that it is more clear
what is going wrong when this is being called from a script.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Iebd0ae70dc9dbd378775339ccba2ab90a97d1093
Reviewed-on: http://review.whamcloud.com/6205
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3268 lod: support BE servers in lod_verify_striping()
John L. Hammond [Mon, 6 May 2013 21:29:23 +0000 (16:29 -0500)]
LU-3268 lod: support BE servers in lod_verify_striping()

To support big-endian Lustre servers, in lod_verify_striping() use
leNN_to_cpu() to access the members of struct lov_user_md.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I146e35ab75bc290e92aa9d68211fa1ffedada29b
Reviewed-on: http://review.whamcloud.com/6273
Tested-by: Hudson
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3180 tests: lfsck.sh improved messages
Andreas Dilger [Wed, 1 May 2013 08:26:26 +0000 (02:26 -0600)]
LU-3180 tests: lfsck.sh improved messages

Use skip_env() for the SHARED_DIRECTORY check, so that lfsck is not
skipped for the normal test environment (VMs sharing a single host)
or single-node tests.

Add some more information about lfsck.sh corruption, for improved
debugging in case of problems.

Test-Parameters: testlist=lfsck
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I56d7a52b0f880587d988c842fb6ee0b14b699ca2
Reviewed-on: http://review.whamcloud.com/6206
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2559 tests: enable "slow" lustre-rsync tests
Andreas Dilger [Wed, 30 Jan 2013 20:42:18 +0000 (13:42 -0700)]
LU-2559 tests: enable "slow" lustre-rsync tests

The "SLOW=yes" tests that are disabled in lustre-rsync-test.sh
appear to only be taking about 1-2 minutes each, and are always
passing in the "full" test runs on master.

It won't impact testing throughput significantly to enable them
even for review builds.  It increases overall test time by about
10 minutes in total, but improves our test coverage noticeably.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Iccec870c8b0936aa9e4532da6e8bde2d991ccab0
Reviewed-on: http://review.whamcloud.com/5214
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-1538 utils: remove obsolete scripts
Andreas Dilger [Wed, 1 May 2013 16:08:02 +0000 (10:08 -0600)]
LU-1538 utils: remove obsolete scripts

A number of obsolete test, build, and helper scripts are removed,
because they are no longer useful.

  lustre/doc/chbar.sh
  lustre/doc/postbar
  lustre/doc/tex2pdf
  lustre/scripts/bdev-io-survey.sh
  lustre/scripts/dodiff.sh
  lustre/scripts/maketags.sh
  lustre/tests/sanity-nano.sh
  lustre/utils/loadmod_all.sh

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I109133aadfc75f9812259e560710dc70036e3dd6
Reviewed-on: http://review.whamcloud.com/6227
Tested-by: Hudson
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2498 mount: Set 'deadline' scheduler on ldiskfs
Prakash Surya [Tue, 18 Dec 2012 17:34:46 +0000 (09:34 -0800)]
LU-2498 mount: Set 'deadline' scheduler on ldiskfs

The recommended IO scheduler to use with Lustre on top of ldiskfs is
either the 'deadline' scheduler, or the 'noop' scheduler. This patch
attempts to automatically configure a device to use the 'deadline'
scheduler for the user at mount time. This makes it unnecessary to use
any out of band mechanism to ensure this value is set properly (i.e.
start up scripts, kernel configuration, etc.).

Also, if the scheduler is already set to 'noop', this patch will leave
that setting in place. This makes it easy for a user to manually set the
scheduler to 'noop', if they would prefer to use that scheduler instead
of 'deadline'.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: If869468ba5370afddb29233dd893d74b9c45f367
Reviewed-on: http://review.whamcloud.com/4853
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-1617 build: ignore automatically generated files
Andreas Dilger [Wed, 1 May 2013 16:17:29 +0000 (10:17 -0600)]
LU-1617 build: ignore automatically generated files

Do not list automatically generated files in "git status" output,
so that it does not hide checkpatch.pl output in the commit message.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Iab5c5be25de7dc54225fb2aa6540a4d75e500c1e
Reviewed-on: http://review.whamcloud.com/6229
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3110 tests: OSD_TRACK_DECLARES_LBUG default & handling
Bruno Faccini [Tue, 7 May 2013 15:02:58 +0000 (17:02 +0200)]
LU-3110 tests: OSD_TRACK_DECLARES_LBUG default & handling

This patch sets OSD_TRACK_DECLARES_LBUG as yes/on by
default in Tests and also implements its correct
handling to only apply it on servers running with
ldiskfs back-end.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: Ie1764a3a576809f9f913f6effc54965a3bd153dc
Reviewed-on: http://review.whamcloud.com/6280
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>
10 years agoLU-3262 tests: add slow ost-pools tests to SLOW list
Andreas Dilger [Thu, 2 May 2013 04:43:25 +0000 (22:43 -0600)]
LU-3262 tests: add slow ost-pools tests to SLOW list

Add test 5b, 18, 22, and 25 to the SLOW list, which cuts about
30 minutes off the ost-pools test time if run with SLOW=no.

Test-Parameters: testlist=ost-pools,ost-pools,ost-pools
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I430bdf5132516351e345df3ccf5461cb62500c1e
Reviewed-on: http://review.whamcloud.com/6235
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3364 tests: Skip sanity-lfsck if < 2.2.90
Wei Liu [Wed, 22 May 2013 22:51:12 +0000 (15:51 -0700)]
LU-3364 tests: Skip sanity-lfsck if < 2.2.90

Skip sanity-lfsck if server version is older
than 2.2.90

Change-Id: I65119e7896a433edf50c1eee835ebafd8bca76da
Signed-off-by: Wei Liu <wei3.liu@intel.com>
Reviewed-on: http://review.whamcloud.com/6424
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>
10 years agoLU-3283 llite: check ll_prep_md_op_data() using IS_ERR()
John L. Hammond [Mon, 6 May 2013 21:53:38 +0000 (16:53 -0500)]
LU-3283 llite: check ll_prep_md_op_data() using IS_ERR()

In ll_file_ioctl() and ll_swap_layouts() check the result of
ll_prep_md_op_data() using IS_ERR().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ib916635559863cd7a8aee3c88bb1d2bb2e7921b8
Reviewed-on: http://review.whamcloud.com/6275
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3157 llite: A not locked mutex can be unlocked.
Dmitry Eremin [Thu, 11 Apr 2013 11:55:57 +0000 (15:55 +0400)]
LU-3157 llite: A not locked mutex can be unlocked.

In case of memory pressure a not locked mutex can be unlocked
in function ll_file_open(). This is not allowed and subsequent
behavior is not defined.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I21368247cac23038f9b995e9de328f9286909731
Reviewed-on: http://review.whamcloud.com/6028
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Reviewed-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Tested-by: Hudson
Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3154: Fix plot-sgpdd to match new sgpdd-survey output format
Cliff White [Wed, 10 Apr 2013 23:29:17 +0000 (16:29 -0700)]
LU-3154: Fix plot-sgpdd to match new sgpdd-survey output format

The fields in sgpdd-survey output have changed. This updates plot-sgpdd to
work correctly. One field 'rsz' has changed from numeric to string, new
variable added to deal with that.
Fix for trailing tabs on two lines. Cleaned up tabs per Andreas.
Removed one more trailing tab.

Change-Id: I754d5fec6f6aebbc0882386d2734aa6805eb8de5
Signed-off-by: Cliff White <cliffwhi@intel.com>
Signed-off-by: Cliff White <cliffw@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/6023
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>
10 years agoLU-3174 build: missing noiokit option in lbuild
Minh Diep [Wed, 17 Apr 2013 05:41:58 +0000 (22:41 -0700)]
LU-3174 build: missing noiokit option in lbuild

We can not use --noiokit since it's missing in options

Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: I155e5da94b67d1e4baa6613a787146174945246f
Reviewed-on: http://review.whamcloud.com/6073
Tested-by: Hudson
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2008 utils: quote TUNE2FS options in ldiskfs_label_lustre
Jian Yu [Wed, 17 Apr 2013 14:46:16 +0000 (22:46 +0800)]
LU-2008 utils: quote TUNE2FS options in ldiskfs_label_lustre

This patch improves ldiskfs_label_lustre() to quote the options
for TUNE2FS in case the label contains space(s).

Test-Parameters: envdefinitions=SLOW=yes \
clientcount=4 osscount=2 mdscount=2 \
austeroptions=-R failover=true useiscsi=true \
testlist=mmp

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I3eaeb604517dba29e07f9750aeb3afed9443e94f
Reviewed-on: http://review.whamcloud.com/6077
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3088 build: fix 'resource leak' errors
Sebastien Buisson [Tue, 2 Apr 2013 14:55:14 +0000 (16:55 +0200)]
LU-3088 build: fix 'resource leak' errors

Fix 'resource leak' defects found by Coverity version 6.5.1:
Resource leak (RESOURCE_LEAK)
Variable going out of scope leaks the storage it points to.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I12312b081ea735118d5375c0dc9c20ead5ed9286
Reviewed-on: http://review.whamcloud.com/5918
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-2753 llite: check alloc in ll_file_data_get, ll_dir_ioctl
John L. Hammond [Tue, 26 Mar 2013 17:21:57 +0000 (12:21 -0500)]
LU-2753 llite: check alloc in ll_file_data_get, ll_dir_ioctl

In ll_file_data_get() and ll_dir_ioctl() return error on failed
allocations.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I122db2cede770261d75af209e92aa60d86ea85f2
Reviewed-on: http://review.whamcloud.com/5845
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net>
10 years agoLU-3054 build: fix 'program hangs' errors
Sebastien Buisson [Thu, 28 Mar 2013 15:37:27 +0000 (16:37 +0100)]
LU-3054 build: fix 'program hangs' errors

Fix 'program hangs' defects found by Coverity version 6.5.1:
Missing unlock (LOCK)
Returning without unlocking.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I96c2bb05a5875ed493ebe99587e9901baea80fc8
Reviewed-on: http://review.whamcloud.com/5870
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <DELETED>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3385 llite: missing last bit in ll_have_md_lock
wang di [Thu, 23 May 2013 07:00:09 +0000 (00:00 -0700)]
LU-3385 llite: missing last bit in ll_have_md_lock

Missing the last bit during INODELOCK check in ll_have_md_lock.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I0801554904cab106513b76ace4f1467d14cfdf1a
Reviewed-on: http://review.whamcloud.com/6438
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3384 llite: use READ, WRITE around ll_rw_stats_tally()
John L. Hammond [Fri, 24 May 2013 18:18:58 +0000 (13:18 -0500)]
LU-3384 llite: use READ, WRITE around ll_rw_stats_tally()

In vvp_io_write_start() the stats function ll_rw_stats_tally() was
incorrectly called with a rw argument of 0. Correct this and use the
macros READ and WRITE in and around ll_rw_stats_tally() for clarity.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Icca6cfcc102b2944761ff211f1b2c2734aae8ecf
Reviewed-on: http://review.whamcloud.com/6447
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-3409 llite: silence lockdep warning in ll_md_blocking_ast
Peng Tao [Tue, 28 May 2013 07:18:52 +0000 (15:18 +0800)]
LU-3409 llite: silence lockdep warning in ll_md_blocking_ast

Got bellow lockdep warning during tests. It is false alarm though.

[ 1184.479097] =============================================
[ 1184.479187] [ INFO: possible recursive locking detected ]
[ 1184.479277] 3.10.0-rc3+ #13 Tainted: G         C
[ 1184.479355] ---------------------------------------------
[ 1184.479444] mkdir/2215 is trying to acquire lock:
[ 1184.479521]  (&(&dentry->d_lock)->rlock){+.+...}, at:
[<ffffffffa06cc27c>] ll_md_blocking_ast+0x55c/0x655 [lustre]
[ 1184.479801]
but task is already holding lock:
[ 1184.479895]  (&(&dentry->d_lock)->rlock){+.+...}, at:
[<ffffffffa06cc1b1>] ll_md_blocking_ast+0x491/0x655 [lustre]
[ 1184.480101]
other info that might help us debug this:
[ 1184.480206]  Possible unsafe locking scenario:

[ 1184.480300]        CPU0
[ 1184.480340]        ----
[ 1184.480380]   lock(&(&dentry->d_lock)->rlock);
[ 1184.480458]   lock(&(&dentry->d_lock)->rlock);
[ 1184.480536]
 *** DEADLOCK ***

[ 1184.480761]  May be due to missing lock nesting notation

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I34c54ddc7a36dbef77564b1e4f14a16d848b2eaa
Reviewed-on: http://review.whamcloud.com/6469
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
10 years agoLU-3232 build: Move fsfilt_ldiskfs.ko into lustre-osd-ldiskfs
Christopher J. Morrone [Fri, 3 May 2013 17:40:06 +0000 (10:40 -0700)]
LU-3232 build: Move fsfilt_ldiskfs.ko into lustre-osd-ldiskfs

The fsfilt_ldiskfs.ko module depends on symbols in osd_ldiskfs.ko and
ldiskfs.  However, osd_ldiskfs.ko is only part of the optional package
lustre-osd-ldiskfs, while fsfilt-ldiskfs.ko is in the non-optional
package lustre-modules.

This means that a person using only the lustre-osd-zfs osd will see a
screen full of warnings about missing ldiskfs-related symbols.

We remedy this problem by moving the fsfilt-ldiskfs.ko into the
lustre-osd-ldiskfs rpm.

Change-Id: I631a98dd56c7d4df69266e4f922f949132774d84
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/6260
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3015 osd-zfs: Fix a typo in udmu_objs_count_estimate
Fan Yong [Sun, 21 Apr 2013 02:46:12 +0000 (10:46 +0800)]
LU-3015 osd-zfs: Fix a typo in udmu_objs_count_estimate

The typo is relatively straightforward given the diff below.
It leads to larger-than-actual average dnode size estimations,
which further causes overly conservative os_ffree (number of
available objects) values. For example, without this patch,
os_ffree values for "empty" 1 GB ZFS-based MDT/OSTs look like:

  [root@linux tests]# df -h
  Filesystem            Size  Used Avail Use% Mounted on
  [...]
  lustre-mdt1/mdt1      929M  3.0M  924M   1% /mnt/mds1
  lustre-ost1/ost1      929M  1.3M  926M   1% /mnt/ost1
  lustre-ost2/ost2      929M  1.3M  926M   1% /mnt/ost2
  linux@tcp:/lustre     1.9G  2.5M  1.9G   1% /mnt/lustre
  [root@linux tests]# df -i
  Filesystem            Inodes   IUsed   IFree IUse% Mounted on
  [...]
  lustre-mdt1/mdt1        7583     178    7405    3% /mnt/mds1
  lustre-ost1/ost1        7631     212    7419    3% /mnt/ost1
  lustre-ost2/ost2        7631     212    7419    3% /mnt/ost2
  linux@tcp:/lustre       7583     178    7405    3% /mnt/lustre

With this patch, they look like:

  [root@linux tests]# df -h
  Filesystem            Size  Used Avail Use% Mounted on
  [...]
  lustre-mdt1/mdt1      929M  2.9M  924M   1% /mnt/mds1
  lustre-ost1/ost1      929M  1.3M  926M   1% /mnt/ost1
  lustre-ost2/ost2      929M  1.3M  926M   1% /mnt/ost2
  linux@tcp:/lustre     1.9G  2.5M  1.9G   1% /mnt/lustre
  [root@linux tests]# df -i
  Filesystem            Inodes   IUsed   IFree IUse% Mounted on
  [...]
  lustre-mdt1/mdt1      161966     178  161788    1% /mnt/mds1
  lustre-ost1/ost1      223825     212  223613    1% /mnt/ost1
  lustre-ost2/ost2      223825     212  223613    1% /mnt/ost2
  linux@tcp:/lustre     161966     178  161788    1% /mnt/lustre

Only after fixing this typo could we evaluate how the intented
estimation algorithm works.

Test-Parameters: mdsfilesystemtype=zfs ostfilesystemtype=zfs mdtfilesystemtype=zfs
Signed-off-by: Li Wei <wei.g.li@intel.com>
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ic3cbe569261d2c0e4338001c47f3dd64c621621a
Reviewed-on: http://review.whamcloud.com/5806
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
10 years agoLU-2784 build: Provide RPMs build for Xeon Phi(TM) card
Dmitry Eremin [Wed, 13 Mar 2013 14:03:02 +0000 (18:03 +0400)]
LU-2784 build: Provide RPMs build for Xeon Phi(TM) card

Enhance Lustre build to provide RPMs which can be installed on
Xeon Phi(TM) card automatically. This means the binaries
should be compiled by cross compiler and deployed into Xeon
Phi(TM) infrastructure on host to be automatically installed
on card after boot.

To produce Lustre client RPMs for Xeon Phi(TM) card just
execute the following commands:

export PATH=/usr/linux-k1om-4.7/bin:$PATH

sh ./autogen.sh

./configure --with-linux=/opt/intel/mic/src/card/kernel \
    --disable-server --without-o2ib \
    --host=x86_64-k1om-linux --build=x86_64-pc-linux

make rpms

NOTE: You should have "intel-mic-gpl-<version>.x86_64" package
installed and MIC GPL sources unpacked in /opt/intel/mic/src.

and the following RPMs will be produced:

lustre-client-mic-<version>.x86_64.rpm
lustre-client-mic-debuginfo-<version>.x86_64.rpm
lustre-client-mic-modules-<version>.x86_64.rpm
lustre-client-mic-source-<version>.x86_64.rpm
lustre-client-mic-tests-<version>.x86_64.rpm
lustre-client-mic-<version>.src.rpm

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I8d61133614443e2a6a33f5c1b1b097250b11d749
Reviewed-on: http://review.whamcloud.com/5324
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3360 osc: check ostid if no OBD_CONNECT_FID
Hongchao Zhang [Wed, 20 Mar 2013 15:16:10 +0000 (23:16 +0800)]
LU-3360 osc: check ostid if no OBD_CONNECT_FID

in lustre_set_wire_obdo, if "ocd->ocd_connect_flags" doesn't contain
OBD_CONNECT_FID, use "ost_id" to check the type of the object
instead of using ost_id.oi_fid only.

Change-Id: I4d9ef133c3d26c3f8f36d5b5b9430e941e445068
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/6426
Tested-by: Hudson
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-2598 tests: check nr_local in ofd_preprw()
Jian Yu [Mon, 20 May 2013 05:33:58 +0000 (13:33 +0800)]
LU-2598 tests: check nr_local in ofd_preprw()

This patch checks the number of bulk I/O RPC pages with
PTLRPC_MAX_BRW_PAGES in ofd_preprw() to avoid
LASSERT(iobuf->dr_npages < iobuf->dr_max_pages) occurring
while larger I/O size is specified.

The patch also fixes echo_client_prep_commit() to reuse
the env context so as to avoid LASSERT(info->fti_exp == NULL)
occurring while the bulk I/O size is larger than
PTLRPC_MAX_BRW_SIZE.

The patch also improves obdfilter-survey to handle the
case while interoprating with old server.

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
testlist=obdfilter-survey

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: Ifa7b720da1e3fc752f85bcfa6968eb16f93af2fa
Reviewed-on: http://review.whamcloud.com/6394
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-3359 osc: fixed a typo in osc_cache_truncate_start
Jinshan Xiong [Mon, 20 May 2013 18:38:24 +0000 (11:38 -0700)]
LU-3359 osc: fixed a typo in osc_cache_truncate_start

Dump osc_extent waiting instead of ext in case error occurred.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I7df560a0aa83ddc6010cad1c51fa2013e941ae60
Reviewed-on: http://review.whamcloud.com/6402
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3369 scrub: skip test_1a for old 2.x (x <= 3) release
Fan Yong [Mon, 13 May 2013 10:53:24 +0000 (18:53 +0800)]
LU-3369 scrub: skip test_1a for old 2.x (x <= 3) release

Lustre-2.3 or older does not support initial OI scrub,
so skip related sanity-scrub test_1a.

Test-Parameters: testlist=sanity-scrub
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I17752be675bdda76588c55c38c20c37a009eff00
Reviewed-on: http://review.whamcloud.com/6417
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
10 years agoLU-3350 tests: allow test-error for lfsck/scrub speed
Fan Yong [Thu, 9 May 2013 23:03:26 +0000 (07:03 +0800)]
LU-3350 tests: allow test-error for lfsck/scrub speed

Affected by the test environment and CPU schedule randomness,
especailly test in virtal machine, it is not easy to control
the lfsck/scrub speed accurtely. So we have to consider more
test-error.

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

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I794d26d2bfa73d7000e77790cc7a2c8203f7db06
Reviewed-on: http://review.whamcloud.com/6374
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
10 years agoRevert "LU-3264 tests: support failover testing with ZFS"
Oleg Drokin [Thu, 23 May 2013 16:19:11 +0000 (12:19 -0400)]
Revert "LU-3264 tests: support failover testing with ZFS"

Unfortunately zfs testing took a nosedive after this commit was included.

This reverts commit fb8bf83fabd45730345b3eb8c5289334174462be.

10 years agoRevert "LU-3264 tests: import ZFS pool which has file-based vdev"
Oleg Drokin [Thu, 23 May 2013 16:18:19 +0000 (12:18 -0400)]
Revert "LU-3264 tests: import ZFS pool which has file-based vdev"

Unfortunately zfs testing took a nosedive after this commit was included.

This reverts commit 3dffd5b5c4c95f29e718cab63e8ef1c7da0c1f8b.

10 years agoLU-3164 utils: Fix Wireshark decode of Lustre under Infiniband
Doug Oucharek [Fri, 12 Apr 2013 21:21:53 +0000 (14:21 -0700)]
LU-3164 utils: Fix Wireshark decode of Lustre under Infiniband

Due to a difference in the IB LND vs TCP LND header sizes, some
hard-coded offsets in the LNet dissector will not believe that the
payload is lustre.  As such, the lustre protocol may not be decoded
under Infiniband.

This patch addresses this by adding a variable to applicable offsets
which is set to 0 for TCP, and 24 (extra bytes in IB LND header)
for Infiniband.

Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Change-Id: I3783bbb563df109e160752d246db9bc5148cf132
Reviewed-on: http://review.whamcloud.com/6045
Tested-by: Hudson
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3300 lprocfs: interpret result of dt_statfs() correctly
John L. Hammond [Tue, 21 May 2013 15:45:49 +0000 (10:45 -0500)]
LU-3300 lprocfs: interpret result of dt_statfs() correctly

In a7369bcd860af61a073cb2424139e3acccdcb203, I accidentally reversed
the sense of the error check after the call to dt_statfs() in
lprocfs_dt_rd_{blksize,{files,kbytes}{free,avail}. Unreverse the error
checking.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I91873f23cd69c2217474c26b9751aec259fae155
Reviewed-on: http://review.whamcloud.com/6385
Reviewed-by: Robert Read <robert.read@intel.com>
Tested-by: Hudson
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-3354 kernel: Kernel update [RHEL6.4 2.6.32-358.6.2.el6]
Bob Glossman [Fri, 17 May 2013 20:28:25 +0000 (13:28 -0700)]
LU-3354 kernel: Kernel update [RHEL6.4 2.6.32-358.6.2.el6]

Update RHEL6.4 kernel to 2.6.32-358.6.2.el6.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I5c6b48d82382974b3cdc8a0c84c5ef54194d5217
Reviewed-on: http://review.whamcloud.com/6379
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>