Whamcloud - gitweb
fs/lustre-release.git
11 years agoLU-1187 tests: Fixes in test-framework for DNE
wangdi [Mon, 12 Nov 2012 22:17:00 +0000 (14:17 -0800)]
LU-1187 tests: Fixes in test-framework for DNE

1. Add dev parameter to mkfs_opts, so it can check if it needs
--mgs for dev. combined_mgs_mdt is only useful for mdt0.
2. Add multi-node facet failover support, so it can fail multiple
targets at the same time.
3. Remove mdsn_HOST/failover_HOSTs in local.sh and add them to
facet_host.
4. replace MDSDEV1 and MGSDEV with mdsdevname and mgsdevname, because
these vars are not always defined.

Signed-off-by: wang di <di.wang@whamcloud.com>
Change-Id: I979b72375a731cf163c6811be3e705ce2298b52c
Reviewed-on: http://review.whamcloud.com/4520
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2357 test: fix spelling in sanityn/36 test name
Nathaniel Clark [Mon, 19 Nov 2012 22:30:08 +0000 (14:30 -0800)]
LU-2357 test: fix spelling in sanityn/36 test name

"Correctly" was ironcally spelled.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I403401fdf411bb3c6230fe2e9212f3f0ddc000df
Reviewed-on: http://review.whamcloud.com/4616
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2273 tests: test failure on lustre-rsync-test
Bob Glossman [Wed, 14 Nov 2012 20:43:59 +0000 (12:43 -0800)]
LU-2273 tests: test failure on lustre-rsync-test

One off allocation errors in lustre_rsync test program cause
corruption of malloc arena and program faults.

Test-Parameters: clientdistro=sles11sp2 \
    envdefinitions=SANITY_EXCEPT=39l,CONF_SANITY_EXCEPT=32b

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: If347bedcac7d843560b5e215cf09002316ae7b47
Reviewed-on: http://review.whamcloud.com/4583
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
11 years agoLU-2390 tests: read quota_type from MDS node
Niu Yawei [Tue, 27 Nov 2012 09:14:23 +0000 (04:14 -0500)]
LU-2390 tests: read quota_type from MDS node

In the quota_type() of t-f, we should read quota_type from MDS node
instead of MGS.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Idad791d0a39e36305845c0623343d0f58b706ee0
Reviewed-on: http://review.whamcloud.com/4681
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-2370 ldiskfs: fix procfs access to mb groups.
Alexey Lyashkov [Mon, 19 Nov 2012 10:53:00 +0000 (14:53 +0400)]
LU-2370 ldiskfs: fix procfs access to mb groups.

backporting a fix 95599968d19db175829fb580baa6b68939b320fb
from kernel.org
with additional memory allocation error handling.

Xyratex-bug-id: MRP-757
Change-Id: I33e7daa18c8b74e34bbd1e12120e27ab7be23cf5
Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-on: http://review.whamcloud.com/4654
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2284 tests: enable D_QUOTA after mds/ost restart
Niu Yawei [Wed, 28 Nov 2012 10:33:46 +0000 (05:33 -0500)]
LU-2284 tests: enable D_QUOTA after mds/ost restart

Always enable D_QUOTA after mds/ost restart.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ifc069b1bb6444c41545dd7498c7c17e3a03bbcee
Reviewed-on: http://review.whamcloud.com/4695
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
11 years agoLU-2275 mdc: Don't leak requests with "strange" dispositions
Oleg Drokin [Mon, 5 Nov 2012 05:17:16 +0000 (00:17 -0500)]
LU-2275 mdc: Don't leak requests with "strange" dispositions

Make sure that a request with no transno will get its rq_replay reset,
also ensure that on error path from ll_file_open we drop reference to
request occupied by open if needed.

Change-Id: If4d59274d2574698567970821b94ef1c5c35385b
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4458
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
11 years agoLU-1199 build: Remove check for obsolete compilers
Christopher J. Morrone [Sat, 24 Nov 2012 06:27:10 +0000 (22:27 -0800)]
LU-1199 build: Remove check for obsolete compilers

The bad compilers that we were checking for are no longer in
use.

Change-Id: I754c8d23ef6547448ecc4b502ce6cf058d98f11c
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4680
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1199 build: Remove obsolete check for 2.4 kernels
Christopher J. Morrone [Sat, 24 Nov 2012 06:04:32 +0000 (22:04 -0800)]
LU-1199 build: Remove obsolete check for 2.4 kernels

Remove check for 2.4 kernels, which are no longer supported.

Change-Id: I4ed5b7c2686fa9b0c104444853e45900f90e1eb8
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4679
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1199 build: Remove obsolete ext3 check
Christopher J. Morrone [Sat, 24 Nov 2012 05:13:09 +0000 (21:13 -0800)]
LU-1199 build: Remove obsolete ext3 check

Remove the check for journal_callback_set() which was only needed
for ext3.

Also correct a couple of comments that still mentioned "ext3".

Change-Id: I0b4362eb1171051589f3772ddc253fa249019e6b
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4678
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
11 years agoLU-1199 build: Fix style and indention in build system files
Christopher J. Morrone [Sat, 24 Nov 2012 03:12:06 +0000 (19:12 -0800)]
LU-1199 build: Fix style and indention in build system files

Fix indentation by replacing spaces with tabs.

Remove stray whitespace at end of lines.

Command substitution changed from `...` notation to $(...) notation.
The latter is part of the POSIX 1003.2, and is supported by Debian's
dash shell, so it is relativly portable these days.

build/Makefile is checked in to git, not auto-generated by the
build system.  Therefore a !Makefile exception is added to
build/.gitignore.

Also, in build/autogen.sh, fix default setting of the IFS variable
to be a space and a tab, rather than 9 spaces.  I believe the 9
spaces were a result of a bad cut-and-paste.

Change-Id: I46270d808d7fe036f748da1cb45826bb42ab01e2
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4677
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
11 years agoLU-1876 hsm: bugfix about layout lock on the client
Jinshan Xiong [Wed, 7 Nov 2012 00:56:16 +0000 (16:56 -0800)]
LU-1876 hsm: bugfix about layout lock on the client

The following issues are fixed in this patch:
* deadlock at add_lsmref
* lov_delete_raid0 should wait for refcount of lsm to be zero
* handle empty layout at lov layer since layout can be changed
  anytime so original assumption of skipping lov layer when lsm is
  NULL is no longer correct
* other fixes

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ie7cd744b188f4d28fdbebda8870259b931328d00
Reviewed-on: http://review.whamcloud.com/4416
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-1565 ptlrpc: resend CANCEL rpc
Vitaly Fertman [Tue, 6 Nov 2012 19:09:47 +0000 (23:09 +0400)]
LU-1565 ptlrpc: resend CANCEL rpc

it is better to deliver CANCEL rpc to server reliably in the case of:
    RPC timeout, re-connect, CANCEL resend
because server may have sent BL AST and is waiting for this CANCEL.
this avoids possible idle time on server and later client evictions.

CANCEL is always has up-todate lock handle or both enqueue and cancel
are not replayed on recovery, with the exception of the case of:
    BL AST is sent; recovery starts, lock is re-enqueued, BL AST comes
    to client, cancel is created, recovery ends (lock handle has
    changed), CANCEL is sent, its reply gets estale as lock handled is
    not updated in the RPC.
this case is left unfixed and still may result in lock callback
timeout and client eviction, but this race window is much much shorter
than the target case being fixed by this fix.

Also remove lock cancelling from client_common_put_super() as it is
done later in client_disconnect_export().

