Whamcloud - gitweb
fs/lustre-release.git
7 years agoLU-1402 libcfs: CFS_ALLOC_HIGH is __GFP_HIGHMEM
Isaac Huang [Mon, 14 May 2012 20:23:04 +0000 (14:23 -0600)]
LU-1402 libcfs: CFS_ALLOC_HIGH is __GFP_HIGHMEM

According to the comment above CFS_ALLOC_HIGH, the flag
allows allocator to return memory in the highmen zone, but
cfs_alloc_flags_to_gfp() incorrectly converts it to
__GFP_HIGH, which enables the use of emergency pools.

__GFP_HIGHMEM should be used instead. Also it makes sense to rename
CFS_ALLOC_HIGH to CFS_ALLOC_HIGHMEM to avoid further confusion.

Signed-off-by: Isaac Huang <Isaac_Huang@xyratex.com>
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I088f36faec1fe22902065d680730731f8deab5d2
Reviewed-on: http://review.whamcloud.com/2732
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
7 years agoLU-1467 ost: ASSERTION(lock->l_req_mode == lock->l_granted_mode)
yangsheng [Wed, 6 Jun 2012 08:15:47 +0000 (16:15 +0800)]
LU-1467 ost: ASSERTION(lock->l_req_mode == lock->l_granted_mode)

The lock may be cancel while ost_prolong_lock_one invoked, so
just return in this case.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: Ica6ad9199e4b210145e99d2420925803b18a7edd
Reviewed-on: http://review.whamcloud.com/3042
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1406 ofd: add FMD support
Mikhail Pershin [Mon, 21 May 2012 09:36:42 +0000 (13:36 +0400)]
LU-1406 ofd: add FMD support

Add FMD code in OFD

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Iec1cd619cd99b49f5a40c21fc7e8815b5ae392e0
Reviewed-on: http://review.whamcloud.com/2863
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: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-1406 ofd: add procfs values
Mikhail Pershin [Mon, 21 May 2012 07:28:55 +0000 (11:28 +0400)]
LU-1406 ofd: add procfs values

Add procfs functionality to OFD

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: If2c0a66479d9df8d585cde651244b86bf78636ce
Reviewed-on: http://review.whamcloud.com/2862
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
7 years agoLU-1406 ofd: OFD device methods
Mikhail Pershin [Sun, 20 May 2012 16:55:56 +0000 (20:55 +0400)]
LU-1406 ofd: OFD device methods

Add capability code and basic device functions: statfs, set_info,
get_info, iocontrol, ping, sync, health_check

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I7a0a671ef45e8f4860344bd8c9a9a306d60bd780
Reviewed-on: http://review.whamcloud.com/2856
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1422 cray: Cray platforms set the initial connection value to high
James Simmons [Fri, 18 May 2012 17:44:07 +0000 (13:44 -0400)]
LU-1422 cray: Cray platforms set the initial connection value to high

While testing imperative recovery it was observed that cray systems
had a noticable delay that did not happen on other systems. It was
discovered that the INITIAL_CONNECTION_TIMEOUT has set to a value
for the old Cray catamount systems which is not long valid and
now impacts recovery performace for both the IR and SR case. Also
this patch removes some catamount hacks from liblustre.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ia6ff6e22886c49c861ad9469e675f38fe42d6fb4
Reviewed-on: http://review.whamcloud.com/2835
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Cory Spitz <spitzcor@cray.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1378 fid: Add console info for super seq allocation
wangdi [Wed, 9 May 2012 05:18:20 +0000 (22:18 -0700)]
LU-1378 fid: Add console info for super seq allocation

Add console information for super sequence allocation. Because
one super sequence will include 1 billion sequences, it rarely
happens in reality, so it will not cause the flood of console
msg.

Signed-off-by: Di Wang <di.wang@whamcloud.com>
Change-Id: I5154ee2a03006680b6a08d588287bf3941149457
Reviewed-on: http://review.whamcloud.com/2701
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>
7 years agoLU-1282 lprocfs: free stat memory as it is cleared
Bobi Jam [Mon, 4 Jun 2012 15:38:17 +0000 (23:38 +0800)]
LU-1282 lprocfs: free stat memory as it is cleared

Clear stats also free the stat memory occupation.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ie0050eb716883aaeca08f4b3bacc772e83b87679
Reviewed-on: http://review.whamcloud.com/3026
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-80 tests: make lfs_migrate script executable
Andreas Dilger [Mon, 4 Jun 2012 17:39:38 +0000 (11:39 -0600)]
LU-80 tests: make lfs_migrate script executable

When running sanity.sh test_56w from the build tree, the test fails
because lfs_migrate does not have execute permission set.  Set the
execute permissions on this script in the build tree.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I4af5d7ff4b41353d2e73937292020505ef8de0d9
Reviewed-on: http://review.whamcloud.com/3020
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-56 lnet: container for LNet message
Liang Zhen [Sun, 27 May 2012 07:58:14 +0000 (15:58 +0800)]
LU-56 lnet: container for LNet message

Adding a simple message container to LNet, and use it to replace
global message queues and message finalizers.
It's a work step of LNet SMP improvements, we will create instances
for each CPT in following patches.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I00f79d7598c4cd1274d7b72f7c4b482d9df75b7a
Reviewed-on: http://review.whamcloud.com/2922
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-56 lnet: abstract container for EQ/ME/MD
Liang Zhen [Sun, 27 May 2012 06:22:34 +0000 (14:22 +0800)]
LU-56 lnet: abstract container for EQ/ME/MD

This patch implemented a simple resource container for LNet,
it also created several instances of it to manage different LNet
objects (EQ/ME/MD), instead of putting resources in global
table/list.
It's a work step of LNet SMP improvements, we will create instances
for each CPT in following patches.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I5e03d618a5c932f032b45b4acdbd4aec546cf9a9
Reviewed-on: http://review.whamcloud.com/2921
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-56 lnet: add lnet_*_free_locked for LNet
Liang Zhen [Sat, 26 May 2012 13:56:46 +0000 (21:56 +0800)]
LU-56 lnet: add lnet_*_free_locked for LNet

LNet has a set of internal functions lnet_*_free to release LNet
message or LNet descriptors (EQ, MD, ME), they require caller to
hold LNET_LOCK on calling, this is somehow confusing because
lnet_*_alloc should be called w/o any lock.
This patch add another set of functions named as lnet_*_free_locked
to replace original lnet_*_free which require caller to hold lock,
and still provide lnet_*_free which can be called w/o any lock.

This patch is just the first step work for LNet SMP improvements.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I4686d83fc08695f117bf6b3b53d5ad56fb03bcd1
Reviewed-on: http://review.whamcloud.com/2919
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1408 debug: initialize debug_msg_data if needed
Hongchao Zhang [Thu, 5 Apr 2012 20:22:31 +0000 (04:22 +0800)]
LU-1408 debug: initialize debug_msg_data if needed

initialize the libcfs_debug_msg_data only if needed

Change-Id: Id80ea290b982153c86dae2f71c3d42753fa8848f
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2889
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Shuichi Ihara <sihara@ddn.com>
7 years agoLU-1406 ofd: add connect functions
Mikhail Pershin [Sun, 20 May 2012 14:05:26 +0000 (18:05 +0400)]
LU-1406 ofd: add connect functions

