Whamcloud - gitweb
fs/lustre-release.git
12 years agoLU-1319 mdt: increment MDT getattr stats
Ned Bass [Thu, 12 Apr 2012 23:20:59 +0000 (16:20 -0700)]
LU-1319 mdt: increment MDT getattr stats

Move increment of MDT getattr stat from mdt_getattr() to
mdt_getattr_internal() so we don't miss other call paths
that may service getattr requests.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I45ae7a73eaf81fbe56775725d07ec275b4261f1f
Reviewed-on: http://review.whamcloud.com/2526
Reviewed-by: Yang Sheng <ys@whamcloud.com>
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-1249 debug: Auto correct improper debug buffer size setting
Bobi Jam [Mon, 9 Apr 2012 05:03:51 +0000 (13:03 +0800)]
LU-1249 debug: Auto correct improper debug buffer size setting

Use the minimum required value when the debug buffer size setting
value is too small, and use the maximum acceptable value when it is
too large.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I89def7762f2ec9da3a25d28f7ffa9aede390eb85
Reviewed-on: http://review.whamcloud.com/2489
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-549 llite: Improve statfs performance if selinux is disabled
Yevheniy Demchenko [Tue, 10 Apr 2012 20:01:14 +0000 (22:01 +0200)]
LU-549 llite: Improve statfs performance if selinux is disabled

Even if selinux is disabled, client still tries to get selinux
attributes from MDS. As xattrs are not yet cached, this significantly
slows down xattr heavy operations like ls -l. This patch forces
to return -EOPNOTSUPP on the client side if selinux is disabled.
It speeds up ls -l 25% for cold-cache case and 50% for hot-cache
case.

Signed-off-by: Yevheniy Demchenko <zheka@uvt.cz>
Change-Id: I5e416093bba4126e5fcad62d8c0a2963c1866386
Reviewed-on: http://review.whamcloud.com/2503
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
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-1209 tests: add debug info to 133d
wangdi [Wed, 14 Mar 2012 06:36:25 +0000 (23:36 -0700)]
LU-1209 tests: add debug info to 133d

Add more information in 133d to help understanding the
failure.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: Ic84120fa5adcab9490abce732993c7c90d3e2881
Reviewed-on: http://review.whamcloud.com/2309
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-911 ost: ost_handle() to refill environment on every requests
Mikhail Pershin [Thu, 12 Apr 2012 10:09:20 +0000 (14:09 +0400)]
LU-911 ost: ost_handle() to refill environment on every requests

OST threads hold environment (lu_env) for request handling. when
a last instance of some device (say ofd or osd) gone, all keys
registered by the device are released, but enviroments are kept.
then at device instantiation the environments aren't repopulated.
this patch fixes this.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib691f22955d40335535fcf3013d62badb24f7f49
Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1850
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-911 osd: use struct obd_statfs instead of kstatfs_t
Alex Zhuravlev [Mon, 12 Dec 2011 16:49:41 +0000 (19:49 +0300)]
LU-911 osd: use struct obd_statfs instead of kstatfs_t

OSD API and users to use struct obd_statfs.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I6bd98a632db9cd9f6ee4309c29d878a61bd7a228
Reviewed-on: http://review.whamcloud.com/1837
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-911 osd: fix th_sync and OSD_EXEC_OP issues
Mikhail Pershin [Fri, 13 Apr 2012 07:02:26 +0000 (11:02 +0400)]
LU-911 osd: fix th_sync and OSD_EXEC_OP issues

This issues occurs during the porting from Orion to the master
- th_sync should accumulate values with '|=' to be not dropped
  occasionally to the async state from sync
- remove duplicated code
- remove ASSERTION in OSD_EXEC_OP as it was previously done but
  returned again from orion by mistake

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I6ee7eb8a086eae6e0a96364a90a192e6ac95903b
Reviewed-on: http://review.whamcloud.com/2530
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-709 build: clean up HAVE_CAN_SLEEP_ARG and HAVE_F_OP_FLOCK
Peng Tao [Mon, 23 Jan 2012 03:05:34 +0000 (11:05 +0800)]
LU-709 build: clean up HAVE_CAN_SLEEP_ARG and HAVE_F_OP_FLOCK

1. flock_lock_file_wait only has two arguments ever since v2.6.12
2. file_operations.flock exists since v2.6.12

Signed-off-by: Peng Tao <peng_tao@emc.com>
Change-Id: I92406f1042dab71ade780b02500fba4404a56a2b
Reviewed-on: http://review.whamcloud.com/2315
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-709 build: clean up LC_STRUCT_INTENT_FILE and LC_SUNRPC_CACHE
Peng Tao [Mon, 23 Jan 2012 02:52:12 +0000 (10:52 +0800)]
LU-709 build: clean up LC_STRUCT_INTENT_FILE and LC_SUNRPC_CACHE

1. open_intent.file was added since v2.6.14
2. cache_head.ref was added since v2.6.16

Signed-off-by: Peng Tao <peng_tao@emc.com>
Change-Id: Ie4047431f56cf71ef7a17115c2cd1a3812256419
Reviewed-on: http://review.whamcloud.com/2314
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-1280 ldiskfs: remove LASSERTF from ext3_ext_new_extent_cb()
Yu Jian [Thu, 5 Apr 2012 10:35:10 +0000 (18:35 +0800)]
LU-1280 ldiskfs: remove LASSERTF from ext3_ext_new_extent_cb()

The LASSERTF() in ext3_ext_new_extent_cb() was injected for
debugging purpose to make sure the race really happened but
was forgotten to be removed from the original patch in
http://review.whamcloud.com/1618 .

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I978b8ab88cc4413c7ac00db838f7578f8011b192
Reviewed-on: http://review.whamcloud.com/2452
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
12 years agoLU-1247 obdfilter: fix invalid check of precrate objects
Alexander.Boyko [Wed, 21 Mar 2012 17:47:53 +0000 (21:47 +0400)]
LU-1247 obdfilter: fix invalid check of precrate objects

MDT precreate objects when it has objects count less than the
oscc->oscc_grow_count / 2. oscc->oscc_grow_count can be equal
to OST_MAX_PRECREATE, so MDT (last_id - next_id) is less than the
(OST_MAX_PRECREAT * 3 / 2). This patch fix the wrong condition at
filter_handle_precreate() when delete orphans request happend.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: Andriy Skulysh <andriy_skulysh@xyratex.com>
Xyratex-bug-id: MRP-440
Change-Id: I5bac3ee7261fe7462254bd80565d770041c3c206
Reviewed-on: http://review.whamcloud.com/2365
Reviewed-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
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-1214 ptlrpc: splits server-side connection/bulkIO/recovery
Liu Xuezhao [Sun, 18 Mar 2012 12:56:07 +0000 (20:56 +0800)]
LU-1214 ptlrpc: splits server-side connection/bulkIO/recovery

Splits/removes these server-side handling from client:
1. Server-side connection and disconnection
2. Splits obdecho client and server
3. Server-side bulk I/O
4. Server-side recovery handling

Uses "HAVE_SERVER_SUPPORT" to protect those server-side codes.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I14422a36ffa6fa46604682c9eed6d27dd56a4888
Reviewed-on: http://review.whamcloud.com/2360
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1095 debug: Report remaining recovery time consistently
Christopher J. Morrone [Mon, 27 Feb 2012 00:20:47 +0000 (16:20 -0800)]
LU-1095 debug: Report remaining recovery time consistently

