Whamcloud - gitweb
fs/lustre-release.git
7 years agoLU-1434 utils: Add better handling for normal lustre packets
Nathaniel Clark [Tue, 18 Dec 2012 17:08:04 +0000 (12:08 -0500)]
LU-1434 utils: Add better handling for normal lustre packets

This fixes handling for Lustre packets (lustre 2.1) for more packet
types and fixes some packet types that were being mis-interpreted.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ib6fcf99a93efc41a0cad3457da8009522c68d248
Reviewed-on: http://review.whamcloud.com/4852
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-2183 quota: quota tests for DNE
Niu Yawei [Fri, 4 Jan 2013 10:16:47 +0000 (05:16 -0500)]
LU-2183 quota: quota tests for DNE

Added two quota tests for DNE:
- test_7e: inode limits reintegration;
- test_12b: inode quota rebalancing;

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I1a262496bde318da062ef1f4558f4160737dd12b
Reviewed-on: http://review.whamcloud.com/4952
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
7 years agoLU-1445 fid: start ptlrpc service for OST FID
wangdi [Tue, 24 Sep 2013 19:32:05 +0000 (12:32 -0700)]
LU-1445 fid: start ptlrpc service for OST FID

Start FID service on OST for FID on OST.

Change-Id: I58b36e052a2f09fc6707107f805176dcdca7e86a
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4328
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
7 years agoLU-1430 mgs: "replace_nids" lctl command added
Artem Blagodarenko [Thu, 30 Aug 2012 12:35:57 +0000 (16:35 +0400)]
LU-1430 mgs: "replace_nids" lctl command added

Currently after device address is changed tunefs
should be started with "writeconf" options. This
erase configuration logs for the filesystem that
this server is part of, and regenerate them. This
is very dangerous. All clients must be unmounted
and servers  for  this filesystem should be stopped.
All targets (OSTs/MDTs) must then be restarted to
regenerate the logs.  No clients should be started
until all targets have restarted. The targets start
order is also important. Wrong order can be cause
of failure.

This patch adds "replace_nids" command to lctl
that should be executed when only MGS server
started. This command replace nids and uuid for
given device. Command can be used to change
OST or MDT nids.

Xyratex-bug-id: MRP-397
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Nathan Rutman <nathan.rutman@xyratex.com>
Signed-off-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Change-Id: I74b72281ce3b5e48188735035e58250596a16bf7
Reviewed-on: http://review.whamcloud.com/2896
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2531 osc: evict extents in trunc whatever happens
Jinshan Xiong [Thu, 27 Dec 2012 20:47:38 +0000 (12:47 -0800)]
LU-2531 osc: evict extents in trunc whatever happens

In osc_cache_truncate_start(), we should ignore the return code
of osc_extent_wait() because initiator will handle it and truncate
should continue in anyways.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Iaae1228d0f1c488c5deaf938761715ee3984ac3d
Reviewed-on: http://review.whamcloud.com/4896
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-676 tests: machinefile option for mpirun via a variable
Jay J. Lan [Tue, 18 Oct 2011 19:04:07 +0000 (12:04 -0700)]
LU-676 tests: machinefile option for mpirun via a variable

Not all MPI implementations pass the host file to mpirun via the same
option. Common options are -machinefile and -hostfile.

This problem can be resolved by using a variable MACHINEFILE_OPTION
instead. A default value is assigned if the variable not defined.

Signed-off-by: Jay J Lan <jay.j.lan@nasa.gov>
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I3362a6e62a27318cff733aea2f99b1356b3ff02e
Reviewed-on: http://review.whamcloud.com/3873
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1187 lmv: remove obsolete lmv object.
wangdi [Thu, 31 Oct 2013 06:33:38 +0000 (23:33 -0700)]
LU-1187 lmv: remove obsolete lmv object.

lmv object is intended to handle spliting directory, which
is obsolete for current DNE infrastructure.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I5337d497451f6869bc67474b0cd7d74bde01a172
Reviewed-on: http://review.whamcloud.com/5011
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1445 fid: Add DATA fid type in fid_request.
wangdi [Thu, 26 Sep 2013 02:11:47 +0000 (19:11 -0700)]
LU-1445 fid: Add DATA fid type in fid_request.

1. Add data fid type in fid request on client side.
2. When MDT request fids to the OST, if it is not
ready for fid allocation yet. i.e. not being connected
to MDT0 yet, it will return -EINPROGRESS, and MDT will
try again.
3. Remove obsolete obd_fid_init/fini in llite.

Signed-off-by: wang di <di.wang@whamcloud.com>
Change-Id: I54d97d5c84a5b38ebeae77522bd8666206ef2701
Reviewed-on: http://review.whamcloud.com/4787
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-1876 hsm: layout lock implementation on server side
Jinshan Xiong [Thu, 6 Dec 2012 17:34:15 +0000 (09:34 -0800)]
LU-1876 hsm: layout lock implementation on server side

* enabled OBD_CONNECT_LAYOUTLOCK both on client and mdt
* mdt_object_lock_try() is implemented to try layout lock
* dlm flag LDLM_FL_BLOCK_NOWAIT is added to implement nonblock mode
  dlm lock enqueue
* try layout lock for IT_GETATTR and IT_OPEN
* make layout lock work
* add layout intent support.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I84a6dfca83ded2344240fa5430c9922b7cfc7bcf
Reviewed-on: http://review.whamcloud.com/4417
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2263 ptlrpc: deadlock of obd_import::imp_lock
Liang Zhen [Fri, 21 Dec 2012 06:27:57 +0000 (14:27 +0800)]
LU-2263 ptlrpc: deadlock of obd_import::imp_lock

ptlrpc_at_recv_early_reply() calls ptlrpc_at_set_req_timeout() with
hold of ptlrpc_request::rq_lock, and
ptlrpc_at_set_req_timeout()->import_at_get_index() requires imp_lock,
it violates locking-order rule of Lustre, which assumes rq_lock can
nest in imp_lock.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I924839b59ca1fa1cdf01568872de867ce3985f8b
Reviewed-on: http://review.whamcloud.com/4880
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-1187 tests: Add parallel sanity tests to dne
wangdi [Fri, 7 Dec 2012 16:38:35 +0000 (08:38 -0800)]
LU-1187 tests: Add parallel sanity tests to dne

1. Add parallel sanity tests(dne_sanity) to run sanity
tests on different directories at the same time.

2. Add PARALLEL check line in sanity to skip some tests which
are unable to run parallel.

3. Do not check multiop in run_one when multiple sanity
is running.

4. In test_105, replace DIR with MOUNT to check flock option.

Test-Parameters: envdefinitions=SLOW=yes testlist=sanity,dne_sanity
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: If2386e5465c2067059fb72c5fc95ac690ddd3fa4
Reviewed-on: http://review.whamcloud.com/4318
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
7 years agoLU-1187 tests: Add dne specific tests to sanityN
wangdi [Sun, 18 Nov 2012 21:30:16 +0000 (13:30 -0800)]
LU-1187 tests: Add dne specific tests to sanityN

1. Change mkdir to test_mkdir for DNE.
2. 2f: Check attr and ownder update under remote dir.
3. 25b: Acl checking under remote dir.
4. 33b: commit on share under remote dir.
5. 4[0-7]: Check remote dir with pdir lock.
6. 70: cd dir and rm -rf dir.

Change-Id: I9b752d8663287db55bd07a5ce132c397749ade4d
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4366
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1445 ofd: Add fid support on OFD
wangdi [Tue, 24 Sep 2013 09:59:57 +0000 (02:59 -0700)]
LU-1445 ofd: Add fid support on OFD

