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>
LU-668 mdd: Rename MDS_*_FL to LUSTRE_*_FL and update usage

Fully remove MDS_*_FL and replace them with LUSTE_*_FL.  These
values are explictly not defined using LDISKFS_*_FL as was
done in mdd_internal.h to avoid a dependency on ldiskfs.h.

"These flags are part of the wire protocol.  We already have
portable definitions of these as "MDS_APPEND_FL", et. al.
in lustre_idl.h.  Since MDS_*_FL is no longer used in the
Lustre code (in preference to LUSTRE_*_FL), it makes sense
to just rename these in lustre_idl.h, and their corresponding
uses in wire*.c."
    -- Andreas

This was originally filed as Lustre bugzilla 22408.

Change-Id: Ib606bd43a93fc7c53f1660cc63751ec4ff9a76ed
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/1349
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-723 ldiskfs: Drop support for ext3 based ldiskfs

Building ldiskfs from ext3 is no longer supported, thus this change
attempts to clean things up and only support building ldiskfs from
ext4 sources. The main changes made, involved replacing the @BACKFS@
autoconf variable with 'ext4', and removing the HAVE_EXT4_LDISKFS
macro. It is now safe to assume that ldiskfs is build based entirely
on ext4.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: Ia0eff6e4c1b755806ccfbf554e4a36201f9f1a64
Reviewed-on: http://review.whamcloud.com/1643
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-669 mea.c unconditionally uses ldiskfs hashs

Remove the ldiskfs hash code from mea.c as described by
comment 15 in Lustre bugzilla 22410.  The MEA_MAGIC_HASH_SEGMENT
case has been replaced with a CERROR() which will indicate if
this ever occurs.

"Yes, the two level hashing function is implemented in this patch.
And there no ldiskfs hash dependency on client anymore, so those
ldiskfs hash function can be removed from mea.c"
    -- wangdi

This was originally filed as Lustre bugzilla 22410.

With the removal of this code the ldiskfsfs_dirhash() function
no longer has any consumers in obdclass.  It is now only used
by the ldiskfs osd.  Since this functionality was originally
copied from ldiskfs it makes sense to remove it entirely and
have the osd rely on the ldiskfs implementation.

Change-Id: I017918cad57fc0641ebbd9471cb5b5717c65dea2
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/1350
Reviewed-by: wangdi <di.wang@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-1396 osc: control the RPC rate between MDS and OST

1. Limit the RPC rate with setting 50 maxim rpc in flight between
MDS and OST.

2. Add specify flag in oa to tell whether the destory from echo_md
destory or MDT close/unlink orphan, where we can not throttle the
destory RPC, since it might block ptlrpcd thread. See Bug 16006.

Signed-off-by: Wang Di <di.wang@whamcloud.com>
Change-Id: Ie3b555eecd2716a82b058f645d002f46d8c4dd36
Reviewed-on: http://review.whamcloud.com/2899
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1095 debug: Common client/server message standardization

Enhance and standardize several common messages.  In particular
when a peer is involved ensure peers nid is in the message, and
on the server include the obd name in the message.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: Iaea477e7dab240866a10c1863886d21d674e293d
Reviewed-on: http://review.whamcloud.com/2200
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1095 debug: Report remaining recovery time consistently

Consistency is good, always report the remaining recovery time
in the mm:ss format.  This patch get's the last 3 remaining
instances where it is simply reported as a total number of seconds.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: If5599d8c24b1cd862ab89670553fcd24672cadbc
Reviewed-on: http://review.whamcloud.com/2204
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1095 debug: fix missing CDEBUG() newline

The console message cleanup 389fde827be2ee6fb4ee08e955d773a2a16e70c6
lost a newline in one of the messages, which itself generates a
warning on the console.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie5eed2977e496e082d5b8e62bfc39e0df93fcab0
Reviewed-on: http://review.whamcloud.com/3134
Reviewed-by: Li Wei <liwei@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-1095 debug: no console message for long symlink

Some minor fixups from running local sanity.sh tests:
- don't print a console message for long-but-legal symlinks,
  which could be hit during normal usage as well

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I24e3e8ea9d8db0ca9c59597f3170f2b18359500c
Reviewed-on: http://review.whamcloud.com/3130
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1095 debug: Improve RPC completed message

Do not print RPC completed messages for fake requests.

