Whamcloud - gitweb
fs/lustre-release.git
12 years agoLU-985 lprocfs: verify user buffer access
Bobi Jam [Fri, 13 Jan 2012 05:46:07 +0000 (13:46 +0800)]
LU-985 lprocfs: verify user buffer access

In lprocfs_xxx_evict_client(), need verify user's buffer when access
it.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I702e22f8d432edce200c6d91a0af8a1eac792008
Reviewed-on: http://review.whamcloud.com/1961
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-717 ldiskfs: MRP-222 Replace sysname with nodename in MMP
Nikitas Angelinas [Mon, 5 Dec 2011 22:31:12 +0000 (22:31 +0000)]
LU-717 ldiskfs: MRP-222 Replace sysname with nodename in MMP

sysname holds "Linux" by default, i.e. what appears when doing a
"uname -s"; nodename should be used to print the machine's hostname,
i.e. what is returned when doing a "uname -n" or "hostname", and what
gethostname(2)/sethostname(2) manipulate, in order to notify the
administrator of the node which is contending to mount the
filesystem.

Andreas says this was introduced when porting the MMP patches from
RHEL5 to RHEL6, and then also pushed upstream to ext4; a patch for
upstream ext4 has already been submitted.

Signed-off-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Change-Id: I207bf145d114a9981b5a6add4bbf92ca76f71840
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-on: http://review.whamcloud.com/1419
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
12 years agoLU-427 test: Test failure on test suite lfsck
yangsheng [Thu, 4 Aug 2011 03:36:23 +0000 (11:36 +0800)]
LU-427 test: Test failure on test suite lfsck

- Reset $MDSDB & $OSTDB in generate_db(). Else they will
  stale if user redefine $SHARED_DIRECTORY.
- Add a function check_shared_dir() to ensure
  $SHARED_DIRECTORY is shared among tests nodes.

Change-Id: Idf2a3d75e46c4cf768419adfea627511c24c495c
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1180
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-81 deadlock of changelog adding vs. changelog cancelling
Niu Yawei [Thu, 18 Aug 2011 04:22:19 +0000 (21:22 -0700)]
LU-81 deadlock of changelog adding vs. changelog cancelling

This is a workaround for the deadlock of changelog adding vs.
changelog cancelling. Changelog adding always start transaction
before acquiring the catlog lock(lgh_lock), whereas, changelog
cancelling do start transaction after holding the catlog lock.

We start transaction earlier to avoid above deadlock.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I9647b9a559f68a27dc0d4b4885857d3cf73b5b8e
Reviewed-on: http://review.whamcloud.com/1260
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-759 mdc: Clear rq_replay on error in mdc_enqueue()
Li Wei [Fri, 30 Sep 2011 08:30:09 +0000 (16:30 +0800)]
LU-759 mdc: Clear rq_replay on error in mdc_enqueue()

When mdc_enter_request() fails (e.g., due to signals) in mdc_enqueue(),
the request is freed without any care about its rq_replay field.  For
rq_replay requests, this results in assertion failures in
__ptlrpc_free_req().  This patch adds a call to mdc_clear_replay_flag()
to make sure __ptlrpc_free_req()'s assumption is respected.

Change-Id: I2185066a9f47b3d9563d9e1a8989754ef2e2dcb4
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1518
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-543 mdd: fix rename changelog
Niu Yawei [Sat, 5 Nov 2011 05:21:12 +0000 (22:21 -0700)]
LU-543 mdd: fix rename changelog

Current rename changelog stores source fid in both CL_RENAME & CL_EXT
records, which is redundant, and the 'tfid' in CL_EXT is never been
used.

Actually, we'd store target fid in the CL_EXT record, then application
could detect the fid unlinked by rename in changelog.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I0c616f813657a2faefa60a707f4fc1d9dc971b39
Reviewed-on: http://review.whamcloud.com/1652
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-542 Fix mdt xattr handler logic error
Bobi Jam [Thu, 28 Jul 2011 14:12:38 +0000 (22:12 +0800)]
LU-542 Fix mdt xattr handler logic error

Record system ACL and user xattr change/deletion changelog.

Change-Id: I5aabf1879ec6e812361fe0d1b8255f84d0e817d6
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1158
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-935 quota: break early when b/i_unit_sz exceeded upper limit
Niu Yawei [Mon, 19 Dec 2011 10:18:28 +0000 (02:18 -0800)]
LU-935 quota: break early when b/i_unit_sz exceeded upper limit

While expanding b/i_unit_sz in dquot_create_oqaq(), we'd break the loop
early when the b/i_unit_sz exceeded upper limit, otherwise, qaq_b/iunit_sz
could be overflow and result in endless loop.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I0bf069e9259627426d7a87ec42844eaed7a733b4
Reviewed-on: http://review.whamcloud.com/1890
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-931 mdd: store lu_fid instead of pointer in md_capainfo
Hongchao Zhang [Tue, 17 Jan 2012 04:10:25 +0000 (12:10 +0800)]
LU-931 mdd: store lu_fid instead of pointer in md_capainfo

in md_capainfo, mc_fid contains at most 5 pointers to lu_fid,
and if the corresponding lu_fid is freed, the pointer isn't notified
about it, then the pointer will point to freed memory!

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: I00088cbfeb145ceac0477467a8b2436f6cf1e530
Reviewed-on: http://review.whamcloud.com/1979
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1218 proc: Recovery timer in proc always displays 0
yangsheng [Thu, 15 Mar 2012 16:18:29 +0000 (00:18 +0800)]
LU-1218 proc: Recovery timer in proc always displays 0

Calculate remain recovery time for proc display.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I50c14859c704c7e2bc60b66b3d70350648feebb6
Reviewed-on: http://review.whamcloud.com/2334
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-952 quota: follow locking order of quota code
Niu Yawei [Fri, 6 Jan 2012 09:18:35 +0000 (01:18 -0800)]
LU-952 quota: follow locking order of quota code

The locking order of quota code is: i_mutex > dqonoff_sem >
journal_lock > dqptr_sem > dquot->dq_lock > dqio_mutex, so we
should call the ll_vfs_dq_init() after journal started to avoid
deadlock.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ia88a2eb8c9dc3827afd4828e0160ee376a1f041e
Reviewed-on: http://review.whamcloud.com/1923
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-805 quota: lfs quota doesn't print grace time correctly
Niu Yawei [Tue, 8 Nov 2011 13:07:05 +0000 (05:07 -0800)]
LU-805 quota: lfs quota doesn't print grace time correctly

Lustre always trigger grace time when the allocated qunit exceeding
softlimit, however, user tools 'lfs quota' only print grace time
when the total usage greater than softlimit, so sometimes user can't
tell if the softlimit is already exceeded from 'lfs quota' output.

This patch changes the 'lfs quota' to use the data get from kernel
instead of comparing usage with softlimit.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ia564c803ca33b2cf925759b6a6e4e4df2692f28d
Reviewed-on: http://review.whamcloud.com/1674
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-78 o2iblnd: kiblnd_check_conns can deadlock
Liang Zhen [Tue, 21 Feb 2012 04:40:25 +0000 (12:40 +0800)]
LU-78 o2iblnd: kiblnd_check_conns can deadlock