Patch adds connect functions and export init/fini

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I6535d37845863c269dc279c6acc8be8bb8c54432
Reviewed-on: http://review.whamcloud.com/2855
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-957 scrub: OI scrub against ldiskfs
Fan Yong [Fri, 1 Jun 2012 01:56:52 +0000 (09:56 +0800)]
LU-957 scrub: OI scrub against ldiskfs

The OI scrub is totally implemented inside osd-ldiskfs,
and driven by the inode iterator. For each object with
normal fid, its fid in the LMA and related OI entry in
the OI file will be compared, if they are inconsistent,
then the OI entry will be updated.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I04d25b3433336fb63c312f795a8631328beb3aa7
Reviewed-on: http://review.whamcloud.com/2552
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-957 scrub: OSD layer cleanup for OI scrub
Fan Yong [Wed, 30 May 2012 15:08:06 +0000 (23:08 +0800)]
LU-957 scrub: OSD layer cleanup for OI scrub

1) Abstract some common functions in OSD layer.
2) Call lu_object_put() in osd_object_find() under failure case.
3) Do not release buffer_head until all the needed contents have
   been accessed in osd_oi_index_create_one().

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I3e6880271ee73ec2c4638b02c7e9c55fc827bdf3
Reviewed-on: http://review.whamcloud.com/2551
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-957 scrub: Ancillary work for LFSCK/OI scrub
Fan Yong [Wed, 30 May 2012 12:27:48 +0000 (20:27 +0800)]
LU-957 scrub: Ancillary work for LFSCK/OI scrub

1) New debug sub-system - 'D_LFSCK'
For Lustre fsck/scrub running trace.

2) New MDT mount option - 'noscrub'
To disable auto triggering OI scrub when MDT mounts up
or by RPC which accesses inconsistent OI mapping entry.

3) Any object which will be used when Lustre server mounts
   should not be added into OI files to guarantee that the
   Lustre server can start up even though OI files corrupt.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I8b1f1f1160db25ce05bd2d5688f9ff1507e3841b
Reviewed-on: http://review.whamcloud.com/2897
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1299 clio: a combo patch to fix cl_lock
Jinshan Xiong [Tue, 22 May 2012 21:02:33 +0000 (14:02 -0700)]
LU-1299 clio: a combo patch to fix cl_lock

In this patch, the following issues are fixed:
* redefine cl_lock_error(). There are two kinds of error when
  enqueuing a cl_lock: internal errors return from server side and
  local error for example interrupted by signal when waiting for a
  lock. Obviously the latter one is not fatal so we shouldn't err the
  lock out;
* for fault handling, only signal SIGKILL and SIGTERM is not allowed;
* handle return code of ll_fault correctly;
* redefine ->unuse() to release resource it held if enqueuing lock
  failed;
* in cl_lock_hold_release(), only CLS_CACHED mode lock will be cached,
  for locks in other states, they will be cancelled voluntarily;
* fix the problem that cfs_block_sigs() is wrongly used as
  cfs_restore_sigs() and implementation of cfs_block_sigs() was wrong
* other minor fixes.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: Ice6d237d367c54bfd84a4a33cea8a4c1081e7696
Reviewed-on: http://review.whamcloud.com/2654
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1438 quota: fix race in quota_chk_acq_common()
Niu Yawei [Fri, 1 Jun 2012 06:28:45 +0000 (23:28 -0700)]
LU-1438 quota: fix race in quota_chk_acq_common()

quota_check_common() & qctxt_adjust_qunit() uses different way
to check if quota is enforced on certain ID, which could result
in infinite loop in quota_chk_acq_common() when the QB/QI_SET
flag is cleared just after checking.

This patch used a non-instrusive way to fix this rare race.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ia8c5cb593abf515cf4dc041c63c8a247ebe0cd03
Reviewed-on: http://review.whamcloud.com/2996
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1461 Fix ppc64 build errors
Oleg Drokin [Thu, 31 May 2012 16:38:08 +0000 (12:38 -0400)]
LU-1461 Fix ppc64 build errors

Do not try to print u64 as %llu, on ppc64 it's translated into
long int, so we must use LP.64 macroses.

Signed-off-by: Oleg Drokin <green@whamcloud.com>
Change-Id: I14d1051b9427abab5c44582d3230352937643fa5
Reviewed-on: http://review.whamcloud.com/2994
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1030 clio: reimplement ll_fsync in clio way
Jinshan Xiong [Mon, 21 May 2012 19:12:59 +0000 (12:12 -0700)]
LU-1030 clio: reimplement ll_fsync in clio way

A new clio operation CIT_FSYNC is added to forcibly synchorize data
on local client and OST.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I047471f819c00901907d4312a353095b44dd96a1
Reviewed-on: http://review.whamcloud.com/2460
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1030 osc: move io data from lov_oinfo into osc_object
Jinshan Xiong [Mon, 20 Feb 2012 19:01:00 +0000 (11:01 -0800)]
LU-1030 osc: move io data from lov_oinfo into osc_object

Cleanup the code and move io related data structure into osc_object
so that it will be easier to manage pages with red-black tree.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I7cd8d6278bb70b221351d9db4193c679f93aeb21
Reviewed-on: http://review.whamcloud.com/2009
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1305 lu: fid_is_acct function
Alex Zhuravlev [Wed, 23 May 2012 07:54:00 +0000 (11:54 +0400)]
LU-1305 lu: fid_is_acct function

a helper introduced in orion for new quota componenent

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Iee557fbd8f910c49b65e1b66330e6906d6efe975
Reviewed-on: http://review.whamcloud.com/2882
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1323 llite: find_vma() should be protected by mmap_sem
Jinshan Xiong [Fri, 13 Apr 2012 22:21:49 +0000 (15:21 -0700)]
LU-1323 llite: find_vma() should be protected by mmap_sem

It had been wrongly protected by page_table_lock since 2004.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: Id7b0341dc8c385ad57e195d94f4e76b6c5626515
Reviewed-on: http://review.whamcloud.com/2543
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1252 recovery: don't always swap nidtbl entries
Jinshan Xiong [Fri, 30 Mar 2012 00:31:40 +0000 (17:31 -0700)]
LU-1252 recovery: don't always swap nidtbl entries

Swap nidtbl entries only when server and client are using different
byte order.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I58ebe98e81040ec187f4ecd75020b7b84c7d8904
Reviewed-on: http://review.whamcloud.com/2410
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1274 osc: Do not grab mutex of cl_lock for glimpse
Jinshan Xiong [Fri, 30 Mar 2012 19:57:34 +0000 (12:57 -0700)]
LU-1274 osc: Do not grab mutex of cl_lock for glimpse

Otherwise this will cause client eviction if that lock is being
flushed and OST happens to be slow to finish the IO.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I8cbd9c38a317f4afaf3b0e237efe55e4c0f991c2
Reviewed-on: http://review.whamcloud.com/2426
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
7 years agoLU-1347 build: remove the vim/emacs modelines
Andreas Dilger [Wed, 9 May 2012 20:19:03 +0000 (14:19 -0600)]
LU-1347 build: remove the vim/emacs modelines

