Whamcloud - gitweb
fs/lustre-release.git
10 years agoLU-3649 lfsck: release object reference when reset lfsck 32/7432/2
Fan Yong [Mon, 15 Jul 2013 14:54:24 +0000 (22:54 +0800)]
LU-3649 lfsck: release object reference when reset lfsck

When reset lfsck, related lfsck tracing file will be re-created,
but we forgot to release the object reference of the old tracing
file, then trigger LASSERT() when related device to be released.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I657e539183675e00fe43bbbdfde987c3e48dd13b
Reviewed-on: http://review.whamcloud.com/7432
Tested-by: Hudson
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
10 years agoLU-2547 tests: EXCLUDE recovery-small/24b for ZFS 24/7424/2
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>
Reviewed-on: http://review.whamcloud.com/7424

10 years agoLU-3620 mdd: missing CLF_RENAME_LAST flag in CL_RENME record 84/7384/5
Bobi Jam [Tue, 23 Jul 2013 16:47:23 +0000 (00:47 +0800)]
LU-3620 mdd: missing CLF_RENAME_LAST flag in CL_RENME record

mdd_rename() should use target's attribute to determine add
CLF_RENAME_LAST flag in changelog record.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Id9a738f1c98f0c893b125d49965354f44c257e08
Reviewed-on: http://review.whamcloud.com/7095
Tested-by: Hudson
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/7384
Reviewed-by: Jian Yu <jian.yu@intel.com>
10 years agoLU-3180 tests: misc fix in lfsck.sh 87/7387/2
Niu Yawei [Tue, 13 Nov 2012 12:17:45 +0000 (20:17 +0800)]
LU-3180 tests: misc fix in lfsck.sh

- Make sure data flush back before run lfsck;
- Go back to old lfsck behaviour: supress the error of the second run
  of lfsck;
- Fix typo in is_empty_fs();

Test-Parameters: envdefinitions=SLOW=yes testlist=lfsck
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Ib2c3ab35424e13b1679f8a096f5e24042c7be3a2
Reviewed-on: http://review.whamcloud.com/7387
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3712 lmv: choose right MDT for open by FID
wang di [Tue, 6 Aug 2013 11:26:44 +0000 (04:26 -0700)]
LU-3712 lmv: choose right MDT for open by FID

If the open is by FID, LMV should locate MDT by the FID
of the file/directory, instead of its parent.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: If7815de8cab0cf28b521decccda3c5f0f1aed73c
Reviewed-on: http://review.whamcloud.com/7253
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoRevert "LU-2665 mdc: Keep resend FLocks"
Oleg Drokin [Tue, 20 Aug 2013 04:54:35 +0000 (00:54 -0400)]
Revert "LU-2665 mdc: Keep resend FLocks"

This causes LU-3701

This reverts commit 5e9646ded8a35f1f0b7f3f1eadbd8ab4d927c4a5.

10 years agoLU-2901 ldlm: fix resource/fid check, use DLDLMRES 16/7316/2
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>
Reviewed-on: http://review.whamcloud.com/7316
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2901 mdt: duplicate link names in directory 15/7315/2
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>
Reviewed-on: http://review.whamcloud.com/7315
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3445 utils: make add_param() handle comma-separated values 44/7344/2
Jian Yu [Wed, 7 Aug 2013 09:44:43 +0000 (17:44 +0800)]
LU-3445 utils: make add_param() handle comma-separated values

Current mkfs.lustre supports comma-separated values in "--mgsnode",
"--failnode", etc. options. However, in mount.lustre, the values
are directly passed to mount() as options without prefixing with
Lustre parameter key for each one. This will make the values can
not be recognized by the backend filesystem and cause mount.lustre
fail with -EINVAL error.

This patch improves add_param() to extract values from the comma-
separated string and prefix Lustre parameter key to each value.

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I64c5cb6f61277a93f65f69f63050721e0070c450
Reviewed-on: http://review.whamcloud.com/6686
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/7344