Consistency is good, always report the remaining recovery time
in the mm:ss format.  This patch get's the last 3 remaining
instances where it is simply reported as a total number of seconds.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: If5599d8c24b1cd862ab89670553fcd24672cadbc
Reviewed-on: http://review.whamcloud.com/2204
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1095 debug: Improve messages for fake requests
Christopher J. Morrone [Mon, 27 Feb 2012 00:19:21 +0000 (16:19 -0800)]
LU-1095 debug: Improve messages for fake requests

Update the console filter to correctly handle fake requests and
squelched the lov_update_create_set() message for the
-ETIMEDOUT/-ENOTCONN case.

 LustreError: 7872:0:(lov_request.c:693:lov_update_create_set()) error
 creating fid 0x104c5e0b sub-object on OST idx 53/2: rc = -107

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: I5f37f585566b053d515665fcddbcc8a3e653d89a
Reviewed-on: http://review.whamcloud.com/2203
Tested-by: Hudson
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1095 debug: Common client/server message standardization
Christopher J. Morrone [Mon, 27 Feb 2012 00:16:51 +0000 (16:16 -0800)]
LU-1095 debug: Common client/server message standardization

Enhance and standardize several common messages.  In particular
when a peer is involved ensure peers nid is in the message, and
on the server include the obd name in the message.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: Iaea477e7dab240866a10c1863886d21d674e293d
Reviewed-on: http://review.whamcloud.com/2200
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1095 debug: Standardize, suppress mount/umount messages
Christopher J. Morrone [Mon, 27 Feb 2012 00:06:29 +0000 (16:06 -0800)]
LU-1095 debug: Standardize, suppress mount/umount messages

Standardize mount/umount console message to include profile name,
and optionally suppress them with the 'quiet' mount option.  We
have been using private namespaces for testing and mounting then
umounting the FS as needed for each job.  In this context these
messages end up causing alot of syslog noise.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: I7514f6016c337a358e5e31146644810dff292d02
Reviewed-on: http://review.whamcloud.com/2199
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-80 mds: use md_size supplied by client, repack reply
Mikhail Pershin [Thu, 29 Mar 2012 13:07:42 +0000 (21:07 +0800)]
LU-80 mds: use md_size supplied by client, repack reply

- mdt uses only client easize to pack reply buffer with the same
buffer sizes as client has.
- introduce reply growing, when packing reply the proper MD size
might be unknown so clients data is being used, but after request
processing the proper size may be bigger than client expects and
reply buffer must be re-packed.
- if server data doesn't fit in buffer then it allocates bigger
buffer instead of using reply message buffer.
- rename mdt_shrink_reply into mdt_fix_reply. It does shrink and/or
grow when needed. Upon growing the bigger MD is copied into new
reply.
- server unpacks ea attr size always in mdt_reint_record for all
operation, so it is available always in rr_eadatasize.

Port from: ORI-80
Author: Mikhail Pershin <tappro@whamcloud.com>

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Ieae6a1d4d07fdf7643ca6900d02d0dd962a07f6c
Reviewed-on: http://review.whamcloud.com/1808
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1308 Additional multihomed nid config fix
Oleg Drokin [Wed, 25 Apr 2012 19:28:22 +0000 (15:28 -0400)]
LU-1308 Additional multihomed nid config fix

Need to put the new nid addition at the last slot available,
not next after the last.

Change-Id: Icf9d898fba4c6e9c05f085b855a33282ea0d4b47
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2599
Reviewed-by: Denis Kondratenko <Denis_Kondratenko@xyratex.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Cory Spitz <spitzcor@cray.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-709 build: cleanup LC_SEQ_LOCK/FILEMAP_FDATAWRITE_RANGE
Peng Tao [Mon, 23 Jan 2012 05:08:46 +0000 (13:08 +0800)]
LU-709 build: cleanup LC_SEQ_LOCK/FILEMAP_FDATAWRITE_RANGE

1. struct seq_file has lock instead of semaphore since v2.6.17
   and seq_file lock is not used in Lustre
2. filemap_fdatawrite_range is exported since v2.6.27
   andRHEL v2.6.18 back ported it. So all kernels Lustre
   supports now have it.

Signed-off-by: Peng Tao <peng_tao@emc.com>
Change-Id: I5730852789a5c19350eebb65fd61baf2a6512626
Reviewed-on: http://review.whamcloud.com/2321
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-709 build: cleanup VFS_KERN_MOUNT/INVALIDATEPAGE_RETURN_INT
Peng Tao [Sat, 25 Feb 2012 04:20:49 +0000 (12:20 +0800)]
LU-709 build: cleanup VFS_KERN_MOUNT/INVALIDATEPAGE_RETURN_INT

1. vfs_kern_mount is added since v2.6.18
2. invalidatepage returns void since v2.6.17

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I9926072d2d519c64ef927e02a13a6e9b0c72f2af
Reviewed-on: http://review.whamcloud.com/2320
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-1320 llite: fix a race between readpage and releasepage
Jinshan Xiong [Wed, 18 Apr 2012 04:40:24 +0000 (21:40 -0700)]
LU-1320 llite: fix a race between readpage and releasepage

This is a race between page stealing and readpage. If a just read
page is stolen, readpage will find the page is not uptodate, this
makes it panic so -EIO is returned to the reading application.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: Ib16d12d3bc3cc8c0545aa27f0836e4fd89c3a809
Reviewed-on: http://review.whamcloud.com/2591
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-1308 Properly add multihomed nids to peer table
Oleg Drokin [Tue, 17 Apr 2012 06:31:10 +0000 (02:31 -0400)]
LU-1308 Properly add multihomed nids to peer table

class_add_uuid had a copy&paste error where it was checking against
wrong entry for nid tables and as such had trouble finding multihomed
nid configurations.

Change-Id: I2d73bdde9cf7b0bf882b14b473b4491873e64c25
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2561
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
12 years agoLU-1240 iokit: fix incorrect statement in README
Minh Diep [Fri, 6 Apr 2012 17:24:14 +0000 (10:24 -0700)]
LU-1240 iokit: fix incorrect statement in README

file_count should be per thread

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I656d53417a529025f863622036ee51fbbfb4364b
Reviewed-on: http://review.whamcloud.com/2464
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Richard Henwood <rhenwood@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1282 lprocfs: Add a module param to disable percpu stats
Bobi Jam [Thu, 12 Apr 2012 00:48:42 +0000 (08:48 +0800)]
LU-1282 lprocfs: Add a module param to disable percpu stats

Add an obdclass module option to choose to use a single lprocfs stats
structure rather than percpu data.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I45d5a05029197e629d4f7d161a5e4e5d01a93bf5
Reviewed-on: http://review.whamcloud.com/2515
Tested-by: Hudson
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1192 tests: automate POSIX compliance testing
Minh Diep [Mon, 5 Mar 2012 23:09:55 +0000 (15:09 -0800)]
LU-1192 tests: automate POSIX compliance testing

a. assuming that the POSIX source already installed
on the system
b. setup loop back ext4 filesystem
c. install, build and run POSIX binaries on ext4
d. run POSIX again lustre
f. compare results from ext4 and lustre

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I104a43549a2dedf272b52c4c9ce3ab0d50a223eb
Reviewed-on: http://review.whamcloud.com/2256
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-840 tests: Fix conf-sanity.sh test_32b
Andriy Skulysh [Sat, 17 Mar 2012 23:45:07 +0000 (01:45 +0200)]
LU-840 tests: Fix conf-sanity.sh test_32b