Remove the expandtabs directive from vim modelines from test scripts
and autoconf files as well.  In some cases where a very large test
script has been using 4-space indents for a long time, add directives
for 4-space tabstops so that the formatting is not too ugly.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I115abb1ceea5744495bc189bc5a83e734b845d36
Reviewed-on: http://review.whamcloud.com/2698
Tested-by: Hudson
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1406 ofd: setup local files for OFD
Mikhail Pershin [Thu, 17 May 2012 09:55:06 +0000 (13:55 +0400)]
LU-1406 ofd: setup local files for OFD

Setup local files needed for OFD work, initialize server data
and clients data upon OFD setup

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I1ec1fc9c07889009f1404eb26830c63cbbc9f451
Reviewed-on: http://review.whamcloud.com/2854
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1213 tests: remove duplicate parallel-scale variables
Yu Jian [Fri, 6 Apr 2012 03:51:10 +0000 (11:51 +0800)]
LU-1213 tests: remove duplicate parallel-scale variables

Remove the duplicate variables from parallel-scale.sh and
parallel-scale-nfs.sh. Those variables are defined inside
the corresponding functions in functions.sh.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I77ea061289296aeb8b138631f7a55090f52093c9
Reviewed-on: http://review.whamcloud.com/2306
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1282 misc: Use present cpu numbers to save memory.
Bobi Jam [Thu, 5 Apr 2012 06:25:40 +0000 (14:25 +0800)]
LU-1282 misc: Use present cpu numbers to save memory.

lprocfs stats data should allocated by the number of present cpus in
stead of by possible cpu number which wastes a lot of memory.

When new cpus are hot-plugged in, alloc necessary percpu array
elements on demand.

OSS minimum thread number also better be decided by online cpu
number.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Id1690f185f4f83fae75be7eddb756e413cbc4fba
Reviewed-on: http://review.whamcloud.com/2451
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1291 mds: Test failure on test suite replay-single 44c
yangsheng [Wed, 23 May 2012 07:42:20 +0000 (15:42 +0800)]
LU-1291 mds: Test failure on test suite replay-single 44c

The obd_notify needs protect by mds_notify_lock. Else LOV
maybe gone while __mds_lov_synchronize be called.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: Icb856b2a2b135711fd5681b0b4ebef0a1d78b988
Reviewed-on: http://review.whamcloud.com/2708
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
7 years agoLU-56 libcfs: more common APIs in libcfs
Liang Zhen [Mon, 16 Apr 2012 17:38:17 +0000 (01:38 +0800)]
LU-56 libcfs: more common APIs in libcfs

Implementation of some common APIs:
- per-cpu-partition (percpt) data allocators
- implementation of per-cpu-partition lock
- a few other functions

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Ib303b79ee9be87cc306da7e2feb20c8c296b8ac6
Reviewed-on: http://review.whamcloud.com/2558
Tested-by: Hudson
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1384 mdd: validate incoming param to avoid crashing
Bobi Jam [Thu, 24 May 2012 03:30:18 +0000 (11:30 +0800)]
LU-1384 mdd: validate incoming param to avoid crashing

MDS get crashed when it is connected by old 1.8.x client, the crash
point is

kernel:LustreError: 3657:0:(mdd_object.c:635:mdd_big_lmm_get())
ASSERTION( ma->ma_lmm_size > 0 ) failed

We need validate the incoming @ma lest old client crashes the MDS.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Iebdce6396318a2c6ee413a03dc76c122e3f84146
Reviewed-on: http://review.whamcloud.com/2905
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-988 llite: add debugging for inode timestamps
Bobi Jam [Tue, 13 Mar 2012 07:08:54 +0000 (15:08 +0800)]
LU-988 llite: add debugging for inode timestamps

Intermittent test failures for sanity.sh test_39j are showing the
inode timestamps going backward. Add internal debugging to track the
LVB timestamps to see where the old timestamps are coming from, to
determine if this is a problem with the VM environment being used for
testing, or if it is a genuine problem in the Lustre code.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Iae09d2361e81c05ccc5883dd4418067d9a90abab
Reviewed-on: http://review.whamcloud.com/2274
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-56 libcfs: export a few symbols from libcfs
Liang Zhen [Sun, 27 May 2012 01:15:31 +0000 (09:15 +0800)]
LU-56 libcfs: export a few symbols from libcfs

Export cfs_trace_copyin_string and cfs_strncasecmp from libcfs,
These symbols will be used by LNet patches soon.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I8722adec822f9d90322a59ff71afff87a9062efd
Reviewed-on: http://review.whamcloud.com/2920
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1417 lov: device type finalized twice
Liang Zhen [Thu, 17 May 2012 10:35:49 +0000 (18:35 +0800)]
LU-1417 lov: device type finalized twice

lov_exit and osc_exit explicitly called lu_device_type_fini() right
before calling class_unregister_type().

However class_unregister_type() will call lu_device_type_fini() too,
which means lov_device_type and osc_device_type will be finalized
twice.

This can be fixed by removing lu_device_type_fini() calls from
lov_exit and osc_exit.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I12dea692f4d2bdd75bb1640b71c6dcc392b94478
Reviewed-on: http://review.whamcloud.com/2823
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1363 llite: Not held lock when calling security_d_instantiate
Bobi Jam [Thu, 3 May 2012 15:28:26 +0000 (23:28 +0800)]
LU-1363 llite: Not held lock when calling security_d_instantiate

security_d_instantiate() could allocate momory and/or yield cpu, don't
held spin lock.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I0a32e067e21ec5f3d8427db020ae5fda6ce96ba1
Reviewed-on: http://review.whamcloud.com/2641
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>
7 years agoLU-1364 utils: add lfs 'poollist' subcommand
Bob Glossman [Mon, 14 May 2012 20:02:42 +0000 (13:02 -0700)]
LU-1364 utils: add lfs 'poollist' subcommand

Instead of adding a new subcommand this updates
the lfs man page.  pool_list is the preferred usage,
we just make all the docs match.

Signed-off-by: Bob Glossman <bogl@whamcloud.com>
Change-Id: I3f0a6692923e4ff8359afc8a3558ee404ffc4365
Reviewed-on: http://review.whamcloud.com/2734
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Richard Henwood <rhenwood@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1347 style: removes obsolete EXPORT_SYMTAB macros
Liu Xuezhao [Sat, 14 Apr 2012 08:26:37 +0000 (16:26 +0800)]
LU-1347 style: removes obsolete EXPORT_SYMTAB macros

EXPORT_SYMTAB is obsolete after 2.4 kernel, this patch removes
all EXPORT_SYMTAB macros from source code.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I5fe3a5544d0cdb45f8d40cd5828a18ea3e1ad26a
Reviewed-on: http://review.whamcloud.com/2671
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1347 lvfs: makes EXPORT_SYMBOL follows function body
Liu Xuezhao [Sat, 14 Apr 2012 08:29:52 +0000 (16:29 +0800)]
LU-1347 lvfs: makes EXPORT_SYMBOL follows function body

