LU-2154 osp: precreate logic to use last assigned id

instead of "next to assign". this change removes few cases
where last-created-id could become less than next-to-assign
resulting in an invalid assertions.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: If41563ea2f227ea980e3017d9485cb9c7caccad5
Reviewed-on: http://review.whamcloud.com/4289
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
LU-1131 osd-ldiskfs: better journal credit tracking

When running with a small MDT device during testing, it is possible to
overflow the reserved credit maximum for the journal.  Improve the
ldiskfs debugging for transaction credits so that it is possible to
better understand where the reserved credits are being used.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Iea90b771a5e19190cc95cbf8f2f725bede500c1e
Reviewed-on: http://review.whamcloud.com/4282
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-2145 target: use tgt_ prefix for target function

There are several prefixes used: target_, lut_, tg_. Start to use
tgt_ prefix as single one.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I4e1f38b81a5311d56472162b8a1114a2aa252874
Reviewed-on: http://review.whamcloud.com/4273
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
LU-1337 llite: kernel 3.1 renames lock-manager ops

Kernel 3.1 renames lock-manager ops(lock_manager_operations) from
fl_xxx to lm_xxx (commit 8fb47a4fbf858a164e973b8ea8ef5e83e61f2e50).

Add LC_LM_XXX_LOCK_MANAGER_OPS/HAVE_LM_XXX_LOCK_MANAGER_OPS to check.

Re-arrange several macro definitions in lustre-core.m4 as kernel
version sequence.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Change-Id: Ic86ec9db2f8262ef7ab9f5f2fb51ca79591120a4
Reviewed-on: http://review.whamcloud.com/3579
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1930 build: Back end file system fixes.

Currently Lustre for ZFS requires the zfs development
rpm for its userland support to be installed on the
build machine so we can create the lustre zfs utilities.
What this patch does is allow a user to be able to build
against the zfs/spl source drops as well as the rpms.
A work around is provided so we can point the lustre
build system to were a user can temporary install the
zfs user land headers.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I8e5586ed22956a9dd4799826a442b8f5a895d872
Reviewed-on: http://review.whamcloud.com/3980
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-2167 ptlrpc: Fix use after free in ptlrpcd on termination

Should not use pc after signalling completion of its use
since it will be freed later.

Change-Id: Id20e8d188fea77f23a52e9a374e7e5e84fe3ad4b
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/4264
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>