kiblnd_check_conns() called kiblnd_check_sends() with hold of global
rwlock, it's wrong because kiblnd_check_sends() could do many things:
 - call lnet_finalize() which is not safe with hold of spinlock
 - call kiblnd_close_conn() which requires to write_lock the same
   global lock
 - kiblnd_check_sends() might need to allocate NOOP message

It can be fixed by moving call of kiblnd_check_sends out from spinlock
This patch is from the fix of Bug 20288, with some small changes.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Icc9fedc70ecb25b0c41ebaf6d80c971f8281c9c6
Reviewed-on: http://review.whamcloud.com/2166
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-651 osc: suppress message in can_merge_pages()
Bobi Jam [Sun, 2 Oct 2011 08:08:56 +0000 (16:08 +0800)]
LU-651 osc: suppress message in can_merge_pages()

Thottle messages if adjacent brw pages are not mergeable with
different OBD_BRW_NOQUOTA flags.

Change-Id: I22ce6f8807e2541d3e6b3c9631f60faa36baa81a
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1328
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1212 ptlrpc: ptlrpc_grow_req_bufs is racy
Liang Zhen [Wed, 14 Mar 2012 04:41:08 +0000 (12:41 +0800)]
LU-1212 ptlrpc: ptlrpc_grow_req_bufs is racy

multiple ptlrpc service threads can enter ptlrpc_grow_req_bufs()
the same time if they found "low_water" in ptlrpc_check_rqbd_pool(),
each of these threads will allocate ptlrpc_service::srv_nbuf_per_group
request buffers and could consume all memory.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I83d6fe53a0f86691ae7e2afb3d75fb8677f58688
Reviewed-on: http://review.whamcloud.com/2308
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
12 years agoLU-960 utils: bad stripe count report, and validate stripe size
Minh Diep [Tue, 7 Feb 2012 17:12:58 +0000 (09:12 -0800)]
LU-960 utils: bad stripe count report, and validate stripe size

Need to use %d to print -1 instead of %u
Need to check for -1 in input for stripe size

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: Ic4ee84a45bdb5dc934a3e681a4fc2fcd51f14b99
Reviewed-on: http://review.whamcloud.com/2112
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-106 procfs: many proc entries are not accessed safely
Lai Siyao [Mon, 13 Jun 2011 03:56:03 +0000 (20:56 -0700)]
LU-106 procfs: many proc entries are not accessed safely

Some in memory data may be released/uninitialized at the time
of proc entry creation/removal, this patch includes the following
fixes:
* initialize data before proc entry creation
* free data after proc entry removal
* free proc entries in obd_precleanup() because
  obd_uuid/nid/nid_stats_hash are released in class_cleanup().
* free proc entries after obd_zombie_barrier() because obd_export
  hold one refcound of nid_stat.
* check osd->od_mount before accessing osd proc entries because the
  osd proc entries are created before mount.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I03cb977e1be0747032a70f6a39fec804f81d70cc
Reviewed-on: http://review.whamcloud.com/326
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1109 llite: do splice read stripe by stripe
Jinshan Xiong [Thu, 23 Feb 2012 19:57:54 +0000 (11:57 -0800)]
LU-1109 llite: do splice read stripe by stripe

If nfsd is reading an across stripe buffer, and if the first stripe
happens to be 64KB(PIPE_BUFFERS*PAGE_SIZE), then first read will
occupy all pipe buffers and this makes nfsd stuck if it reads the
next stripe immediately.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I13cb54b37f738ee3c081dff1929630ea523b77fd
Reviewed-on: http://review.whamcloud.com/2182
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1050 o2iblnd: fix checking order of rdma_create_id() argument
Shuichi Ihara [Mon, 13 Feb 2012 16:47:38 +0000 (01:47 +0900)]
LU-1050 o2iblnd: fix checking order of rdma_create_id() argument

Replace rdma_create_id() with rdma_destroy_id() in
openib gen2 test and four argument check moves to
the back of openib test.

Signed-off-by: Shuichi Ihara <sihara@ddn.com>
Change-Id: I0782183f15f58647291518a4222610601083c369
Reviewed-on: http://review.whamcloud.com/2097
Tested-by: Hudson
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-1125 recovery: initial recovery thread's watchdog
Bobi Jam [Wed, 22 Feb 2012 06:30:41 +0000 (14:30 +0800)]
LU-1125 recovery: initial recovery thread's watchdog

Recovery thread does not have watchdog attached, correctly initialize
it.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I6993c39bbf18f47e9ccd965a5d2ba1919cfb7736
Reviewed-on: http://review.whamcloud.com/2174
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1128 ldlm: return -1 for server pool shrinker
Niu Yawei [Fri, 24 Feb 2012 05:21:51 +0000 (21:21 -0800)]
LU-1128 ldlm: return -1 for server pool shrinker

For ldlm server pool shrinker, we just use it to decrease SLV,
but never reclaim any memory directly, so it should always return
-1 to inform the kernel to break the shrink loop.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I17f51ac84eb0b8c70b2cee9ac7eeca34647c1990
Reviewed-on: http://review.whamcloud.com/2184
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-882 quota: Quota code compares unsigned < 0
Niu Yawei [Mon, 19 Dec 2011 10:01:36 +0000 (02:01 -0800)]
LU-882 quota: Quota code compares unsigned < 0

Port from b23858.

In check_cur_qunit(), it checks "if (limit + record < 0)", however,
the limit is unsigned, so this check will be always false, and when
limit is smaller than -record, following "limit += record" will make
limit a unreasonable large value.

This patch also fixed a similar defect in dqacq_handler().

Signed-off-by: Vladimir Saveliev <vladimir.saveliev@oracle.com>
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Iea02143dae5542f1a9f9cc823a684a18031b8a03
Reviewed-on: http://review.whamcloud.com/1889
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-617 recovery: setattr from open breaks recovery
Niu Yawei [Fri, 26 Aug 2011 02:58:36 +0000 (19:58 -0700)]
LU-617 recovery: setattr from open breaks recovery

The setattr from open(open(O_TRUNC)) is now serialized with
'cl_setattr_lock' on client and goes to a dedicate portal, which is
different with other reint operations, consequently, setattr RPC
can be parallel with other reint RPCs, and that result in the race of
updating last_transno/last_xid on server.

This patch removed the 'cl_setattr_lock' stuff to make all the reint
operations serialized by 'cl_rpc_lock', and the code on server side
which assumes client is holding DLM lock when setattr from open is also
removed, since it's not true.

The MDS_SETATTR_PORTAL service is preserved to keep the compatibility
with old client, and the MDS_SETATTR_FROM_OPEN is also preserved, since
we are using this flag to check write access for open(O_TRUNC), and
it probably can be used for some optimization purpose in future.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I45f83f8f05022ff0d31f8e7784381821c835785d
Reviewed-on: http://review.whamcloud.com/1654
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
12 years agoLU-1198 idl: move FID VER to DLM resource name[1]
Andreas Dilger [Thu, 8 Mar 2012 07:29:09 +0000 (15:29 +0800)]
LU-1198 idl: move FID VER to DLM resource name[1]

Until Lustre 1.8.7/2.1.1 the FID version was packed into name[2].

However, this leaves very little room in the LDLM resource name
for other uses.  The upcoming quota code needs to store another
FID into the LDLM resource to allow directory tree quotas, and
managed by the DLM.