Fix correct settings debug level
Fix correct mdt.upcall path
Fix mgs node settings to able to connect to correct host
(alternative way to fix it's
- add waiting for export to wait ost<>mgs connection established)

Xyratex-bug-id: MRP-233
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Change-Id: I4bc21fe4abfff0cf89dbb83a1149f822ba69438c
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Bruce Korb <bruce_korb@xyratex.com>
Reviewed-on: http://review.whamcloud.com/1695
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-482 test: sync MDS before first replay test
Lai Siyao [Mon, 16 Apr 2012 01:53:09 +0000 (09:53 +0800)]
LU-482 test: sync MDS before first replay test

Maloo autotest system often fails on mountdata lost on MDS, the cause
may be related with LMV and hyporvisor usage. Sync MDS before first
replay to flush all files on MDS.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I2c0fe37d77b05c81e567c70ef5bffca9eae84632
Reviewed-on: http://review.whamcloud.com/2545
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1285 tests: fix tar breakage in 102d/102f/102j
Andreas Dilger [Thu, 5 Apr 2012 23:37:09 +0000 (17:37 -0600)]
LU-1285 tests: fix tar breakage in 102d/102f/102j

Due to changes in commit a5fed8233f4f5755d61909849e23d146a94d4396
to remove the use of ad-hoc "lfs getstripe" output parsing, the
sanity.sh tests 102d, 102f, and 102j were broken.  Fix the tests
to use "lfs getstripe [-c|-S|-i]" instead of "get_stripe_info()".

Allow the new files to have 3/4 stripes (per min_stripe_count())
of the originally backed up files in case there are not enough
OSC objects available.

Also clean up the formatting of test_102a to match the coding
style, avoid breaking the vim syntax highlighting due to the
use of excessive quoting, and add proper error messages on failure.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I2cd09c455f024882d94cf945a0e2f546d13ac27a
Reviewed-on: http://review.whamcloud.com/2458
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1144 ptlrpc: implement a NUMA aware ptlrpcd binding policy
Gregoire Pichon [Wed, 7 Mar 2012 12:53:37 +0000 (13:53 +0100)]
LU-1144 ptlrpc: implement a NUMA aware ptlrpcd binding policy

This is a complement to the ORNL-22 general ptlrpcd threads pool
support.

This patch improves the PDB_POLICY_NEIGHBOR ptlrpcd binding policy,
when the kernel supports NUMA. In that case, the ptlrpcd threads are
all binded and have threads in the same NUMA node setup as partners.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Change-Id: I8eb553d6f25fac6fd64faf1eecfa4dfae5ed15ee
Reviewed-on: http://review.whamcloud.com/2212
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
12 years agoLU-1205 tests: cleanup code style in mmap_sanity.c
Andreas Dilger [Mon, 12 Mar 2012 20:43:45 +0000 (14:43 -0600)]
LU-1205 tests: cleanup code style in mmap_sanity.c

Cleanup numerous code style issues in the mmap_sanity.c test:
- whitespace at end of line
- spaces around operators
- indentation
- line wrapping at 80 columns

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I7481d358732effa58875cbf2a2d545bf741ecab0
Reviewed-on: http://review.whamcloud.com/2291
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1205 tests: add timestamps to sanityn 18 mmap
Andreas Dilger [Mon, 12 Mar 2012 20:23:07 +0000 (14:23 -0600)]
LU-1205 tests: add timestamps to sanityn 18 mmap

The sanityn.sh test_18 mmap_sanity.c test sometimes takes over
an hour to run, and sometimes only seconds.  Add timestamps to
the subtest results so that it is possible to debug where that
time is being spent.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie33c46d9b72083c79112455ac9df6f357dc7cab0
Reviewed-on: http://review.whamcloud.com/2290
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1241 kernel: Kernel update [RHEL6.2 2.6.32-220.7.1.el6]
yangsheng [Tue, 27 Mar 2012 16:19:04 +0000 (00:19 +0800)]
LU-1241 kernel: Kernel update [RHEL6.2 2.6.32-220.7.1.el6]

Update RHEL6.2 kernel to 2.6.32-220.7.1.el6.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: Ib8149b5fb50dce2f2eb3555be06c4946e763ea93
Reviewed-on: http://review.whamcloud.com/2389
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
12 years agoLU-1016 build: no sub-builds in sub-shells
Bruce Korb [Mon, 12 Mar 2012 23:54:49 +0000 (16:54 -0700)]
LU-1016 build: no sub-builds in sub-shells

The make program paradigm is to have command failures fail the make.
Invoking a failing "make" in a subshell will cause the subshell
to exit returning non-zero to the invoking shell.  However, the
invoking shell will *NOT* exit.  Therefore, to correctly use a
subshell in a make file scriptlet, use the following template:

  ( do-some-stuff ) || false

this will work as expected.  You want "false" instead of "exit 1"
in case make as been invoked with the "-i" ("--ignore-errors")
option.

WRT the code in question, there really is no need of even using
a subshell.  So this patch fixes two (related) things:

1.  the "for subdir in $(RPM_SUBDIR)" is now done in one process
    and will cause the superior make to stop if any subdirectory
    make fails.

2.  The tests for BUILD_TESTS and BUILD_SERVER for building RPMs
    need to take into account the possibility that these are not
    necessarily defined in all autoMakefile.am's that use the
    autoMakefile.am.toplevel file.

Signed-off-by: Bruce Korb <bruce_korb@xyratex.com>
Xyratex-bug-id: MRP-361
Change-Id: Icbfd453d42a69a2b65d66677e02d89f746533121
Reviewed-on: http://review.whamcloud.com/2012
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
12 years agotag 2.2.51 2.2.51 v2_2_51_0
Oleg Drokin [Mon, 9 Apr 2012 20:51:26 +0000 (16:51 -0400)]
tag 2.2.51

Change-Id: Ief1b53a52c1b7e6512004b1ca73ea32d09419ccc
Signed-off-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1134 test: can not assume lustre setup before nfs test
Minh Diep [Mon, 12 Mar 2012 20:42:15 +0000 (13:42 -0700)]
LU-1134 test: can not assume lustre setup before nfs test

During autotest, lustre can be unmounted. parallel-scale-nfs
test should not assume that lustre is mounted and skip the setup.

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I79bd995efd9f08b27ec8c08ac7087be78d578a36
Reviewed-on: http://review.whamcloud.com/2218
Tested-by: Hudson
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-911 defs: XATTR_NAME_FID defition
Alex Zhuravlev [Mon, 12 Dec 2011 17:11:08 +0000 (20:11 +0300)]
LU-911 defs: XATTR_NAME_FID defition

to be used by OFD later to store back pointer
to MDS object referencing this OST object.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I5c7b4838efa9064eedf6c530d9eb54bed9e602fb
Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1839
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-630 lnet: only router checks peer health
Lai Siyao [Mon, 5 Dec 2011 07:28:39 +0000 (15:28 +0800)]
LU-630 lnet: only router checks peer health

The peer health code is designed for router, so a ~rtr node always
assumes peers to be alive.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: Iacdc7359c69e0f172de0914048b35bd6fe06133e
Reviewed-on: http://review.whamcloud.com/1797
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1200 build: check page_mkwrite parameter
Peng Tao [Fri, 9 Mar 2012 16:08:23 +0000 (00:08 +0800)]
LU-1200 build: check page_mkwrite parameter