Change-Id: I1bfe70444299d93c3fb348b737cb9721ea63eda3
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Andrew Perepechko <Andrew_Perepechko@xyratex.com>
Xyratex-bug-id: MRP-477
Reviewed-on: http://review.whamcloud.com/3189
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2394 llog: Fix a NULL pointer dereference
Prakash Surya [Mon, 26 Nov 2012 23:54:15 +0000 (15:54 -0800)]
LU-2394 llog: Fix a NULL pointer dereference

If llog_cat_id2handle fails and returns a positive value, it may free
its 'res' parameter and set it to NULL. Thus, a caller must be cautious
not to cause a NULL pointer dereference on error.

This patch fixes the cat_cancel_cb function, keeping it from dereferencing
this potentially NULL pointer.

In addition, any console message regarding a failed call to
llog_cat_id2handle in llog_cat.c now outputs the same message.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: I949b558d0ea4569685e8ed85b7a920b2dca548c3
Reviewed-on: http://review.whamcloud.com/4676
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
11 years agoLU-1565 disabling ELC through procfs
Vitaly Fertman [Tue, 26 Jun 2012 12:03:37 +0000 (16:03 +0400)]
LU-1565 disabling ELC through procfs

adding a possibility to disable ELC through procfs, for test purposes only.

Change-Id: I45153d67f325bd464943c8f618d5c86dd663166e
Reviewed-by: Andrew Perepechko <Andrew_Perepechko@xyratex.com>
Reviewed-by: Alexander Zarochentsev <Alexander_Zarochentsev@xyratex.com>
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Xyratex-bug-id: MRP-477
Reviewed-on: http://review.whamcloud.com/3188
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-974 security: ignore umask if acl enabled
Lai Siyao [Fri, 13 Jan 2012 10:34:33 +0000 (18:34 +0800)]
LU-974 security: ignore umask if acl enabled

* add OBD_CONNECT_UMASK to show whether MDS supports umask.
* client packs umask in create/open request, MDS will use it in
  object creation.
* client ignores umask if acl is enabled.
* client enforces umask if MDS doesn't support OBD_CONNECT_UMASK.
* don't update inode->i_mode after creation because la_mode may
  not be correct which doesn't consider umask.
* add an acl test for this.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: Ibbb45dd79378d116eb428b76070a417fe08a8142
Reviewed-on: http://review.whamcloud.com/1972
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2285 osp: Fix last_created updates after orphan cleanups
Li Wei [Mon, 12 Nov 2012 09:50:01 +0000 (17:50 +0800)]
LU-2285 osp: Fix last_created updates after orphan cleanups