Signed-off-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Change-Id: I7156c22c94210f265d01c8621e2be9da0c4a913d
Reviewed-on: http://review.whamcloud.com/3445
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-1095 debug: quiet unnecessary console chatter

Quiet warning when configuring non-default CPT partitions, since this
will happen whenever the module parameter is changed.  Only complain
if the number of partitions is more than the number of cores, or if
it is more than 4x the recommended number.

Running racer.sh provokes a lot of messages from mdd_readdir(),
because it is doing "ls" in a directory that has been unlinked.
This is legal under POSIX and should not generate a console message.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I33afab093e9a03324a579244ce5177708735e7cc
Reviewed-on: http://review.whamcloud.com/3894
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
ORNL-14: debug: print recovery completion message

Print a proper "end of recovery" message to match the one printed
by 1.x so that it is clear when recovery has finished, how long it
took, and how many clients recovered.

This should have been part of the original patch committed for
eda8eab5abeef1117ae1082533b5888a91875e12.

Change-Id: I3a8793fdcb3c665e8df0d39ae82b4c56fb1bb527
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1278
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1095 debug: conditionally print recovery status

Avoid printing non-sense messages like this when the recovery
code hasn't run. For example, this can occur when your starting
a new target for the first time.

  Lustre: lustre-OST0001: Recovery over after 22277843:04,
  of 0 clients 0 recovered and 0 were evicted.

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: Ib4bd8783c0c17aa15052fc9b9cf78e18274b2783
Reviewed-on: http://review.whamcloud.com/4043
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
LU-1203 mdt: recognize old rootsquash and nosquash_nid params

Change mdt_process_config() to make it capable of recognizing
old "mdt.rootsquash" and "mdt.nosquash_nid" parameters.

The new parameters are "mdt.root_squash" and "mdt.nosquash_nids".

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I9fc71e2a997a3b0835a3adad2ccfde6d2c64ca56
Reviewed-on: http://review.whamcloud.com/2680
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1203 mdt: map old params to new ones by using an array

This patch improves mdt_process_config() to use an array for
mapping old params to new ones.

The patch also adds a common function class_find_old_param()
to check whether a proc param is an old one or not, and return
new one if it's an old one.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I122e4e83a3f4e84a3fdbd3fe6a69b7c1b5e08d3f
Reviewed-on: http://review.whamcloud.com/3836
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1479 build: enable srp initiator module with lbuild

kernel-ib doesn't include ib_srp module if RPMs built by lbuild.
It's required for Infiniband based storage.

Signed-off-by: Shuichi Ihara <sihara@ddn.com>
Change-Id: I16e940592f93abc9150f391316b8f55eb60c663a
Reviewed-on: http://review.whamcloud.com/3049
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1448 llite: Prevent NULL pointer dereference on disabled OSC

When a file system is mounted with a disabled OSC reading the import
information from the proc file system can result in a NULL pointer
dereference. The Lustre import on a disabled OSC with remain
in the LUSTRE_IMP_NEW state and imp_connection will remain NULL.

Signed-off-by: Jeremy Filizetti <jeremy.filizetti@gmail.com>
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ia6df51a36efbcd5a7fc7668bb23455b253ae4855
Reviewed-on: http://review.whamcloud.com/2995
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1528 test: run_one_logged should return error when test fail

run_one_logged need to return error code even FAIL_ON_ERROR=false

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I1ac59ddfb58b25e7292aacc8c5a31fc218371520
Reviewed-on: http://review.whamcloud.com/3112
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1685 test: fix FAIL_ON_ERROR=false parameter

The previous fix on LU-1528 which was supposed to
fix the overall status to FAIL when a subtest FAIL
didn't work. This commit will provide the proper
fix. The issue is grep FAIL: in exit_status() should
not include ":"

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I7eaf14351ac8a2c3d21f530e43c75871b4b01f6a
Reviewed-on: http://review.whamcloud.com/3507
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-445 lnet: Make previous change backwards compatible

With the previous patch as is, a 2.3 system running against
a 2.2 or 2.1 system will have an invalid timestamp for doing
bandwidth calculations.

This patch checks the value of the timestamp field to
determine if it is a valid value (>= 2.3) or is too small
to be a timestamp (< 2.3). If it is a valid timestamp, it
will be used. If not, the local timestamp will be used.

Signed-off-by: Doug Oucharek <doug@whamcloud.com>
Change-Id: If655144de72d3e46ab32acfcfc35ed79f58d00b2
Reviewed-on: http://review.whamcloud.com/3192
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>