Makes EXPORT_SYMBOL macros immediately follow the function body,
to follow normal Linux kernel coding style.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: Icf63514a8ad173217b55f115b4e4ada695eb9295
Reviewed-on: http://review.whamcloud.com/2838
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-56 libcfs: NUMA allocator and code cleanup
Liang Zhen [Thu, 12 Apr 2012 19:08:49 +0000 (03:08 +0800)]
LU-56 libcfs: NUMA allocator and code cleanup

This patch covered a few things:
- Implementation of NUMA allocaters based on concept of CPU
  partition
- Add macros of NUMA allocators for both libcfs and OBD
- cleanup OBD allocaters
- A minor fix for llite, it's using GFP flag which should be
  CFS_ALLOC flag

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I5441a504d5df217b59b5db59e37ddb4855e7ae49
Reviewed-on: http://review.whamcloud.com/2523
Tested-by: Hudson
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-694 config: make 'jobid_var' global
Niu Yawei [Fri, 18 May 2012 06:09:11 +0000 (23:09 -0700)]
LU-694 config: make 'jobid_var' global

This patch makes the global parameter able to accept
string value, and move the 'jobid_var' from the llite
folder into the lustre proc root /proc/fs/lustre.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ibaac19d2f29f8631d4717c6b0f82853cff64fc96
Reviewed-on: http://review.whamcloud.com/2785
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-694 ptlrpc: Job Stats
Niu Yawei [Mon, 24 Oct 2011 15:14:09 +0000 (08:14 -0700)]
LU-694 ptlrpc: Job Stats

This feature is to collect filesystem operation stats for the jobs
running on Lustre.

When some job scheduler (SLURM, for instance) is running on lustre
client, the lustre client will pack the job id into each request
(open, unlink, write...), and server will collect those information
then expose them via procfs.

- A 'pb_jobid' is added in 'ptlrpc_body' for storing the jobID;
- The job stats can be accessed from the proc file 'job_stats' in
  each mdt & obdfilter proc entries;
- 'job_cleanup_interval' is created in each mdt & obdfilter proc
  entries for tuning stats cleanup interval;
- 'jobid_var' is created in llite proc entry for configuring the
  jobID environment variable name;

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I35c21f93d7ce1ce648504ce437fcfd374f891453
Reviewed-on: http://review.whamcloud.com/1397
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1217 osc: to not check a cl_lock's state w/o protection
Jinshan Xiong [Mon, 26 Mar 2012 19:17:17 +0000 (12:17 -0700)]
LU-1217 osc: to not check a cl_lock's state w/o protection

osc_page_putref_lock() used to check cl_lock's refcount and
corresponding osc_lock's ols_hold without any protection, this
is racy because other process can change the lock state so as to
make the assertion be false.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I65fe1fa7fc55e8642fea6789784d7bb92a45d56f
Reviewed-on: http://review.whamcloud.com/2616
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1406 ofd: init lu_target in OFD
Mikhail Pershin [Wed, 16 May 2012 08:56:41 +0000 (12:56 +0400)]
LU-1406 ofd: init lu_target in OFD

initialize LUT infrastructure, redo lut_init() to use
dt_find_or_create() instead of dt_store_open, add object methods

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I22602aeed7b2efd1b240f912b7a9fd34ba38dcc8
Reviewed-on: http://review.whamcloud.com/2804
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1406 ofd: OFD to setup device stack on OSD
Mikhail Pershin [Tue, 15 May 2012 20:25:05 +0000 (00:25 +0400)]
LU-1406 ofd: OFD to setup device stack on OSD

Device stack initialization on top of OSD.
Pass through device and object methods to lower layer - OSD
Fix issue with osd_compat_init()

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: If3659f4a1dedfd579f65be64372f7531536852a3
Reviewed-on: http://review.whamcloud.com/2803
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1406 ofd: OFD module framework
Mikhail Pershin [Tue, 15 May 2012 15:45:54 +0000 (19:45 +0400)]
LU-1406 ofd: OFD module framework

The very basic functionality, obd_device plus lu_device,
no methods so far. Can be built and run but do nothing.

For ability to use OFD the test-framework check shell variable
USE_OFD and loads ofd.ko instead of obdfilter

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I2797f375aec63204eca9d435cf837636e84e09bd
Reviewed-on: http://review.whamcloud.com/2792
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoiupdate to new tag 2.2.54 2.2.54 v2_2_54_0
Oleg Drokin [Tue, 29 May 2012 05:01:51 +0000 (01:01 -0400)]
iupdate to new tag 2.2.54

Change-Id: I1676f95d0a9d3021c2c02aa010096503a523c745
Signed-off-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-506 kernel: remove BKL fix
Lai Siyao [Tue, 21 Feb 2012 07:40:55 +0000 (15:40 +0800)]
LU-506 kernel: remove BKL fix

Commit I8a3432ad56b7a1fcdbf74be4b7819edb31bf6272 has defect; it's
fixed in this patch:
* use #ifdef instead of #if for HAVE_KERNEL_LOCKED check.
* in case of HAVE_KERNEL_LOCKED, a mntput() is missed if kernel is
  not locked.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I5c93252dc02e0ff90ce108701f9d847e4ee2e4e6
Reviewed-on: http://review.whamcloud.com/2928
Tested-by: Hudson
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-506 kernel: remove BKL
Lai Siyao [Tue, 21 Feb 2012 07:40:55 +0000 (15:40 +0800)]
LU-506 kernel: remove BKL

Late kernel removes BKL completely; do so for lustre:
* replace BKL with inode->i_lock in ldiskfs.
* HAVE_UNLOCKED_IOCTL is defined after 2.6.12, so this check can be
  removed from lustre code now.
* remove all lock/unlock_kernel definition/usage from lustre code.
* check kernel_locked() in configure, which is removed in 2.6.37.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I8a3432ad56b7a1fcdbf74be4b7819edb31bf6272
Reviewed-on: http://review.whamcloud.com/2169
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-532 llite: trusted. xattr is invisible to non-root
Bob Glossman [Thu, 17 May 2012 18:41:59 +0000 (11:41 -0700)]
LU-532 llite: trusted. xattr is invisible to non-root

Filter out all invalid xattrs in listxattr.
This includes trusted. xattrs that can cause
unnecessary "EPERM" in subsequent getxattr operations.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Signed-off-by: Bob Glossman <bogl@whamcloud.com>
Change-Id: Ic32fe262772370cd837bef878c9bfd9eefc0ec3c
Reviewed-on: http://review.whamcloud.com/2490
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-957 revert OI scrub patch
Oleg Drokin [Thu, 24 May 2012 04:40:21 +0000 (00:40 -0400)]
LU-957 revert OI scrub patch

The patch interactions with lut changes from LU-911
broke mdt mounting.

Revert "LU-957 scrub: Ancillary work for LFSCK/OI scrub"

This reverts commit eeb7850ac3eae797a3cc3fee1a18725674d4d95f.