10 years agoLU-3554 test: Don't run Sanity 233 on less than 2.4 servers
Keith Mannthey [Wed, 14 Aug 2013 03:36:52 +0000 (20:36 -0700)]
LU-3554 test:  Don't run Sanity 233 on less than 2.4 servers

2.4 clients 2.3 server interop testing showed that sanity.sh
test 233 needs to be skipped for older servers.

Add a check for MDS server code that it is greater than 2.3.64

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: I3f96b8017c40a95d246061a8a52db8822c172eca
Reviewed-on: http://review.whamcloud.com/7324
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2230 tests: disable replay-dual test 21b with ZFS
Jian Yu [Sun, 11 Aug 2013 11:42:33 +0000 (19:42 +0800)]
LU-2230 tests: disable replay-dual test 21b with ZFS

This patch disables replay-dual test 21b with ZFS because
semantics of replay_barrier_nosync is different on ZFS:
spa_freeze() syncs all changes. IOW, "nosync" (which is
crucial here) doesn't work.

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
mdtfilesystemtype=zfs mdsfilesystemtype=zfs ostfilesystemtype=zfs \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 testlist=replay-dual

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I271839fa626bfb140bd077d895826c6b4539892f
Reviewed-on: http://review.whamcloud.com/7287
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3326 tests: limit the disk space used by run_*.sh
Hongchao Zhang [Tue, 13 Aug 2013 13:40:21 +0000 (21:40 +0800)]
LU-3326 tests: limit the disk space used by run_*.sh

In run_dd.sh and run_tar.sh, limit the disk space to be used
according to the total free disk space and the client counts.

Test-Parameters: envdefinitions=ENABLE_QUOTA=yes \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 \
clientcount=4 osscount=2 mdscount=2 \
austeroptions=-R failover=true useiscsi=true \
testlist=recovery-mds-scale

Change-Id: I61ea1167906312fdb182b67d7169e95cad1b6d72
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Signed-off-by: Jian Yu <jian.yu@intel.com>
Reviewed-on: http://review.whamcloud.com/6376
Tested-by: Hudson
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3101 mgs: deregister the mount for failed case
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>
10 years agoLU-3744 llite: use 64bits flags in ll_lov_setea()
Niu Yawei [Tue, 13 Aug 2013 02:59:13 +0000 (22:59 -0400)]
LU-3744 llite: use 64bits flags in ll_lov_setea()

In ll_lov_setea(), setting MDS_OPEN_HAS_OBJS to an int flags will
result in the flags being overflowed.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I7c623785579d782dd7ce03e0ca291d32ad3952f9
Reviewed-on: http://review.whamcloud.com/7312
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-3264 tests: support failover testing with ZFS
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>
10 years agoLU-2200 obdclass: be more careful processing server name
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>
10 years agoLU-3553 tests: volatile file test fails interop testing
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>
10 years agoLU-3547 tests: skip unsupported subtest on old servers
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>
10 years agoLU-3449 tests: Trash track_declares_assert related errors
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-3352 test: use correct nettype in conf-sanity.sh test_73
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-2407 tests: remove the leading space in the fake nid
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>
10 years agoLU-3389 build: Fix build fails on RHEL6.4 kernel with OFED-3.5 16/7216/3
Shuichi Ihara [Fri, 2 Aug 2013 16:22:49 +0000 (01:22 +0900)]
LU-3389 build: Fix build fails on RHEL6.4 kernel with OFED-3.5

OFED-3.5.1 supports RHEL6.4 kernel. CONFIG_COMPAT_RHEL_6_4 macro
needs to build lustre with them.

backport from http://review.whamcloud.com/6448