The 32-bit VER, which is currently always 0, is moved into the high
bits of name[1] along with the 32-bit OID, to avoid consuming the
name[2] field.  Since future use of the FID version (including
snapshots, pools, etc) will need changes on the client side anyway,
there will never be non-zero VER on an existing client.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: If1e500cfb277dfc25bc056bb0c5763e48e7dcab0
Reviewed-on: http://review.whamcloud.com/2288
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-620 llite: add delete/remove_from_page_cache check
Bobi Jam [Wed, 21 Sep 2011 10:17:13 +0000 (18:17 +0800)]
LU-620 llite: add delete/remove_from_page_cache check

Later 2.6.32 kernel use memory cgroup feature but does not export
truncate_complete_page but export delete_from_page_cache or
remove_from_page_cache, we need properly use them for pachless client
code.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I33e3e7c32b548866ee77753ef8a8193c814d0ecb
Reviewed-on: http://review.whamcloud.com/2230
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1049 script: lc_net doesn't parse output correctly
Minh Diep [Mon, 6 Feb 2012 23:37:10 +0000 (15:37 -0800)]
LU-1049 script: lc_net doesn't parse output correctly

Port the second fix from bz=23234
The output of ping contains two ip addresses. The regex
matching picks up both addresses. The fix is to add
-m 1 to stop at the first match
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: Iaefe42918b4587f88a8a0cb39cf9afb2a82021ba
Reviewed-on: http://review.whamcloud.com/2105
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: hongchao.zhang <hongchao.zhang@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
12 years agoLU-874 ldlm: Fix ldlm_bl_* thread creation
Jinshan Xiong [Fri, 3 Feb 2012 19:12:46 +0000 (11:12 -0800)]
LU-874 ldlm: Fix ldlm_bl_* thread creation

Always create a new ldlm_bl_ thread when all threads
are busy, not just after returning from sleep.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: Ife23dd09694e26d11d49572bc8bb0a2c0b2d3eee
Reviewed-on: http://review.whamcloud.com/2088
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-874 osc: prioritize writeback pages
Jinshan Xiong [Fri, 3 Feb 2012 19:11:37 +0000 (11:11 -0800)]
LU-874 osc: prioritize writeback pages

When a lock is being canceled, we should prioritize those covering
pages which have already been submitted by page writeback daemon;
otherwise, this client may be evicted because there is no active IO
for that lock for a long time.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I2f914df0204375a51f4a7565a75640e9bb3c6d19
Reviewed-on: http://review.whamcloud.com/2087
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-874 ldlm: prioritize LDLM_CANCEL requests
Jinshan Xiong [Fri, 3 Feb 2012 19:10:55 +0000 (11:10 -0800)]
LU-874 ldlm: prioritize LDLM_CANCEL requests

If a lock canceling request has already reached server, there is no
reason of evicting the client when the waiting list times out.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: If87b3b321feb97f5755840a0901e747afd8bb32c
Reviewed-on: http://review.whamcloud.com/2086
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-874 ptlrpc: handle in-flight hqreq correctly
Jinshan Xiong [Fri, 3 Feb 2012 19:15:02 +0000 (11:15 -0800)]
LU-874 ptlrpc: handle in-flight hqreq correctly

If there are in-flight requests pending, we shouldn't timeout the
covering dlm locks; neither should we remove the requests from export
exp_hp_rpcs list until the requests are handled.

In this patch, the following things are improved:
1. leave IO rpcs in export's hp list until they are handled;
2. using interval tree to find rpc overlapped locks;
3. refresh the lock again after IO rpcs are finished to leave a time
   window for clients to cancel covering dlm locks;
4. rework repbody in ost_handler.c so as to not modify original obdo
5. cleanup the code.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I22873187aa6fdb28e95173dc0be9f992a54bbb9e
Reviewed-on: http://review.whamcloud.com/2085
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-983 llite: align readahead to 1M after ra_max adjustment
wangdi [Mon, 5 Mar 2012 19:44:34 +0000 (11:44 -0800)]
LU-983 llite: align readahead to 1M after ra_max adjustment

1. Align the readahead pages only if ria_start != 0, otherwise
   the readahead pages will be cut to zero.
2. Add test_101e to verify small reads for small size files.
   Add test_101f to verify max_read_ahead_whole_mb.
3. Port 101c from b1_8

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I8b31621f5b48c3bc98f8d888f91d65b945c51999
Reviewed-on: http://review.whamcloud.com/2260
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1029 build: build ofed 1.5.4 with qlgc_vnic failed
Minh Diep [Tue, 7 Feb 2012 16:40:33 +0000 (08:40 -0800)]
LU-1029 build: build ofed 1.5.4 with qlgc_vnic failed

Ofed failed to include proper header files to support
qlgc_vnic. Since we are not using ib on vnic in the lab,
we'll remove it

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I016fa4cc764fe163449229953631a76ef3b49b14
Reviewed-on: http://review.whamcloud.com/2111
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Michael MacDonald <mjmac@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1120 kernel: kernel update [RHEL6.2 2.6.32-220.4.2]
yangsheng [Mon, 27 Feb 2012 17:42:49 +0000 (01:42 +0800)]
LU-1120 kernel: kernel update [RHEL6.2 2.6.32-220.4.2]

Update RHEL6.2 kernel to 2.6.32-220.4.2.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I08a96bbf2ac3eeaaa9db13998531935a92d85fe7
Reviewed-on: http://review.whamcloud.com/2215
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1052 kernel: Kernel update [RHEL5.7 2.6.18-274.18.1.el5]
yangsheng [Tue, 31 Jan 2012 14:27:38 +0000 (22:27 +0800)]
LU-1052 kernel: Kernel update [RHEL5.7 2.6.18-274.18.1.el5]

Update RHEL5.7 kernel to 2.6.18-274.18.1.el5.

Signed-off-by: Yang Sheng <ys@whamcloud.com>
Change-Id: Ie8439a864ec4ffdda7104ec1f2fd92fef3af2d0b
Reviewed-on: http://review.whamcloud.com/2069
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-143 fid hash improvements
Liang Zhen [Tue, 29 Mar 2011 08:44:41 +0000 (16:44 +0800)]
LU-143 fid hash improvements

Current hash function of fid is not good enough for lu_site and
ldlm_namespace.
We have to use two totally different hash functions to hash fid into
hash table with millions of entries.

Change-Id: I6261e63a406118a93d578210c31e67fc7f9e389c
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/374
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoTag 2.1.1rc3 2.1.1 2.1.1-RC4 v2_1_1_0 v2_1_1_0_RC4
Oleg Drokin [Fri, 17 Feb 2012 06:21:21 +0000 (01:21 -0500)]
Tag 2.1.1rc3

Signed-off-by: Oleg Drokin <green@whamcloud.com>
Change-Id: Ib1e74c23a0747526179d0904a03d3e4fa1c3b50a

12 years agoLU-1091 fix the tag matching code in configure
Brian J. Murrell [Fri, 10 Feb 2012 20:27:04 +0000 (15:27 -0500)]
LU-1091 fix the tag matching code in configure

Signed-off-by: Brian J. Murrell <brian@whamcloud.com>
Change-Id: I24dd4d0929364a2012afe725586626328ea584c0
Reviewed-on: http://review.whamcloud.com/2129
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-966 mdd: revert commit and use original patch
Mikhail Pershin [Wed, 15 Feb 2012 08:39:53 +0000 (12:39 +0400)]
LU-966 mdd: revert commit and use original patch