Change-Id: Ic9a1d3e3da1e6d97d5db30b7d08656e68e4a0ba6
Signed-off-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1424 kernel: Kernel update [RHEL6.2 2.6.32-220.17.1.el6]
yangsheng [Mon, 21 May 2012 15:21:55 +0000 (23:21 +0800)]
LU-1424 kernel: Kernel update [RHEL6.2 2.6.32-220.17.1.el6]

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

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I7ad3bee13303f389006d94ab83a7810493615763
Reviewed-on: http://review.whamcloud.com/2849
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoUpdate version to 2.2.53 2.2.53 v2_2_53_0
Oleg Drokin [Wed, 23 May 2012 04:19:50 +0000 (00:19 -0400)]
Update version to 2.2.53

Change-Id: Icb5f762ae2e790d78b017ca094182789c06b79ea
Signed-off-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1252 recovery: reduce reconnect time for IR
Jinshan Xiong [Sat, 19 May 2012 16:45:23 +0000 (09:45 -0700)]
LU-1252 recovery: reduce reconnect time for IR

Two problems fixed in this patch:
1. network latency can be increased to incredible large after all
   connections have been tried. Limited it to not be over
   CONNECTION_SWITCH_MAX;
2. reconnect the failing target ASAP when the previous connecting
   RPC failed, if the client has already been notified by IR.
With the above two fix, it can reduce the recovery time if there was a
connecting RPC in flight when the client is notified by IR.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: If43e93037e418b7a775228ca7abbe8b337e44e9a
Reviewed-on: http://review.whamcloud.com/2371
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1214 quota: don't compile quota module for client
Liu Xuezhao [Wed, 4 Apr 2012 06:01:53 +0000 (14:01 +0800)]
LU-1214 quota: don't compile quota module for client

1. Only and always compile lquota module for server, and needs not
   compile quota library for liblustre.
2. HAVE_QUOTA_SUPPORT macro is no more needed in quota source files
3. Removes several un-used function declarations in quota_internal.h

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: Ibf94ba6f37b43721cc53c2d7bde017b039581bbd
Reviewed-on: http://review.whamcloud.com/2363
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-56 libcfs: implementation of cpu partition
Liang Zhen [Thu, 5 Apr 2012 15:46:21 +0000 (23:46 +0800)]
LU-56 libcfs: implementation of cpu partition

This patch is implementation of CPU partition (CPT) and CPT table.

CPU partition (CPT) is conceptually similar to the 'cpuset' of Linux.
It is designed to provide an abstract layer that can be conveniently
used by kernel threads, unlike the 'cpuset' that is most accessible
from userspace.

CPT table is a set of CPTs:
- A CPT table can contain 1-N CPU partitions
- CPUs in one CPT shouldn’t overlap with CPUs in CPTs of the same
CPT table
- A CPT table can cover all CPUs in the system, or a subset of system
CPUs.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Idd3168f21ea82891d11dffe06cbb386e1505889c
Reviewed-on: http://review.whamcloud.com/2461
Tested-by: Hudson
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-56 libcfs: move range expression parser to libcfs
Liang Zhen [Wed, 14 Mar 2012 03:10:20 +0000 (11:10 +0800)]
LU-56 libcfs: move range expression parser to libcfs

There are mulptile implementations of range expression parser,
we removed those redundant code and move the only implementation
into libcfs so everyone can use it.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I0717fbff2f32a616ff94f6bd53b363fda7d77168
Reviewed-on: http://review.whamcloud.com/2346
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-181 obdclass: fix portal_handle memory wastage
Liang Zhen [Fri, 9 Dec 2011 06:33:15 +0000 (14:33 +0800)]
LU-181 obdclass: fix portal_handle memory wastage

This patch is the first step of fixing memory wastage in Lustre.
We can save 20 bytes for each portals_handle(on 64bits system)
by reusing members, which could be over a hundred megabytes
on system with millions of ldlm_locks because portals_handle is
embedded in ldlm_lock.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: I401c0c0c2fc8d2624fd48c714dc3d06fc0e4e21e
Reviewed-on: http://review.whamcloud.com/1827
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-506 dcache: check lookup_instantiate_filp() return value
Lai Siyao [Mon, 9 Apr 2012 07:06:03 +0000 (15:06 +0800)]
LU-506 dcache: check lookup_instantiate_filp() return value

For new kernels, nd->intent.open.file may not be checked before use,
but it may be an error code. To avoid this, return error when
the original open in lookup_instantiate_filp() fails.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: Ibfbc4eef284962302418872b9f1af8dce2f95db5
Reviewed-on: http://review.whamcloud.com/2491
Reviewed-by: Peng Tao <tao.peng@emc.com>
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1405 osd: Kernel panic when running sanityn test_12
Andriy Skulysh [Tue, 15 May 2012 08:20:07 +0000 (11:20 +0300)]
LU-1405 osd: Kernel panic when running sanityn test_12

Fix LASSERT changed in LU-993. i_nlink can be equal to ddp_max_nlink
(LDISKFS_LINK_MAX) for regular files.

Xyratex-bug-id: MRP-468
Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Change-Id: I4b0fd5171d39a82ce622cdf93ab160a3526e3d8f
Reviewed-on: http://review.whamcloud.com/2787
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-957 scrub: Ancillary work for LFSCK/OI scrub
Fan Yong [Wed, 9 May 2012 07:11:58 +0000 (15:11 +0800)]
LU-957 scrub: Ancillary work for LFSCK/OI scrub

1) New debug sub-system - 'D_LFSCK'
For Lustre fsck/scrub running trace.

2) New MDT mount option - 'noscrub'
To disable auto triggering OI scrub when MDT mounts up
or by RPC which accesses inconsistent OI mapping entry.

3) Any object which will be used when Lustre server mounts
   should not be added into OI files to guarantee that the
   Lustre server can start up even though OI files corrupt.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: I482fb0e076c296bb8690ed200c569001a9cb78f5
Reviewed-on: http://review.whamcloud.com/2550
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1188 clio: acquire lockdep for cl_lock_peek()
Jinshan Xiong [Fri, 30 Mar 2012 21:16:14 +0000 (14:16 -0700)]
LU-1188 clio: acquire lockdep for cl_lock_peek()

Otherwise it will break lock dependencies check.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: Icc9e3f881d8c5d0c6a9575638d23cff38948724f
Reviewed-on: http://review.whamcloud.com/2422
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
7 years agoLU-1088 ldlm: dump certain amount of locks for ldlm resouce
Lai Siyao [Sun, 11 Mar 2012 08:19:56 +0000 (16:19 +0800)]
LU-1088 ldlm: dump certain amount of locks for ldlm resouce

* dump last 256 granted locks for ldlm resource to avoid DDOS.
* replace ldlm_lock_dump with ldlm_lock_debug, and print nid.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I9b369978496397be44578e8aa07e2bc8c8bde4af
Reviewed-on: http://review.whamcloud.com/2250
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-992 ldiskfs: fix typo for rhel5 ldiskfs patches
yangsheng [Wed, 11 Apr 2012 05:27:48 +0000 (13:27 +0800)]
LU-992 ldiskfs: fix typo for rhel5 ldiskfs patches