In SLES11 SP0 (2.6.27.19-5.1), .page_mkwrite uses struct page *
instead of struct vm_fault * as its second parameter.

Signed-off-by: Peng Tao <peng_tao@emc.com>
Change-Id: I249174b34d90edb31bc3dce79a79da3c795975d5
Reviewed-on: http://review.whamcloud.com/2277
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1160 tests: remove liblustre from default tests
Andreas Dilger [Fri, 2 Mar 2012 06:19:48 +0000 (23:19 -0700)]
LU-1160 tests: remove liblustre from default tests

The liblustre testing is currently failing. Since this functionality
is not being used by any (or at least not many?) users since it is
no longer used for the Cray Catamount compute clients, the liblustre
testing should be removed from automated test runs.

Until the test can be fixed this test can be re-enabled. As yet,
the liblustre code will not be removed from the tree.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I916994b71a60e0f8596b7babb69c67a8b2bebc73
Reviewed-on: http://review.whamcloud.com/2244
Tested-by: Hudson
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1227 tests: mds-survey.sh should check ost's space
Minh Diep [Fri, 23 Mar 2012 00:40:30 +0000 (17:40 -0700)]
LU-1227 tests: mds-survey.sh should check ost's space

When we run the test with stripe_count=1, we need to
reduce the file_count to be the min of both mdt's inode
and ost's inode

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I04a558c277ebf9a1e1526a7d507faab8b66e740c
Reviewed-on: http://review.whamcloud.com/2372
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1156 ldlm: per-export waiting flock lists for deadlock detection
Vitaly Fertman [Thu, 1 Mar 2012 16:50:05 +0000 (20:50 +0400)]
LU-1156 ldlm: per-export waiting flock lists for deadlock detection

replace 1 common list of flocks with 1 common spinlock by per-export
list with per-export lock

Change-Id: Ib59c1b4e0e3d08e07505bdfffc007ac2850e9258
Xyratex-Bug-ID: MRP-382
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Andriy Skulysh <andriy_skulysh@xyratex.com>
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-on: http://review.whamcloud.com/2239
Tested-by: Hudson
Reviewed-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1245 lprocfs: use correct cpu number
Bobi Jam [Tue, 27 Mar 2012 02:50:06 +0000 (10:50 +0800)]
LU-1245 lprocfs: use correct cpu number

Take care of correct cpu number in lprocfs_stats_collector().

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ifb149f64ee6d5b67a029331c0d0452fc29533c6b
Reviewed-on: http://review.whamcloud.com/2384
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-1254 iokit: should not use single '[]'
Minh Diep [Fri, 23 Mar 2012 01:06:06 +0000 (18:06 -0700)]
LU-1254 iokit: should not use single '[]'

Single [] checking for empty variable is dangerous.
When the variable is undefined, it will fall through
without double quote

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: Iec49cd704be8d106cce07032dc20f060f6044e8a
Reviewed-on: http://review.whamcloud.com/2373
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-352 obdfilter: fix obdfilter-survey to work on verify mode.
Alexander.Boyko [Thu, 15 Mar 2012 06:14:27 +0000 (14:14 +0800)]
LU-352 obdfilter: fix obdfilter-survey to work on verify mode.

With r/o cache landing lctl test_brw command needs to choose a type
of operation with backend device. osc needs to use obd_brw mode,
but obdfilter doesn't work in that mode. It needs to force to use a
obd_prep + obd_commit more.

Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Xyratex-bug-id: MRP-131, MRP-277
Change-Id: I562784b3e9fe537929e78e0197256949cb27a9e1
Reviewed-on: http://review.whamcloud.com/598
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-80 utils: add "-c <stripe_count>" option to lfs_migrate
Yu Jian [Thu, 29 Mar 2012 10:16:28 +0000 (18:16 +0800)]
LU-80 utils: add "-c <stripe_count>" option to lfs_migrate

Add "-c <stripe_count>" option to lfs_migrate to support
restriping the file with a specified stripe count. A sanity
test case was also added to check this option.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Ia86d2417cfa7d08a424ef325c9b3a4509abfc87f
Reviewed-on: http://review.whamcloud.com/2247
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
12 years agoLU-911 obdclass: la_from_obdo helper
Alex Zhuravlev [Fri, 25 Nov 2011 07:39:49 +0000 (10:39 +0300)]
LU-911 obdclass: la_from_obdo helper

- OFD will need la_from_obdo() conversion.
- Fix obdo_from_la() to work with la flags.
- Call obdo_set_parent_fid() directly when needed instead of
  using obdo_from_inode() just to update parent fid
- Make obdo_from_inode() consistent with its name and don't
  update parent FID from.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ib1a7d0a4a3e19434ae48c74b06b153d2fc5e5d78
Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1848
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-447 lnet: add lctl --net XXX push
James Simmons [Fri, 30 Mar 2012 12:50:09 +0000 (08:50 -0400)]
LU-447 lnet: add lctl --net XXX push

Lctl --net XXX push is used to clear out purgatory conns arbitrarily.
We use this with lctl --net XXX disconnect for regression testing.
This does not nuke the peer, so it shouldn't yield lnd_query failures
like del_peer does.

Change-Id: Ib47bde4497b8ef49deb6bbfa0c4d8f5b40470c5e
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/1003
Reviewed-by: Cory Spitz <spitzcor@cray.com>
Tested-by: Hudson
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1255 tests: pass $DBENCH_LIB to run_dbench.sh
Yu Jian [Fri, 23 Mar 2012 10:02:11 +0000 (18:02 +0800)]
LU-1255 tests: pass $DBENCH_LIB to run_dbench.sh

This patch does:
1) pass the values of $DBENCH_LIB and $DBENCH_SRC to run_dbench.sh
2) redirect the output of tar directly into the $LOG file instead of
   messing up the test output
3) check the $LOGDIR directory inside gather_logs() in case
   this function was called before init_logging()
4) fix check_logdir() and check_write_access() to avoid using
   node.$(hostname -s).yml files which should not be deleted

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I32350bfe3481614a2e5de7d5e7c254b09bd7e774
Reviewed-on: http://review.whamcloud.com/2376
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1244 obdecho: destroy ost objects for md echo client.
wangdi [Wed, 21 Mar 2012 00:27:55 +0000 (17:27 -0700)]
LU-1244 obdecho: destroy ost objects for md echo client.

Since md echo client connects MDT directly, and there are no
lov for echo client, so it will destroy the ost object in
mdd_unlink directly.

In setxattr test, it should set another EA, instead of LOV,
which would cause problem in the following test.

Reset valid before unlink and getattr.

Signed-off-by: Di Wang <di.wang@whamcloud.com>
Change-Id: Id3da42fac4af944ceef7db34f13e8f2b40f733b6
Reviewed-on: http://review.whamcloud.com/2356
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1137 ldlm: fix for the flock handling for 1.8 clients
Alexey Lyashkov [Fri, 24 Feb 2012 10:47:37 +0000 (02:47 -0800)]
LU-1137 ldlm: fix for the flock handling for 1.8 clients