1. Init fid server related structure in OFD, which will
become a sequence metaserver, i.e. MDT will request sequence
from OST(OFD), OFD will request super sequence from MDT0

2. OST FID sequence width will be 4 billion, which is different
with MDS FID.

Change-Id: If861cf5814ea77ce72464525a8de71ac182d742c
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4326
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-1445 ofd: set index during server_data_init
wangdi [Tue, 15 Oct 2013 04:40:21 +0000 (21:40 -0700)]
LU-1445 ofd: set index during server_data_init

Get mdt/ost index from obd_name, and set it in
server_data_init.

Signed-off-by: wang di <di.wang@whamcloud.com>
Change-Id: I62466f3bcadb738b4182db90773e83361d6963e9
Reviewed-on: http://review.whamcloud.com/4918
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1445 fld: change md_site to seq_server_site
wangdi [Fri, 27 Sep 2013 15:14:10 +0000 (08:14 -0700)]
LU-1445 fld: change md_site to seq_server_site

Change md_site to seq_server_site, so both Metadata and data
stack will use this structure for sequence service.

Signed-off-by: wang di <di.wang@whamcloud.com>
Change-Id: I1f9c835d7006c4d336153c9bf8cac7d6fc729def
Reviewed-on: http://review.whamcloud.com/4805
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1445 ofd: remove ofd_seq_count and add ocd_seq
wangdi [Tue, 24 Sep 2013 09:47:06 +0000 (02:47 -0700)]
LU-1445 ofd: remove ofd_seq_count and add ocd_seq

Remove ofd_seq_count from the disk, so ofd_seq will
not be initialized during setup,  only be created during
connection or reconnection.

Change-Id: I6dad9aa960897f46afb0a5ea96d8330a227f36e4
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4325
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1445 osd: replace OFD_GROUP0_LAST_OID with [seq, 0]
wangdi [Tue, 24 Sep 2013 09:45:31 +0000 (02:45 -0700)]
LU-1445 osd: replace OFD_GROUP0_LAST_OID with [seq, 0]

Replace OFD_GROUP0_LAST_OID with [seq, 0], so LAST_ID of each
sequence will be identified by [seq,0].

Change-Id: Ieca4eb0cf367e59b6fca044367e4c7e223f79025
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4324
Tested-by: Hudson
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-2367 osc: unplug IO queue for writeback anyway
Jinshan Xiong [Thu, 22 Nov 2012 22:31:36 +0000 (14:31 -0800)]
LU-2367 osc: unplug IO queue for writeback anyway

osc_io_unplug_async() in osc_extent_release() may not unplug IO
queue due to a race in ptlrpc_queue_work(). As a fix, we should
unplug it when the page is being flushed or fsync calls.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ied1d6ad12b79a28229cdae83a9db9ad9b3189462
Reviewed-on: http://review.whamcloud.com/4659
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2543 llite: wait osc cleanup when put super
Niu Yawei [Fri, 4 Jan 2013 09:35:07 +0000 (04:35 -0500)]
LU-2543 llite: wait osc cleanup when put super

Since osc is now accessing sbi->ll_cache, we'd wait till all OSCs
are gone when put super.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I5d09b29cda28d4b596f67bdf8da2ce5e7082a38e
Reviewed-on: http://review.whamcloud.com/4951
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2494 tests: obdfilter/*/mds_sync: Found no match
Bob Glossman [Fri, 21 Dec 2012 19:34:33 +0000 (11:34 -0800)]
LU-2494 tests: obdfilter/*/mds_sync: Found no match

Revise test-framework to look for new variable *osp*/old_sync_processed
instead of obsolete variable */mds_sync.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ie219f17fae3b49caf52394aff16a6b7d58840ade
Reviewed-on: http://review.whamcloud.com/4885
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-2109 llog: introduce llog handle refcounter
Mikhail Pershin [Wed, 5 Dec 2012 11:57:20 +0000 (15:57 +0400)]
LU-2109 llog: introduce llog handle refcounter

llog handle is allocated by llog_open and freed by llog_close,
meawhile there is 'backdoor' to get already opened handle - it is
llog_cat_id2handle() function, it can find handle in the list. That
leads to possible use-after-free.

llog_refcount was introduced to solve this.
- llog_alloc_handle() set refcount to 1
- llog_handle_put() drops refcount and free handle if refcount == 0
- llog_cat_i2handle() takes extra reference
- llog_handle_put() must be called if handle was taken by
  llog_cat_id2handle()
- llog_free_handle() calls llog_handle_put() at the end.

Additional changes in patch:
- llog_cat_init_and_process() processes llogs without fork, making
  sure that server will not start until all old llogs are cancelled.
- llog_cat_cancel_records() doesn't break cycle if handle is not
  found but continue to check other handles
- wrong GOTO() parameter in llog_close. Should be 'rc = -EOPNOTSUPP'
  but not just '-EOPNOTSUPP'.
- indentation fixes.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I0dd0a934eb79c63c6726902540132ad877183d10
Reviewed-on: http://review.whamcloud.com/4745
Tested-by: Hudson
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
7 years agoLU-941 hsm: Manage dirty flag for hsm-archived files
Aurelien Degremont [Mon, 19 Dec 2011 13:55:05 +0000 (14:55 +0100)]
LU-941 hsm: Manage dirty flag for hsm-archived files

clio manages a LLIF_DATA_MODIFIED flag when file data are modified
which is sent to MDT. It now has a way to know file data was modified
and can update HS_DIRTY flag in LMA which is mandatory for Lustre/HSM
binding.
When HS_DIRTY is set, a changelog event is raised.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: I074c8db0d6c10341aaabc55441fe746497259e84
Reviewed-on: http://review.whamcloud.com/1891
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoRevert "LU-2469 tests: use MDS/OSTDEV and MDS/OSTDEVBASE with zfs"
Oleg Drokin [Thu, 10 Jan 2013 15:42:44 +0000 (10:42 -0500)]
Revert "LU-2469 tests: use MDS/OSTDEV and MDS/OSTDEVBASE with zfs"

This broke zfs completely apparently

This reverts commit d25e7654f798060f6b671c3b65949a70b8c67f58.

7 years agoLU-657 test: limit the write size in run_dd
Hongchao Zhang [Mon, 31 Dec 2012 19:32:25 +0000 (03:32 +0800)]
LU-657 test: limit the write size in run_dd

1, in run_dd.sh, limit the write size of dd according to
   the free disk space currently intead of using fixed value.

2, fix a bug in ofd_tnx_stop_cb, which cleared the 'thandle->th_sync'

Test-Parameters: envdefinitions=SLOW=yes clientcount=4 osscount=2 mdscount=2 austeroptions=-R failover=true useiscsi=true testlist=recovery-mds-scale
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: I8b9cc2fc8b9831e5ad79b521ba7af4ae9160143f
Reviewed-on: http://review.whamcloud.com/4599
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-1187 osd: allocate osd_compat_objid_seq dynamically
wangdi [Tue, 24 Sep 2013 09:16:38 +0000 (02:16 -0700)]
LU-1187 osd: allocate osd_compat_objid_seq dynamically

1. Allocate osd_compat_objid_seq dynamically, so osd can load
as many as seq it wants.
2. Change group to seq.
3. remove the compat from name, because we will still use
the same disk-layout for FID on OST.

Change-Id: I52d40ecd805aa44074838496e44ed2b71fd39f92
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4323
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-2275 mdt: Avoid setting positive dispositions too early
Oleg Drokin [Mon, 5 Nov 2012 05:21:06 +0000 (00:21 -0500)]
LU-2275 mdt: Avoid setting positive dispositions too early