A typo indroduced a long time ago. Fix it even rhel5
support will deprecate.

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I10564cd8dee7d62e05616869044dab0930a5638a
Reviewed-on: http://review.whamcloud.com/2506
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1235 osd: delete commit cb entry list first
Bobi Jam [Tue, 15 May 2012 07:50:01 +0000 (15:50 +0800)]
LU-1235 osd: delete commit cb entry list first

delte commit cb entry list before calling the commit callback
functions.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I183d31e09666626724f5adcbd977670d558ae219
Reviewed-on: http://review.whamcloud.com/2791
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: hongchao.zhang <hongchao.zhang@whamcloud.com>
Tested-by: hongchao.zhang <hongchao.zhang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-911 obdapi: add env to few methods
Alex Zhuravlev [Fri, 25 Nov 2011 07:37:24 +0000 (10:37 +0300)]
LU-911 obdapi: add env to few methods

so that soon-coming OFD doesn't need to reallocate env on every
request. Instead OST will be passing env down as MDT does.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I605b4cdb5eb1f2984c303646c161fbde43d155ef
Reviewed-on: http://review.whamcloud.com/1847
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-911 lut: few more methods from orion are taken
Mikhail Pershin [Thu, 12 Apr 2012 11:51:37 +0000 (15:51 +0400)]
LU-911 lut: few more methods from orion are taken

target.c is updated from orion:
- has own environment key now
- int lut_client_del
- int lut_client_add
- int lut_client_new

MDT related code is cleaned up

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I07a5f1f11286004ec957587fdf16fcd5a4dd073f
Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1849
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1280 ldiskfs: remove EXT_ASSERT from ext3_ext_new_extent_cb()
Yu Jian [Thu, 17 May 2012 14:30:03 +0000 (22:30 +0800)]
LU-1280 ldiskfs: remove EXT_ASSERT from ext3_ext_new_extent_cb()

The EXT_ASSERT() in ext3_ext_new_extent_cb() is invalid since
new locking is introduced in ext4_ext_walk_space().

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I8de3ad4004c304a45be14347df50bf066d8f4caa
Reviewed-on: http://review.whamcloud.com/2827
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1350 debug: lower debug message level
Bobi Jam [Fri, 4 May 2012 09:32:59 +0000 (17:32 +0800)]
LU-1350 debug: lower debug message level

File info read and unlink race is normal, we'd lower the debug message
level since a lot of unnecessary unmasked messages will be generated
if mdt_object_find() cannot find those deleted objects.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I5d6e65ad2c2dabadb371fdc4ffd6d8193f1cd0fb
Reviewed-on: http://review.whamcloud.com/2648
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-482 tests: abort replay-dual if test_0a fails
Andreas Dilger [Thu, 10 May 2012 22:56:46 +0000 (16:56 -0600)]
LU-482 tests: abort replay-dual if test_0a fails

Due to repeated and annoying LU-482 failures of replay-dual.sh
test_0a, abort the whole test script if test_0a fails.  While this
is not ideal, it is better than disabling replay-dual.sh entirely.

Until bug TT-554 is fixed to display "SKIP" results from a test in
Maloo, we should still be able to detect the LU-482 failures because
replay-dual test will complete in a few seconds instead of thousands.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I4bc6b62e0028b908f0fc8afaab0030b0fcdf500c
Reviewed-on: http://review.whamcloud.com/2731
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
7 years agoLU-1366 utils: disable ldiskfs extents feature for MDT
Bobi Jam [Tue, 15 May 2012 14:10:10 +0000 (22:10 +0800)]
LU-1366 utils: disable ldiskfs extents feature for MDT

Explicitly disable "extents" for MDT filesystem if it's based on ext4,
it provides no benifit for MDT.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I9cb4d9cbaa80096cb8182e307e4911a92004ddd4
Reviewed-on: http://review.whamcloud.com/2797
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-936 Remove LUSTRE_KERNEL_VERSION
Brian Behlendorf [Mon, 19 Dec 2011 21:10:17 +0000 (13:10 -0800)]
LU-936 Remove LUSTRE_KERNEL_VERSION

Patched kernels are no longer an absolute requirement for
Lustre servers.  Remove the LC_LUSTRE_VERSION_H autoconf
check and all usage of the LUSTRE_KERNEL_VERSION #define.
Going forward any specific kernel dependency should be
expressed with an explicit, clearly documented, autoconf
test.

As part of this change the check for automatically disabling
lustre server support has been moved to the ldiskfs autoconf
checks.  Previously this was done by checking for the
existance of a patched kernel.

Change-Id: Ifb5dcaf62638146a190f5d7417b9462177c5730d
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/1873
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1318 ldlm: allow different LVB structures to be used
Johann Lombardi [Fri, 24 Feb 2012 15:42:23 +0000 (16:42 +0100)]
LU-1318 ldlm: allow different LVB structures to be used

The DLM code always assumes that the request buffer storing the LVB is
of type ost_lvb.
This patch allows new LVB types to be defined and used. Although there
is still one single LVB structure defined (i.e. ost_lvb), the new
quota architecture will define its own LVB soon.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I497d774eb4b66029ff2755739bbe75190f6aeee8
Reviewed-on: http://review.whamcloud.com/2649
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-911 osd: couple helpers for osd api
Alex Zhuravlev [Mon, 12 Dec 2011 17:03:59 +0000 (20:03 +0300)]
LU-911 osd: couple helpers for osd api

- dt_find_or_create() to "open" and create if needed an object
- dt_object_sync() - a wrapper for corresponding osd api method

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: If10e2f522f6e5383260a1d729f305ccdc0b02bbb
Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1838
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1205 tests: sanityn test_18 sometimes takes long time to run
Jinshan Xiong [Fri, 13 Apr 2012 23:15:51 +0000 (16:15 -0700)]
LU-1205 tests: sanityn test_18 sometimes takes long time to run

This is a live-lock problem where two processes are writing to the
same mmaped file via two nodes. To write a mmap region, both processes
will do:

  acquire cl_lock -> read page -> release cl_lock-> install page.

During the above steps, the page can be truncated after the lock is
released and then immediately cancelled by the other process, so
kernel has to do page fault again and never complete.

Lustre can't handle this case well so this test case is disabled.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I0c3fd5beab388cbed6193ae496d4d0e4f23be797
Reviewed-on: http://review.whamcloud.com/2544
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1389 lov: standardize lov_do_div64() usage
Andreas Dilger [Thu, 27 Oct 2011 04:11:07 +0000 (22:11 -0600)]
LU-1389 lov: standardize lov_do_div64() usage

Rename ll_do_div64() to lov_do_div64() and move it to a header
for use by LOV and LOD.  Lustre shouldn't use linux-specific
methods in the code, so this is a bit of portability fix as well.

Change-Id: Ia6f071914a982c7c7d5f2d11271f9587aea01ed6
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/1619
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1102 crypto: correctly check crypto_alloc_blkcipher returns
Bobi Jam [Wed, 9 May 2012 19:22:58 +0000 (03:22 +0800)]
LU-1102 crypto: correctly check crypto_alloc_blkcipher returns

ll_crypto_alloc_blkcipher() returns error value as well as possible
NULL pointer, should check its return value carefully.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I181b236406e2649580a04940886f849ad6071078
Reviewed-on: http://review.whamcloud.com/2703
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1078 lnet: two minor issues in lnet
Bob Glossman [Tue, 8 May 2012 22:18:45 +0000 (15:18 -0700)]
LU-1078 lnet: two minor issues in lnet