Signed-off-by: Shuichi Ihara <sihara@ddn.com>
Change-Id: Ib082bdf08d9a4b609178ff572cae677699d988fe
Reviewed-on: http://review.whamcloud.com/7216
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2904 llite: return valid fsid for statfs
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>
10 years agoLU-3413 scrub: NOT create new files in test_11 during scrub
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>
10 years agoLU-3571 kernel: kernel update [SLES11 SP2 3.0.80-0.7] 79/7279/2
Bob Glossman [Thu, 8 Aug 2013 23:26:07 +0000 (16:26 -0700)]
LU-3571 kernel: kernel update [SLES11 SP2 3.0.80-0.7]

Update of build files to new kernel version.

Lustre-commit: c4faab9d603055d81e2c53a7fdfaf8d2960c477f
Lustre-change: http://review.whamcloud.com/6991

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ie6ece5a6a885a45f6dee784b5d9a11d477f6ce58
Reviewed-on: http://review.whamcloud.com/7279
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3604 kernel: Kernel update [RHEL6.4 2.6.32-358.14.1.el6] 78/7278/2
yangsheng [Fri, 19 Jul 2013 05:18:03 +0000 (13:18 +0800)]
LU-3604 kernel: Kernel update [RHEL6.4 2.6.32-358.14.1.el6]

Update RHEL6.4 kernel to 2.6.32-358.14.1.el6

Lustre-commit: aaa103b24a4bead459cbae8e49fd051153011720
Lustre-change: http://review.whamcloud.com/7055

Signed-off-by: yang sheng <yang.sheng@intel.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I1b54bdbb1bde2434c561c8811ad53a77336415aa
Reviewed-on: http://review.whamcloud.com/7278
Tested-by: Hudson
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3093 lnet: Fix assert on empty group in selftest module 77/7277/2
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.

Lustre-commit: 7cd460776da349643f53cda4c5d4e927316b666e
Lustre-change: http://review.whamcloud.com/6092

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I304ffc64dcbc06c1802a7bb9a30b15d4489afd43
Reviewed-on: http://review.whamcloud.com/7277
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3576 mdc: prevent fall through in mdc_iocontrol() 76/7276/3
John L. Hammond [Fri, 12 Jul 2013 15:21:48 +0000 (10:21 -0500)]
LU-3576 mdc: prevent fall through in mdc_iocontrol()

In mdc_iocontrol() add a goto to the end of the LL_IOC_HSM_STATE_SET
case, preventing fall through into the next case. In the same
function, replace the return statement in OBD_IOC_QUOTACTL with a
goto, so that a reference to the module is not leaked.

Lustre-commit: 0d166ef1fd80b0056497969b956d04e32e86aa85
Lustre-change: http://review.whamcloud.com/6962

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I762de2aaf794f1691cb243feed5b65289f91e1dd
Reviewed-on: http://review.whamcloud.com/7276
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2902 test: ost stat parameters were not present
Keith Mannthey [Fri, 12 Jul 2013 05:33:04 +0000 (22:33 -0700)]
LU-2902 test: ost stat parameters were not present

A few tests use roc_hit to sort out cache hits. These tests
were failing for a while because the lproc stats needed were not
present.

Use roc_hit_init with setstripe to correctly identify that basic
cache_access stats are working for each individual ost before
using roc_hit.

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: Iea501433ddcdb367fe5d9614361b4aff049cb1f1
Reviewed-on: http://review.whamcloud.com/6564
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3633 test: Sanity test 101d fails due to full OST
James Nunez [Tue, 30 Jul 2013 17:20:49 +0000 (11:20 -0600)]
LU-3633 test: Sanity test 101d fails due to full OST

Sanity test 101d checks the available space on the file
system against the size of the file before writing, but
the file stripe is never checked or set. So, test 101d
has failed with enough space on the file system to write
the file, but the default stripe was 1 and there was not
enough space on that single OST for the file.

This patch sets the stripe of the file to -1 (all OSTs)
before writing to the file system.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I69b8f24bc6e6fe05c7179160bf89610516b9c5cb
Reviewed-on: http://review.whamcloud.com/7179
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
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>
10 years agoLU-3230 osp: bail out of precreate_reserve on I/O errors
Nathaniel Clark [Mon, 15 Jul 2013 17:52:11 +0000 (13:52 -0400)]
LU-3230 osp: bail out of precreate_reserve on I/O errors