The current fix intended to fix the issue with incorrect flock
owner field filling. This issue observed when 1.8 clients
(and with lesser version) doesn't fill the owner field correctly.
With this patch this filling integrated on the 2.x server side.

Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andriy Skulysh <andriy_skulysh@xyratex.com>
Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Signed-off-by: Iurii Golovach <iurii_golovach@xyratex.com>
Xyratex-bug-id: MRP-413
Change-Id: I88ba40eb9cb74d07b90862801669028c5dc94e08
Reviewed-on: http://review.whamcloud.com/2193
Reviewed-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-709 build: Remove last bit of HAVE_GFP_T
James Simmons [Fri, 30 Mar 2012 12:44:34 +0000 (08:44 -0400)]
LU-709 build: Remove last bit of HAVE_GFP_T

The build fails when using a external OFED stack due to the
lack of HAVE_GFP_T. This test is no longer needed for newer
kernels.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I6957750736036d6a5150e85442565859e04ce975
Reviewed-on: http://review.whamcloud.com/2417
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-673 llite: Add some metadata stats, fix some file stats.
John L. Hammond [Mon, 12 Mar 2012 19:45:13 +0000 (14:45 -0500)]
LU-673 llite: Add some metadata stats, fix some file stats.

Add LPROC_LL_CREATE, LPROC_LL_LINK, LPROC_LL_UNLINK, LPROC_LL_SYMLINK,
LPROC_LL_MKDIR, LPROC_LL_RMDIR, LPROC_LL_MKNOD, and LPROC_LL_RENAME
for successful calls to the corresponding directory inode operations.

Add LPROC_LL_READDIR for successful calls to ll_readdir().

Tally LPROC_LL_OPEN if and only if the call succeeds.  Under the
previous behavior, opens of a file that was already open locally with
the same flags were not tallied.

Do not tally LPROC_LL_SETATTR when the setattr is from truncate() or
truncate from open().

Tally LPROC_LL_TRUNC when appropriate in ll_setattr_raw(), but remove
tallies in ll_truncate() and vvp_io_init().  Under the previous
behavior, a single call to truncate() caused LPROC_LL_TRUNC to be
tallied 3 times (and similarly for truncate from open()).

Remove the unused stats LPROC_LL_WB_WRITEPAGE, LPROC_LL_WB_PRESSURE,
LPROC_LL_WB_OK, LPROC_LL_WB_FAIL, LPROC_LL_LOCKLESS_TRUNC,
LPROC_LL_DIRECT_READ, LPROC_LL_DIRECT_WRITE, LPROC_LL_LOCKLESS_READ,
and LPROC_LL_LOCKLESS_WRITE.

Change-Id: Id286a6eb986088ea109da2e6c6e31b9d21a34562
Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Reviewed-on: http://review.whamcloud.com/1360
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-911 osd: support for legacy OST objects in ldiskfs osd
Mikhail Pershin [Thu, 15 Mar 2012 19:14:26 +0000 (23:14 +0400)]
LU-911 osd: support for legacy OST objects in ldiskfs osd

ldiskfs osd maintains O/ directory: recognize IDIFs and use O/
to lookup/create such objects by ldiskfs/vfs means.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I76207e5e0540c51923ceaa32a37e4b7a998b624e
Reviewed-on: http://review.whamcloud.com/1836
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-506 kernel: remove unnecessary memset from autoconf test
yangsheng [Thu, 22 Mar 2012 02:16:14 +0000 (10:16 +0800)]
LU-506 kernel: remove unnecessary memset from autoconf test

Eliminate memset() usage from config check. It may introduces
its own compiler error on some systems.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I1e6eae772782b3dbeab75230bfa41e781c4c4028
Reviewed-on: http://review.whamcloud.com/2336
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-812 compat: file_operations.fsync needs 4 arguments
Wally Wang [Fri, 9 Mar 2012 18:39:49 +0000 (10:39 -0800)]
LU-812 compat: file_operations.fsync needs 4 arguments

Linux 3.0 file_operations.fsync needs 4 arguments.

Change-Id: I1e376f35edb87e9eaa0feb82e69905f04ec8ee93
Signed-off-by: Wally Wang <wang@cray.com>
Reviewed-on: http://review.whamcloud.com/1950
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-989 ldlm: Fix client's import destruction
Andriy Skulysh [Fri, 13 Jan 2012 14:08:57 +0000 (16:08 +0200)]
LU-989 ldlm: Fix client's import destruction

Move client's import destruction from disconnect to cleanup phase
The patch allows to use connect after disconnect.

Xyratex-bug-id: MRP-288
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Change-Id: I984660a2917a7e4d5c95cd8288dd6974a7c3ccba
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-on: http://review.whamcloud.com/1963
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-354 test: Change dev_set_rdonly() check to warning
Brian Behlendorf [Fri, 9 Mar 2012 23:08:55 +0000 (15:08 -0800)]
LU-354 test: Change dev_set_rdonly() check to warning

The dev_set_rdonly() symbol is only required to fence I/O
from the underlying device for testing.  This patch is not
strictly required to build a lustre release.

In addition, this change updates the dt_ro callback to
potentially return an error code.

Change-Id: I35b0a120087845e2a57c9df6c3e1de5b9e4b6ff7
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/1872
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1146 build: update script to refresh copyright
Andreas Dilger [Fri, 2 Mar 2012 02:27:42 +0000 (19:27 -0700)]
LU-1146 build: update script to refresh copyright

Update the script for batch processing of copyright messages so that
it can add new copyright messages in addition to replacing existing
copyright messages.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I4d8fe306da7444e9d75214e9fc314a42f4aef345
Reviewed-on: http://review.whamcloud.com/2241
Tested-by: Hudson
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-709 build: clean up LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP
Peng Tao [Tue, 24 Jan 2012 05:00:30 +0000 (13:00 +0800)]
LU-709 build: clean up LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP

grab_cache_page_nowait_gfp does not exist from v2.6.18 to
latest kernel. HAVE_ADD_TO_PAGE_CACHE_LRU is checked twice

Signed-off-by: Peng Tao <peng_tao@emc.com>
Change-Id: I95b8ba91b357c5803613927fce41804f1ad6adf8
Reviewed-on: http://review.whamcloud.com/2326
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-709 build: cleanup two unused macros
Peng Tao [Sat, 25 Feb 2012 05:14:57 +0000 (13:14 +0800)]
LU-709 build: cleanup two unused macros

1. HAVE_MAPPING_CAP_WRITEBACK_DIRTY is not used due to remove of
   LC_EXPORT_FILEMAP_FDATAWRITE_RANGE
2. HAVE_VFS_SYMLINK_5ARGS is not used

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: I28383c00087da1b88694770436aab06149e7b8f9
Reviewed-on: http://review.whamcloud.com/2325
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-709 build: clean up libcfs/autoconf/lustre-libcfs.m4
Peng Tao [Fri, 27 Jan 2012 20:27:11 +0000 (04:27 +0800)]
LU-709 build: clean up libcfs/autoconf/lustre-libcfs.m4

1. cpu_online is found from v2.6.18 to latest
2. gfp_t is always defined from v2.6.18 to latest
3. HAVE_SCHED_SHOW_TASK is not used
4. task_struct has rcu field since v2.6.16
5. panic_notifier_list is atomic since v2.6.18
6. HAVE_NLMSG_MULTICAST_5ARGS is not used
7. HAVE_NETLINK and HAVE_NETLINK_NL2 are not used
8. kernel has kmem_cache from v2.6.18 to latest
9. HAVE_NETLINK_NS and HAVE_NETLINK_CBMUTEX is not used