Fix typos, 1 in a doxygen comment, 1 in a failure test

Signed-off-by: Bob Glossman <bogl@whamcloud.com>
Change-Id: I09a2f4f3e2762f8826e075ef5de2d6d2d6fb6f13
Reviewed-on: http://review.whamcloud.com/2692
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Isaac Huang <Isaac_Huang@xyratex.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1361 build: enable kabi on rhel6
Minh Diep [Thu, 3 May 2012 23:00:46 +0000 (16:00 -0700)]
LU-1361 build: enable kabi on rhel6

Turn on USE_KABI=true to build with kabi on rhel6

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: Ie028ced17baf5a4540c59b8b63fb279a146718a6
Reviewed-on: http://review.whamcloud.com/2642
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Brian J. Murrell <brian@whamcloud.com>
Tested-by: Brian J. Murrell <brian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1095 debug: Send common recovery messages to D_HA
Christopher J. Morrone [Sun, 26 Feb 2012 23:05:14 +0000 (15:05 -0800)]
LU-1095 debug: Send common recovery messages to D_HA

These messages are always present at recovery time, and are not
understable by a sysadmin.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: I907b0ac49541b20699914dc4f8c5e0db3fb6bec9
Reviewed-on: http://review.whamcloud.com/2198
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-251 Fix gcc configure warnings
Ned A. Bass [Thu, 21 Apr 2011 23:45:43 +0000 (16:45 -0700)]
LU-251 Fix gcc configure warnings

Newer versions of gcc are getting smart enough to detect the sloppy
syntax used for the autoconf tests.  It is now generating warnings for
unused or uninitialized variables.  Newer versions of gcc even have the
-Wunused-but-set-variable option set by default.  This isn't a problem
except when -Werror is set and they get promoted to an error.  In this
case the autoconf test will return an incorrect result which will result
in a build failure or runtime error later on.

To handle this I'm tightening up many of the autoconf tests to
explicitly mark variables as unused to suppress the gcc warning.  Tests
emitting uninitialized variable errors are updated to initialize
pointers to NULL, and some variables are converted to pointers to
accomodate this.  'Argument makes integer from pointer without a cast'
errors were fixed by passing 0 for the offending argument in cases where
we are not explicitly testing the argument type.  0 is accepted as both
an integer and a pointer.

Change-Id: Idaa04b04308e3cd994b0d802a5ee1eb5c90f9be6
Signed-off-by: Ned Bass <bass6@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/478
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1095 debug: Improve recovery console messages
Christopher J. Morrone [Sat, 3 Mar 2012 01:41:45 +0000 (17:41 -0800)]
LU-1095 debug: Improve recovery console messages

Quiet and/or improve a few recovery messages.

A sysadmin will not understand this:

  2012-03-02 16:27:19 Lustre: 5211:0:(ldlm_lib.c:2072:
  target_queue_recovery_request()) Next recovery transno: 410629539,
  current: 410629539, replaying

Messages like this are too verbose for the console:

  2012-03-02 16:27:59 LustreError: 5286:0:
  (genops.c:1270:class_disconnect_stale_exports())
  lc3-OST0004: disconnect stale client
  47808f4f-9f36-e8eb-f363-14b1abe4ac57@<unknown>

and can be left to this simpler message:

  2012-03-02 16:27:59 Lustre: lc3-OST0005: disconnecting 0 stale
  clients

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: I457602c3440ba10475e4ddca7c4e58ef8669922c
Reviewed-on: http://review.whamcloud.com/2249
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Liu Xuezhao <xuezhao.liu@emc.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-709 build: cleanup lustre-lnet.m4 and ofed.m4
Peng Tao [Sat, 25 Feb 2012 05:30:17 +0000 (13:30 +0800)]
LU-709 build: cleanup lustre-lnet.m4 and ofed.m4

1. HAVE_SPINLOCK_T is not used
2. OFED supports iWarp transport since v2.6.18

Signed-off-by: Peng Tao <tao.peng@emc.com>
Change-Id: Ieb5971f359b5d81b7dce3db8ea732ca33c6cbd53
Reviewed-on: http://review.whamcloud.com/2327
Reviewed-by: Andreas Dilger <adilger@whamcloud.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-812 kernel: sync_page() removed from address_space_operations
Wally Wang [Tue, 10 Apr 2012 23:47:29 +0000 (16:47 -0700)]
LU-812 kernel: sync_page() removed from address_space_operations

sync_page function has been removed from struct
address_space_operations since Linux 2.6.39.

Change-Id: Iec85c08bee9c8ee8d7904b7a2bf97ece5c04bbfa
Signed-off-by: Wally Wang <wang@cray.com>
Reviewed-on: http://review.whamcloud.com/1985
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Peng Tao <tao.peng@emc.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1345 tests: sanity test 215 non integer handling fix
James Simmons [Fri, 4 May 2012 11:45:02 +0000 (07:45 -0400)]
LU-1345 tests: sanity test 215 non integer handling fix