After an OST orphan cleanup, the OST's last created ID plus one is
stored into opd_pre_last_created.  This is weird and contradicts with
osp_precreate_send() and a few other places, like the following except
from osp_precreate_reserve():

  ...
  precreated = d->opd_pre_last_created - d->opd_pre_used_id;
  if (precreated > d->opd_pre_reserved) {
          d->opd_pre_reserved++;
  ...

The issue is not only about coding style, as suggested by this piece
of debug log dumped by a run of replay-ost-single 2:

  00000004:00080000:0.0:1353838616.328831:0:14474:0:(osp_precreate.c:4
  51:osp_precreate_cleanup_orphans()) lustre-OST0000-osc-MDT0000: Got
  last_id 130 from OST, last_used is 36, pre_used 130
  ...
  00000004:00080000:1.0:1353838616.328935:0:14230:0:(osp_precreate.c:7
  42:osp_precreate_reserve()) lustre-OST0000-osc-MDT0000: precreated 1
  : opd_pre_last_created 131 opd_pre_used_id 130 opd_pre_reserved 0
  00000004:00080000:1.0:1353838616.329173:0:14230:0:(osp_precreate.c:8
  01:osp_precreate_get_id()) lustre-OST0000-osc-MDT0000: Incremented o
  pd_pre_used_id: 131

The first line says that opd_pre_last_created was 131, while on the OST
side the last created ID was 130.  Then, according to the second line, a
request tried to reserve an object and found one.  The last line tells
us that the request consumed 131.  Actually, the OSP at that time hadn't
officially created 131 on the OST yet.

This patch makes sure opd_pre_last_created stores what its name
implies.

Change-Id: I8b94df2c4c702aaac9d68859f59c2d5ec1e8b796
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/4625
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
11 years agoLU-2356 tests: ensure recovery-small/10-12 recover fully
Nathaniel Clark [Mon, 19 Nov 2012 22:12:57 +0000 (14:12 -0800)]
LU-2356 tests: ensure recovery-small/10-12 recover fully

Ensure recovery compeletes in tests 10, 11, and 12 before proceeding
to next test, otherwise it can cause the next test to fail.

This also ensure that partial test runs can be restarted cleanly by
fixing initial rm's of old test run files.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ifa0e5c7344a23c112a69550ff308e3081e5a21d5
Reviewed-on: http://review.whamcloud.com/4615
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2171 ost: remove old checksum verification
Alex Zhuravlev [Tue, 20 Nov 2012 19:41:45 +0000 (23:41 +0400)]
LU-2171 ost: remove old checksum verification

it was used long ago to catch bugs. now it conflicts with
LU-2150 where pages are not pinned by the bulk descriptor
and can not be accessed after a call to obd_commitrw().

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I5cc05e0836e8e42871aa2eca1d7ec0f402b42ee7
Reviewed-on: http://review.whamcloud.com/4400
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-20 kernel: add descriptions to kernel patches
Andreas Dilger [Mon, 19 Nov 2012 19:30:53 +0000 (12:30 -0700)]
LU-20 kernel: add descriptions to kernel patches

Add some descriptive text to kernel patches so that it is more clear
what the patches are needed for, and whether they can simply be
dropped, or if they should be pushed upstream.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie19de1feedc8bedeb7ae890886aab73815500c1e
Reviewed-on: http://review.whamcloud.com/4613
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Keith Mannthey <kemannthey@gmail.com>
11 years agoLU-2251 osp: remove invalid assertion
James Simmons [Mon, 26 Nov 2012 17:56:51 +0000 (12:56 -0500)]
LU-2251 osp: remove invalid assertion

Given we initiate precreation before current pool is exhausted,
we can easly get final number of precreated objects more than
OST_MAX_PRECREATE but it should always be less then the
theortical max of OST_MAX_PRECREATE * 2. If its more than that
then the LASSERT is valid.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ie3ec88c95d94529e457981942e8196b5a6f7d7ae
Reviewed-on: http://review.whamcloud.com/4495
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-2285 osp: Enhance pre-creation-related debug messages
Li Wei [Sun, 25 Nov 2012 07:48:00 +0000 (15:48 +0800)]
LU-2285 osp: Enhance pre-creation-related debug messages

This patch adds a couple of debug messages to help diagnose osp's
pre-creation code.  It also fixes OBD names and print formats in a few
related messages.

Change-Id: Ide153834511360855f390e7f35e85a389d0bd4db
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/4668
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
11 years agoLU-2181 tests: test failure on conf-sanity, subtest 23a
Bob Glossman [Tue, 20 Nov 2012 20:39:40 +0000 (12:39 -0800)]
LU-2181 tests: test failure on conf-sanity, subtest 23a

Disable subtests that do umount with mds down in SLES11 SP2.
Problems with upstream umount command cause hangs.

Test-Parameters: fortestonly, clientdistro=sles11sp2, \
 envdefinitions=SANITY_EXCEPT=39l

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I3d5f0c02dcc0deef1d38e2d1a09c8ed6cf2b295f
Reviewed-on: http://review.whamcloud.com/4639
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-2268 o2iblnd: initialize tx-pool after fmr-pool
Liang Zhen [Mon, 5 Nov 2012 12:29:18 +0000 (20:29 +0800)]
LU-2268 o2iblnd: initialize tx-pool after fmr-pool

TX pool should be created after FMR pool, otherwise
kiblnd_create_tx_pool() will not allocate tx_pages for
kib_tx_t even if FMR is enabled.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I30d3c53b4e29ac249500cf1f780619dcfaa59b10
Reviewed-on: http://review.whamcloud.com/4670
Tested-by: Hudson
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2200 tests: conf-sanity/32 does not work with IB
Nathaniel Clark [Fri, 16 Nov 2012 21:22:01 +0000 (16:22 -0500)]
LU-2200 tests: conf-sanity/32 does not work with IB

Check if running over infiniband and skip test if that is the case.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I45ca12c15935df268c2699feb7a135b80782664c
Reviewed-on: http://review.whamcloud.com/4607
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2118 mdt: fetch parent fid if requested
Alex Zhuravlev [Fri, 9 Nov 2012 11:15:46 +0000 (15:15 +0400)]
LU-2118 mdt: fetch parent fid if requested

open-by-fid replay needs this functionality to use correct parent
and appropriate default striping.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I8aa618f98f7a7dbbcf32f3407fa89c79a8b98d83
Reviewed-on: http://review.whamcloud.com/4503
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-921 test: drop subtest 24 from ALWAYS_EXCEPT
Hongchao Zhang [Tue, 30 Oct 2012 19:02:11 +0000 (03:02 +0800)]
LU-921 test: drop subtest 24 from ALWAYS_EXCEPT

a new subtest 24a is introduced, drop it from ALWAYS_EXCEPT
to allow it to be tested, and verify whether the newer linux
kernel handle fsync(by filemap_fdatawait) correctly.

Pls see BZ5494 to more detail.

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: I88d5c6870827cafc5534aba33661b0c8180a8d5c
Reviewed-on: http://review.whamcloud.com/4443
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1940 ost: wait a while for OBD_FAIL_OST_EROFS
Hongchao Zhang [Tue, 13 Nov 2012 22:36:43 +0000 (06:36 +0800)]
LU-1940 ost: wait a while for OBD_FAIL_OST_EROFS

for OSC, -EROFS is a recoverable error, it will resend the failed
request at most cl_resends times (obd->u.cli.cl_resends), and
its default value is 10, then for test case, the failed request
will be resent repeatly without delay, and the cl_resends could be
not enough to handle, replaces OBD_FAIL_CHECK with OBD_FAIL_TIMEOUT
will introduce some delay for -EROFS.

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: Ic2a8fe6f2d75e74f30d007940a8fd631997135e4
Reviewed-on: http://review.whamcloud.com/4622
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-930 utils: update lfs_migrate example usage
Andreas Dilger [Tue, 6 Nov 2012 23:12:40 +0000 (16:12 -0700)]
LU-930 utils: update lfs_migrate example usage

Update the lfs_migrate example usage to exclude files created within
the past two days.  This makes it more clear that the current script
needs to take care to avoid migrating files that may still be modified
by applications.  While two day old files are not guaranteed to be
unused, it definitely would avoid the vast majority of cases of files
that were just created and are being written to by running apps.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: If7c06ef3b0688db492930a56d7ba5ad4599b04e2
Reviewed-on: http://review.whamcloud.com/4481
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
11 years agoLU-1978 llite: Fix i_size race with truncate and mkwrite
michael.mckay [Wed, 19 Sep 2012 14:54:56 +0000 (10:54 -0400)]
LU-1978 llite: Fix i_size race with truncate and mkwrite

These changes address a race between the truncate
process and the mkwrite process. We add an additional
check in the case of a mkwrite to make sure we are not
past the end of the file. While holding the lli_trunc_sem
lock we check the size and make sure we are not past
the end of the file. If we are we return -ENODATA which
will trigger a SIGBUS. This is similar to what occurs in the
ext4 filesystem in these cases. The return status to -ENODATA
which will eventually get mapped to
VM_FAULT_NOPAGE (ll_page_mkwrite()).
The kernel will then return a SIGBUS. These changes
return -ENODATA to ensure we correctly clean up. In the
case of the mapping being null nothing will change.

Xyratex-bug-id: MRP-651
Reviewed-by: Andrew Perepechko <Andrew_Perepechko@xyratex.com>
Reviewed-by: Alexander Zarochentsev <Alexander_Zarochentsev@xyratex.com>
Signed-off-by: Michael McKay <michael_mckay@xyratex.com>
Change-Id: Ice41b20ac16d81be44fb0c6a1bf0da8b2fcf9b7c
Reviewed-on: http://review.whamcloud.com/4044
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1517 ptlrpc: throw net error to ptlrpc for bulk
Alexander.Boyko [Mon, 17 Sep 2012 13:48:59 +0000 (17:48 +0400)]
LU-1517 ptlrpc: throw net error to ptlrpc for bulk

Start reconnect and resend if network error occures
for the bulk transfer.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Change-Id: I0cf2ee1230a039336f081fbb520c1ce768882088
Xyratex-bug-id: MRP-523
Reviewed-on: http://review.whamcloud.com/4299
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Cory Spitz <spitzcor@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1944 ldlm: Add another net_latency to recoverry timer.
wangdi [Fri, 14 Sep 2012 14:39:21 +0000 (07:39 -0700)]
LU-1944 ldlm: Add another net_latency to recoverry timer.

Add another net_latency to this request deadline, i.e.
we need add 2 net_latency to extend the recovery timer,
one for balance rq_deadline (see ptl_send_rpc), one for
resend the req to server.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I6cb6e57358f4fe32ae2ac8d982af6ce03b68014b
Reviewed-on: http://review.whamcloud.com/4351
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoRevert "LU-1756 kernel: cleanup lustre_compat25.h"
Oleg Drokin [Wed, 21 Nov 2012 16:42:00 +0000 (11:42 -0500)]
Revert "LU-1756 kernel: cleanup lustre_compat25.h"

This is causing build failures on SLES11SP2

This reverts commit 472fe13982952c9ccad969a996c054f9cf643847.

11 years agoLU-2139 osc: Move cl_client_lru to cl_client_cache
Prakash Surya [Tue, 6 Nov 2012 21:24:27 +0000 (13:24 -0800)]
LU-2139 osc: Move cl_client_lru to cl_client_cache

The cl_client_lru structure was renamed to cl_client_cache. This is
intended as a purely cosmetic change motivated by the future inclusion
of other, non LRU, information in that structure. For example, the plan
is to include "unstable" page information in this structure; which is
unrelated to the LRU list of clean pages, but still part of a client's
cache.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: I286a1bbb2fb0d7dc52f007407bb823f960ae7c62
Reviewed-on: http://review.whamcloud.com/4483
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1756 kernel: cleanup lustre_compat25.h
Peng Tao [Thu, 16 Aug 2012 07:59:21 +0000 (15:59 +0800)]
LU-1756 kernel: cleanup lustre_compat25.h

1. unused functions:
   ll_bdi_wb_cnt()
2. call bdi_init/bdi_destroy directly
3. call add_to_page_cache_lru directly
4. fix a typo of ll_pagevec_init
5. remove QUOTA_OK/NO_QUOTA. They are defined in libcfs

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I9953dabbc758e6fb7a3d0649bdc64ba1455efb99
Reviewed-on: http://review.whamcloud.com/3689
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
11 years agoLU-2031 obdclass: check if client is connected to the target
Jinshan Xiong [Tue, 13 Nov 2012 19:56:17 +0000 (11:56 -0800)]
LU-2031 obdclass: check if client is connected to the target

When the client is notified by IR, it may not connect to the OST
yet, verify it before writing the new NID to the import.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ia144b695443a9850ecccd0c8946de029492b4446
Reviewed-on: http://review.whamcloud.com/4525
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2244 lov: remove unused bits from lov, osc
Alex Zhuravlev [Sun, 28 Oct 2012 18:38:11 +0000 (21:38 +0300)]
LU-2244 lov: remove unused bits from lov, osc

- precreation logic in OSC
- QoS code in LOV
- fake requests in ptlrpc

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I7a3e3ec6cf254a9fcd53ae7eab6c2d23b7520234
Reviewed-on: http://review.whamcloud.com/4399
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
11 years agoLU-591 mdd: link ea code cleanup
Vitaly Fertman [Mon, 22 Oct 2012 19:55:12 +0000 (23:55 +0400)]
LU-591 mdd: link ea code cleanup

Change-Id: I7504a2a3ae540471ef37d75e46ca0d7cf9d8a9f5
Xyratex-bug-id: MRP-139
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Nathan Rutman <Nathan_Rutman@xyratex.com>
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-on: http://review.whamcloud.com/1230
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2345 tests: remove $FSTYPE from tests
Niu Yawei [Fri, 16 Nov 2012 10:50:13 +0000 (05:50 -0500)]
LU-2345 tests: remove $FSTYPE from tests

$FSTYPE is deprecated, it should be replaced by facet_fstype.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I6671249c88a53b01badebd7172fb3307c8f4f48b
Reviewed-on: http://review.whamcloud.com/4596
Tested-by: Hudson
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
11 years agoLU-1606 api: Do not include lustre_idl.h from lustreapi.h
Christopher J. Morrone [Sat, 10 Nov 2012 02:06:29 +0000 (18:06 -0800)]
LU-1606 api: Do not include lustre_idl.h from lustreapi.h

lustre_idl.h has become increasingly difficult to use from
user-space.  Normal users of the lustre api should not
be looking into lustre wire protocol anyway, so this change
eliminates the include of lustre_idl.h.

After removing lustre_idl.h, it became obvious that a number
of programs have been picking up normal user-space headers
through a very windy path of includes.  With the include
of lustre_idl.h gone, they no longer compiled, so we also
add the missing explicit includes.

It became clear that copytool.c explicity requires
libcfs/libcfs.h, and lustre_rsync.c require lustre_idl.h.
But I believe that it is far better to have those includes
explicitly stated, so it is obvious that those programs
are peeking into lustre's internals.  In the future we
can work on creating new lustre API calls that provide the
information that they need without side-stepping abstraction
layers.

Change-Id: I8ce55ffe0e1766515061f3dbc63c2372d5713f58
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4505
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Yu Jian <yujian@whamcloud.com>
11 years agoLU-1623 mdt: Atomically update MDT export connection flags
Ned Bass [Fri, 26 Oct 2012 22:32:26 +0000 (15:32 -0700)]
LU-1623 mdt: Atomically update MDT export connection flags

MDT processing of connect requests currently updates the export
connection flags in two steps: client/server feature matching is
performed first, then much later various security-related bits are
removed as needed.  Certain error paths may leave the export flags
partially initialized.

A problem arises if multiple connect requests from the same client are
handled out of order, as may occur due to network disruptions. If the
last such request to be handled has a lower connection count than one
that already completed, it will be aborted with -EALREADY after having
modified the connection flags in the export.  However, the
security-related flags are left with incorrect values, as the
top-level connect handler skips setting these in the error path.
Replies to subsequent client requests may then contain unexpected
security information, causing the client to crash.

Similar issues may exist with other target types having non-atomic
export flag updates, and these should be addressed in follow-up
patches.

This patch makes the following changes:

- To avoid the problem described above, update the export connection
  flags atomically, and only in the successful case.

- To make this important atomic operation more conspicuous, move it
  from mdt_init_sec_level() to the top-level handler mdt_connect().

- Add a comment to mdt_connect_internal(), and delete a disabled code
  block from it.

- Correct debug message in target_handle_connect() to match code.

Signed-off-by: Ned Bass <bass6@llnl.gov>
LLNL-bug-id: bz1711
Change-Id: Ic00c4679cc9b813bdb47cf148bef8f62c0ef8ddb
Reviewed-on: http://review.whamcloud.com/4406
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1337 llite: kernel 3.2 protects inode->i_nlink
Liu Xuezhao [Tue, 30 Oct 2012 09:01:51 +0000 (17:01 +0800)]
LU-1337 llite: kernel 3.2 protects inode->i_nlink

Kernel 3.2 protects inode->i_nlink from direct modification.
Filesystems can only read i_nlink directly and shall use the
(set|clear|inc|drop)_nlink for modification.
See kernel commit a78ef704a8dd430225955f0709b22d4a6ba21deb.

This patch adds LC_HAVE_PROTECT_I_NLINK checking and implements
set_nlink for old kernel, clear/inc/drop_nlink exists after 2.6.18

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: Ie958cb308291ecc48d409a1282fed7ea3549a561
Reviewed-on: http://review.whamcloud.com/3577
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2322 quota: OBD_IDX_READ should be handled during recovery
Niu Yawei [Wed, 14 Nov 2012 09:57:04 +0000 (04:57 -0500)]
LU-2322 quota: OBD_IDX_READ should be handled during recovery

OBD_IDX_READ should be handled during recovery.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I509be43b062943e7601fdfc3a38178acb2d150b0
Reviewed-on: http://review.whamcloud.com/4580
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
11 years agoLU-2156 misc: too noisy messages are suppressed
Alex Zhuravlev [Fri, 12 Oct 2012 08:16:54 +0000 (12:16 +0400)]
LU-2156 misc: too noisy messages are suppressed

- number of messages leading to confusion and adding no
  useful information to the customers are suppressed.

- remove KEY_REVIMP_UPD - it's not used with OFD

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I9679b786354a2f4b52c5c13e0e2ec98a5a5b86a9
Reviewed-on: http://review.whamcloud.com/4261
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
11 years agoLU-2220 doc: add CLIO notes
Ned Bass [Tue, 23 Oct 2012 23:26:35 +0000 (16:26 -0700)]
LU-2220 doc: add CLIO notes

Add notes on the CLIO subsystem originally composed by Nikita Danilov
to the lustre/doc directory.  Update document to improve accuracy,
language, and formatting.

Original document URL:
http://wiki.lustre.org/images/3/37/CLIO-TOI-notes.pdf

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I18ac65bc437cf095ac7a897ebd2f8882318d27ad
Reviewed-on: http://review.whamcloud.com/4377
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Ian Colle <Ian.Colle@intel.com>
11 years agoLU-2284 quota: debug patch for test_7d
Niu Yawei [Mon, 12 Nov 2012 02:53:19 +0000 (21:53 -0500)]
LU-2284 quota: debug patch for test_7d

Try to collect D_TRACE & D_QUOTA log to see why the setquota failed
with -EINVAL.

This patch improve the test script a bit: fail the test when setquota
failed.

Test-Parameters: testlist=sanity-quota
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ic866dcefcb174bd0128e63f5777824608db52962
Reviewed-on: http://review.whamcloud.com/4510
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
11 years agoLU-1337 llite: take trunc_sem outside cl_io_loop for mkwrite
Liu Xuezhao [Wed, 7 Nov 2012 03:17:44 +0000 (11:17 +0800)]
LU-1337 llite: take trunc_sem outside cl_io_loop for mkwrite

In truncate path it acquires lli_trunc_sem and then dlm lock, so
in page_mkwrite we should take it in the same sequence to avoid
dead lock.

This is a fix for f78805dbf041bb42b250fe754dff7b864856203f .

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: Idb5574bffdaf00461befd43b867cdd9b3e549efe
Reviewed-on: http://review.whamcloud.com/4485
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1956 test: Disable test_156 for ZFS
Nathaniel Clark [Fri, 2 Nov 2012 16:00:11 +0000 (12:00 -0400)]
LU-1956 test: Disable test_156 for ZFS

Since osd-zfs does not collect or report caching stats, do not run 156
against it.  Mark test as skipped.  Created LU-2261 as enhancement to
add caching stats to osd-zfs.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Id4a0b92cc775a0751fa023d6027240e8511aa312
Reviewed-on: http://review.whamcloud.com/4448
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoRestore build after a tag crossed imaginary line. tag 2.3.56 2.3.56 v2_3_56 v2_3_56_0
Oleg Drokin [Mon, 19 Nov 2012 18:21:37 +0000 (13:21 -0500)]
Restore build after a tag crossed imaginary line. tag 2.3.56

We need to find a better way to control such can-kicking excercises.

Change-Id: I25d8a2fbf7d5905c8f002a7c38fc44ef3124dda5

11 years agoLU-2129 llog: protect llog write against concurrent read
Mikhail Pershin [Thu, 18 Oct 2012 19:01:49 +0000 (23:01 +0400)]
LU-2129 llog: protect llog write against concurrent read

llog_write_rec contains case when buffer passed separately from
header and tail, resulting 3 writes instead of single one, so
concurrent read may read partial record.
Another similar case is llog_pad, which writes header and tail
with required gap to align records at the end of 8K buffer.

Use dt_read/write locks on llog object to protect writes against
read. Such '3-writes' case happens only with configs llogs.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Idfb94706b2cf8ad22776c1a277b862863f94c2f6
Reviewed-on: http://review.whamcloud.com/4303
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
11 years agonew tag 2.3.55 2.3.55 v2_3_55 v2_3_55_0
Oleg Drokin [Mon, 19 Nov 2012 15:59:31 +0000 (10:59 -0500)]
new tag 2.3.55

Change-Id: I92940a37023baccdbd36fa9ca4c669b67cad8c95

11 years agoLU-2130 osp: wait until all the requests are processed
Alex Zhuravlev [Wed, 14 Nov 2012 19:12:11 +0000 (23:12 +0400)]
LU-2130 osp: wait until all the requests are processed

there is a window between osp_sync_interpret() and
osp_sync_request_commit_cb() where opd_syn_rpc_in_progress
is not zero while opd_syn_rpc_in_flight can be zero.
the assertion in osp_sync_thread() can hit this window or
osp_sync_request_commit_cb() can pin request at the point
where osp_sync_thread() has already stopped the processing
- this would be a deadlock.

with this patch osp_sync_thread() will be waiting until all
the requests are processed, checking the list of committed
requests in a while.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I409feb0bbb681e41bff1d41cb1232ef5ef1cbf37
Reviewed-on: http://review.whamcloud.com/4581
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-930 doc: update URLs in man pages
Andreas Dilger [Tue, 6 Nov 2012 23:06:21 +0000 (16:06 -0700)]
LU-930 doc: update URLs in man pages

Update the bug reporting URL to point at http://bugs.whamcloud.com/,
since current releases are not longer being made by Sun, and they
should not be getting bug reports about any 2.x releases.  Since all
of the man pages reference lustre(7), and the URL is also in the RPM
packages, we don't need to put the URL into every man page.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I24f95df62efbf75de89d96b52acfacbd16c12074
Reviewed-on: http://review.whamcloud.com/4480
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
11 years agoLU-1934 ofd: Fix a mis-aligned closing brace
Prakash Surya [Wed, 14 Nov 2012 19:38:48 +0000 (11:38 -0800)]
LU-1934 ofd: Fix a mis-aligned closing brace

This is a trivial change to correctly align a closing brace with
its open brace and code block.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: I1206211b0485ea6dac54dbc6f6e3acbcf8443837
Reviewed-on: http://review.whamcloud.com/4582
Tested-by: Hudson
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-2304 tests: fsx log print file descriptor number
Andreas Dilger [Fri, 9 Nov 2012 00:19:33 +0000 (17:19 -0700)]
LU-2304 tests: fsx log print file descriptor number

Print the file descriptor number when dumping logs after an fsx
failure during multi-mount testing.  This allows easier tracking
of which mountpoint data was written to and read from.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I5800bb982e1874d2394a554c95289342ab3444a2
Reviewed-on: http://review.whamcloud.com/4498
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2310 quota: fix typo in find_tree_dqentry()
Niu Yawei [Mon, 12 Nov 2012 02:09:41 +0000 (21:09 -0500)]
LU-2310 quota: fix typo in find_tree_dqentry()

In find_tree_dqentry(), we should pass 'type' to quota_read_blk(),
instead of '0'.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ife8afd248833b53ead017dd909359fc792db7689
Reviewed-on: http://review.whamcloud.com/4509
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
11 years agoLU-2274 tests: use ext3 as baseline for POSIX test on SLES
Yu Jian [Tue, 13 Nov 2012 14:16:07 +0000 (22:16 +0800)]
LU-2274 tests: use ext3 as baseline for POSIX test on SLES

Since SLES distro does not support read-write access to an ext4
file system by default, this patch changes the baseline filesystem
to ext3 for POSIX testing on SLES distro.

The patch also removes the package installation codes from the
test script, which can detect and prompt which mandatory package
is not installed.

Test-Parameters: envdefinitions=SLOW=yes clientdistro=sl11 testlist=posix
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Iac901bb62afe0a944e8211e73bacb061e9a3aac1
Reviewed-on: http://review.whamcloud.com/4524
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
11 years agoLU-2183 interop: handle deprecated quota param
Niu Yawei [Wed, 14 Nov 2012 03:33:33 +0000 (22:33 -0500)]
LU-2183 interop: handle deprecated quota param

The 'quota_type' param is deprecated now, we should ignore them
when processing config logs.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ife12d266db9ac049487217076410671685063389
Reviewed-on: http://review.whamcloud.com/4528
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
11 years agoLU-2283 test: fix sanity-quota test_18
Niu Yawei [Wed, 7 Nov 2012 02:40:18 +0000 (21:40 -0500)]
LU-2283 test: fix sanity-quota test_18

test_18 should grep the watchdog message start from "sanity-quota
test 18" instead of "test 18b", otherwise, the messages from other
tests could be mis-processed.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Icf4c13cd5f602cbb1974fc3ca5d156c87398cd3e
Reviewed-on: http://review.whamcloud.com/4484
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1113 llite: hide DCACHE_LUSTRE_INVALID in ll_dentry_data
Peng Tao [Thu, 14 Jun 2012 06:10:22 +0000 (14:10 +0800)]
LU-1113 llite: hide DCACHE_LUSTRE_INVALID in ll_dentry_data

DCACHE_LUSTRE_INVALID is lustre private flag in vfs layer.
Replace it with dentry->d_fsdata->lld_invalid so that it won't
conflict with VFS flags.

After dcache scalability patch, dentry->d_fsdata is always set
before dentry is materised/rehashed. So if a dentry's d_fsdata
is not set, then it is not hashed/materised. The patch make use
of the fact and treat such dentry as invalid as well. It is
necessary because d_lustre_invalidate() can be called in
ll_invalidate_negative_children() and finds unmaterised/unhashed
dentries.

Also drop all vfs_races patches as they are no longer needed.

Plus two minor cleanups.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I655154b8807440c99574ad6b865bd550cbc145f1
Reviewed-on: http://review.whamcloud.com/2407
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
11 years agoLU-1257 config: keep using old osc name
Niu Yawei [Sun, 1 Apr 2012 05:13:35 +0000 (22:13 -0700)]
LU-1257 config: keep using old osc name

When adding new OST to a system upgraded from 1.8, we
arbitrarily use the new OSC naming style in the MDT config
log, however, config parameter (conf_param) updating code
will use old naming OSC style for the newly added OST since
it found that the system is upgraded from 1.8. Such OSC
name mismatching problem will cause error when processing
the parameter config records.

This patch changed the registration code to follow the
same rule as the param updating code: always use old OSC
naming style for the upgraded 1.8 system.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I4d9b02bfa439fb95993bdbdb0b05fc5a38c9af96
Reviewed-on: http://review.whamcloud.com/2432
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-2285 osp: Send correct object IDs when deleting orphans
Li Wei [Mon, 12 Nov 2012 09:04:45 +0000 (17:04 +0800)]
LU-2285 osp: Send correct object IDs when deleting orphans

When processing an orphan deletion request with object ID n, ofd (as
well as obdfilter in older branches) destroys objects from n + 1.
This patch fixes osp to send last used IDs instead of last used ID
plus ones, so that the first orphan in each sequence will be destroyed
correctly.

Change-Id: I6aae73dfdd7fa73aca7b1a8cfe074a1902ad981f
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/4511
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-2286 osc: unplug OSC queue at the end of truncate
Jinshan Xiong [Tue, 6 Nov 2012 16:59:58 +0000 (08:59 -0800)]
LU-2286 osc: unplug OSC queue at the end of truncate

It was missed somehow. Otherwise, this extent would never be flushed
until the next write to this file is coming. Even writepage() won't
help out this case.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I179269163e5ad5382448036046925a5747282472
Reviewed-on: http://review.whamcloud.com/4477
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2192 tests: enable large xattr testing on zfs
Yu Jian [Thu, 8 Nov 2012 04:16:14 +0000 (12:16 +0800)]
LU-2192 tests: enable large xattr testing on zfs

Since zfs supports large xattr by default and dumpe2fs does not
work on zfs, we need improve large_xattr_enabled() to check the
backend fs type on MDS.

Test-Parameters:mdsfilesystemtype=zfs mdtfilesystemtype=zfs ostfilesystemtype=zfs testlist=sanity,conf-sanity,replay-single,lustre-rsync-test
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I27bdad38d8a40e3858d96ee29f44a6abb5365fef
Reviewed-on: http://review.whamcloud.com/4493
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
11 years agoLU-2211 quota: cache return code of acq for 1s
Johann Lombardi [Wed, 24 Oct 2012 18:51:36 +0000 (20:51 +0200)]
LU-2211 quota: cache return code of acq for 1s

Cache failed return code of acquire request for 1s to avoid
request flooding with EINPROGRESS and cumulative timeout on
ETIMEOUT when the master isn't responsive.

Signed-off-by: Johann Lombard <johann.lombardi@intel.com>
Change-Id: I3c212055b1ed6cd3671e69a0cff079dae831af61
Reviewed-on: http://review.whamcloud.com/4380
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2188 tests: Fix assumptions in test 133d
Nathaniel Clark [Thu, 1 Nov 2012 17:51:13 +0000 (13:51 -0400)]
LU-2188 tests: Fix assumptions in test 133d

The test assumed that with 512 files in a directory, the inode sizes
would be different in the two test directories.  This is not the case
on zfs which caused the get_rename_size() function to return multiple
values.  This change adds a argument to specify which stat is pulled
from rename_stats, and doesn't rely on the sizes being different.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I568ec95bd7f0613caf96101055a392ea5762cd2d
Reviewed-on: http://review.whamcloud.com/4438
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2244 mds: remove remaining of old mds code
Alex Zhuravlev [Sun, 28 Oct 2012 17:17:42 +0000 (20:17 +0300)]
LU-2244 mds: remove remaining of old mds code

it's not used anymore.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Ie6e94d7a19a38ed57397ff48091597ea02f2ada1
Reviewed-on: http://review.whamcloud.com/4398
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: wangdi <di.wang@intel.com>
11 years agoLU-1832 ldlm: fix double list add
Peng Tao [Wed, 5 Sep 2012 07:51:04 +0000 (15:51 +0800)]
LU-1832 ldlm: fix double list add

Adding list to itself will cause kernel warning if
CONFIG_DEBUG_LIST is on.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Ibaf135c2c6ca6cc8ee4f0e6f270d738c6964fddb
Reviewed-on: http://review.whamcloud.com/3880
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Keith Mannthey <kemannthey@gmail.com>
11 years agoLU-2186 mdt: initialize pointer to lu_site
Alex Zhuravlev [Tue, 16 Oct 2012 19:20:25 +0000 (23:20 +0400)]
LU-2186 mdt: initialize pointer to lu_site

later it's used to access top device (which is MDT) and
learn number of current clients to foresee how many
sequences will be needed.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I0f542dfbc45836180ec274dc605d3770b527e988
Reviewed-on: http://review.whamcloud.com/4280
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
11 years agoLU-2073 procfs: procfs symlinks are apparently never freed
yangsheng [Thu, 1 Nov 2012 15:33:05 +0000 (23:33 +0800)]
LU-2073 procfs: procfs symlinks are apparently never freed

We shouldn't set proc_dir_entry->data to NULL in any case.
There must cause memleak when it is a symlink entry.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I45c82fd206be738b5fdc4b2e612c3d87a708df67
Reviewed-on: http://review.whamcloud.com/4434
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
11 years agoLU-1538 tests: sanity.sh failed tests to clean up after themselves
Oleg Drokin [Sat, 3 Nov 2012 19:36:55 +0000 (15:36 -0400)]
LU-1538 tests: sanity.sh failed tests to clean up after themselves

commit 467cf22b changed behavior of error() function to abort the
test right away, as the result a lot of older tests were leaving
piles of files behing causing subsequent tests to fail spuriously.
Also tests like 32[ijkl] left mountpoints on lutre so subsequent test
65j is no longer able to umount lustre and hands there indefinitely.

This patch adds cleanups in tests: 24v, 27m, 32[ijkl]

Additionally tests 17m, 27m, 59 were making unsafe assumptions about
how long would it take for objects to be deleted. Removed explicit sleep
there to calls to wait_delete_completed

test 110: fixed a typo with quotes, autogenerate long filenames

test 72a 80: removed unnecessary "true" call.

Change-Id: I1c1002bfad278b767e45301b56e74688690690ee
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4454
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-1337 llite: kernel 3.2 make_request_fn returns void
Liu Xuezhao [Tue, 30 Oct 2012 08:59:11 +0000 (16:59 +0800)]
LU-1337 llite: kernel 3.2 make_request_fn returns void

3.2 request_queue.make_request_fn defined as function returns void.
(kernel commit 5a7bbad27a410350e64a2d7f5ec18fc73836c14f)
Add LC_HAVE_VOID_MAKE_REQUEST_FN/HAVE_VOID_MAKE_REQUEST_FN for check.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I49a27873c1754addc9fef7c5f50cbf84592adf05
Reviewed-on: http://review.whamcloud.com/3576
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1527 clio: check if lock is freed in cl_lock_peek()
Andriy Skulysh [Thu, 4 Oct 2012 14:20:05 +0000 (17:20 +0300)]
LU-1527 clio: check if lock is freed in cl_lock_peek()

The lock may have been freed between cl_lock_lookup() and
cl_lock_mutex_get() so we should check lock state after grabbing
lock mutex.

Xyratex-bug-id: MRP-665
Change-Id: Id3562b3dd8bd052b74ad7840f08b904ca38a6746
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-on: http://review.whamcloud.com/3117
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2191 utils: tunefs.lustre failed to read ZFS partitions
Nathaniel Clark [Mon, 5 Nov 2012 21:07:55 +0000 (16:07 -0500)]
LU-2191 utils: tunefs.lustre failed to read ZFS partitions

ZFS shared libraries were not loaded prior to attempting to verify
type of partition supplied on commandline, it would never recognize a
ZFS partition.  Mount type also needs to be passed down to
osd_read_lld, and not just use whatever is set in defaults.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Iad88da4ddd9cf5fcc75f8409933467d9237f58d3
Reviewed-on: http://review.whamcloud.com/4469
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
11 years agoLU-2281 utils: Fix possible segfault in tunefs.lustre
Nathaniel Clark [Mon, 5 Nov 2012 21:22:33 +0000 (16:22 -0500)]
LU-2281 utils: Fix possible segfault in tunefs.lustre

ldiskfs_read_ldd() can segfault if fopen of mountdata fails, because
it will always try to fclose the file handled (which if it is NULL,
dies).

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I553a7972b61ec01473bf834f98f8937bc7b11dbc
Reviewed-on: http://review.whamcloud.com/4470
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2275: obdclass: Proper error cleaup for class_newdev
Oleg Drokin [Mon, 5 Nov 2012 05:24:18 +0000 (00:24 -0500)]
LU-2275: obdclass: Proper error cleaup for class_newdev

class_newdev did not have a proper cleanup for the case of no more
obd devices and used to leak obdtype reference and some memory
in such a case.
This patch fixes the issue.

Change-Id: I6b683f914f5cbcd21ef414fe470ccc88c39c4deb
Signed-off-by: Oleg Drokin <green@whamcloud.com
Reviewed-on: http://review.whamcloud.com/4460
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1531 mdt: Check non-normalised fid.
build [Thu, 11 Oct 2012 18:16:32 +0000 (13:16 -0500)]
LU-1531 mdt: Check non-normalised fid.

Apply fid checking in a manner similar to mdt_fid2path processing.

IGIF FIDs are checked to ensure correct behavior for upgraded
1.8 filesystems.

Signed-off-by: Richard Henwood <richard.henwood@intel.com>
Change-Id: Iea7ebfda8a31915b9d4fe2959773c9312b087485
Reviewed-on: http://review.whamcloud.com/4255
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2020 sanity: test 140 should allow 40 consecutive symlink
Peng Tao [Mon, 24 Sep 2012 07:17:41 +0000 (15:17 +0800)]
LU-2020 sanity: test 140 should allow 40 consecutive symlink

For kernel > 3.5, to test recursive symlink, we need real
recursive symlink.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I4f1b834a79cdf4edb1775da45200f6fd2a680709
Reviewed-on: http://review.whamcloud.com/4079
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
11 years agoLU-2170 osc: set osc_lock attribute only once
Jinshan [Fri, 19 Oct 2012 16:28:00 +0000 (12:28 -0400)]
LU-2170 osc: set osc_lock attribute only once

Set osc_lock's attribute by lock allocator, otherwise if this lock is
matched and enqueued by a glimpse thread, the osc_lock's ols_glimpse
will be set to true and the lock state will be messed in
osc_lock_upcall().

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ib8492fa159a43dad11febe5a01f8c4ef72b8c4f3
Reviewed-on: http://review.whamcloud.com/4316
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2241 symlink: fix off-by-one error when reading symlinks
Nathaniel Clark [Wed, 31 Oct 2012 20:56:09 +0000 (16:56 -0400)]
LU-2241 symlink: fix off-by-one error when reading symlinks

This fixes and off-by-one error when reading symlinks of inode size.
The null character is not accounted for when checking bufferlength
vs. inode data size.

Also add regression test to sanity.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: If4464cac60d57012311226113ff38b9c28926958
Reviewed-on: http://review.whamcloud.com/4415
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1684 ldlm: move ldlm flags not sent through wire to upper 32bits
Vitaly Fertman [Mon, 22 Oct 2012 12:49:27 +0000 (16:49 +0400)]
LU-1684 ldlm: move ldlm flags not sent through wire to upper 32bits

there is no empty bit for a LDLM_FL_* flag in lower 32bits, i.e. which needs
to be sent through wire. move locally used flags to upper 32bits to free some
bits.

Change-Id: Iddaff0a75b19d7311800d2ac6c3fef1012b9ffd2
Reviewed-by: Alexander Zarochentsev <Alexander_Zarochentsev@xyratex.com>
Reviewed-by: Andrew Perepechko <Andrew_Perepechko@xyratex.com>
Xyratex-Bug-ID: MRP-541
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-on: http://review.whamcloud.com/3494
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-2235 lfsck: remove unnecessary warning message
Fan Yong [Sat, 3 Nov 2012 02:34:40 +0000 (10:34 +0800)]
LU-2235 lfsck: remove unnecessary warning message

Currently, the new online LFSCK does not work for ZFS backend,
but it is neither fatal nor block the mount processing.
So remove those unnecessary warning message.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I106a6b5c978cde8695821776570c30605f03c400
Reviewed-on: http://review.whamcloud.com/4452
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
11 years agoLU-1199 build: Remove ancient "nonfree" module support
Christopher J. Morrone [Tue, 30 Oct 2012 02:54:49 +0000 (19:54 -0700)]
LU-1199 build: Remove ancient "nonfree" module support

Lustre doesn't have any "nonfree" kernel modules, and the code to
support "nonfree" was from 2005.  I think we can remove it now.

Change-Id: I790d170fabdc5cd6e4948f20ccca2a6bfdd1bc29
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4408
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1199 build: Remove duplicate LC_MODULE_LOADING
Christopher J. Morrone [Tue, 30 Oct 2012 02:43:07 +0000 (19:43 -0700)]
LU-1199 build: Remove duplicate LC_MODULE_LOADING

It appears that LC_MODULE_LOADING was accidentally declared twice
back-to-back in the same file.  This removes the first declaration
on the assumption that if my eye-balling of the code missed a
difference, the second one is the one we've been using anyway.

Change-Id: I04a9da80d6be7bef6e4fd35eca8f3e490a8a824f
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4407
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1729: lu_buf code cleaning
jcl [Thu, 9 Aug 2012 21:29:05 +0000 (23:29 +0200)]
LU-1729: lu_buf code cleaning

Fix DLUBUF define and use LU_BUF_NULL to clear a lu_buf

Change-Id: I742308616d9c39196e56bf4983523152d26e1245
Signed-off-by: jcl <jacques-charles.lafoucriere@cea.fr>
Reviewed-on: http://review.whamcloud.com/3589
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1714 lnet: Properly initialize sg_magic value
Prakash Surya [Fri, 17 Aug 2012 16:11:32 +0000 (09:11 -0700)]
LU-1714 lnet: Properly initialize sg_magic value

When the CONFIG_DEBUG_SG flag is enabled in the kernel, we must ensure
the sg_magic field is properly initialized. Otherwise, internal kernel
assertions will fail when trying to verify this field. As a result,
certain calls to sg_* function had to be changed or inserted to ensure
the sg_init_table function would be called, initializing the magic
value. Also, we need to ensure this value isn't zeroed out in the
kiblnd_setup_rd_kiov function.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Change-Id: I5b6b265a4a8dd37408bb78decd79ed54e0f9251b
Reviewed-on: http://review.whamcloud.com/3709
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1840 ldlm: fix mutex leak in ldlm_resource_get
Peng Tao [Thu, 6 Sep 2012 03:08:51 +0000 (11:08 +0800)]
LU-1840 ldlm: fix mutex leak in ldlm_resource_get

We created resource with lr_lvb_mutex locked. Need to drop
it before returning.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Id81f792605d864b9d3236498f063d6c003d8cd77
Reviewed-on: http://review.whamcloud.com/3883
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1951 mdd: fix for error handler of mdd_rename
Liang Zhen [Fri, 5 Oct 2012 12:16:19 +0000 (20:16 +0800)]
LU-1951 mdd: fix for error handler of mdd_rename

If mdd_rename() failed to unlink target file/dir, it will try to
revert everything including insert target file/dir back into target
directory, but it didn't restore nlink count of target, which will
leave a file/dir under target directory with wrong nlink number.

Another thing is fixed by this patch is, mdd_attr_check_set_internal()
didn't release mdd_write_lock() while jumping to error handler.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I601f0569de87b71d032f86ed1082c27d5bf5adaf
Reviewed-on: http://review.whamcloud.com/4405
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1337 llite: provides ll_get_acl to ->i_op->get_acl
Liu Xuezhao [Tue, 30 Oct 2012 08:52:55 +0000 (16:52 +0800)]
LU-1337 llite: provides ll_get_acl to ->i_op->get_acl

Since kernel 3.1 generic_permission() has lost the check_acl
argument, ACL checking has been taken to VFS and filesystems
need to provide a non-NULL ->i_op->get_acl to read an ACL
from disk.

This patch is a complementarity to http://review.whamcloud.com/3397
(d018b087c962b8c66e8dc479fc66e964a2e5fd94), to fix failure of test_25
of sanityn.sh.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: Ica96adac03c1792e2e8b668b959457a4ffec9a43
Reviewed-on: http://review.whamcloud.com/3885
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1337 llite: kernel 3.1 changes open_to_namei_flags
Liu Xuezhao [Tue, 30 Oct 2012 08:45:48 +0000 (16:45 +0800)]
LU-1337 llite: kernel 3.1 changes open_to_namei_flags

Kernel 3.1 changes the translation from open_flag to namei_flag,
(kernel commit 8a5e929dd2e05ab4d3d89f58c5e8fca596af8f3a).

So after 3.1, kernel's nameidata.intent.open.flags is different
with lustre's lookup_intent.it_flags, as lustre's it_flags'
lower bits equal to FMODE_xxx while kernel doesn't transliterate
lower bits of nameidata.intent.open.flags to FMODE_xxx.

This patch keeps lustre it_flags' semantics and add
ll_namei_to_lookup_intent_flag for translation.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I408685040688bae574d04cf288abb6ca967607df
Reviewed-on: http://review.whamcloud.com/3583
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-930 utils: minor fixes to lfs_migrate.1 man page
Andreas Dilger [Thu, 1 Nov 2012 21:50:16 +0000 (15:50 -0600)]
LU-930 utils: minor fixes to lfs_migrate.1 man page

Fix the formatting of the lfs_migrate.1 man page SYNOPSIS section,
since ".Blfs_migrate" is not the same as ".B lfs_migrate", and hence
the synopsis was missing the actual name of the command it described.

Also fix some minor grammar issues.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie0d8e3cd6fbab0663562b6a99f124ead953ebbe5
Reviewed-on: http://review.whamcloud.com/4440
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1279 utils: Silence modprobe ptlrpc output in mount.lustre
Oleg Drokin [Fri, 2 Nov 2012 18:52:07 +0000 (14:52 -0400)]
LU-1279 utils: Silence modprobe ptlrpc output in mount.lustre

Patch d8d9b78a5c08eb1d938ab9e3bdaf7f756bfbb5ec introduced
this modprobe, but order of redirects was reversed which results
in printing spurios messages like "FATAL: Module ptlrpc not found."
when mountig lustre from local build dir.

Change-Id: I688d073ad3b0565f73c29a50c2b81383adfd7a48
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4449
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-928 fid: add comments describing different FIDs
Andreas Dilger [Wed, 26 Sep 2012 09:29:26 +0000 (11:29 +0200)]
LU-928 fid: add comments describing different FIDs

Add comments to the code describing various FID types, from
http://wiki.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I325b48a0e85fb25ed8c3a3709e623978969d8d4a
Reviewed-on: http://review.whamcloud.com/4102
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Ned Bass <bass6@llnl.gov>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1337 llite: kernel 3.1 kills inode->i_alloc_sem
Liu Xuezhao [Thu, 27 Sep 2012 06:20:25 +0000 (14:20 +0800)]
LU-1337 llite: kernel 3.1 kills inode->i_alloc_sem

Kernel 3.1 kills inode->i_alloc_sem, use i_dio_count and
inode_dio_wait/inode_dio_done instead.
(kernel commit bd5fe6c5eb9c548d7f07fe8f89a150bb6705e8e3).

Add HAVE_INODE_DIO_WAIT to differentiate it.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: Ife36e07a85c76153985a4a86ee1973262c4c0e27
Reviewed-on: http://review.whamcloud.com/3582
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
11 years agoLU-2153 quota: several fixes for reintegration
Niu Yawei [Tue, 16 Oct 2012 02:48:03 +0000 (22:48 -0400)]
LU-2153 quota: several fixes for reintegration

- On master side, never delete the id entry from the global/slave
  index, otherwise, those deleted entries will not be transfered
  during reintegration, and improved test_7a for this change;
- When start reintegration thread, if there is any pending
  updates, abort and try to start reintegration later;
- Set rq_no_retry_einprogress for quota request;
- When master found quota acquire for not enforced ID, return
  -ESRCH to slave instead of -EINPROGRESS;
- Check free inodes in test_2;

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I64037f6aff6be686250272eda53c027bf5ba47c2
Reviewed-on: http://review.whamcloud.com/4275
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
11 years agoLU-1337 build: remove unnecessary includings of system.h
Liu Xuezhao [Tue, 30 Oct 2012 09:12:11 +0000 (17:12 +0800)]
LU-1337 build: remove unnecessary includings of system.h

<asm/system.h> is removed in kernel 3.4, and it is indeed not needed.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: Ic4d0a086656c5dfb05669aae40680b41e8ea00c7
Reviewed-on: http://review.whamcloud.com/3575
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1994 kernel: v3.5 defines INVALID_UID
Peng Tao [Wed, 22 Aug 2012 08:55:22 +0000 (16:55 +0800)]
LU-1994 kernel: v3.5 defines INVALID_UID

With kernel commit 7a4e7408, Lustre doesn't need to redefine
INVALID_UID.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I96b854cc51db735d8c985528c879fbeb5b049ab9
Reviewed-on: http://review.whamcloud.com/3755
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1337 osc: fix -Werror=unused-result
chas williams - CONTRACTOR [Tue, 14 Aug 2012 14:42:25 +0000 (10:42 -0400)]
LU-1337 osc: fix -Werror=unused-result

Newer Fedora kernels build using -Werror=unused-result.  It appears
that GOTO() isn't correctly assigning rc in this instance.  The
unused PTR_ERR() is generating warning which is upgraded to an error.

Signed-off-by: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Change-Id: I66d730d4d0e20f0f1c7671dc00acefdf7ed1fbe9
Reviewed-on: http://review.whamcloud.com/3638
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-845 tests: automate large LUN testing
Wei3 Liu [Tue, 30 Oct 2012 21:42:56 +0000 (14:42 -0700)]
LU-845 tests: automate large LUN testing

a. run llverdev on the raw device to verify there is no driver issue
b. run llverfs on OST ldiskfs filesystem
c. use up free inodes on the OST with mdsrate
d. run llverfs on lustre filesystem

Change-Id: I021009647d2053fa53cff1067f8f2bc83d12ce45
Signed-off-by: Wei Liu <sarah@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1700
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
11 years agoLU-1279 utils: mount.lustre load ptlrpc module if necessary
Bobi Jam [Thu, 18 Oct 2012 10:10:09 +0000 (18:10 +0800)]
LU-1279 utils: mount.lustre load ptlrpc module if necessary

When LNET modules have not loaded, and mounting multiple targets at
the same time could fail. Use mount.lustre to load the network modules
if necessary.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I9d7a4007cc5b233055a4a985237b01ff0874cf54
Reviewed-on: http://review.whamcloud.com/4292
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>