LU-1199 build: Change various %defines to %globals

As a general rule, "%define" should not be used inside
of %{ } blocks.  %define is locally scoped.  While it
appears to work with constructs like this:

   %{!?foo: %define foo bar}

that is only because of an rpm quirk that fails to
free non-global scope variables immediately.  Later use
of parameterized macros in the file can trigger cleanup
of the local variables, and "foo" will be once again
undefined.

The solution is to use %global like so:

   %{!?foo: %global foo bar}

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: Ie18b0b86324334330b726bf69249d97e47e9350e
Reviewed-on: http://review.whamcloud.com/3420
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>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1691 kernel: kernel update [SLES11 SP2 3.0.34-0.7.9]

Add SLES11 SP2 client support to 3.0.34-0.7.9.

Allow 2.6 (SP1) and 3.0 (SP2) clients to be built for SLES11
Standard lbuild will build for the kernel version that builder
is using, this can be overridden by specifying the target
directly as an lbuild parameter

This change explictly does not make changes to support SLES11SP2
server

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Chris Gearing <chris.gearing@intel.com>
Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: Iece4c0286a3f0dcd28fe96e03a8aec9bda065ed5
Reviewed-on: http://review.whamcloud.com/3734
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-2097 quota: missing ll_vfs_dq_init()

ll_vfs_dq_init() should be called before operating on the system
objects (like llog, oi, last_rcvd, etc.), otherwise, block accounting
will be missed if object is already existing.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I922c9ca8caebf52ae07fd130c41286dad68c1b8f
Reviewed-on: http://review.whamcloud.com/4220
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1842 test: remove code from s-q to use OFD

Now that obdfilter is gone and OFD is the default, we don't need to
restart lustre with USE_OFD any more.

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: Ifa3647bd815866aa29bd88a9b3c6be16c6c66fa5
Reviewed-on: http://review.whamcloud.com/4222
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <liwei@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-2110 mount: do not start osp twice

failover nid can be added under the same marker as the
main device setup block. so do not call lustre_osp_setup()
on a subsequent LCFG_ADD_UUID command in the config.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Ic4858812e942f73dd264dca5e33b27d51509f670
Reviewed-on: http://review.whamcloud.com/4227
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
LU-1606 api: Rename liblustreapi.h -> lustreapi.h

The header file "liblustreapi.h" is unfortunately named,
implying that it is only part of the lustre-in-user-space-client
rather than the more general lustre api for users that it is.

This patch renames it to simply "lustreapi.h" to avoid that
confusion.  This also helps to move towards making it
easier to use the lustre API for users.  They can simply

  #include <lustre/lustreapi.h>

and then compile with "-llustreapi".

For backwards compatibility, liblustreapi.h becomes a stub
that includes lustreapi.h, and can be removed at some date
in the future.

Since LU-113, LASSERT should be removed from userspace.
In this change, lustre_user.h has had LASSERTs removed.

All code examples in the man pages have been tested.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Signed-off-by: Richard Henwood <richard.henwood@intel.com>
Change-Id: Id1e709d36a855ad2a8eff206fa9f6bbe87182a29
Reviewed-on: http://review.whamcloud.com/3427
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
LU-1943 tests: Refresh conf-sanity 32[ab]

Existing conf-sanity 32[ab] does not run on multi-node clusters or
network types other than TCP.  This patch rewrites the tests to
start the targets on the MDS and mount the upgraded file system on
the primary client.  This scheme works both on a single-node
development environment and a typical Autotest cluster.

The disk image tarball format has been updated to include more
"metadata".  For example, the 1.8.7-wc1 and 2.1.1 tarballs added
by this patch include the kernel versions, architectures, Lustre
versions, and commit SHAs (currently only Lustre version) used to
create the disk images.  In addition, the script used to create
the tarballs is recorded as a test in test_32newtarball().

A couple of new data verifications are added to make sure the name
space, the file data, and most of the file attributes are consistent
across upgrades.

Signed-off-by: Li Wei <liwei@whamcloud.com>
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I3b0d38d67e86e0e2ac24d9aae4406b055b63ce61
Reviewed-on: http://review.whamcloud.com/4213
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-2102 llog: wrong handle was used for changelog processing

- Wrong llog handle was passed tp changelog_user_init_cb() for
  processing

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I3656829e283232ff8c17829e18df68b320e26f2f
Reviewed-on: http://review.whamcloud.com/4229
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-2099 osd: set dr_elapsed before dr_numreqs

so that service thread always get dr_elapsed and
dr_elapsed_valid initialized when the bio is done.
also, the patch adds a bit of debug to help with
the original bug if this patch doesn't help.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I7c41af9a2be5be2f37190fb053d7449653fc7a99
Reviewed-on: http://review.whamcloud.com/4216
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>