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-1994 llite: don't release nd->path in ll_follow_link

For 3.6 kernel, .follow_link is not allowed to release nd,
as VFS handles itself on error path. So we change to not do
it and report error via nd_set_link().

For all kernels, if ll_follow_link returns NULL and set
error via nd_set_link, VFS will release nd->path in
__vfs_follow_link(). This also matches most in-kernel fs
behavior.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: yang sheng <yang.sheng@intel.com>
Change-Id: I13b7e00822b983c47183ee38357e4490bea3c52c
Reviewed-on: http://review.whamcloud.com/4487
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-2221 ptlrpc: kerberos support for kernel>=2.6.24

Since kernel 2.6.24 the scatterlist struct has no field "page".
Then related Lustre kerberos code cannot work anymore.

So do not access scatterlist::page directly, instead, use the
scatterlist functions sg_set_page and sg_assign_page.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Signed-off-by: Thomas Stibor <thomas@stibor.net>
Change-Id: I446925bb42c1e018a55a69948383c8f71976f1fa
Reviewed-on: http://review.whamcloud.com/4394
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
LU-2642 quota: update quota APIs

Commit 871a2931 renamed vfs_dq_init to dquot_initialize. (v2.6.34)
Commit 9f754758 renamed vfs_dq_drop to dquot_drop. (v2.6.34)
Commit b43fa828 renamed vfs_dq_transfer to dquot_transfer. (v2.6.34)
Commit 0f0dd62f killed vfs_dq_off and vfs_dq_quota_on_remount and
replaced them with dquot_suspend and dquot_resume. (v2.6.34)

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Change-Id: I61e5a4d6c4a519457146b4a65ce78bfddebe2899
Reviewed-on: http://review.whamcloud.com/5119
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
LU-718 mdt: allow mds_num_threads module parameter

In 1.8.x the MDS service threads tunable is called "mds_num_threads",
but in 2.0/2.1 this was renamed mdt_num_threads without any chance
of compatibility.  In 2.3.x this was named back to mds_num_threads
(commit bd8835cc2dde6e86701650ccf90423ecd8fb042e) since the threads
are a property of the MDS, not of the MDT(s) on the system.

Add a compatible module option "mds_num_threads" for 2.1 so that it
is possible to upgrade 1.8->2.1->2.4 without problems.  No message
is printed in 2.1.x about deprecation, since it isn't possible to use
only one or the other in 2.1, and a warning will be printed in 2.3+
once the system is upgraded.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I3cb095812488b9459e4a3e878757d40410accab0
Reviewed-on: http://review.whamcloud.com/3804
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
LU-2237 osd: skip OI ops for local objects

We should not add the FID mapping in the OI file for local object.
Otherwise it will cause OI lookup to return non-exist local object
when the local object lost for system crash, and it also prevents
new local object to be created, and then causes the server cannot
mountup.

This issue has been fixed in OI scrub project, which will be back
ported to lustre-2.1 soon. This is a temporary patch to allow the
current lustre-2.1 to be workable.

Signed-off-by: Fan Yong <yong.fan@whamcloud.com>
Change-Id: Ibe2861818aaef3842605fb7d4e24cc02dad22104
Reviewed-on: http://review.whamcloud.com/4395
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
LU-1216 LBUG: ASSERTION(lli->lli_sai == NULL) failed using robinhood tool

Since statahead is still buggy, this small fix turns it off default.
This is a workaround and should go away with a future proper fix.

Signed-off-by: Bob Glossman <bogl@whamcloud.com>
Change-Id: Ia5781a976586cb7105cdeae4d772ce76ea56f0b6
Reviewed-on: http://review.whamcloud.com/3512
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1164 o2iblnd: param to tune number of kib scheduler threads

This patch gives the ability to control the number of kib scheduler
threads launched by the ko2iblnd module, via a kernel module option.

Indeed, we can have some situations where the default threads number
is not appropriate. The default value is to create as many threads as
the number of CPU cores.

On certain platforms, we have noticed a performance penalty
when running too many kib scheduler threads.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I2f7baa2f9bc9350502d1a0738c8e72777b57fa57
Reviewed-on: http://review.whamcloud.com/3047
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Doug Oucharek <doug@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-2513 osc: compute grant targets in bytes

In osc_shrink_grant() and osc_shrink_grant_to_target() convert page
unit target values to bytes before comparing to cl_avail_grant.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ie8e6e8b4b3245efa3b14777608f3a48bbab7e4e2
Reviewed-on: http://review.whamcloud.com/5495
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>