mdt_finish_open and mdt_open_by_fid_lock set DISP_LOOKUP_POS
and DISP_OPEN_OPEN a bit too eagerly only to have later code add
negative disposition and a lookup error, confusing a client
with such self-contradicting replies in the end.

This patch only sets positive dispositions when we are sure
not to get them overruled.

Change-Id: I3389f1d59b21f4a9e4c16ca75b398785ea6e130c
Signed-off-by: Oleg Drokin <green@whamcloud.com
Reviewed-on: http://review.whamcloud.com/4459
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1187 ofd: Allocate ofd group dynamically.
wangdi [Tue, 24 Sep 2013 08:06:42 +0000 (01:06 -0700)]
LU-1187 ofd: Allocate ofd group dynamically.

Allocate the OFD sequence maps dynamically, so that the OST can
handle an arbitrary number of MDTs or WBC clients, and potentially
multiple streams of object allocations from each MDT.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: Id5f8e5bf4f3dcbe3ba228144c7542bdd3cfef20c
Reviewed-on: http://review.whamcloud.com/4322
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-2332 osc: solve a race in client obd list lock
Jinshan Xiong [Thu, 15 Nov 2012 05:07:02 +0000 (21:07 -0800)]
LU-2332 osc: solve a race in client obd list lock

In __client_obd_list_lock(), the lock may have been released before
printing the debug information.

Also, avoid calling osc_wake_cache_waiters() recrusively in
__osc_unreserve_grant().

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I4ada1f02feb56b7b25f2f87384551cee7265679e
Reviewed-on: http://review.whamcloud.com/4587
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2279 osp: do not spin awaiting for connection
Alex Zhuravlev [Tue, 18 Dec 2012 05:23:46 +0000 (09:23 +0400)]
LU-2279 osp: do not spin awaiting for connection

modify ready condition for osp_precreate_reserve() so that
it ignores -ENODEV and instead rely on expiration mechanism.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Id59e75bb17c603140616f34e08c98a6f31f10a8d
Reviewed-on: http://review.whamcloud.com/4847
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2508 build: make ldev.conf not overwritten after upgrade
Minh Diep [Wed, 26 Dec 2012 18:18:24 +0000 (10:18 -0800)]
LU-2508 build: make ldev.conf not overwritten after upgrade

Include %config(noreplace) in the spec file so we don't lose
changes after upgrade for ldev.conf

Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: I9e3f892c494a6f8e3f0da27691cb5f8ac7dfe31e
Reviewed-on: http://review.whamcloud.com/4890
Tested-by: Hudson
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-709 build: remove old userspace-OSS configure
Andreas Dilger [Tue, 6 Nov 2012 22:47:13 +0000 (15:47 -0700)]
LU-709 build: remove old userspace-OSS configure

Remove the old and obsolete userspace-OSS configure options.  These
are not used anywhere in the code, and are not intended to be needed
any time in the near future.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I9b50dbd4f22ad07696be7b3a39cbf87ab5500c1e
Reviewed-on: http://review.whamcloud.com/4828
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-992 kernel: deprecate RHEL5 server support for master
yangsheng [Fri, 21 Dec 2012 04:46:29 +0000 (12:46 +0800)]
LU-992 kernel: deprecate RHEL5 server support for master

Remove patches relate to RHEL5 server support.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I694c9bbe0b6713119501392540c9cf5c6f8e53f3
Reviewed-on: http://review.whamcloud.com/4865
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
7 years agoLU-2337 scripts: init script to not use -d with zpool import
Ned Bass [Tue, 27 Nov 2012 19:06:43 +0000 (11:06 -0800)]
LU-2337 scripts: init script to not use -d with zpool import

The zpool import command shipped with ZFS on Linux now searches the
following directories for devices (in order), eliminating the need for
the zpool import -d option in the lustre init script.

  /dev/disk/by-vdev   - Custom rules, use first if they exist
  /dev/disk/zpool     - Custom rules, use first if they exist
  /dev/mapper         - Use multipath devices before components
  /dev/disk/by-uuid   - Single unique entry and persistent
  /dev/disk/by-id     - May be multiple entries and persistent
  /dev/disk/by-path   - Encodes physical location and persistent
  /dev/disk/by-label  - Custom persistent labels
  /dev                - UNSAFE device names will change

The command formerly only searched /dev by default, so the init script
used the -d option to give precedence to preferred locations such as
/dev/mapper.  However this approach is error-prone on systems where
/dev/mapper exists but doesn't contain the zpool member devices.  With
this change the default script behavior should work on systems using
any of the above directories.

Also print an error message if zpool import fails, and remove an
unused variable from an unrelated function.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I257da17328bec84aa568a61a40cdb374535aa935
Reviewed-on: http://review.whamcloud.com/4686
Tested-by: Hudson
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2361 quota: allow upgraded fs to start w/o spc accounting
Johann Lombardi [Wed, 21 Nov 2012 09:56:46 +0000 (10:56 +0100)]
LU-2361 quota: allow upgraded fs to start w/o spc accounting

All filesystems upgraded to 2.4 should run tunefs.lustre --quota to
have functional space accounting. If not done, we still allow the
filesystem to be started, but print an error on the console if the
administrator tries to enable quota.

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: I98ff2cf5e5c381353b219679b935bc0584b033cc
Reviewed-on: http://review.whamcloud.com/4642
Tested-by: Hudson
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2164 utils: mkfs.lustre segfaults if no "/" in dataset name
Ned Bass [Wed, 7 Nov 2012 20:46:13 +0000 (12:46 -0800)]
LU-2164 utils: mkfs.lustre segfaults if no "/" in dataset name

mkfs.lustre incorrectly assumes that the libzfs function
zfs_name_valid() disallows filesystem names without a "/", and so uses
the result of strrchr(pool, '/') without a NULL check.  In fact
dataset names without a / are permitted, as in the case of commands
like

   zfs get all tank

where a pool tank is treated like a dataset.  The leads to a segfault
if mkfs.lustre is given a dataset name without a /.  Since lustre
datasets are always created as children of a pool, add a separate
check for a missing slash and print an error if it's missing.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: Ic7bede9ca19d646f64d2f166f189fa6822a70fe3
Reviewed-on: http://review.whamcloud.com/4490
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-2395 ofd: Maintain per-export {read,write}_bytes counters
John L. Hammond [Tue, 27 Nov 2012 20:28:20 +0000 (14:28 -0600)]
LU-2395 ofd: Maintain per-export {read,write}_bytes counters

Add handling of these counters to ofd_counter_incr() and add a test to
sanity to ensure that they work as intended.

Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Change-Id: I49e237a6387b8ece1aecd63987ad4a75897b430b
Reviewed-on: http://review.whamcloud.com/4687
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-2317 mgs: both callbacks are to be fixed
Vitaly Fertman [Mon, 17 Dec 2012 19:48:44 +0000 (23:48 +0400)]
LU-2317 mgs: both callbacks are to be fixed

The commit ORNL-27 introduced a new lock enqueue which drops a
reference on it in the blocking callbacks. however, it turned out
to be racy as if a lock is taken quickly, callback is called twice,
from enqueue completion and from conflicting lock cancel, and lock
reference is decremented twice.  LU-1259 tried to fix it, but only
for 1 callback.

Fix it for mgs_completion_ast_config as well.

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Xyratex-bug-id: MRP-792
Change-Id: I49207cfae230318da3b6dcbe3a63c14d8d94a244
Reviewed-on: http://review.whamcloud.com/4744
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2469 tests: use MDS/OSTDEV and MDS/OSTDEVBASE with zfs
Nathaniel Clark [Tue, 18 Dec 2012 19:05:55 +0000 (14:05 -0500)]
LU-2469 tests: use MDS/OSTDEV and MDS/OSTDEVBASE with zfs

