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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Update version to 2.2.53

Change-Id: Icb5f762ae2e790d78b017ca094182789c06b79ea
Signed-off-by: Oleg Drokin <green@whamcloud.com>
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>
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>
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>
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>