Use original patch which replaces LASSERT with CERROR in MDD,
because checking object exists in MDT ruins VBR recovery.
It happens too early but VBR should check that too before reply
to the client.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: If31586c9d1cc86c4c8059a7227c231acdc82a0f1
Reviewed-on: http://review.whamcloud.com/2148
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Yu Jian <yujian@whamcloud.com>
12 years agoLU-769 ptlrpc: Do not miss pending signals in ptlrpc_set wait
Oleg Drokin [Mon, 7 Nov 2011 03:34:41 +0000 (22:34 -0500)]
LU-769 ptlrpc: Do not miss pending signals in ptlrpc_set wait

conf_sanity test 23a highlighted a problem in ptlrpc_set_wait logic,
if we enter there with a signal pending and the import is not FULL,
there is no way to interrupt such a set because we block signals
all the time. Enabling signals all the time is not an option either.
Waiting until import reconnects is questionable too since it might
never come up after all (like in the test 23a).
So for the solution we will just manually mark the set as interrupted
after the initial wait.

Change-Id: Iaa3e356e971b4f75fd7f21cc579c85f7487719a0
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1657
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
12 years agoLU-820 Increase LU_CDEBUG_LINE so that osc page messages fit.
Oleg Drokin [Thu, 3 Nov 2011 03:41:09 +0000 (23:41 -0400)]
LU-820 Increase LU_CDEBUG_LINE so that osc page messages fit.

LU_CDEBUG_LINE at 255 does not quite fit osc-page message out of
osc_page_print that is quite long.
As a result we get annoying "does not end in newline" console messages
when this happens.

Doubling LU_CDEBUG_LINE certainly should be enough.

Change-Id: Iec8635d6578e192d3b33643c4b1dab1dae2be6b4
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1642
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-778 o2iblnd: Add rdma_create_id() compatibility macro 2.1.1-RC2 v2_1_1_0_RC2
Ned Bass [Wed, 19 Oct 2011 21:47:50 +0000 (14:47 -0700)]
LU-778 o2iblnd: Add rdma_create_id() compatibility macro

As of RHEL6.2 kernel 2.6.32-204.el6, rdma_create_id() requires a
queue-pair type as a fourth argument.  This was previously inferred
from the rdma_port_space argument.  Add an autoconf test to detect
whether the fourth argument is expected and a compatibility macro
that discards the QP type argument if the 3-argument version of
rdma_create_id() is present.

Change-Id: Idb668e1f059954ecc994ad59b366d54da8b82dc8
Signed-off-by: Ned Bass <bass6@llnl.gov>
Reviewed-on: http://review.whamcloud.com/1556
Tested-by: Hudson
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoUpdate version to 2.1.1(rc1) 2.1.1-RC1 v2_1_1_0_RC1
Oleg Drokin [Thu, 9 Feb 2012 00:56:41 +0000 (19:56 -0500)]
Update version to 2.1.1(rc1)

Change-Id: I4ac4d6a0701bc6217f968fe68fe3b2c5bb7cd341
Signed-off-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-797 tests: speed up ost-pools tests
Andreas Dilger [Thu, 26 Jan 2012 12:39:06 +0000 (05:39 -0700)]
LU-797 tests: speed up ost-pools tests

The test time of the ost-pools subtests is unreasonably long.

test_14 fills an OST to 90% full, regardless of the OST size.
Skip the test if the amount of data to be written is too large
to run in a practical time.

test_18 creates 3x3x30000 files to compare performance with/without
pools enabled.  Instead of creating a fixed number of files, use
createmany to run for a specific (short) time to measure performance.

test_23 tried to fill all OSTs 100% full.  Split this test into two:
- test_23a to test quota with a file in a pool
- test_23b to test OOS with a file striped over pool

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ib851939a210ab68f52da1ac777781c2a922c500c
Reviewed-on: http://review.whamcloud.com/2028
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-322 tests: Pool test fixes for large number of OSTs
James Simmons [Wed, 30 Nov 2011 15:07:18 +0000 (10:07 -0500)]
LU-322 tests: Pool test fixes for large number of OSTs

This patch fixes issues with large numbers of OSTs with the
ost-pools test. We need to use the hexidecimal numbers for
the pool args since the OSTs UUID are named with hex numbers.
Curently the test do pass but errors can be seen in the logs
when more than 9 OSTs exist.

Change-Id: I2bed80a1c55fc7cd405dc530876ef517a380c423
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/251
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
12 years agoLU-760 obdecho: initialization and awk problem
Jinshan Xiong [Thu, 13 Oct 2011 23:27:08 +0000 (16:27 -0700)]
LU-760 obdecho: initialization and awk problem

echo_client registers obd type and then initializes kmem cache, this is
problematic because echo_key will be immidiately accessed after obd type
is registered. This will cause kernel fault.

Also, an awk problem is fixed. If the length of output buffer is longer
than 1024 bytes, awk will run into problem.

Change-Id: Ief287e8f4eeb6a39bc336e7a9f5c21e921b79a58
Signed-off-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1521
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-966 mdd: mdd object may not be exist
Bobi Jam [Mon, 9 Jan 2012 10:23:41 +0000 (18:23 +0800)]
LU-966 mdd: mdd object may not be exist

If MDT device has been checked with fsck, some mdd objects
could be removed, so that recovery replay could act on non-existing
objects.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: If3a3b72ee70ab2513978ed968c9598ddde11c085
Reviewed-on: http://review.whamcloud.com/1928
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
12 years agoLU-1042 ost: revert negative timestamp initialization
Oleg Drokin [Mon, 30 Jan 2012 00:27:20 +0000 (19:27 -0500)]
LU-1042 ost: revert negative timestamp initialization

This reverts commit 414251797ed178eec5d431e1f5aa4a889d2b159f from

"LU-221 don't use a/c/m time for newly allocated objects",
because it caused 1.8 clients to think that these files had
a time in the distant past.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-919 obdclass: remove hard coded 0x5a5a5a
Niu Yawei [Wed, 11 Jan 2012 03:59:10 +0000 (19:59 -0800)]
LU-919 obdclass: remove hard coded 0x5a5a5a

We assert atomic_t value with hard coded 0x5a5a5a in several places,
which could result in false assertion failure when the reference count
getting very large in some extreme case.

The hard coded 0x5a5a5a should be replaced by LI_POISON.

Signed-off-by: Bruno Faccini <bruno.faccini@bull.net>
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Idc271621017d071b3e2dce5d0ec6fb854127a955
Reviewed-on: http://review.whamcloud.com/1953
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-987 build: Fail to create ldisk rpms
James Simmons [Fri, 13 Jan 2012 16:11:29 +0000 (11:11 -0500)]
LU-987 build: Fail to create ldisk rpms

The autoMakefile.am in ldsikfs does not define the
BUILD_SERVER flag so make rpms fails. This patch
simply set the flag to true since ldiskfs will most
likely be used only on servers

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I51e31d1ce0fd1d7e8639426852af1888a9a93f4f

12 years agoLU-955 build: fix bad lustre-backend-fs dependency
Minh Diep [Thu, 5 Jan 2012 17:12:29 +0000 (09:12 -0800)]
LU-955 build: fix bad lustre-backend-fs dependency

Fix an incorrect RPM package dependency if Lustre RPMs are built
with "make rpms" with client only

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: Ib8691a37fc230cc63b7aca48bc5146a67e10a2f0