Sanity test 215 test the format of various /proc/sys/lnet/* files.
Some of those files are integer values but their can be times when
no valid number is available so a NA is reported. This patch
handles those cases.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I2c9ae2c56d7864099cddb456b998356f0f7c32b2
Reviewed-on: http://review.whamcloud.com/2602
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1347 build: remove the vim/emacs modelines
Liang Zhen [Mon, 7 May 2012 08:46:10 +0000 (16:46 +0800)]
LU-1347 build: remove the vim/emacs modelines

Delete all of the vim/emacs modelines.
Add copyright information for a few files.

Signed-off-by: Liang Zhen <liang@whamcloud.com>
Change-Id: Ic22ce8d8cc7786ffdb19937eb9f93a2d49aa2581
Reviewed-on: http://review.whamcloud.com/2658
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1358 kernel: Kernel update [RHEL6.2 2.6.32-220.13.1.el6]
yangsheng [Wed, 2 May 2012 05:49:34 +0000 (13:49 +0800)]
LU-1358 kernel: Kernel update [RHEL6.2 2.6.32-220.13.1.el6]

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

Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: Id6a1c8ef918d9df8f5948caedfd45688f73d4747
Reviewed-on: http://review.whamcloud.com/2653
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years ago2.2.52 2.2.52 v2_2_52_0
Oleg Drokin [Tue, 8 May 2012 03:30:58 +0000 (23:30 -0400)]
2.2.52

Change-Id: Ia2a129c0cb3103c94591869759b4a16ed19901a6

7 years agoLU-1351 llapi: Handle special file types in llapi_path2fid()
John L. Hammond [Sat, 28 Apr 2012 18:40:41 +0000 (13:40 -0500)]
LU-1351 llapi: Handle special file types in llapi_path2fid()

In llapi_path2fid() check for errors from open() and ioctl() that
occur on special file types (device, socket, fifo).  Add a test in
sanity.sh that lfs path2fid will handle each type.

Change-Id: Ib411038179b3eff4191e25ac7320558a0ee1c76b
Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Reviewed-on: http://review.whamcloud.com/2606
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1264 quota: reserve FID sequences for quota
Johann Lombardi [Wed, 28 Mar 2012 09:41:41 +0000 (11:41 +0200)]
LU-1264 quota: reserve FID sequences for quota

This patch reserves 2 FID sequences for quota.

Slave indexes will be allocated an unique FID from the FID_SEQ_QUOTA
sequence.

As for FID_SEQ_QUOTA_GLB, it will be used to uniquely identify the
global quota indexes. For the global index, the sequence will thus be
set to FID_SEQ_QUOTA_GLB and the 32-bit object ID divided into 3
fields:
- 16-bit pool identifier
- 8-bit quota type (user or group quota)
- 8-bit target type (data or metadata)

Thanks to this static FID scheme, slave can enqueue global quota lock
directly on the right FID without requiring a first readdir or to
change the resource ID on the fly when the lock is granted.
As for the slave index FID, it is allocated dynamically from
FID_SEQ_QUOTA and is returned to the slave in the quota LVB when the
global quota lock is granted.

Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I27552256cb96bbb88c0eeb3e7e3584d97476c9f1
Reviewed-on: http://review.whamcloud.com/2396
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1306 ldlm: LBUG at ldlm_lock.c:213
Andriy Skulysh [Wed, 11 Apr 2012 11:55:28 +0000 (14:55 +0300)]
LU-1306 ldlm: LBUG at ldlm_lock.c:213

Protect l_flags with locking to prevent race on
signal reception.

Xyratex-bug-id: MRP-420
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-by: Iurii Golovach <iurii_golovach@xyratex.com>
Change-Id: Ifbf9e668bfeba30c9f9f206086186ad7d499a871
Reviewed-on: http://review.whamcloud.com/2511
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1311 Disable local irqs when locking tcds while walking them
Oleg Drokin [Thu, 26 Apr 2012 21:43:11 +0000 (17:43 -0400)]
LU-1311 Disable local irqs when locking tcds while walking them

This helps us to avoid a deadlock with other threads that goes like this:
thread doint the walking = (1)
other thread = (2)

(1) get some non-irq type tcd locked while walking the tcds
(2) get some irq/bh lock
(2) try to print a debugging message and block on the tcd lock held by (1)
(1) irq/bh arrives, tries to get irq/bh lock held by (2) == BAM!

Change-Id: If1e1cc57c0f2e287b453e34db0c894c1ca830b9a
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2605
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
7 years agoLU-1329 ptlrpc: handle -EINPROGRESS for create
Niu Yawei [Wed, 18 Apr 2012 07:35:38 +0000 (00:35 -0700)]
LU-1329 ptlrpc: handle -EINPROGRESS for create

If some metadata operation get -EINPROGRESS from server, client
should retry the operation infinitely. Which is required by
the new quota design in the DNE environment.

We handle -EINPROGRESS only for create operation for now, if
necessary, it can be extended for other operations later.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Iad568afeff0af1d4df840d3acf2df161df6f7690
Reviewed-on: http://review.whamcloud.com/2572
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-904 ptlrpc: redo io on -EINPROGRESS
Niu Yawei [Fri, 13 Jan 2012 08:33:22 +0000 (00:33 -0800)]
LU-904 ptlrpc: redo io on -EINPROGRESS

When server return -EINPROGRESS for a write RPC, the client
should keep resending the RPC until server return other
error code or the client is evicted.

This is required by the new quota design: when a write on
OST can't acquire quota from master for broken network, it
should return -EINPROGRESS to inform the client to retry
write infinitely.

This patch also fixed the defect of redo io RPC can't be
aborted during eviction, in a lightweight manner.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Iea393cb1ea55e9d006f52dbfc39a2b9a3670d682
Reviewed-on: http://review.whamcloud.com/1962
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-506 statahead: revalidating dentry may be stale
Lai Siyao [Mon, 9 Apr 2012 07:33:29 +0000 (15:33 +0800)]
LU-506 statahead: revalidating dentry may be stale

The revalidating dentry may be stale (other client recreated this
file), so the statahead inode can be different from dentry inode.
Return -ESTALE instead of LASSERT here.

And for this kind of dentry, it shouldn't be revalidated, but dropped
and re-lookup. To achieve this, if ll_statahead_enter() fails to get
a valid dentry, and the return value is not 0 or -EAGAIN,
ll_revalidate_it() should return 0 directly, and let VFS calls
.lookup to get a new dentry.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I3eae450069a59d18d138d0cf7538a225e6d6deb8
Reviewed-on: http://review.whamcloud.com/2492
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Peng Tao <tao.peng@emc.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-911 obdclass: new context tags for future use
Mikhail Pershin [Thu, 22 Mar 2012 09:53:22 +0000 (13:53 +0400)]
LU-911 obdclass: new context tags for future use

- Add new thread tags: local, mgs and osp
- use LCT_LOCAL to avoid extra keys allocation when just local
  server update is needed.
- target_recovery_thread() is capable to serve OFD.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Ic41673c91b8d519c95a8740c418070f9e14aa3a6
Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1851
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-425 tests: fix the issue of using "grep -w"
Yu Jian [Fri, 13 Apr 2012 06:33:48 +0000 (14:33 +0800)]
LU-425 tests: fix the issue of using "grep -w"

This patch fixes the following issue while using "grep -w"
to do exact match:

$ echo /mnt/nbp0-2 | grep -w /mnt/nbp0
/mnt/nbp0-2

Per the description of "-w" option:
-w, --word-regexp
Select only those lines containing matches that form whole words.
The test is that the matching substring must either be at the
beginning of the line, or preceded by a non-word constituent
character. Similarly, it must be either at the end of the line
or followed by a non-word constituent character. Word-constituent
characters are letters, digits, and the underscore.

So, the hyphen "-" character is a non-word constituent character
and "grep -w" does not do exact match on strings which contain it.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I53d306d38b05408c351db10dc545120f2f9dabce
Reviewed-on: http://review.whamcloud.com/2529
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-911 osd: osd_ldiskfs_read returns short reads
Mikhail Pershin [Tue, 6 Mar 2012 08:39:27 +0000 (12:39 +0400)]
LU-911 osd: osd_ldiskfs_read returns short reads

osd_ldiskfs_read returned always the requested size even if short
read occurs hiding possible problems. Now it returns real size.

dt_read() helper returns just the same result and can be used to read
any data.

dt_record_read() must be used only for fixed length records

Fix mdt_getattr_internal() code related to readlink, it always tried
to read link of size + 1, so now we need to take this into account.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: Ib603c5cbe5b06f3f6a9aef74c52bb78cdbd4c3eb
Reviewed-on: http://review.whamcloud.com/2263
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
7 years agoLU-1214 ptlrpc: removes client lu_target.h/target.c dependency
Liu Xuezhao [Sun, 18 Mar 2012 15:08:37 +0000 (23:08 +0800)]
LU-1214 ptlrpc: removes client lu_target.h/target.c dependency

Needs not include lu_target.h or compile target.c for client.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I332864158839a8ed1f1df3b24477f5e68ef4ecb7
Reviewed-on: http://review.whamcloud.com/2362
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>