LU-2838 build: Syntax issues in sources

Just fix syntax issues in source code.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I822b943f31785e18ca09125466a9b21d7f7ce558
Reviewed-on: http://review.whamcloud.com/5476
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
LU-718 mds: fix mds-max-threads configure parameter

Commit 648b69c2c9 renamed MDT_MAX_THREADS to MDS_MAX_THREADS, but
didn't update the configuration parameter for setting this value
at build time.  Fortunately, the configure parameter itself has
the correct name to begin with, so no build-visible changes needed.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I21dc22e470e7e3788ebef8009643b5c7a98bc220
Reviewed-on: http://review.whamcloud.com/5723
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3182 lmv: fix duplicate directory entries

lmv_readpage() fails to overwrite the ldp_hash_end and ldp_flags of
the first lu_dirpage in a CFS_PAGE with the values from the last
lu_dirpage. This causes duplicate directory entries to be returned
from readdir() for sufficiently large directories.  This is only
an issue on platforms where CFS_PAGE_SIZE > LU_PAGE_SIZE, i.e. PPC.

* Fix the regression introduced in commit 5e91e5b, which was the
  apparently accidental removal of these lines from lmv_readpage():

-                        hash_end = dp->ldp_hash_end;
-                        flags = dp->ldp_flags;

* Refactor the lmv_readpage() function and add some comments.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I04e9a98b90216a7da7ce9d9325080d6b6c4010c7
Reviewed-on: http://review.whamcloud.com/6071
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3242 obdclass: skip zero cookie in class_handle_hash()

In class_handle_hash() really skip the zero cookie when it comes
around.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I042d7a43b70feb9710a7b3a27e732fc314ec1cf5
Reviewed-on: http://review.whamcloud.com/6198
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2877 Add a roundtrip delay in sanity test 34h

It seems we are still getting false failures in test 34h due to
overloaded server that takes longer than 2 seconds to process
a request.
To even things out - do another sync RPC to OST first before
starting the timeout.

Change-Id: I070345233398d7a15a105162523ef6dc81c1a929
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/5882
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
LU-1199 lbuild: Fix error handling

Improper grouping of expressions in the error() function meant
that even a simple "lbuild -h" would trigger a backtrace, and email to
someone at whamcloud.com.  That is fixed here.

Also stop sending email to a static email address on errors.

Also fix a minor typo.

Change-Id: I5a3f6131baaadc9dba23414e9e959f72fbda2679
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/5961
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2989 build: some make targets are broken

Add make targets "distclean" and "maintainer-clean" in
ldiskfs/ldiskfs/Makefile. The global "make distclean" now
executes whithout an error.

Also lustre/target/.gitignore file is created to hide
message from GIT.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ic8841d11960d5aacd8293ecfcaf8c628dd743c45
Reviewed-on: http://review.whamcloud.com/5766
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-1199 build: Improve git hook link installation

Check for .git/hooks directory before trying anything else.  Removes
one barrier to compiling lustre without .git being present.

Change-Id: I5fdf8fae9a4958099a40772d927fa59e42446a5b
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/5879
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-1330 proc: remove osd proc handlers from lprocfs_status.c

Move lprocfs_osd_rd_{blksize,{files,kbytes}{free,avail} to dt_object.c
and rename them to lprocfs_dt_rd_blksize....  Remove the unused
function lprocfs_obd_rd_mntdev().  Do not include
lustre_{fsfilt,log,disk}.h or dt_object.h in lprocfs_status.c.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ic54973f8bc6ec1d440fa76aadf0dd13629ce345c
Reviewed-on: http://review.whamcloud.com/5721
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-3086 build: fix 'uninitialized variables' errors

Fix 'uninitialized variables' defects found by Coverity version 6.5.1:
Uninitialized scalar variable (UNINIT)
Using uninitialized value.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I8df7c60823e392b37880ca5ddb1ea107554784e6
Reviewed-on: http://review.whamcloud.com/5916
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3106 ofd: create additional symlinks to osd

to preserve compatibility with obdfilter stats:
read_cache_enable, readcache_max_filesize and
writethrough_cache_enable are accessible via
/proc/.../obdfilter/.. again.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: Iee5315a58c6434f4633692a80f57e68890f5c415
Reviewed-on: http://review.whamcloud.com/5873
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-3203 mdd: check result of dt_trans_create() using IS_ERR().

In mdd_convert_linkea() and orphan_object_destroy() check the result
of dt_trans_create() using IS_ERR().  In mdd_close() avoid passing an
error pointer to mdd_trans_stop().  In local_oid_storage_init() avoid
a spurious mutex unlock after failure in dt_trans_create().  Trivially
simplify cleanup in mdd_convert_remove_dots() and mdd_convert_lma().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I4a5c53d3efa9c69c1428a8e5a875a531c9206d12
Reviewed-on: http://review.whamcloud.com/6117
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-2038 osd: Rename do_*punch to dbo_*punch

Minor fix where dt_body_operations::do_punch and
dt_body_operations::do_declare_punch were renamed to
dt_body_operations::dbo_punch and
dt_body_operations::dbo_declare_punch, respectively, to keep the
field names consistent.

Signed-off-by: Girish Shilamkar <gshilamkar@ddn.com>
Change-Id: Id807805bd69bb20460898552830a658d8a25c238
Reviewed-on: http://review.whamcloud.com/5895
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-1199 build: Increase ldiskfs version to 4.1.0

The ldiskfs version number has not changed in quite some time.

This brings the versioning in line with what LLNL has been using
externally, and allows us to realign on the same code.

Add an explicit requirement for "lustre-ldiskfs >= 4.1.0"
to the lustre spec file at the same time.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: I72c9f52093942d881ee02dad8f65c2f04dbef35e
Reviewed-on: http://review.whamcloud.com/5938
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
LU-1606 api: compile and build lustreapi test

To avoid regression of the client api conf-sanity includes a new test
73 to verify the lustreapi can be compiled and linked against. All the
files in the directory $LUSTRE_TESTS_API_DIR with the extension .c are
compiled and linked. The directory is located in the build tree at
./lustre/tests/clientapi.

Signed-off-by: Richard Henwood <richard.henwood@intel.com>
Change-Id: I0ad6a1671bf7033ec2ad5bc7a82d82e468cd31c2
Reviewed-on: http://review.whamcloud.com/3440
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3244 utils: tunefs.lustre should preserve virgin label

so that the filesystem registers can register properly on MGS,
if tunefs.lustre was used right after mkfs.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I6245e5e4d10cd0a13a4e9068a9b758da8580b537
Reviewed-on: http://review.whamcloud.com/6216
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>