12 years agoLU-843 iokit: get_ec_devno returns trash
Minh Diep [Fri, 13 Jan 2012 23:50:42 +0000 (15:50 -0800)]
LU-843 iokit: get_ec_devno returns trash

Some commands leak output to stdout and get_ec_devno returns
its results via stdout.  Redirect fd 8 to stdout and redirect
stdout to stderr.  Echo final results to fd 8.  Since this
only works when run as a subshell, invoke "exit" instead of
"return" when done.

Inside create_objects() function, stdin is redirected for a
shell "while" command.  Though this is done in the current
environment (process) for current BASH, it is not required
and there is no committment that BASH will always behave
this way.  Instead, set fd 3 to be reading from that file
and read from fd 3 insted of stdin.

While there, also test for "is object id" lines and extract
values using shell constructs instead of fork-ed commands.

Also while there, ensure that "ERROR" is always printed on
every error exit.

Also while there, ensure that the libecho file comes from
the same directory as the obdfilter-survey script.

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: If6dec690d3aa96f6ddb7fa2994330aae4f89fec0
Reviewed-on: http://review.whamcloud.com/1967
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
12 years agoLU-781 kernel: kernel update [RHEL6.2 2.6.32-220]
yangsheng [Thu, 5 Jan 2012 10:30:42 +0000 (18:30 +0800)]
LU-781 kernel: kernel update [RHEL6.2 2.6.32-220]

Add support for RHEL6.2. The version is 2.6.32-220.el6.

Change-Id: Icc03a2f5d8b377aa1b1180ae09056989bbc84a9d
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1986
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
12 years agoLU-674 kernel update [RHEL5.7 2.6.18-274.12.1.el5].
yangsheng [Mon, 28 Nov 2011 03:09:38 +0000 (11:09 +0800)]
LU-674 kernel update [RHEL5.7 2.6.18-274.12.1.el5].

Test-Paramaters-Start:
serverdistro=el5
clientdistro=el5
testgroup=regression
Test-Paramaters-End:

Change-Id: I146b64a3e5110af868067c4fb5fefde5270ca2fc
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1744
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-508 ldiskfs: fix race in ext4_ext_walk_space()
Bobi Jam [Thu, 27 Oct 2011 01:51:39 +0000 (09:51 +0800)]
LU-508 ldiskfs: fix race in ext4_ext_walk_space()

we should not access on-disk data (e.g. path->p_ext->*) with no
locking.

to be fixed in mainline ext4 as well.

Port from: ORI-291
Author: Alex Zhuravlev <bzzz@whamcloud.com>
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ic9dfcc9a90766c79c0da5ca54e9fbb2f917865a6
Reviewed-on: http://review.whamcloud.com/1618
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-613 clio: Client dead-lock during binary exec
Jinshan Xiong [Fri, 19 Aug 2011 22:24:15 +0000 (15:24 -0700)]
LU-613 clio: Client dead-lock during binary exec

The root cause is clio takes attr lock and i_size_sem in reverse
order.

In my patch, I find out there is no deadlock issue any more in fault
and truncate path, so it holds i_size_sem in fault path to fix this
problem.

Change-Id: I04cca9324158a34fded6651692410e29aae2e402
Signed-off-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1281
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-357 racer test cleanup
hongchao.zhang [Thu, 23 Jun 2011 03:24:31 +0000 (11:24 +0800)]
LU-357 racer test cleanup
 1, increase the test time to 300s(900s for SLOW)
 2, fixing the problem of recursively calling racer.sh

Change-Id: I91ac7e5c42ed5bc98b3a647c30d7e37af0573f09
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/905
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-745 kernel: ost-pools test_23 hung
Niu Yawei [Wed, 9 Nov 2011 03:23:52 +0000 (19:23 -0800)]
LU-745 kernel: ost-pools test_23 hung

It could be caused by a jbd2 bug which result in forever sleep
in the do_get_write_access().

http://www.spinics.net/lists/linux-ext4/msg24689.html

In do_get_write_access() we wait on BH_Unshadow bit for buffer to get
from shadow state. The waking code in journal_commit_transaction() has
a bug because it does not issue a memory barrier after the buffer is moved
from the shadow state and before wake_up_bit() is called. Thus a waitqueue
check can happen before the buffer is actually moved from the shadow state
and waiting process may never be woken. Fix the problem by issuing proper
barrier.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I44dce352babc6699cdacc00263bfd3f24538400c
Reviewed-on: http://review.whamcloud.com/1675
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-753 obdfilter: improper LASSERT in filter_commitrw_write()
Niu Yawei [Sat, 22 Oct 2011 08:16:55 +0000 (16:16 +0800)]
LU-753 obdfilter: improper LASSERT in filter_commitrw_write()

In rare cases fsfilt_commit_wait() will wake up and return after the
transaction has finished its work and updated j_commit_sequence but
the commit callbacks have not been run yet. Which will trigger the
LASSERT(oti->oti_transno <= obd->obd_last_committed) improperly.

We should just wait for the commit callback finished instead of put
an improper LASSERT here.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ibd5add8d352d2e7598be49b0bf8fa37d40ce6e1f
Reviewed-on: http://review.whamcloud.com/1583
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-791 obdfilter: Don't clear OBD_MD_FLFLAGS mistakenly
Niu Yawei [Tue, 25 Oct 2011 11:31:11 +0000 (04:31 -0700)]
LU-791 obdfilter: Don't clear OBD_MD_FLFLAGS mistakenly

Instead of set oa->o_valid to OBD_MD_FLID | OBD_MD_FLGROUP arbitrarily
in filter_handle_precreate(), it should be changed as "|=" to keep
the OBD_MD_FLFLAGS setted in filter_precreate().

Otherwise, client will not be aware of OST is running out of space,
and lov_create() will wait for objects forever in such case.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I84be8dde59dbb2829cd800e10b7aa6f4402b7e56
Reviewed-on: http://review.whamcloud.com/1589
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: hongchao.zhang <hongchao.zhang@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-762 ldiskfs: don't drop directory nlink to 0
yangsheng [Thu, 3 Nov 2011 18:25:42 +0000 (02:25 +0800)]
LU-762 ldiskfs: don't drop directory nlink to 0

When landing the nlink patch for ext4, for an unknown reason the
logic in ext4_dec_count() was changed from the ext3 version of
the patch. It now drops the nlink = 0 temporarily and then
if it is a directory with nlink == 0 it increases nlink again.

Instead, only drop nlink if it is larger than 2.

Change-Id: Ieeff3e45daea56f502848f9c2b0fb04f0a9d2b6d
Author: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1644
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-488 ptlrpc_connection_put() LASSERT(!cfs_hlist_unhashed(&conn->c_hash))
Lai Siyao [Fri, 8 Jul 2011 16:35:47 +0000 (09:35 -0700)]
LU-488 ptlrpc_connection_put() LASSERT(!cfs_hlist_unhashed(&conn->c_hash))

Connection hash may be rehashed while ptlrpc_connection_put() is
called, ASSERT &conn->c_refcount > 1 instead of this.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: Iec6d35419e0c4d8497bd0b84c6210abc8eb23882
Reviewed-on: http://review.whamcloud.com/1074
Tested-by: Hudson
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Reviewed-by: zhen liang <liang.zhen@live.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-513 Make cfs_wait_event_interruptible_exclusive really exclusive
Christopher J. Morrone [Wed, 20 Jul 2011 00:43:15 +0000 (17:43 -0700)]
LU-513 Make cfs_wait_event_interruptible_exclusive really exclusive