Signed-off-by: Peng Tao <peng_tao@emc.com>
Change-Id: Ib10d4b9f19f96aa85f9be4d6f2dbaa7fb4cbbc34
Reviewed-on: http://review.whamcloud.com/2328
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-974 protocol: change OBD_CONNECT_GRANT_PARAM
Andreas Dilger [Tue, 13 Mar 2012 19:26:05 +0000 (13:26 -0600)]
LU-974 protocol: change OBD_CONNECT_GRANT_PARAM

Change the OBD_CONNECT_GRANT_PARAM flag value to avoid conflict
with the OBD_CONNECT_UMASK flag from LU-974.  While that patch is
not yet landed to our release tree, it is in use in production at
some customers.  While the risk of conflict is currently low, it
is easier to change the GRANT_PARAM value since only in use on the
orion branch, and isn't even handled by the client there yet.

Add (hopefully) clear comments for OBD_CONNECT and obd_connect_data
to ensure that they are not modified in some incompatible way across
branches.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I503892c3b595c0272b0941fa58a16a49631ecab0
Reviewed-on: http://review.whamcloud.com/2297
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-836 ldiskfs: require ldiskfs filesystem has journal
Andriy.Skulysh [Tue, 30 Aug 2011 08:42:31 +0000 (11:42 +0300)]
LU-836 ldiskfs: require ldiskfs filesystem has journal

Add check for journal presence during ldiskfs mount

Xyratex-Bug-Id: MRP-118
Change-Id: If26005f7b597ed8815991fac7cda80e1df2f36e9
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-on: http://review.whamcloud.com/1687
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-1166 recovery: don't leak a connected client counter.
Alexey Lyashkov [Mon, 5 Mar 2012 16:17:19 +0000 (20:17 +0400)]
LU-1166 recovery: don't leak a connected client counter.

target_handle_connect vs client eviction race may leak a
connected client counter and some evicted clients will counted twice.

Xyratex-bug: MRP-451

Change-Id: Id35baae16ae09bc3647d089b45b95e967582d09b
Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-on: http://review.whamcloud.com/2255
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
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-884 osc: remove unlikely() marker for checksums
Andreas Dilger [Sat, 25 Feb 2012 23:06:39 +0000 (16:06 -0700)]
LU-884 osc: remove unlikely() marker for checksums

When the bulk RPC checksums were originally introduced they were
disabled by default, and marked with an unlikely() annotation for
the compiler to optimize branch prediction.  Checksums are now
enabled by default, so this compiler annotation is incorrect.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ib1d5c09da732224dfd331c1ce07a252a441ed549
Reviewed-on: http://review.whamcloud.com/2197
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-808 llite: deny truncate beyond user rlimit
Andreas Dilger [Mon, 31 Oct 2011 20:14:27 +0000 (14:14 -0600)]
LU-808 llite: deny truncate beyond user rlimit

Add a call to inode_newsize_ok() in ll_setattr_raw() to ensure
that the file is not truncated beyond the VFS/VM maximum limits
or the user maximum file size, as set by rlimit.

Replace the PAGE_CACHE_MAXBYTES constant with MAX_LFS_FILESIZE,
which is already defined by the VFS.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I6b4f03820dd59d6b1c3429e9bbfea62c50206cc9
Reviewed-on: http://review.whamcloud.com/1635
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-812 compat: clean up mutex lock to use kernel mutex primitive
Wally Wang [Tue, 28 Feb 2012 20:19:43 +0000 (12:19 -0800)]
LU-812 compat: clean up mutex lock to use kernel mutex primitive

Linux has removed DECLARE_MUTEX and init_MUTEX/_LOCKED which
were defined with semaphore functions. Instead of continuing to
map the cfs_mutex_*() functions to semaphore, this patch
maps these functions to existing kernel mutex primitive.

Change-Id: Ie814dd2a04f506b67b20b474c4a04147413d6506
Signed-off-by: Wally Wang <wang@cray.com>
Reviewed-on: http://review.whamcloud.com/1949
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-444 lnet: Add LNetError for S_LND and S_LNET
James Simmons [Mon, 5 Mar 2012 14:28:48 +0000 (09:28 -0500)]
LU-444 lnet: Add LNetError for S_LND and S_LNET

This changes the console error string for LND and LNET subsystem
messages to LNet or LNetError depending on the severity. This
should make it much easier to figure out where the issues are.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ibd5f5c4cd717d2c9b6bd865e7e13258e84cda821
Reviewed-on: http://review.whamcloud.com/990
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-433 ldiskfs: remove jbd2-jcberr patch from kernel
Brian Behlendorf [Fri, 9 Mar 2012 22:12:12 +0000 (14:12 -0800)]
LU-433 ldiskfs: remove jbd2-jcberr patch from kernel

Remove the AC_MSG_ERROR for kernels which don't export either
the jbd2_journal_callback_set or journal_callback_set symbols.
These are no longer required if your building against ext4
and thus should not cause a failure at configure time.

Change-Id: I09151d6eaf409627bdcd31abf5b8a1826e1f3355
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/2278
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-1047 utils: mkfs shouldn't create loopback files in /dev
Johann Lombardi [Fri, 27 Jan 2012 21:48:17 +0000 (22:48 +0100)]
LU-1047 utils: mkfs shouldn't create loopback files in /dev

When the target device does not exist, mkfs.lustre shouldn't assume
that the user wants to create a loopback file under /dev.

This patch also fixes some error msgs printed by mkfs.lustre:
mkfs.lustre: Unable to create backing store: 2
mkfs.lustre: Unable to truncate backing store: 2

to be instead:
mkfs.lustre: Unable to create backing store: No such file or directory
mkfs.lustre: Unable to truncate backing store: No such file or
             directory

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I5f4393a47d06e5b7bde7745b38a938dcd2eb7ecd
Reviewed-on: http://review.whamcloud.com/2035
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-787 clio: ftruncate shouldn't block when grouplock is hold
Johann Lombardi [Thu, 2 Feb 2012 13:21:22 +0000 (14:21 +0100)]
LU-787 clio: ftruncate shouldn't block when grouplock is hold

Pass the file descriptor used by ftruncate to the CLIO stack so that
ccc_io_one_lock_index() can use the group lock when appropriate (i.e.
when LL_FILE_GROUP_LOCKED is set).

This patch also adds a regression test for this issue.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Signed-off-by: Jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I81828cc63bb40586cc1155a58c00e3dab1100ec3
Reviewed-on: http://review.whamcloud.com/2081
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-92 files and dirs missing in dist tarball
Brian J. Murrell [Tue, 22 Feb 2011 19:47:32 +0000 (14:47 -0500)]
LU-92 files and dirs missing in dist tarball

Some files and dirs are missing in the "dist" tarball.

Change-Id: I24d4cb2c294850192d504eb49193fdf62df06a6a
Signed-off-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/356
Reviewed-by: Andreas Dilger <adilger@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-1110 fid: add full support for open-by-fid
Lai Siyao [Wed, 29 Feb 2012 04:44:54 +0000 (12:44 +0800)]
LU-1110 fid: add full support for open-by-fid

Op-by-fid which involves parent change are not permitted:
        link/unlink/rename/create/open(CREATE)
return -EPERM directly in case dt operations are triggered, but obf
object doesn't have disk object, which will panic.

Add more sanity tests for op-by-fid.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I10869923e861ac0165886a48880f58e1269554ec
Reviewed-on: http://review.whamcloud.com/2224
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Faccini Bruno <bruno.faccini@bull.net>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-611 tests: clean up code style in tests/lfs
Andreas Dilger [Thu, 26 Jan 2012 11:31:15 +0000 (04:31 -0700)]
LU-611 tests: clean up code style in tests/lfs