Allow osp_precreate_reserve to propogate error if
precreate_cleanup_ophans recives EIO.

Test-Parameters: testgroup=review-zfs
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ib6a109df82be610a21391777b9c293d78b2114e6
Reviewed-on: http://review.whamcloud.com/6988
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3641 libcfs: Zero fill shrinker struct in cfs_set_shrinker
Ann Koehler [Thu, 25 Jul 2013 21:07:57 +0000 (16:07 -0500)]
LU-3641 libcfs: Zero fill shrinker struct in cfs_set_shrinker

Dropping Lustre caches might not terminate if the Linux kernel
supports the customisable shrinker batch size feature (commit
e9299f5058595a655c3b207cda9635e28b9197e6). This kernel feature
added a new field (batch) to the shrinker struct. Lustre does
not initialize it. When the unitialized batch value is negative,
the kernel shrink_slab function never terminates its loop that
calls the Lustre shrinker function. The problem was observed
with the ldlm_pools_cli_shrink shrinker, but it could also happen
with other Lustre shrinkers.

The fix is to ensure that all fields of the shrinker struct are
initialized by zero filling the struct when cfs_set_shrinker
allocates it. Zero filling works with all versions of the kernel.

Signed-off-by: Ann Koehler <amk@cray.com>
Change-Id: I3efa3a858f5d367f73596f38bb4e40b51c2ac5e7
Reviewed-on: http://review.whamcloud.com/7122
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
10 years agoLU-3643 ofd: get data version only if file exists
Jinshan Xiong [Fri, 26 Jul 2013 00:48:22 +0000 (17:48 -0700)]
LU-3643 ofd: get data version only if file exists

In ofd_getattr(), dt_version_get() could be called on a non-existant
object, leading to a NULL pointer for its inode.
It should try to call dt_version_get() only if attr_get returns
success; otherwise it will crash.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: I450fb78b85ea86d813ccad4de2f14f5bd4fca645
Reviewed-on: http://review.whamcloud.com/7124
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3585 ptlrpc: Fix a crash when dereferencing NULL pointer
Amir Shehata [Thu, 25 Jul 2013 20:13:55 +0000 (13:13 -0700)]
LU-3585 ptlrpc: Fix a crash when dereferencing NULL pointer

When a system runs out of memory and the function
ptlrpc_register_bulk() is called from ptl_send_rpc() the call to
LNetMEAttach() fails due to failure to allocate memory.  This forces
the code into an error path, which most probably previously went
untested.  The error path:
if (rc != 0) {
CERROR("%s: LNetMEAttach failed x"LPU64"/%d: rc = %dn",
desc->bd_export->exp_obd->obd_name, xid,
posted_md, rc);
break;
}
This print assumes that desc->bd_export is not NULL.  However, it is.
In fact it is expected to be NULL.  desc->bd_import is the correct
structure to access in this case.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I772ec757af224b9868956cc3fc9dc00e804fe84d
Reviewed-on: http://review.whamcloud.com/7121
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3636 llapi: llapi_hsm_copy_end() on correct FID on restore.
Aurelien Degremont [Thu, 6 Jun 2013 10:27:32 +0000 (12:27 +0200)]
LU-3636 llapi: llapi_hsm_copy_end() on correct FID on restore.

When doing a llapi_hsm_copy_end(), the FID sent to kernel should
be the DATA FID, when restoring. To be sure of that, the FID in
hsm_progress is used.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: Ic378b76716057044f33a670089d738c950e07702
Reviewed-on: http://review.whamcloud.com/7112
Tested-by: Hudson
Reviewed-by: Faccini Bruno <bruno.faccini@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>
10 years agoLU-3634 llapi: Fix returned value of llapi_hsm_copy_start/end.
Aurelien Degremont [Mon, 22 Jul 2013 11:57:27 +0000 (13:57 +0200)]
LU-3634 llapi: Fix returned value of llapi_hsm_copy_start/end.