Change-Id: Iea0556a006f8826f8597824131fb5110a848c434
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/1118
Tested-by: Hudson
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-417 llite: report non-zero blocks on writing client
Bobi Jam [Fri, 4 Nov 2011 07:22:41 +0000 (15:22 +0800)]
LU-417 llite: report non-zero blocks on writing client

Writing client may not report accurate allocated block numbers when
dirty pages has not been writting back to OSTs, some "cp" or "tar" may
skip the file because it thinks it is completely sparse.

This patch makes writing client consider dirty pages when reporting
allocated blocks, lest the file be treated as a completely sparse one.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I985d50a44ea1e917bf8e1cba3b5cb770eec35c3f
Reviewed-on: http://review.whamcloud.com/1647
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-601 mdd: Fix transaction credits
Bobi Jam [Tue, 23 Aug 2011 03:34:06 +0000 (11:34 +0800)]
LU-601 mdd: Fix transaction credits

* mdd_create()/mdd_create_data() may need delete orphan objects on
  OSTs, so that we need preserve enough transaction credits for llog
  records.
* mdd_attr_set() may write lov llogs.
* orphan_object_destroy() also will write a llog record, we need
  reserve credit for it as well.
* add credit changelog record.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I5124d2f368e2ff794b2b2b8194bec86f63e971cf
Reviewed-on: http://review.whamcloud.com/1276
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-687 clio: retry if fault page was truncated
Jinshan Xiong [Wed, 5 Oct 2011 05:54:48 +0000 (22:54 -0700)]
LU-687 clio: retry if fault page was truncated

In vvp_io_fault_start, if a page was truncated we should retry it in
ll_fault() instead of return -EFAULT because it will cause fake OOM.

Change-Id: Ia2ba40ca4ecd67170e6c2eb81ddc0ee34d9379a8
Signed-off-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1453
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-792 lbuild-rhel5 should use redhat's SRPM repo
Michael MacDonald [Tue, 25 Oct 2011 13:57:16 +0000 (09:57 -0400)]
LU-792 lbuild-rhel5 should use redhat's SRPM repo

Download EL5 kernel .src.rpm packages from redhat's repo instead
of trying to use CentOS's often-outdated repo.

Change-Id: I0e622e6481f11941b5038b36c0fd074fe470c595
Signed-off-by: Michael MacDonald <mjmac@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1590
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-110 Recognize old mdt.quota_type param
Niu Yawei [Wed, 23 Mar 2011 06:30:33 +0000 (23:30 -0700)]
LU-110 Recognize old mdt.quota_type param

Minor changes in mdt_process_config() to make it capable of recognizing old mdt.quota_type.

Issue:
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ie13851eee573eb633a68bf5ee3cd86dbbf1bd1a9
Reviewed-on: http://review.whamcloud.com/354
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-721 llite: Parallel writes to same file results in zero file
Bobi Jam [Mon, 3 Oct 2011 04:44:37 +0000 (12:44 +0800)]
LU-721 llite: Parallel writes to same file results in zero file

Canceling lock may contain data being sent to OSTs. Change
find_cbdata iterator to take that into account.

Author: Vladimir Saveliev <vladimir.saveliev@oracle.com>
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I1b30fe13ee5303fe3b98e45ad969f5273c41d676
Reviewed-on: http://review.whamcloud.com/1460
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 years agoUpdate release date for 2.1 in Changelog to reflect RC2 2.1.0 2.1.0-RC2 v2_1_0_0 v2_1_0_0_RC2
Oleg Drokin [Fri, 16 Sep 2011 17:20:21 +0000 (13:20 -0400)]
Update release date for 2.1 in Changelog to reflect RC2

Signed-off-by: Oleg Drokin <green@whamcloud.com>
Change-Id: Ifda31666cac43cb964184903a3d3de20f671cb7d

13 years agoLU-683: handle short write in cl_io_commit_write
Jinshan Xiong [Thu, 15 Sep 2011 05:49:21 +0000 (22:49 -0700)]
LU-683: handle short write in cl_io_commit_write

CLIO has to handle short write case where no bytes were
actually copied from user space. In this case, we should
avoid adding that page into cache.

Change-Id: I78c870e741d7bdb2a9c4c0bfba1adc50a6e814e7
Signed-off-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1383
Tested-by: Hudson
Tested-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
13 years agoLU-653 i_version shouldn't be used for VBR
Mikhail Pershin [Wed, 7 Sep 2011 06:26:31 +0000 (10:26 +0400)]
LU-653 i_version shouldn't be used for VBR

RHEL6 plus EXT4 combination cause i_version is to be used to store
Lustre versions instead of i_fs_version. Meanwhile this field is used
by ext4 internally and may be changed breaking Lustre recovery.

Patch makes only i_fs_version to be used for versions.

Change-Id: Idf7cd257aa2d288abce2a7c18c4d8b139bc9c5c6
Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1342
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Yu Jian <yujian@whamcloud.com>
13 years agoLU-653 Ignore last transno from clients with no outstanding transactions
Oleg Drokin [Thu, 1 Sep 2011 20:19:11 +0000 (16:19 -0400)]
LU-653 Ignore last transno from clients with no outstanding transactions

Clients that did not have any unreplied transactions should not
artificially reduce next_recovery_transno since those transactions are
never coming anyway and would just elay all replay activity
until all clients are reconnected.

Change-Id: Iafa32b315211ada93838f4b16fe0f2c800d619c4
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1318
Tested-by: Hudson
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
13 years agoLU-662 fix conflict between seq_client_flush and seq_client_alloc_fid
Hongchao Zhang [Fri, 9 Sep 2011 11:00:39 +0000 (19:00 +0800)]
LU-662 fix conflict between seq_client_flush and seq_client_alloc_fid

seq_client_flush modifies the lu_client_seq.lcs_space by holding the
lu_client_seq.lcs_sem, but seq_client_alloc_fid uses lcs_update to
exclude other concurrent modification.

Change-Id: Ibc3335841b9a045360283e15aab9b6c36b7a39af
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1364
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 years agoLU-650 Max possible file size is mutable
Bobi Jam [Sun, 2 Oct 2011 05:18:59 +0000 (13:18 +0800)]
LU-650 Max possible file size is mutable

Move maxbytes fields out of wire data part of lov_stripe_md,
it can change when OSTs change their status, e.g. disconnected
or inactivated.

Change-Id: I9fb1f2597df1e98d993792706ac94f469d23a78c
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1327
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
13 years agoLU-614 tests: speed up needlessly long tests
Andreas Dilger [Fri, 26 Aug 2011 08:26:51 +0000 (02:26 -0600)]
LU-614 tests: speed up needlessly long tests

Fix unlinkmany to use the original $next_id instead of the one
seen after createmany was run.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I816081ab1ee04fe66d6c14b76eb076262215bc32
Reviewed-on: http://review.whamcloud.com/1298
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 years agoLU-617 temporary fix for the setattr from open
Niu Yawei [Fri, 26 Aug 2011 02:58:36 +0000 (19:58 -0700)]
LU-617 temporary fix for the setattr from open