Add support for using MDSDEVn, OSTDEVn, MDSDEVBASE and OSTDEVBASE
variables when testing with zfs.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I89115ce935294cdbbd6620fec3f9dc3eb76f8960
Reviewed-on: http://review.whamcloud.com/4854
Tested-by: Hudson
Reviewed-by: Cliff White <cliff.white@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1756 kernel: cleanup lustre_compat25.h
Peng Tao [Tue, 30 Oct 2012 09:15:02 +0000 (17:15 +0800)]
LU-1756 kernel: cleanup lustre_compat25.h

Use cpumask_of_node() rather than node_to_cpumask().
cpumask_of_node() is availabe in latest kernel, while
node_to_cpumask() isn't.

Also fix how cpumask_of_node() is detected. Some OFED
backports cpumask_of_node() and put it in private
include/linux/cpumask.h.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I770fcb549c354c2c925c821d2a8920d867274d7a
Reviewed-on: http://review.whamcloud.com/4588
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
7 years agoLU-2414 tests: fix job # substitution in replay_barrier
Nathaniel Clark [Fri, 30 Nov 2012 16:56:51 +0000 (11:56 -0500)]
LU-2414 tests: fix job # substitution in replay_barrier

The extra % in front of ${!svc} can cause erronious substitution by
bash, as in If ${!svc} resolves to something like nlc then the %n
becomes job number 0 so the filesystem is 0lc and that fails.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I4a0b0db86e960a33dab95b2e7ca4aed7fce4a55d
Reviewed-on: http://review.whamcloud.com/4725
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2056 mdd: create transaction before locking object
Hongchao Zhang [Sun, 30 Dec 2012 12:37:41 +0000 (20:37 +0800)]
LU-2056 mdd: create transaction before locking object

OSD requires transactions to be created before locking the object.
however, mdd_close has a rare call path violating this rule.

Signed-off-by: Liang Zhan <liang@whamcloud.com>
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: Ibf7930338c3d1216b6ec1e0c51403ab4b8f3b940
Reviewed-on: http://review.whamcloud.com/4461
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-2526 quota: writer proper size in test_9
Niu Yawei [Thu, 27 Dec 2012 03:05:28 +0000 (22:05 -0500)]
LU-2526 quota: writer proper size in test_9

Write proper size (4.5G) in test_9 of s-q.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I5233368bbfb47e926c852baf413791ee043acded
Reviewed-on: http://review.whamcloud.com/4892
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
7 years agoLU-2446 build: Update Whamcloud copyright messages to Intel
Keith Mannthey [Fri, 4 Jan 2013 03:34:24 +0000 (19:34 -0800)]
LU-2446 build: Update Whamcloud copyright messages to Intel

Update script to assign all Whamcloud copyrights to Intel and add
copyrights to files that have been edited by Whamcloud since
2010-06-01.

Changes to the script include:
  Ability to exclude some previous commits.
  Intel Authors now reconized
  Ability to deal with a few common forms in the Intel Copyright
  Xyratex Copyright aware
  Updated user messages
  Detects Git non-linear year issues.

Signed-off-by: Keith Mannthey <keith@whamcloud.com>
Change-Id: I8c817e6564ea51b88223f954af8b838d713c9a44
Reviewed-on: http://review.whamcloud.com/4811
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
7 years agoLU-2446 build: Update Whamcloud copyright messages for Intel
Keith Mannthey [Fri, 4 Jan 2013 02:48:41 +0000 (18:48 -0800)]
LU-2446 build: Update Whamcloud copyright messages for Intel

Update the copyright messages for master branch for Intel.

This is the result of the updatecw.sh script.

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: Id8dc454e7a5b6dffef64aa6efefeaaaea966d780
Reviewed-on: http://review.whamcloud.com/4812
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
7 years agoLU-2446 build: Update Whamcloud copyright messages for Intel
Keith Mannthey [Fri, 4 Jan 2013 01:56:25 +0000 (17:56 -0800)]
LU-2446 build: Update Whamcloud copyright messages for Intel

Update the copyright messages for master branch for Intel.

These are the manual changes required.
Issues addressed:
  The addition of the GPL to two header files
  Updating the Man page copyrights
  Dealing with nonlinear year issues in git
  Removal of a double copyright
  Careful addition of Intel copyrights in a tricky spots

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: Iaf8bd9f2a7e38c265c86c477fdf51607c1590b86
Reviewed-on: http://review.whamcloud.com/4948
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
7 years agoLU-2504 procfs: Call put_cpu() if stats alloc fails
John L. Hammond [Mon, 17 Dec 2012 23:34:57 +0000 (17:34 -0600)]
LU-2504 procfs: Call put_cpu() if stats alloc fails

Call put_cpu() if lprocfs_stats_alloc_one() fails in
lprocfs_stats_lock().

Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Change-Id: I12c3eb9ecbbef3086493d63c300ddb853d86dd98
Reviewed-on: http://review.whamcloud.com/4845
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2503 libcfs: Call lbug_with_loc() in LASSERT()
John L. Hammond [Mon, 17 Dec 2012 23:07:27 +0000 (17:07 -0600)]
LU-2503 libcfs: Call lbug_with_loc() in LASSERT()

LASSERT() declares a msgdata which can be passed to lbug_with_loc()
instead of calling LBUG() thereby saving /millions/ of bytes.  Also
remove unused libcfs_assertion_failed().

Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Change-Id: Iac267c7804b5e18f687f47b2eea585c655e7bb21
Reviewed-on: http://review.whamcloud.com/4844
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-2351 tests: remote_node works wrong
Kyrylo Shatskyy [Thu, 8 Nov 2012 10:55:33 +0000 (12:55 +0200)]
LU-2351 tests: remote_node works wrong

The test-framework's remote_node works wrong for host names with any
suffixes.

To resolve this the host identification has been switch to IP address.
Target node address is compared with address on each interface
of the local host. Assume host remote if it is unable to resolve
its IP address. Results of comparison are cached in global variables
in order to suppress host resolution overhead.

Signed-off-by: Kyrylo Shatskyy <kyrylo_shatskyy@xyratex.com>
Xyratex-bug-id: MRP-629
Reviewed-by: Alexander Lezhoev <Alexander_Lezhoev@xyratex.com>
Reviewed-by: Roman Grigoryev <Roman_Grigoryev@xyratex.com>
Reviewed-by: Bruce Korb <Bruce_Korb@xyratex.com>
Change-Id: I6128650ac8c5cc2759f9ff53856b5ffdf3222aa4
Reviewed-on: http://review.whamcloud.com/4609
Reviewed-by: Bruce Korb <bruce_korb@xyratex.com>
Reviewed-by: Alexander Lezhoev <alexander_lezhoev@xyratex.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2489 cfs: Use vfs_write() in cfs_user_write()
John L. Hammond [Thu, 13 Dec 2012 18:18:48 +0000 (12:18 -0600)]
LU-2489 cfs: Use vfs_write() in cfs_user_write()

cfs_user_write() calls filp->f_op->write() which does not check the
mode of filp.  Call vfs_write() instead.

Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Change-Id: I0cbb2e88d813fe53ce9d625c4299fc5277d246f5
Reviewed-on: http://review.whamcloud.com/4824
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
7 years agoLU-2566 tests: delete obsolete kernel version check
Bob Glossman [Fri, 4 Jan 2013 01:39:56 +0000 (17:39 -0800)]
LU-2566 tests: delete obsolete kernel version check

