LU-3953 config: move ext4 src detection to earlier phase

Moving ext4 src detection to earlier in config phase to
make sure enable_ldiskfs is marked no to avoid build
failure from client only.

Correct syntax error in LB_ZFS_USER.

Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: I8b707dd66bcceb2b5b56a26ea7354c455c03f3d8
Reviewed-on: http://review.whamcloud.com/7692
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-3959 build: fix make rpms for lustre-iokit

With the recent merge of the lustre-iokit build
system with lustre's build system on some platforms
running make rpms from the top of the lustre tree
breaks with

make -C lustre-iokit  rpms
make[1]: Entering directory `lustre-2.4.93/lustre-iokit'
make[1]: *** No rule to make target `rpms'.  Stop.

This patch removes the offending code in the makfile
without breaking anything else.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I837ab1c2c383e1ca68eaadc492c3c8cf18cecb92
Reviewed-on: http://review.whamcloud.com/7771
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
LU-3864 mdt: return st_blocks=1 for released files

Before this patch it has been decided to return st_blocks=0 for
released files. Unfortunatelly this caused tools like tar then
to consider the file as fully sparse and to archive it as is
without attempting to access/restore its content.
As this leads to potential corruption, it has been decided that
the less ugly and intrusive way to bypass this was to return 1
block considering this is consumed by file's metadatas.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I85df56a60bf3585b42999fc1b80d1f075435dbc3
Reviewed-on: http://review.whamcloud.com/7776
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
LU-3979 tests: archive access must be done on agent

In sanity-hsm tests, all access to archive backend
must be done from an agent, so all the command which
access it are executed through a do_facet $SINGLEAGT
Modified tests are 10a 10b 10c 11 12a 12b 12d 12n 13 25a 30a
110a 111a 222a
When doing remote commands on agent, we cannot use default
environnement variables. So test 106 must use explicitly the
lustre mount point when calling get_client_uuid.

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I245069655d2dcf20d1c316c8b9e166cbd8ee4e98
Reviewed-on: http://review.whamcloud.com/7730
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3828 mdt: hsm tunable can be set permanently

HSM tunable are now always visible, even if hsm is off,
so HSM tunning in MGS conf can be set at MDT mount.
Rename hsm /proc entry archive_id in default_archive_id

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: Ic89de22e11f989ecd2ce01f10764ec6a61a7e870
Reviewed-on: http://review.whamcloud.com/7557
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Malcolm Cowe <malcolm.j.cowe@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Revert "LU-3544 nfs: writing to new files will return ENOENT"

This causes nasty interop issues with 2.1 that ca cannot get a handle on in time for 2.5, so reverting this for now.

This reverts commit 2402980a0891e43668f4016e17f2ff872006e0fa

Change-Id: Ia5323df6f493b78832c5ca9cfbd497e80bef26fe
Reviewed-on: http://review.whamcloud.com/7809
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2074 build: fix 'copy into fixed size buffer' errors

Fix 'copy into fixed size buffer' defects found by Coverity
version 6.0.3:
Copy into fixed size buffer (STRING_OVERFLOW)
The fixed-size string might be overrun by copying without
checking the length.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Ia47e6ae132fe476fce202ce06d6fc655f9855012
Reviewed-on: http://review.whamcloud.com/4154
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3974 libcfs: replace num_physpages with totalram_pages

Currently lustre uses an exported kernel variable
num_physpages but this variable includes also non-ram
pages and is not memory hotplug support aware. Also in
kernels 3.11 and above this variable is no longer
exported. The exported variable totalram_pages handles
the the limitations of num_physpages plus its avaliable
in all Lustre supported kernels.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I021fbbd99b2c8e538fc0357a676834e26d690702
Reviewed-on: http://review.whamcloud.com/7726
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
LU-4019 ofd: setattr don't udpate lvbo with object referenced

we shouldn't allow recursive lu_object_find() while object
can be destroyed. so release the reference to the object
before calling to ldlm_res_lvbo_update() which lookups the
object on its own.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: If34d89834e352b6d0b8129a6fb4377317833a78a
Reviewed-on: http://review.whamcloud.com/7795
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>