The setattr from open(open(O_TRUNC)) is serialized with
'cl_setattr_lock' on client and goes to a dedicate portal, which is
different with other reint operations, consequently, setattr RPC
can be parallel with other reint RPCs, and that result in the race of
updating last_transno/last_xid on server.

This temporary fix removes the LASSERT(req_is_replay(req)) in
mdt_last_rcvd_update().

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I7e07eaf9e718c2d75d9a503207523be9c700ea4a
Reviewed-on: http://review.whamcloud.com/1295
Tested-by: Hudson
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 years agoLU-594 Make sure sanity 27v fallout clears
Bobi Jam [Sat, 20 Aug 2011 10:51:33 +0000 (18:51 +0800)]
LU-594 Make sure sanity 27v fallout clears

We need wait long enough for OST to wake up from
OBD_FAIL_TGT_DELAY_PRECREATE sleep.

Change-Id: I8e4e8153a11a70b66a64f4e8a1deb3e741f58554
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1262
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 years agoLU-622 Alloc enough cfg buffer space
Bobi Jam [Wed, 24 Aug 2011 04:07:22 +0000 (12:07 +0800)]
LU-622 Alloc enough cfg buffer space

obd device name needs space enough for "<dev_name>-<instance_name>\0".
This fixes the glitch in commit cbc4ca2e8dc37d54bb7d3c9b02ab20b63e60f592.

Change-Id: Ib8c3c8db49baad8a9ca068a1c8009aee72aa1e62
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1280
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Yu Jian <yujian@whamcloud.com>
13 years agoLU-614 test: speed up needlessly long tests
Andreas Dilger [Fri, 19 Aug 2011 21:58:43 +0000 (15:58 -0600)]
LU-614 test: speed up needlessly long tests

Some tests are running needlessly long compared to the value that
they provide, and can be made much faster without any loss in value.

conf-sanity test_53a: run llverdev in partial mode always
conf-sanity test_53b: run llverfs in partial mode always
sanity test_220: use unlinkmany instead of "rm -rf", but could likely
                 be sped up dramatically via CFS_FAIL_LOC() on OST

Change-Id: Ifbe66bffc051b6163e41a9bffb1d6b1ab6304e94
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1266
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 years agoUpdate release date for 2.1.0 RC1 2.1.0-RC1 v2_1_0_0_RC1
Oleg Drokin [Tue, 23 Aug 2011 03:54:16 +0000 (23:54 -0400)]
Update release date for 2.1.0 RC1

Change-Id: Ia71c1f4a4d6867e0e605675a1d57a541ef5f9c92
Signed-off-by: Oleg Drokin <green@whamcloud.com>
13 years agoLU-365 Update lustre/Changelog
Oleg Drokin [Sat, 20 Aug 2011 16:52:43 +0000 (12:52 -0400)]
LU-365 Update lustre/Changelog

To indicate that the release is from Whamcloud.

Change-Id: I2e8f8e83c895ef1591d55b460727e04a695e1f29
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1269
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
13 years agoUpdate version to 2.1 as a start of RC process. 2.1.0-RC0 v2_1_0_0_RC0
Oleg Drokin [Sat, 20 Aug 2011 16:30:26 +0000 (12:30 -0400)]
Update version to 2.1 as a start of RC process.

Signed-off-by: Oleg Drokin <green@whamcloud.com>
Change-Id: I46e6405953581b5cc10140e8f25e2b4b345e1a4d

13 years agoUpdate recommended e2fsprogs version
Oleg Drokin [Sat, 20 Aug 2011 16:29:52 +0000 (12:29 -0400)]
Update recommended e2fsprogs version

Signed-off-by: Oleg Drokin <green@whamcloud.com>
Change-Id: I00a587a4ab4e8fecb6d3def33ee952b2f793873e

13 years agoLU-365 Update copyright for files modified by Whamcloud
Oleg Drokin [Fri, 19 Aug 2011 23:56:06 +0000 (19:56 -0400)]
LU-365 Update copyright for files modified by Whamcloud

I scoured through the commits logs since first whamcloud commit
and updated all the files that had non-trivial contributions by
Whamcloud.

Signed-off-by: Oleg Drokin <green@whamcloud.com>
Change-Id: I293a82b69a4ce02c028517771bd172ed94c4e44b
Reviewed-on: http://review.whamcloud.com/1267
Reviewed-by: Robert Read <rread@whamcloud.com>
Tested-by: Hudson
13 years agoLU-598 open non-exist object should return ENOENT
nasf [Tue, 16 Aug 2011 13:53:19 +0000 (21:53 +0800)]
LU-598 open non-exist object should return ENOENT

When call ll_intent_file_open() against non-exist object, we cannot
obtain RPC request refcount after the call, so subsequent operation
should not use such internal (only) RPC request to avoid to access
freed (or re-allocated) memory.

Change-Id: I4c3763f460c6145e376538f392fde338d44e6c5e
Signed-off-by: nasf <yong.fan@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1242
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 years agoLU-473 llite: improve error for 2.x cli + 1.8 srv
Andreas Dilger [Wed, 29 Jun 2011 20:36:25 +0000 (14:36 -0600)]
LU-473 llite: improve error for 2.x cli + 1.8 srv

Improve the error message printed to the console when a 2.x client
is trying to mount a 1.8 filesystem.  More specifically, have the 2.x
client check whether the MDS supports the OBD_CONNECT_FID and
OBD_CONNECT_FULL20 flags, without which the client will not be able
to cope.  The 2.x client also does not understand the RPC structure
of 1.8 servers (mdt_body, mdt_rec, etc), but this is harder to check.

For a 2.x server, the client will configure an LMV device, so
exp_connect_flags will be zero, but in that case we also know the
server is running 2.x.

Change-Id: I935571aa0623f9311ddf0545904230721d2fad32
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1036
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 years agoLU-592 1.8 <-> 2.1 interop: missing LMV on client
Niu Yawei [Tue, 16 Aug 2011 09:38:20 +0000 (02:38 -0700)]
LU-592 1.8 <-> 2.1 interop: missing LMV on client

When the cluster is upgraded from 1.8, client will not have LMV layer,
and the "ll_md_exp" is pointing to MDC directly, so the code which
assuming "ll_md_exp" as LMV need be revised:

- ll_dir_ioctl(LL_IOC_GETOBDCOUNT) should return 1 for MDC case;
- mdc_iocontrol() needs to handle the OBD_IOC_QUOTACTL as well when the
  "ll_md_exp" is MDC;

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I3659a5f8076125c9b2012826521c44540e65a75e
Reviewed-on: http://review.whamcloud.com/1236
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>
13 years agoLU-599 verify "mi_ginfo" before accessing its member
nasf [Wed, 17 Aug 2011 07:18:34 +0000 (15:18 +0800)]
LU-599 verify "mi_ginfo" before accessing its member

If the target user only belong to one group, then we just set
"identity->mi_gid", and does not set "identity->mi_ginfo", to
save unnecessary memory allocation and groups processing.

So before accessing member inside "identity->mi_ginfo", make
sure "identity->mi_ginfo" is valid.

Change-Id: I880ccadddd93425c301115328d57c552d11bda8e
Signed-off-by: nasf <yong.fan@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1252
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: hongchao.zhang <hongchao.zhang@whamcloud.com>
Tested-by: hongchao.zhang <hongchao.zhang@whamcloud.com>
Tested-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 years agoLU-585 lower mdt reconstruct open debug message level
Bobi Jam [Sat, 13 Aug 2011 14:53:22 +0000 (22:53 +0800)]
LU-585 lower mdt reconstruct open debug message level