Since the kernel version check that leads to the reported problem
is obsolete it is simplest to just delete the check

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I190e9d71877268600c877fa156e8911f84f56beb
Reviewed-on: http://review.whamcloud.com/4947
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1187 test: add dne test to insanity.sh
wangdi [Sun, 18 Nov 2012 21:34:23 +0000 (13:34 -0800)]
LU-1187 test: add dne test to insanity.sh

1. Add test_10 (fail MDT0/OST/MDT1) and
test_11(fail MDT0/client/MDT1), test_12(MDTs/OSTs/Clients),
test_13(MDTs/Clients/OSTs) and test_14(OSTs/Clients/MDTs).

2. Replace fail SINGLEMDS with fail all MDTs to
fully test DNE.

Change-Id: Ic3cae011d6ede5b0b9616608cc840a0565777ecd
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4319
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
7 years agoLU-2127 osc: fix wrong osc_announce_cached() msgs
Bruno Faccini [Wed, 10 Oct 2012 17:23:44 +0000 (19:23 +0200)]
LU-2127 osc: fix wrong osc_announce_cached() msgs

In osc_announce_cached() wrong signed/unsigned comparison has been fixed with
a cast.

Unlikely conditions have also been specified, along with some changes to comply
coding rules.

Signed-off-by: Bruno Faccini <bfaccini62@gmail.com>
Change-Id: I8f8f2bdfc673d31054b4db2063d32c3dc34100d8
Reviewed-on: http://review.whamcloud.com/4246
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-2288 build: Support build-id links for kernel modules
John L. Hammond [Fri, 9 Nov 2012 22:06:39 +0000 (16:06 -0600)]
LU-2288 build: Support build-id links for kernel modules

Follow RHEL practice of making kernel modules executable so that their
build-id links are installed and perf an other tools can find
their debuginfo thereby.

Change-Id: I1a288fda0948424b85a61cf4294319dbbe05dd81
Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Reviewed-on: http://review.whamcloud.com/4491
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Reviewed-by: Keith Mannthey <kemannthey@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2492 obdclass: lu_object_find_at() waits forever
Bobi Jam [Sat, 5 Jan 2013 00:52:22 +0000 (08:52 +0800)]
LU-2492 obdclass: lu_object_find_at() waits forever

In htable_lookup(), cfs_hash_bd_lookup_locked() could add an object
refcount and it messes with lu_object_put(), and the object's supposed
last holder will miss the change to free the object, leaving an 0
referred object in the hash table, and keeps lu_object_find_at()
waiting forever.

In this patch, we do not take the refcount of the dying object
in htable_lookup().

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I4bd57e944bf9167d70d97845be55241b538872df
Reviewed-on: http://review.whamcloud.com/3439
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2489 mdc: Restrict access to hsm_nl file
John L. Hammond [Thu, 13 Dec 2012 18:24:45 +0000 (12:24 -0600)]
LU-2489 mdc: Restrict access to hsm_nl file