Make existing "lfs {find,getstripe,setstripe}" tests more consistent.
- whitespace/line wrap/line continuation cleanups
- put the options at the start, and pathnames at the end.
- use $GETSTRIPE and $SETSTRIPE everywhere
- use "getstripe [-c|-i|-S]" instead of parsing verbose output
- use "getstripe -S" instead of "getstripe -s"
- replace uses of "getstripe --offset" with "getstripe --index"

Make sanity test_27z parsing of "lfs getstripe" output more robust:
- do not depend on positional parameters for most output
- use "lfs getstripe [-c|-i|-S]" options to get specific values
- parse OST index/objid/seq on a line-by-line basis
- use debugfs to extract filter_fid info instead of unmount/remount OSTs

Remove duplicate code in test_204 parsing of default/raw striping.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ia90de17e39e38543bcd9bc5a9861533accf6500c
Reviewed-on: http://review.whamcloud.com/2022
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-611 utils: lfs find --stripe-{count,size,index}
Andreas Dilger [Thu, 26 Jan 2012 10:45:20 +0000 (03:45 -0700)]
LU-611 utils: lfs find --stripe-{count,size,index}

Add options to "lfs find" so it can find files by their stripe-count,
stripe-index, and stripe-size. For stripe-index (alias ost-index) it
is possible to specify a comma-separated list of OST indexes. Make the
short options for these consistent between "lfs find", "lfs getstripe"
and "lfs setstripe", keeping the old options for usage compatibility.
Add sanity.sh tests for the new "lfs find -c, -i, -S" options.

Add a verbose deprecation for "lfs {get,set}stripe --offset" (which
is too vague a term) and suggest "lfs {get,set}stripe --index",
which existed since Lustre 1.8.1 and can be used for interop tests.
The prefered long-term option name is --stripe-index, but this is not
available in Lustre 1.8.x and would break interop tests.

Remove deprecated "-v", "-q", and "-r" options from "lfs find".  These
are holdovers from when "lfs find" and "lfs getstripe" were the same
command, and have been verbosely deprecated since the 1.6.4 release.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ia90de17e39e38543bcd9bc5a9861533accf6c158
Reviewed-on: http://review.whamcloud.com/1264
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1148 build: Handle download kernel-devel failure
Brian J. Murrell [Wed, 29 Feb 2012 14:46:58 +0000 (09:46 -0500)]
LU-1148 build: Handle download kernel-devel failure

When the kernel-devel fails to get downloaded with yumdownloader,
emit a meaningful error message rather than just mysteriously exiting.
While it would be nice to actually be able to do something about this
failure programatically, typically it's something that requires
human intervention somewhere.  Or at least more time than we'd rather
have a build blocked for while it's rectified.

Signed-off-by: Brian J. Murrell <brian@whamcloud.com>
Change-Id: I070968f73eb0e78152705e78eedefdc3b6ac8e4f
Reviewed-on: http://review.whamcloud.com/2226
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-911 osd: OI is implemented internally within OSD
Alex Zhuravlev [Mon, 12 Dec 2011 16:16:19 +0000 (19:16 +0300)]
LU-911 osd: OI is implemented internally within OSD

previously lu infrastructure was used and it was impossible
to initialize OI without MDD (which is the case of OST).
instead ldiskfs osd use ldiskfs directly.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Iaca243959dbb83bbbe81145b2ceaaa97f95be70c
Reviewed-on: http://review.whamcloud.com/1835
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-911 osd: zerocopy methods in ldiskfs osd
Alex Zhuravlev [Wed, 23 Nov 2011 07:55:07 +0000 (10:55 +0300)]
LU-911 osd: zerocopy methods in ldiskfs osd

add implementation for zerooopy methods to manipulate data:
grab/release buffers, prepare them for read/write, commit
modified buffers, truncate

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ied662c7c837bb25b71587b69096bc12fe002d115
Reviewed-on: http://review.whamcloud.com/1834
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-958 tests: debug_mb set incorrectly for smp or vm
Denis Kondratenko [Tue, 27 Mar 2012 07:47:51 +0000 (10:47 +0300)]
LU-958 tests: debug_mb set incorrectly for smp or vm

For cpus with number of cores or for some VMs,
number of possible CPUs in the system could
be greater than number of cpu reported by getconf.
Added check for maximum debug buffer size.
Added check that "possible" is exist, if not - use old method.

Xyratex-bug-id: MRP-219 incorrect settings for debug_mb
Signed-off-by: Denis Kondratenko <Denis_Kondratenko@xyratex.com>
Change-Id: I1ea367d1b956ae1009c4a501e0f02b6c9209a2f7
Reviewed-on: http://review.whamcloud.com/2377
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1225 utils: Change %llu to LPU64
Christopher J. Morrone [Fri, 16 Mar 2012 03:12:09 +0000 (20:12 -0700)]
LU-1225 utils: Change %llu to LPU64

%llu in printf should be LPU64 to allow compilation on ppc64.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: Ia0a6adf4220e19802164e6567f3d0c5a24875fe2
Reviewed-on: http://review.whamcloud.com/2338
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1092 ptlrpc: take export refcount during connect
Lai Siyao [Mon, 19 Mar 2012 08:41:54 +0000 (16:41 +0800)]
LU-1092 ptlrpc: take export refcount during connect

In the process of (re)connect,  a refcount of export should be taken,
otherwise disconnect of this export may be called, and it will put
the last refcount of this export and make access to this export
invalid.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: Iaf27e842ed516b8968c90bfce396609e39f52c85
Reviewed-on: http://review.whamcloud.com/2345
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-709 build: clean up four macros in lustre-core.m4
Peng Tao [Sun, 22 Jan 2012 23:58:14 +0000 (07:58 +0800)]
LU-709 build: clean up four macros in lustre-core.m4

1. truncate_inode_pages_range() was added since v2.6.15
2. HAVE_RELEASEPAGE_WITH_GFP is not used
3. HAVE_STATFS_NAMELEN is not used
4. HAVE_D_ADD_UNIQUE is not used

Signed-off-by: Peng Tao <peng_tao@emc.com>
Change-Id: I6864d0f18c14f5087b2d1a0c20fcf14f92d7246f
Reviewed-on: http://review.whamcloud.com/2313
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-911 osd: minor code reorganization
Alex Zhuravlev [Wed, 23 Nov 2011 07:48:03 +0000 (10:48 +0300)]
LU-911 osd: minor code reorganization

to make structures and helpers usable outside of osd_handler.c
in other files (within ldiskfs osd)

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I1b421a0a6ad148dea0e453d8b01942fe63cf1397
Reviewed-on: http://review.whamcloud.com/1833
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@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-1222 ldlm: Fix the race in AST sender vs multiple arriving RPCs
Oleg Drokin [Tue, 20 Mar 2012 03:43:37 +0000 (23:43 -0400)]
LU-1222 ldlm: Fix the race in AST sender vs multiple arriving RPCs

LU-1046 tried to close this race, but still left a bit of a window open.
Basically when two last RPCs arrive one of them is declared as "last"
and it is the one that would release "rpc" part of the arg refcount.
The problem is the "non last" rpc might actually finish processing later.

To combat this every RPC will now hold its own arg reference.