Reconstruct open is not an error case.

Change-Id: Ifb559616c148b01298196b4be7e398306a6b8e4c
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1233
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 years agoLU-325 using preallocated objects if OST has enough disk space
hongchao.zhang [Fri, 12 Aug 2011 13:25:13 +0000 (21:25 +0800)]
LU-325 using preallocated objects if OST has enough disk space

during creating files, if ENOSPC is returned by one OST, the preallocated
objects in the corresponding OSC should still can be used if there is enough
blocks but no inode available in the OST.

Change-Id: I9d57461698d1c0fb3a492188fb4ce1519d65efc7
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1051
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 years agoLU-586 1.8 <-> 2.1 interop: list_add corruption
Lai Siyao [Thu, 21 Jul 2011 21:04:42 +0000 (05:04 +0800)]
LU-586 1.8 <-> 2.1 interop: list_add corruption

In seq_client_alloc_fid(), client may list_add itself more than
once to waitqueue under race or error condition.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: Id7d35cc4ca3eafc4fc44d2d79a9ebc25fe56e62c
Reviewed-on: http://review.whamcloud.com/1216
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 years agoLU-15 Strange slow IO messages and bad performance
yangsheng [Wed, 20 Apr 2011 10:05:51 +0000 (18:05 +0800)]
LU-15 Strange slow IO messages and bad performance

b=24183 slow I/O on new files via mballoc.

upstream patch to avoid loading bitmaps from full groups

Change-Id: I9b4de1b4b1942b0f084b6199d5ab3e1267c9e8e3
Signed-off-by: Yang Sheng <ys@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/442
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
13 years agoLU-544 speed up filesystem formatting time in conf-sanity.sh
Yu Jian [Thu, 11 Aug 2011 10:34:27 +0000 (18:34 +0800)]
LU-544 speed up filesystem formatting time in conf-sanity.sh

Pass "-E lazy_itable_init" to mke2fs to speed up Lustre
filesystem formatting time in conf-sanity.sh.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I29070e6c4b95028b12573d552a32ca04189c2c1d
Reviewed-on: http://review.whamcloud.com/1210
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
13 years agoLU-455 Replace DIST_SOURCES with EXTRA_DIST
Christopher J. Morrone [Fri, 22 Jul 2011 20:28:06 +0000 (13:28 -0700)]
LU-455 Replace DIST_SOURCES with EXTRA_DIST

Resolve autoconf-2.63 warnings mainly by replacing DIST_SOURCES
with EXTRA_DIST.  Additionally, the non-portable $(shell) contruct
was removed from tests/module.mk and the sources simply enumated.
Finally, the incorrect EXTRA_SOURCES instance was removed from
the top level autoMakefile.am.

  Running automake-1.11 -a -c -W no-portability
  libcfs/libcfs/autoMakefile.am:92:
          variable `DIST_SOURCES' is defined but no program or
  libcfs/libcfs/autoMakefile.am:92:
          library has `DIST' as canonical name (possible typo)
  lnet/klnds/mxlnd/autoMakefile.am:44:
          variable `DIST_SOURCES' is defined but no program or
  lnet/klnds/mxlnd/autoMakefile.am:44:
          library has `DIST' as canonical name (possible typo)
  ...

Also, as a result of the above changes, libcfs/libcfs/autoMakefile.am had to be
modified in order to allow 'make dist' to succeed.

As it turns out, libcfsutils_a_SOURCES was incorrect. That list contained
references to nonexistent 'util/[parser|platform].h' files. The assumption is
it intended to reference libcfs/include/libcfs/util/[parser|platform].h.

To fix the issue, both [parser|platform].h references were removed from the
list. This produces a simple solution that maintains consistency with the rest
of the build system. The caveat being that libcfsutil.a won't automatically be
rebuilt if either of the intended [parser|platform].h files are modified.

Change-Id: Ia81eb1e3fc219f6dac4c7da234f7e736754c5440
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Signed-off-by: Prakash Surya <surya1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/1092
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Richard Henwood <rhenwood@whamcloud.com>
Tested-by: Richard Henwood <rhenwood@whamcloud.com>
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 years agoLU-550 incorrect quota hash function
Niu Yawei [Fri, 29 Jul 2011 04:00:09 +0000 (21:00 -0700)]
LU-550 incorrect quota hash function

Quota code uses 'uid' or '(1 << 32) + gid' as the hash key, however,
the quota hash function lqs_hash() always try to interpret such a
unsigned long long key as a 'quota_adjust_qunit' struct, then calculate
the hash value by quota_adjust_qunit->qaq_id.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I48dc7f276eb97f34b22097b4edc529d5f76acf37
Reviewed-on: http://review.whamcloud.com/1162
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 years agoLU-297 improve llverfs to display the current read/write performance
Yu Jian [Thu, 14 Jul 2011 03:07:34 +0000 (11:07 +0800)]
LU-297 improve llverfs to display the current read/write performance

This patch changes show_filename() to show_rate() in llverfs.c to
display the current read/write file name and performance, along with
an estimate of how long the whole read/write operation will continue.

The patch also changes "fast" to "partial" and fixes some typos in
the comments of llverdev.c and llverfs.c.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I94cb112ae9a38b1128e53021aa0c1f1e8e5411af
Reviewed-on: http://review.whamcloud.com/1110
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 years agoLU-560 Fixup intent status on ENOENT in mdt_intent_reint
John Hammond [Mon, 1 Aug 2011 15:28:48 +0000 (10:28 -0500)]
LU-560 Fixup intent status on ENOENT in mdt_intent_reint

Clear -ENOENT from rep->lock_policy_res2 for non existent files so
that clients may cache negative dentries if they hold
MDS_INODELOCK_UPDATE on the parent directory.

Change-Id: I238f1001782923a595f9f7ee1c094d53ab1422ae
Signed-off-by: John Hammond <jhammond@tacc.utexas.edu>
Reviewed-on: http://review.whamcloud.com/1173
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 years agoLU-574 Fix whitespace issues in conf-sanity.sh
Andreas Dilger [Tue, 9 Aug 2011 21:17:02 +0000 (15:17 -0600)]
LU-574 Fix whitespace issues in conf-sanity.sh

Move "run_one test_41b" to immediately follow declaration of test_41b.
Fix some whitespace problems (space before tab, space at end of line)
that I noticed while inspecting LU-574.

Change-Id: I18a80a55c9895cf8a6647a01ffa646f5ca499795
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1200
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 years agoLU-321 Don't assume file system name for some test
James Simmons [Fri, 13 May 2011 13:25:01 +0000 (09:25 -0400)]
LU-321 Don't assume file system name for some test

Some of the test assume the file system name is lustre
which is not always the case.

Change-Id: I582aa81fce5d1a881837dfa28bb0d6d84cfb5547
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/253
Tested-by: Hudson
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 years agoLU-556: Fix config_log_find() in mgc_request.c
Jinshan Xiong [Sat, 30 Jul 2011 07:24:51 +0000 (00:24 -0700)]
LU-556: Fix config_log_find() in mgc_request.c

This issue was imported by lu-411. Actually after checking
the code, I found we can make things a bit simpler.

Change-Id: Iad212782a5f0357b73014baf7766c77637fb47db
Signed-off-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1168
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>