LU-1682 ptlrpc: LBUG in ldlm_cli_cancel_local

When the case ldlm_cli_enqueue() created a new lock, and then, fails
to allocate memory for a new request, it could cause the LBUG in
ldlm_cli_cancel_local() because the lock->l_conn_export is NULL,
nevertheless the lock is a client-side lock.
This patch fills in some lock fields before the memory allocation
for a new request.

Signed-off-by: Hiroya Nozaki <nozaki.hiroya@jp.fujitsu.com>
Change-Id: I4ba4b6f1bc5dfbb51853261a0f247289304a6abd
Reviewed-on: http://review.whamcloud.com/3488
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
LU-1477 kernel: Kernel update [RHEL6.3 2.6.32-279.2.1.el6]

Add support for RHEL6.3 kernel 2.6.32-279.2.1.el6.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I792b174c77d635100cd02dbbddef568b550d6ed1
Reviewed-on: http://review.whamcloud.com/3033
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>
LU-1337 build: make configure process not break for 3.4 kernel

1. remove "ifeq ($(PATCHLEVEL),4)" from build/Makefile, Rules.in
   "ifeq ($(PATCHLEVEL),4)" is for old 2.4 kernel, it breaks
   configuration process for 3.4 kernel.
2. change the "-include" file from "include/$AUTOCONF_HDIR/autoconf.h"
   to "include/linux/kconfig.h", as kconfig.h includes autoconf.h and
   defines some macros(IS_ENABLED etc.) which is needed for some
   header files.
3. Fix a typo from "blkkdev.h" to "blkdev.h" in lustre-core.m4

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: If1c712c194ba76a2fe46c31afad28c37f0b465c6
Reviewed-on: http://review.whamcloud.com/3396
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
LU-1337 vfs: generic_permission has 2 args

generic_permission has 2 args since kernel 3.1
(kernel commit 2830ba7f34ebb27c4e5b8b6ef408cd6d74860890).

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I1ee2d127af3dfdc3c24f1466d9e183918c3a652c
Reviewed-on: http://review.whamcloud.com/3397
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
LU-1337 kernel: NETIF_F_NO_CSUM and LOOKUP_CONTINUE removed

1. kernel: 3.3 removes NETIF_F_NO_CSUM feature bit
   (kernel commit 34324dc2bf27c1773045fea63cb11f7e2a6ad2b9)
   The only one place uses NETIF_F_NO_CSUM is to check
   "(caps & (NETIF_F_IP_CSUM | NETIF_F_NO_CSUM | NETIF_F_HW_CSUM))".
   Replace (NETIF_F_IP_CSUM | NETIF_F_NO_CSUM | NETIF_F_HW_CSUM)
   as NETIF_F_ALL_CSUM which was added since kernel 2.6.17
   (kernel commit 8648b3053bff39a7ee4c711d74268079c928a657)
2. Kernel 3.1 kills LOOKUP_CONTINUE, LOOKUP_PARENT is equivalent
   to it since that.
   See kernel commit 49084c3bb2055c401f3493c13edae14d49128ca0

Another minor change is adding "#include <linux/module.h>" to
libcfs/linux/linux-crypto-adler.c, linux-crypto-crc32.c.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: I4f3621fcb921c866b33881027a4a0a491d676640
Reviewed-on: http://review.whamcloud.com/3398
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
LU-1158 general: added nanosecond OBD connect flag

To prevent collisions with any future flags needed in features written
against this branch.

Signed-off-by: Isami Romanowski <isami@whamcloud.com>
Change-Id: I965a0ce0120f253014a75c80fe0941ba92f1c45e
Reviewed-on: http://review.whamcloud.com/3380
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-1522 recovery: rework LU-1166 patch in different way

Dropping recovery counters upon last export put caused LU-1522 issue,
return class_export_recovery_cleanup() back to the
class_export_disconnect() and use exp_failed flag to avoid race
between target_handle_connect() and class_disconnect_stale_exports()

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I78c19a8d49786877d2de27c82bf40ebec494f044
Reviewed-on: http://review.whamcloud.com/3122
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1057 quota: speed up lookup in osc_quota_chkdq

This patch replace the global hash table used to store uid/gid
about to run out of quota space with a per-OSC cfs_hash.

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: Ibf0785a60b007f33a8660298159abcc387dd8507
Reviewed-on: http://review.whamcloud.com/2074
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: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1422: debug: remove obsolete Cray Catamount support

The lustre debug layer also had special hooks for Catamount
support. Now that Catamount support has been removed we can
remove this code as well.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I838deb6ec7f1e9f43cb2d8121bf27bff5dbad68e
Reviewed-on: http://review.whamcloud.com/3385
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-812 vfs: address_space_operations.migratepage has 4 args

Linux 3.3 address_space_operations.migratepage has 4 args.
Add detection in build configure and condition in code for
the new argument. Before Linux 3.3 the migration_mode values
were located in migrate.h instead of migrate_mode.h

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Wally Wang <wang@cray.com>
Change-Id: I5be5de9c6693b09ddbbc92e729b79bfa1d99ee3a
Reviewed-on: http://review.whamcloud.com/2279
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>