Disallow ordinary users from writing to /proc/fs/lustre/mdc/*/hsm_nl
to prevent denials of service.

Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Change-Id: Ibd37cb9365bc4583fa964b18c3d87f264d1ca33d
Reviewed-on: http://review.whamcloud.com/4825
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>
7 years agoLU-2432 ptlrpc: alloc_rqbd spin on vmap_area_lock
Liang Zhen [Tue, 1 Jan 2013 08:23:09 +0000 (16:23 +0800)]
LU-2432 ptlrpc: alloc_rqbd spin on vmap_area_lock

vmalloc based allocations can potentially take a very long time to
complete due to a regression in the kernel. As a result, MDS service
threads might lock up for certain periods of time while all of the
cores spin on the vmap_area_lock down in ptlrpc_alloc_rqbd.

Tihs patch only allow one thread of each CPT to enter rqbd
alloation path.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I4ba442801859ae58cf8e8dd8ae18af1062379639
Reviewed-on: http://review.whamcloud.com/4939
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2190 mountconf: zfs processes mount parameters
Lai Siyao [Wed, 5 Dec 2012 02:32:43 +0000 (10:32 +0800)]
LU-2190 mountconf: zfs processes mount parameters

Add zfs support to store/fetch lustre mount parameters into/from
dataset properties.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I1ca6255cc19ef99727c639432741164993b09bd8
Reviewed-on: http://review.whamcloud.com/4732
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-2043 iokit: sgpdd-survey support for multiple servers
Gregoire Pichon [Fri, 28 Sep 2012 12:17:51 +0000 (14:17 +0200)]
LU-2043 iokit: sgpdd-survey support for multiple servers

This patch is an improvement to sgpdd-survey script that
allows measurement of raw storage bandwidth of multiple
servers sharing storage arrays.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Change-Id: I2506818303ae26cc1a378f3a0da0e081582f988d
Reviewed-on: http://review.whamcloud.com/4122
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2360 ptlrpc: a few fixes for req_history read
Liang Zhen [Sun, 23 Dec 2012 09:53:29 +0000 (17:53 +0800)]
LU-2360 ptlrpc: a few fixes for req_history read

This patch fixed a few issues in seq_file operations of ptlrpc
request history:
- start() function always start from CPT 0 despite of start position,
  this might cause endless read.
- ptlrpc history sequence can't be directly used as read position of
  seq_file, because seq_read() can increase position to indicate
  reading of the next element, this will actually change CPT ID of
  sequence, which means it's possible that next() will never be able
  to finish iteration of requests on a CPT in some case.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I3ee4e06d3b93dcc61bfd910725d4cab87b555511
Reviewed-on: http://review.whamcloud.com/4888
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
7 years agoLU-2104 recovery: keep valid obd_stale_clients during recovery
Mikhail Pershin [Tue, 20 Nov 2012 18:01:23 +0000 (22:01 +0400)]
LU-2104 recovery: keep valid obd_stale_clients during recovery

- in class_fail_export() update obd_stale_clients counter if
  recovery is in progress. That fixes endless recovery issues.
- class_disconnect_stale_exports() should check exp_failed and
  exclude such exports from being evicted once more.
- set obd_no_conn flag in ofd_prepare() like mdt does.
- remove check for obd_no_conn from check_for_clients(). That is
  extra check as we don't allow any client to connect while
  obd_no_conn is set

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I439a1edd49a9c51f42df4c423d7c165468a3d38d
Reviewed-on: http://review.whamcloud.com/4636
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-2237 tests: new test for re-recreating last_rcvd
Fan Yong [Tue, 11 Dec 2012 23:25:46 +0000 (07:25 +0800)]
LU-2237 tests: new test for re-recreating last_rcvd

To verify that the lost "last_rcvd" file can be re-created
when server mount.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I3eca382f37aa983bed89418c5b5d997d594fd1f3
Reviewed-on: http://review.whamcloud.com/4455
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-2515 quota: handle OBD_QC_CALLBACK for interoperability
Niu Yawei [Fri, 21 Dec 2012 04:07:18 +0000 (23:07 -0500)]
LU-2515 quota: handle OBD_QC_CALLBACK for interoperability

Add back the OBD_QC_CALLBACK handler, to make 2.4 client interop
with old servers.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Idf5614d1755c87146e2f99cc07dd70f1395733e6
Reviewed-on: http://review.whamcloud.com/4878
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
7 years agoLU-2569 test: use xattr.h from sys.
Richard Henwood [Thu, 3 Jan 2013 22:37:09 +0000 (16:37 -0600)]
LU-2569 test: use xattr.h from sys.

glibc now provides sys/xattrs.h. This is used over the
old attr/xattr.h originally provided by SGI.

Signed-off-by: Richard Henwood <richard.henwood@intel.com>
Change-Id: Ie3ca5b53e8a1a71ac2b51431780c5dbc19e18594
Reviewed-on: http://review.whamcloud.com/4946
Tested-by: Hudson
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1187 tests: add create remote directory to racer
wangdi [Sun, 18 Nov 2012 21:26:54 +0000 (13:26 -0800)]
LU-1187 tests: add create remote directory to racer

Add create remote directory to racer

Test-Parameters: envdefinitions=SLOW=yes testlist=racer
Change-Id: Iac666d78ac8696dd4fd3e0318d105bb0040d10f8
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4365
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1199 build: Refactor ldiskfs's build system
Christopher J. Morrone [Thu, 29 Nov 2012 22:05:39 +0000 (14:05 -0800)]
LU-1199 build: Refactor ldiskfs's build system

Lustre has a complicated build system that combines automake
files and the kernel's Makefile.in build system in a rather
serpentine system that has long chains of makefile includes,
making it very difficult for the reader to ever know exactly
which targets and reles will either be required or  available
under any specific set of conditions.

The good news is that none of that is required by ldiskfs
because ldiskfs is only built for kernel-space Linux.
We only need one fairly straight forward build path.

To simplify the build system, we:

- Remove Rules.in
- Remove all autoMakefile.am files
- Remove confusing build/Makefile
- Combine the three .m4 files into one, since
  that was just a hold-over from Lustre's build system.
- Cleanup and improve some of the m4 macros
- Remove the multi-level build/ subdirectory tree
  and replace with single-level config subdirectory.
- Fix the ldiskfs debuginfo package (actually contains
  the patched source of ldiskfs!)
- Simplify autogen.sh
- Update .gitignore files

Change-Id: I9e6112c150c1e0f9076d5e689b69534eab7a964b
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4728
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-718 mds: new MDS layer.
wangdi [Thu, 26 Sep 2013 08:36:35 +0000 (01:36 -0700)]
LU-718 mds: new MDS layer.

Pull out ptlrpc service from MDT and create new MDS layer.

Change-Id: Ib8a5d22c1f85d086f6ed37e4c46c7aa0e3c4b03a
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4354
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2501 osc: hold cli list lock for osc_exit_cache
Jinshan Xiong [Sun, 16 Dec 2012 17:42:13 +0000 (09:42 -0800)]
LU-2501 osc: hold cli list lock for osc_exit_cache

Somehow it's not held before which hit the assert.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I48e50c3e8df197ed5d17ceecf41e995cc7d87f69
Reviewed-on: http://review.whamcloud.com/4834
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1199 build: Untangle the ldiskfs build system from lustre 09/4409/10
Christopher J. Morrone [Mon, 26 Nov 2012 21:38:35 +0000 (13:38 -0800)]
LU-1199 build: Untangle the ldiskfs build system from lustre

Make ldiskfs have its own independant build system, with no
sharing of files from higher up the tree in lustre.  To begin
with, this means some minor duplication of functions in build
scripts.  However, it is my opinion that the simpicity that
is gained by having a clear separation of the build systems
far outweighs the costs of some initial duplication.  It
also opens up the possibility of easily moving ldiskfs into
its own separate git repo should we choose to do so in the
future.

The separation of the build systems began by removing the
ldiskfs/build->lustre/build symbolic link, and making a
complete copy of the lustre/build tree into ldiskfs/build.
Then I iterated on removing everything from ldiskfs/build
that was unnecessary to build ldiskfs.

Since lustre's build/autogen.sh is no longer shared between
two build systems, I removed the wrapper autogen.sh scripts
and made the upper-level autogen.sh in both lustre and
ldiskfs full-fledged scripts.  This meant making a minor
change to remove bash specific language (pushd/popd).

Now the ldiskfs subtree is capable of being built completely
absent of the lustre tree.  There are no doubt more things
that can be trimmed and cleaned up, but that much is now
complete.

Also, along the way I noted build/Makefile is being ignored
by git, even though it is part of the source tree, and not
auto-generated by the build system.  I added "!Makefile" to
.gitignore in the lustre/build directory so that it is no
longer ignored.

Change-Id: I98e437a0da897680e3ea6f21f15bcd6287367166
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/4409
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
7 years agoLU-2148 mount: Kernel update for latest FC18 kernel
yangsheng [Sat, 22 Dec 2012 20:14:49 +0000 (04:14 +0800)]
LU-2148 mount: Kernel update for latest FC18 kernel

Upstream kernel has hidden the mount gut. So get rid
of mount.h dependence. Then we can build patchless
client using kernel-devel rpms for FC18.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I53c6b56cee8276afc2a5ebc61d9199fbef1edfc9
Reviewed-on: http://review.whamcloud.com/4741
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
7 years agoLU-1994 llite: atomic_open support
Peng Tao [Tue, 28 Aug 2012 01:53:27 +0000 (09:53 +0800)]
LU-1994 llite: atomic_open support

v3.6 adds iop->atomic_open, to facilitate atomic lookup/create/open.
In the meantime, struct open_intent is removed from nameidata, and
->lookup()/->create() on longer carries intent data. So Lustre has
to support atomic_open in order to preserve intent functionality.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Ibf4eee5a98c7a86417dc22b0075f647600328668
Reviewed-on: http://review.whamcloud.com/4387
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agonew tag 2.3.58 2.3.58 v2_3_58 v2_3_58_0
Oleg Drokin [Mon, 31 Dec 2012 21:38:29 +0000 (16:38 -0500)]
new tag 2.3.58

Change-Id: I69ef99e4ef58b9b88fc20dc5c94314520f8a98b2

7 years agoLU-1187 fld: fix fldb proc after moving range lookup to fld.
wangdi [Wed, 25 Sep 2013 23:58:35 +0000 (16:58 -0700)]
LU-1187 fld: fix fldb proc after moving range lookup to fld.

Read fldb entries from index file directly, instead of cache, because
it might conflict with cache merging process.

Also a few fixes to make both ldiskfs and ZFS work for fldb procfs.

Change-Id: I2b8d0014b0ed0fe64c36f884f90862e720fe38e4
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4350
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: John Hammond <jhammond@tacc.utexas.edu>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2240 fld: Move range lookup to fld.
wangdi [Wed, 25 Sep 2013 23:57:01 +0000 (16:57 -0700)]
LU-2240 fld: Move range lookup to fld.

Because ZFS does not support range lookup in a ZAP, we will move
range lookup  to FLD, and do an in-memory lookup there.  The FLD
entries are still stored in an index on disk, but this is just a
container and is not used for searching anymore.

It is expected the FLD will always be able to fit in RAM.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: If8cadcc30743e6d63ba779a430bc585af29d51fe
Reviewed-on: http://review.whamcloud.com/4396
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2291 tests: add "lfs setstripe" to racer
Andreas Dilger [Tue, 6 Nov 2012 19:22:08 +0000 (12:22 -0700)]
LU-2291 tests: add "lfs setstripe" to racer

During the file_create.sh test, instead of just creating the file with
default striping use "lfs setstripe -c ${{RANDOM % OSTCOUNT}}" to both
exercise the "lfs setstripe" path under load, as well as make the
file IO spread across multiple OSTs.

Test-Parameters: envdefinitions=SLOW=yes testlist=racer
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I26020d516388af0bb95d320c0f2a364395bd0b12
Reviewed-on: http://review.whamcloud.com/4478
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2505 osc: use GFP_ATOMIC for ll_dirty_page_discard_warn()
Jinshan Xiong [Wed, 19 Dec 2012 17:12:23 +0000 (09:12 -0800)]
LU-2505 osc: use GFP_ATOMIC for ll_dirty_page_discard_warn()

Because it can be called inside client obd list lock as follows:

        ll_dirty_page_discard_warn at ffffffffa0a3d252 [lustre]
        vvp_page_completion_common at ffffffffa0a7adfc [lustre]
        vvp_page_completion_write_common at ffffffffa0a7ae6b [lustre]
        vvp_page_completion_write at ffffffffa0a7b83e [lustre]
        cl_page_completion at ffffffffa05eed8f [obdclass]
        osc_completion at ffffffffa0880812 [osc]
        osc_ap_completion at ffffffffa086a544 [osc]
        brw_interpret at ffffffffa0876d69 [osc]

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I04a4cc1142e019d39dccf2c1f3084c0298acff9d
Reviewed-on: http://review.whamcloud.com/4870
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-2500 osp: osp_precreate_timeout_condition() to return 1
Alex Zhuravlev [Tue, 18 Dec 2012 12:22:42 +0000 (16:22 +0400)]
LU-2500 osp: osp_precreate_timeout_condition() to return 1

so that l_wait_even() in osp_precreate_reserve() can expire.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Iee7f9e2195103b25647a41d95a13c3bc4d3dd344
Reviewed-on: http://review.whamcloud.com/4846
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2285 osp: Block new reservations during orphan recoveries
Li Wei [Thu, 15 Nov 2012 10:26:27 +0000 (18:26 +0800)]
LU-2285 osp: Block new reservations during orphan recoveries

If a thread reserves a pre-created object during an orphan recovery,
it may get an orphan that is being destroyed by the orphan cleanup
request.  This patch introduces a new flag, opd_pre_recovering, to
indicate an OSP is doing orphan recovery and makes sure new
reservations are blocked at least until the orphan recovery is done.

Change-Id: If011de57d0e365768ea28a705c864388eaed76d4
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/4590
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-2490 mdd: mdd_links_rename() be quiet in regular cases
Alex Zhuravlev [Mon, 17 Dec 2012 06:45:56 +0000 (10:45 +0400)]
LU-2490 mdd: mdd_links_rename() be quiet in regular cases

when LINKEA is overflowed or some link can not be found in
LINKEA due to previous overflow.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I6bc8000df4af61031fd0c51c7d9d05c248f0d777
Reviewed-on: http://review.whamcloud.com/4838
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2485 lod: initialize v3 to actual buf
Alex Zhuravlev [Wed, 12 Dec 2012 18:26:19 +0000 (22:26 +0400)]
LU-2485 lod: initialize v3 to actual buf

and do not pass v3=NULL to lustre_swab_lov_user_md_v3()

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I7ad7898a736833ac86e0188248c2222a7652f41a
Reviewed-on: http://review.whamcloud.com/4814
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1434 utils: Update Makefile to work out of the box
Nathaniel Clark [Mon, 17 Dec 2012 17:21:29 +0000 (12:21 -0500)]
LU-1434 utils: Update Makefile to work out of the box

Add ability to install plugins into user's home directory if not root.
Build using pkg-config for wireshark.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I5b3f5d6df7e5f1de9681645f7f2f4d01800b40cd
Reviewed-on: http://review.whamcloud.com/4851
Tested-by: Hudson
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-1434 utils: Update Wireshark support for LNet and Lustre
Doug Oucharek [Thu, 25 Oct 2012 22:19:43 +0000 (15:19 -0700)]
LU-1434 utils: Update Wireshark support for LNet and Lustre

There was work previously done to create two plugins for Wireshark to
decode LNet and Lustre headers. That work is started was
lustre/contrib as the files packet-lnet.c and packet-lustre.c.

Attempting to build these plugins revealed that Wireshark's API for
dissectors has changed such they no longer build/run. This change
fixes the plugins so they work with the latest stable Wireshark
release: 1.6.8. It also adds logic to allow the plugins to decode
Infiniband packets captured with ibdump.

Note: The LNet decoding appears to be correct, the Lustre decoding
does have problems which will be addressed in future patches.

Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Change-Id: I2fbadf1c8baef1df2c50754646cd9c1f6b30f8e8
Reviewed-on: http://review.whamcloud.com/4393
Tested-by: Hudson
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-1994 llite: don't release nd->path in ll_follow_link
yangsheng [Wed, 19 Dec 2012 08:07:19 +0000 (16:07 +0800)]
LU-1994 llite: don't release nd->path in ll_follow_link

For 3.6 kernel, .follow_link is not allowed to release nd,
as VFS handles itself on error path. So we change to not do
it and report error via nd_set_link().

For all kernels, if ll_follow_link returns NULL and set
error via nd_set_link, VFS will release nd->path in
__vfs_follow_link(). This also matches most in-kernel fs
behavior.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: yang sheng <yang.sheng@intel.com>
Change-Id: I13b7e00822b983c47183ee38357e4490bea3c52c
Reviewed-on: http://review.whamcloud.com/4487
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1337 llite: support SEEK_HOLE and SEEK_DATA
yangsheng [Tue, 18 Dec 2012 04:21:36 +0000 (12:21 +0800)]
LU-1337 llite: support SEEK_HOLE and SEEK_DATA

kernel 3.1 introduced SEEK_HOLE and SEEK_DATA. llite should
handle them as required by vfs. For now, we can just consider
whole file is data.

Also fix race between concurrent SEEK_CURs by taking f_lock
in SEEK_CUR, as implemented since kernel commit ef3d0fd27.
Before that, kernel handled the race by taking i_mutex.

Kernel introduced f_lock to protect f_flags when dropping BKL
in kernel commit db1dd4d3. Later, f_lock is extended to protect
Protects f_ep_links, f_flags, and f_pos vs i_size in lseek
SEEK_CUR.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I944102f20ab1ca1083a16d41e95802d6b8bda15d
Reviewed-on: http://review.whamcloud.com/4579
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
7 years agoLU-1187 tests: Add test_mkdir in sanity for DNE.
wangdi [Wed, 14 Nov 2012 20:02:43 +0000 (12:02 -0800)]
LU-1187 tests: Add test_mkdir in sanity for DNE.

1. Replace mkdir with test_mkdir, which will create local or
remote directory according to its testnum, i.e. choose the
mdt index by testnum % mdt_count, then create directory
by lfs mkdir.

2. Some cleanups replace dxx/fxx with $tdir/$tfile, remove
"--skip" in SKIP message.

Change-Id: I7d5396ddb50c7414f78a76c20772a06da438f4e0
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4359
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-2471 tests: Fix facet_type() to recognise names like mds1_2
Li Wei [Tue, 18 Dec 2012 14:40:49 +0000 (22:40 +0800)]
LU-2471 tests: Fix facet_type() to recognise names like mds1_2

In conf-sanity 24a, mdsdevname() and mdsvdevname() are given facet
numbers like "1_2".  This causes facet_type() to be given facet names
like "mds1_2", which it can not return the facet type "MDS".  This
patch fixes facet_type() to handle names like "mds1_2" properly.

Signed-off-by: Li Wei <wei.g.li@intel.com>
Change-Id: I0203add5f6fdf089d5061ee48c6efca449db1a96
Reviewed-on: http://review.whamcloud.com/4849
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2463 security: osd_mknod shouldn't alter mode after creation
Lai Siyao [Fri, 14 Dec 2012 02:25:08 +0000 (10:25 +0800)]
LU-2463 security: osd_mknod shouldn't alter mode after creation

ldiskfs osd_mknod() calls init_special_inode() after creation, which
will update inode->i_mode, don't use the mode from client because
mode is decided at creation time.

Test-Parameters: envdefinitions=SLOW=yes testlist=posix
Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: Id11c00bf57903e210fc96d33437dd3ece6f2e171
Reviewed-on: http://review.whamcloud.com/4829
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1187 tests: Add DNE test cases in sanity.
wangdi [Wed, 14 Nov 2012 20:00:21 +0000 (12:00 -0800)]
LU-1187 tests: Add DNE test cases in sanity.

1. test_17n: e2fsck check MDTs after remote ops.
2. test_24[x-z]: rename and link validation under remote dir.
3. test_33d openfile and chmod under remote dir.
4. test_230 create/unlink remote dir.

Change-Id: Id0587ab8f7a3daa6ba85ce5255cbd13e6189bd6f
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4358
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-1187 tests: sanity fixes for multiple MDT
wangdi [Mon, 12 Nov 2012 22:44:30 +0000 (14:44 -0800)]
LU-1187 tests: sanity fixes for multiple MDT

1. test_27y: deactive/degrade OSCs on all of MDTs, the original
implementation just assume there will be only 1 MDT.
2. test_39l: set atime_diff on MDT0 during the test.
3. test_129: set max_dir_size on all of MDTs.
4. remove test_55bb which is invalid for current DNE.

Signed-off-by: wang di <di.wang@whamcloud.com>
Change-Id: Idc31b078afd23f9834de2218c88e8167785ea854
Reviewed-on: http://review.whamcloud.com/4523
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-1187 tests: Add DNE tests into recovery-small.
wangdi [Wed, 14 Nov 2012 20:42:22 +0000 (12:42 -0800)]
LU-1187 tests: Add DNE tests into recovery-small.

Add DNE tests in recovery-small 110[a-f].

Change-Id: I80a6d02b65bcd55fce9938be6251dd7e9cfbe802
Signed-off-by: Wang Di <di.wang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4360
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-20 build: fix confirmpatches, remove old patches
Andreas Dilger [Mon, 3 Dec 2012 07:02:26 +0000 (00:02 -0700)]
LU-20 build: fix confirmpatches, remove old patches

Update both confirmpatches.sh and clearpatches.sh scripts to take
a command line argument of the patch directory to check.  Add
options "-h" for help, and "-v" for verbose.

Update confirmpatches.sh to ignore comment lines in patch series.

Update clearpatches.sh to have a "-d" option to delete the patches
it found to be unused.

Remove unused kernel/ldiskfs patches found from running clearpatches.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Id5a1de13930f1c428a13d6816e68db40ce61cab0
Reviewed-on: http://review.whamcloud.com/4755
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1419 lnet: Add support for Cray's Gemini interconnect
James Simmons [Wed, 5 Dec 2012 18:54:39 +0000 (13:54 -0500)]
LU-1419 lnet: Add support for Cray's Gemini interconnect

This patch adds LNET support to use Cray's Gemini
interconnect on their newer systems. The gnilnd was
originally based off of the ralnd.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Chris Horn <hornc@cray.com>
Signed-off-by: Cory Spitz <spitzcor@cray.com>
Change-Id: Ia98a44f4f3d68773438d820c49fe554a3d551dc5
Reviewed-on: http://review.whamcloud.com/3381
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2450: Do not store and use unreferenced oap pointers
Oleg Drokin [Sun, 16 Dec 2012 20:21:49 +0000 (15:21 -0500)]
LU-2450: Do not store and use unreferenced oap pointers

osc_extent_finish looks for the last oap to see if it was a partial
write or not, and does it by storing a pointer to it, but by the time
we need the offsets from this OAP, it might have already been freed
because completion was called.
Change the code to store oap offset and byte count instead.

Change-Id: Id52743e701d9b090907eb42ff4648c589193f000
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4835
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1914 ldlm: add doxygen comments
Ned Bass [Thu, 13 Sep 2012 19:17:56 +0000 (12:17 -0700)]
LU-1914 ldlm: add doxygen comments

Update original patch from bugzilla b=20943 written by Oleg Drokin for
master.  Extensively document functions, data structures and
subsystems in the ldlm module.  Make various improvements to language
and formatting of existing comments.  Complete conversion of major
struct definitions to tab indentation.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Oracle-bug-id: b=20943
Change-Id: I10086a1be943b2b473f90129bc2d6abab31d9bd7
Reviewed-on: http://review.whamcloud.com/3985
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-2100 ofd: small batched precreation on a small system
Alex Zhuravlev [Mon, 15 Oct 2012 09:53:29 +0000 (13:53 +0400)]
LU-2100 ofd: small batched precreation on a small system

on a small system (like NAME=local configuration) ldiskfs
transactions can not accept many changes. with batched
precreation in OFD, the default value of 128 objects may
lead to warnings and transaction overflow. to prevent this
OFD checks fs and if it's small (OFD_PRECREATE_SMALL_FS
= 1GB), then initial number of objects to precreate in a
single transaction is set to OFD_PRECREATE_BATCH_SMALL=8.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Id9b9c4b6abd76df69787777cc52380d71fdf5a86
Reviewed-on: http://review.whamcloud.com/4274
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
7 years agoLU-1994 kernel: 3.6 dentry_open uses struct path as first arg
Peng Tao [Tue, 28 Aug 2012 16:08:17 +0000 (00:08 +0800)]
LU-1994 kernel: 3.6 dentry_open uses struct path as first arg

3.6 dentry_open uses struct path as first argument.
see kernel commit 765927b2 for details.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Ib69021356b1483abfcc49f644260b1dcbb57f76b
Reviewed-on: http://review.whamcloud.com/4386
Tested-by: Hudson
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-1994 kernel: kernel 3.6 changes i_dentry/d_alias to hlist
yang sheng [Wed, 5 Dec 2012 19:57:22 +0000 (03:57 +0800)]
LU-1994 kernel: kernel 3.6 changes i_dentry/d_alias to hlist

kernel 3.6 changes i_dentry/d_alias from list to hlist.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: If05f01fe6fe34225ec24b90bf85eb9e9e80f44f3
Reviewed-on: http://review.whamcloud.com/4385
Tested-by: Hudson
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-1994 kernel: 3.5 kernel encode_fh passes in parent inode
Peng Tao [Thu, 23 Aug 2012 05:55:46 +0000 (13:55 +0800)]
LU-1994 kernel: 3.5 kernel encode_fh passes in parent inode

Changed by upsteam commit b0b0382b.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I6d7223b934bfe4151371744ad72bdab6b170c700
Reviewed-on: http://review.whamcloud.com/3757
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
7 years agoLU-1994 llite: kernel 3.5 renames end_writeback to clear_inode
yang sheng [Wed, 5 Dec 2012 19:38:15 +0000 (03:38 +0800)]
LU-1994 llite: kernel 3.5 renames end_writeback to clear_inode

kernel commit dbd5768f8 renames end_writeback to clear_inode,
which used to exist for ~2.6.36 kernels.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I2435e820092085c0fb55539818f4bad9e48ff386
Reviewed-on: http://review.whamcloud.com/3756
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
7 years agoLU-2329 quota: wait longer in test_7c
Niu Yawei [Tue, 4 Dec 2012 09:25:17 +0000 (04:25 -0500)]
LU-2329 quota: wait longer in test_7c

In test_7c of s-q, we'd wait longer than usual to make sure
the reintegration triggered by quota wb thread is done.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I977b3a03a0e57424a531df13fed5550a753f41c2
Reviewed-on: http://review.whamcloud.com/4739
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
7 years agoLU-1741 test: fix conf_sanity test_18 test case
Bobi Jam [Tue, 14 Aug 2012 11:35:35 +0000 (19:35 +0800)]
LU-1741 test: fix conf_sanity test_18 test case

* We need always check block device's size bigger than its minimum
  requirement.

* Correct code indentation for formatall().

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I884287f43a2d1499a5be986e7d57d8d1a3827a24
Reviewed-on: http://review.whamcloud.com/3632
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>