Change-Id: I0d1e69dc6ea37224422d4c7822bb1e6b9417585b
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2350
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
12 years agoLU-1081 fid: define special FID for BFL
wangdi [Wed, 22 Feb 2012 18:44:35 +0000 (10:44 -0800)]
LU-1081 fid: define special FID for BFL

The sequence of LUSTRE_BFL_FID is in conflict with
FID_SEQ_OST_MDT1, so reserve a new sequence for this FID.

Also it defines a new FID sequence(FID_SEQ_SPECIAL) for
later special purpose.

Move some special dot_lustre oid to lustre_idl.h, so avoid
oid conflict in future.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I556b31c706cc04c610c909f83e59f0cb9a821535
Reviewed-on: http://review.whamcloud.com/2180
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-981 llite: fix loop back device writeback
Jinshan Xiong [Wed, 25 Jan 2012 07:13:26 +0000 (23:13 -0800)]
LU-981 llite: fix loop back device writeback

In vvp_mmap_locks(), we should distinguish if the write is from
loopback device, and to not try to find mmap region in this case.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I4409e460b77576e07e279200ccc69f62cc48ad0f
Reviewed-on: http://review.whamcloud.com/2010
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.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-1206: mdt: Fix error handling in mdt_mfd_open
Oleg Drokin [Thu, 15 Mar 2012 00:56:02 +0000 (20:56 -0400)]
LU-1206: mdt: Fix error handling in mdt_mfd_open

In mdt_mfd_open if the mo_open() call failed or we could not allocate
mfd, we also need to undo write/exec reference count in order to
not mess up with subsequent exec/write accesses.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Change-Id: I3bd98bd68368b48f2afaa7bb450d3a9947c992ac
Reviewed-on: http://review.whamcloud.com/2300
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
12 years agoLU-827 lov: Implement a per file data_version.
Aurelien Degremont [Tue, 10 Jan 2012 14:27:33 +0000 (15:27 +0100)]
LU-827 lov: Implement a per file data_version.

This patch extends getattr RPC to also send in its reply a data
version for the file content.  This only tracks data object changes.
This does not track chown/chmod on OST object.  This value is intended
to be only compared for equality.  A new call in liblustreapi is
available and through 'lfs data_version'.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I5d748e096b11627c05f86ef6f3f6906bce120893
Reviewed-on: http://review.whamcloud.com/1671
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1070 agl: update lock state when AGL upcall
Fan Yong [Mon, 20 Feb 2012 10:37:36 +0000 (18:37 +0800)]
LU-1070 agl: update lock state when AGL upcall

The AGL RPC sponsor may exits the cl_lock processing without
wait() called before related OSC lock upcall(). So when AGL
upcall(), it needs to update the cl_lock state according to
the enqueue result through the general cl_lock API wait().

Originally, it is done in "lov_lock_unuse()" against toplock.
But osc_lock upcall() is against sublock. So the sublock state
may be un-updated and inconsistent with the low layer osc_lock
state, then causes the sublock cannot be cached.

On the other hand, cl_lock::cll_descr::cld_enq_flags should not be
changed during unuse() for passing parameter, as the replacement,
it can be done through cl_lock::cll_flags.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I4bc4c0ef0b93d5e0c2e59304158a35c57635ad70
Reviewed-on: http://review.whamcloud.com/2099
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-734 tests: add sub-tests into recovery-*-scale tests
Yu Jian [Wed, 7 Mar 2012 14:45:27 +0000 (22:45 +0800)]
LU-734 tests: add sub-tests into recovery-*-scale tests

This patch adds sub-tests into the recovery-*-scale tests
so that test results and logs could be gathered properly
and uploaded to Maloo.

The patch also does some cleanup works on the test scripts
and moves some common functions into test-framework.sh.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I2c23b641e62a56882171982b8a3157ba023ea36c
Reviewed-on: http://review.whamcloud.com/2265
Tested-by: Hudson
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-969 debug: reduce stack usage
Hongchao Zhang [Mon, 12 Mar 2012 08:11:47 +0000 (16:11 +0800)]
LU-969 debug: reduce stack usage

1, libcfs_debug_vmsg2 to accept libcfs_debug_msg_data struture
   to replace SUBSYSTEM, __FILE__, __FUNCTION__, __LINE__ and
   cdls on the stack

2, CDEBUG, DEBUG_CAPA use static libcfs_debug_msg_data

3, remove the local variable in RETURN/GOTO/__CHECK_STACK

4, reduce stack in recovery thread by moving lu_env,
   ptlrpc_thread to heap.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: I4a66d18d956ea4526ac85794d17305bde67f5634
Reviewed-on: http://review.whamcloud.com/2162
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-1082 test: create test for mds-survey
Minh Diep [Mon, 12 Mar 2012 17:17:19 +0000 (10:17 -0700)]
LU-1082 test: create test for mds-survey

Create a mds-survey.sh test with two test cases
1. test without stripe count
2. test with stripe count
Create test_224[a|b] for quick run on metadata survey

Notice, we remove all clients before testing
because the real client and echo_client share
the same client object memory

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I453ac34d8b6019e109be5d89d482300d31571f93
Reviewed-on: http://review.whamcloud.com/2156
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-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: If1e500cfb277dfc25bc056bb0c5763e48e7dccdf
Reviewed-on: http://review.whamcloud.com/2271
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-1190 test: Test failure on sanity, subtest test_51c.
yangsheng [Thu, 8 Mar 2012 03:08:45 +0000 (11:08 +0800)]
LU-1190 test: Test failure on sanity, subtest test_51c.

Since LU-993 already add test_51ba for rmdir test, So remove test_51c.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: Ib517f83964a877b687a332c7e1ff7a74c79836b6
Reviewed-on: http://review.whamcloud.com/2269
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-734 tests: save recovery-*-scale debug logs into $LOGDIR
Yu Jian [Mon, 5 Mar 2012 08:08:53 +0000 (16:08 +0800)]
LU-734 tests: save recovery-*-scale debug logs into $LOGDIR

This patch changes the specific debug log names of
recovery-*-scale tests and saves them into $LOGDIR.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: Id1ad7dd3dde41bd49a53986945d15d80f91718e5
Reviewed-on: http://review.whamcloud.com/2261
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1195 llite: error handling for statahead/AGL start failure
Fan Yong [Thu, 8 Mar 2012 02:47:07 +0000 (10:47 +0800)]
LU-1195 llite: error handling for statahead/AGL start failure

Statahead/AGL status will be checked when release ll_statahead_info.
But if some reasons cause statahead/AGL cannot be started, then the
status are undefined. So need proper error handling for such failure
cases.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I4dec58862ad425c19e9c6284b7183b8bcaa449f6
Reviewed-on: http://review.whamcloud.com/2268
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoLU-1155 obdecho: Oops if target device can not be found.
wangdi [Thu, 1 Mar 2012 00:32:23 +0000 (16:32 -0800)]
LU-1155 obdecho: Oops if target device can not be found.

Missing setting error value if target device can not be found,
which will cause Oops in some cases.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: I5fc7cd376c8c7c276739692c7234ae142b4f6e23
Reviewed-on: http://review.whamcloud.com/2229
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
12 years agoMaster is now for upcoming 2.3.0 release 2.2.50 v2_2_50_0
Oleg Drokin [Tue, 6 Mar 2012 07:54:03 +0000 (02:54 -0500)]
Master is now for upcoming 2.3.0 release

Updates changelog and lustre version.
New tag 2.2.50

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