Both function were doing a ioctl and were returning ioctl()
return code instead of returning errno.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: Ibd4c6f5188bb50e7fa8875e2d4fa3442c2c69888
Reviewed-on: http://review.whamcloud.com/7109
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3427 build: fix 'error handling' issues
Sebastien Buisson [Wed, 24 Jul 2013 15:22:37 +0000 (17:22 +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: I67d667b405f292604290a49e69c963500d98278e
Reviewed-on: http://review.whamcloud.com/7103
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobbie Lind <bobbie.j.lind@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3405 build: fix 'control flow' errors
Sebastien Buisson [Mon, 27 May 2013 15:13:09 +0000 (17:13 +0200)]
LU-3405 build: fix 'control flow' errors

Fix 'control flow' issues found by Coverity version 6.5.1:
Logically dead code (DEADCODE)
Execution cannot reach this statement.
Missing break in switch (MISSING_BREAK)
This case is not terminated by a 'break' statement.
Stray semicolon (STRAY_SEMICOLON)
"if" statement with no "then" or "else" is suspicious.
Unsigned compared against 0 (NO_EFFECT)
This greater-than-or-equal-to-zero comparison of an unsigned value
is always true.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Ia737603bd9ef4dd6b01891b9b13edd59dec11891
Reviewed-on: http://review.whamcloud.com/6466
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3310 tests: add version check code to sanity test 17o
Jian Yu [Wed, 17 Jul 2013 08:43:15 +0000 (16:43 +0800)]
LU-3310 tests: add version check code to sanity test 17o

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

Lustre-commit: 20544bd96269dbda51a76d31c2d09935637e8b2d
Lustre-change: http://review.whamcloud.com/6121

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes,ONLY=17 \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 serverjob=lustre-b2_1 serverbuildno=215 \
testlist=sanity

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I590a4fb03d6dd406ff1d859825f9033a24ceb66c
Reviewed-on: http://review.whamcloud.com/7017
Tested-by: Hudson
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3517 llite: don't check for O_CREAT in it_create_mode
John L. Hammond [Mon, 1 Jul 2013 17:26:15 +0000 (12:26 -0500)]
LU-3517 llite: don't check for O_CREAT in it_create_mode

ll_lookup_it() checks for O_CREAT in struct lookup_intent's
it_create_mode member which is nonsensical, as it_create_mode is used
for file mode bits (S_IFREG, S_IRUSR, ...). Fix this by just checking
for IT_CREATE in it_op and do the same in llu_lookup_it(). This will
not affect the behavior of either function, since if O_CREATE (0100)
is actually set in o_create_mode then IT_CREATE must have been set in
it_op. In ll_atomic_open() check for O_CREAT in the open_flags
parameter rather than testing mode.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I301964222ec043e6f0cc3b000678fe3c881a2381
Reviewed-on: http://review.whamcloud.com/6786
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3079 osd-zfs: Change header order to avoid build fail
yangsheng [Fri, 12 Jul 2013 19:49:24 +0000 (03:49 +0800)]
LU-3079 osd-zfs: Change header order to avoid build fail

SPL redefined list_move_tail() in sys/list.h. It will
confused if system & lustre header use list_move_tail()
after SPL header.

Signed-off-by: yang sheng <yang.sheng@intel.com>
Change-Id: I946e810b57affdeedbfc16bb5e502ebde0716039
Reviewed-on: http://review.whamcloud.com/6968
Reviewed-by: Bob Glossman <bob.glossman@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>
10 years agoLU-3589 tests: Access changelog record FIDs by name.
Henri Doreau [Tue, 16 Jul 2013 09:33:16 +0000 (11:33 +0200)]
LU-3589 tests: Access changelog record FIDs by name.

Update sanity test_160 to make it parse changelog records
in a more robust way. Access target and parent FIDs by name
instead of relying on their position on the line.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: Ib5836a8e624f04a971b80f9ff9b9e978bbff7bee
Reviewed-on: http://review.whamcloud.com/6998
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3364 tests: fix Lustre version number in sanity-lfsck.sh
Jian Yu [Wed, 17 Jul 2013 11:26:41 +0000 (19:26 +0800)]
LU-3364 tests: fix Lustre version number in sanity-lfsck.sh

The sanity-lfsck.sh was added by the following patch, which was included
since Lustre 2.3.60 instead of 2.2.90.

Lustre-commit: 21a9805abde3cbe1ffe046f2d9958d968303b8d3
Lustre-change: http://review.whamcloud.com/4911

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=sanity-lfsck

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I0f35b22409853852d8c7336e67f7b3661aa89f95
Reviewed-on: http://review.whamcloud.com/7019
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2527 tests: add version check code to sanity test 183
Jian Yu [Tue, 16 Jul 2013 03:48:20 +0000 (11:48 +0800)]
LU-2527 tests: add version check code to sanity test 183

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

Lustre-commit: ef75b59800d643e666d7c44c20287a8002e0a166
Lustre-change: http://review.whamcloud.com/4458

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes,ONLY=183 \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 serverjob=lustre-b2_1 serverbuildno=215 \
testlist=sanity

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I5de38207ed1a3a7d69294abf979dc64be69a8135
Reviewed-on: http://review.whamcloud.com/6994
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Hudson
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-3559 utils: mgs has no index
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>
10 years agoLU-3446 mdd: changelog index to survive MDT restart
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>
10 years agoLU-3305 quota: Update SuSE kernel to handle quota changes in 2.4+
James Simmons [Thu, 18 Jul 2013 16:44:22 +0000 (12:44 -0400)]
LU-3305 quota: Update SuSE kernel to handle quota changes in 2.4+

This patch address two issues needed for SuSE systems. The first
is 64 bit quotas are not properly support in SLES11 SP1. We update
quota-support-64-bit-quota-format, which is no longer needed for
RHEL system, to allow 64 bit quotas for SP1. The second is the port
of the patch to handle the global lock contention inside the
dqget()/dqput(). We'd avoid calling dqget()/dqput() in
dquot_initialize().

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I16a989a68925dfcd098415f6e1f621a6e5c2a9b1
Reviewed-on: http://review.whamcloud.com/7032
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3421 grant: more aggressively book space for precreate
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>
10 years agoLU-3420 scrub: trigger OI scrub properly
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-3426 build: fix 'resource leak' errors
Sebastien Buisson [Fri, 31 May 2013 13:47:36 +0000 (15:47 +0200)]
LU-3426 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>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ieb45e4cceb26b6c1ca605ef1b1c78cf3f603dffa
Reviewed-on: http://review.whamcloud.com/6509
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3611 quota: Fix order of locking and allocating memory.
Li Xi [Wed, 24 Jul 2013 03:33:05 +0000 (20:33 -0700)]
LU-3611 quota: Fix order of locking and allocating memory.

mgs_pool_cmd() locks fsdb_mutex and then allocates mti. It will
leave fsdb_mutex locked if it fails to allocate memory.

This patch fixes the problem.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I10f92522c509052916a7d7134d73c4923cfaf33e
Reviewed-on: http://review.whamcloud.com/7065
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3437 mdd: Fix ACL/def_ACL during object creation.
wang di [Wed, 5 Jun 2013 07:06:30 +0000 (00:06 -0700)]
LU-3437 mdd: Fix ACL/def_ACL during object creation.

In mdd_acl_init, after getting default ACL which will
be converted to ACL, then later(in mdd_create) the
acl_buf is re-used to set both default_ACL and ACL,
which is definitely wrong.

And also the remote directory creation does not use
correct ACL/default ACL.

This patch use different buf for def ACL and ACL to avoid
confusion.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I30177bc55e4c6b4d916ccf118ab3485f3394fa87
Reviewed-on: http://review.whamcloud.com/6552
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-2835 ptlrpc: Fix race during exp_flock_hash creation
Andriy Skulysh [Thu, 16 May 2013 10:10:41 +0000 (13:10 +0300)]
LU-2835 ptlrpc: Fix race during exp_flock_hash creation

During race exp_flock_hash can be created 2 times.
It is created & assigned without any lock.

Move hash initialization from ldlm_flock_blocking_link()
to ldlm_init_export()

Xyratex-bug-id: MRP-855
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Alexander Boyko <Alexander_Boyko@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
Tested-by: Kyrylo Shatskyy <kyrylo_shatskyy@xyratex.com>
Change-Id: Iaec171eb628396b69dede973260a59ac345b7e8c
Reviewed-on: http://review.whamcloud.com/5471
Tested-by: Hudson
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3297 lov: convert magic to host-endian in lov_dump_lmm()
John L. Hammond [Wed, 8 May 2013 17:54:04 +0000 (12:54 -0500)]
LU-3297 lov: convert magic to host-endian in lov_dump_lmm()

In lov_dump_lmm(), convert the lmm_magic from little-endian to
host-endian byte order before the switch statement, as the other
lov_dump_xxx() and lov_verify_xxx() functions already do.  Remove the
unused macro LMM_ASSERT().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Icfa52f3043aaa13b0d0cc34f5be2f59792c3787e
Reviewed-on: http://review.whamcloud.com/6290
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
10 years agoLU-3383 utils: typo in lfs print_quota() function
Patrick Valentin [Fri, 24 May 2013 12:14:20 +0000 (14:14 +0200)]
LU-3383 utils: typo in lfs print_quota() function

In the print_quota() function of 'lfs quota' command, the following
sequence is to determine if the inode grace time is expired:
         if (dqb->dqb_btime > now) {
                 iover = 2;
The test must be done on dqb_itime (inode time), instead of
dqb_btime (data time).

Signed-off-by: Patrick Valentin <patrick.valentin@bull.net>
Change-Id: I1aa9dc9c25ba219ea2272165d21895220a9ef9a7
Reviewed-on: http://review.whamcloud.com/6444
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-3470 llog: fix return value of llog_alloc_handle
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>
10 years agoLU-3544 nfs: writing to new files will return ENOENT
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>
10 years agoLU-3474 mdd: mdd_links_read() to return linkea_init() errors
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>
10 years agoLU-3233 llite: use correct FID in ll_och_fill()
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>
10 years agoLU-3233 mdt: validate open handle cookies
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>
10 years agoLU-2665 mdc: Keep resend FLocks
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>
10 years agoLU-3313 tests: Skip sanityn test_51b
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-3268 lod: return root LOV EA in little-endian
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>
10 years agoLU-3546 mdt: reply error to client after version check
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-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-3461 kernel: Kernel update [RHEL6.4 2.6.32-358.11.1.el6] 35/6635/2
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: I0fdd7d739041c0ba9f17439e145c1776ffce63bf
Reviewed-on: http://review.whamcloud.com/6635
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
10 years agoLU-1602 ldlm: Fix flock deadlock detection race
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-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-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-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-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-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-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-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>
11 years agoNew tag 2.4.0-RC2 2.4.0 2.4.0-RC2 v2_4_0 v2_4_0_0 v2_4_0_0_RC2 v2_4_0_RC2
Oleg Drokin [Fri, 24 May 2013 20:46:24 +0000 (16:46 -0400)]
New tag 2.4.0-RC2

Change-Id: I6cacd097c6f3c5f2a6e80f2338650edae6a1a83c
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
11 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>
11 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>
11 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>
11 years agoLU-3359 osc: fixed a typo in osc_cache_truncate_start 03/6403/2
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>