LU-3756 mdt: Change HSM policy display

HSM policy display must follow the format:
policy1 policy2 policy3 ... with [] around
active policies

Add sanity-hsm test 109 to test policy setting.

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I2000b9b8adfaf4cd2b369acbd076e65166832fc5
Reviewed-on: http://review.whamcloud.com/7365
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1346 libcfs: cleanup libcfs primitive (linux-prim.h)

Affected primitives:

cfs_kthread_run, CFS_DAEMON_FLAGS, cfs_task_t, cfs_current,
cfs_task_lock, cfs_task_unlock, CFS_DECL_JOURNAL_DATA,
CFS_PUSH_JOURNAL, CFS_POP_JOURNAL, cfs_sigset_t,
cfs_timer_t, CFS_MAX_SCHEDULE_TIMEOUT

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Iae0e9a9ccaa39fda71175205e9af451e65b620d1
Reviewed-on: http://review.whamcloud.com/6956
Tested-by: Hudson
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2158 lvfs: remove llog_lvfs.c and other lvfs code from llog

- remove obdfilter/llog_lvfs.c
- remove lgh_file from llog_header

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I5749997284c558307372d1442591ff68f457feb9
Reviewed-on: http://review.whamcloud.com/7413
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3642 seq: make seq_proc_write_common() safer

Don't allow seq_proc_write_common() to specify arbitrary ranges,
since this can permanently corrupt the sequence controller and/or
sequnece server.  That would allow duplicate FID allocation, or
possibly prevent any new files to be created or servers to be added
to the filesystem.

Instead, limit the sequence range that can be written via /proc to
a subset of the sequence range currently allocated to that node.
Add the "clear" keyword to allow dropping the entire local sequence
and force a new one to be fetched from the sequence server.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I89da0223a52ce8bec787b1d5099402c84274291a
Reviewed-on: http://review.whamcloud.com/7123
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1346 gnilnd: remove libcfs abstractions

With the move of libcfs to using linux as the default api
this has impacted many of the lnet drivers. This patch
removes the libcfs wrappers and uses the linux API's
directly in the LND driver

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Id502abb578808063b04e094bff026c92a5d12a3b
Reviewed-on: http://review.whamcloud.com/7454
Reviewed-by: James Shimek <jshimek@cray.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Chuck Fossen <chuckf@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3496 lprocfs: implement log2 using bitops

This patch implements log2 using fls.

Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: Alexander Boyko <Alexander_Boyko@xyratex.com>
Reviewed-by: alexander_zarochentsev@xyratex.com
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
Xyratex-bug-id: MRP-999
Change-Id: Id19752761b4dd162b282bb8006072f607b8bf729
Reviewed-on: http://review.whamcloud.com/6757
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1346 libcfs: cleanup libcfs primitive (linux-prim.h)

Affected primitives:

cfs_mb, cfs_in_interrupt, cfs_might_sleep, cfs_group_info_t,
cfs_get_group_info, cfs_put_group_info, cfs_set_current_groups,
cfs_groups_free, cfs_groups_alloc, cfs_get_random_bytes_prim

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I52293cad577f2027cabf1b124dbb1b7354fef3a5
Reviewed-on: http://review.whamcloud.com/6957
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2800 autoconf: remove LC_PAGE_CONSTANT

The purpose of this patch was to see if the kernel
was patched to support raid5 zerocopy. This only was
supported on RHLE5 servers which means this test can
be removed now.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I36276dfee7a6247719e716a9a304453dd519acdb
Reviewed-on: http://review.whamcloud.com/5339
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2800 autoconf: remove quota_on/quota_off checks

With the rewrite of the Lustre quota code we no longer
need ll_quota_[on/off]. Those obsolete methods touched
linux kernel internals that have changed over time.
With ll_quota_[on/off[ gone we can remove all the
quota autoconf that was required.

Signed-off-by: James Simmons  <uja.ornl@gmail.com>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Change-Id: I6d11894e163f213ee53c007c0e41a374fccb70f9
Reviewed-on: http://review.whamcloud.com/5367
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2800 autoconf: remove LC_BI_HW_SEGMENTS test

bio.bi_hw_segments has been removed from the upstream kernel
since v2.6.27

We can remove the test and dead code.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Iaf8c468750aeb3c0234e46c09873f8f382c77b9a
Reviewed-on: http://review.whamcloud.com/5370
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3462 lnet: Fix path to ldiskfs module

After this commit:

4dd31ba LU-3462 ldiskfs: Subsume ldiskfs's build system into lustre

The path to the ldiskfs module in lnet/utils/debug.c is updated
to point to the new location (one directory higher).

Change-Id: I949a9cdad107755f66d10dafaf0e8692587e902e
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/7639
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3670 mdt: cancel MDS_INODELOCK_XATTR on MDS updates

In some cases, MDS updates extended attributes
on its own rather than on a client request.
MDS_INODELOCK_XATTR should be taken for this purpose.

Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Change-Id: I8d5e947cc05ce5f25c8f128b01ab7458636b55ba
Reviewed-on: http://review.whamcloud.com/7186
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
LU-3999 hsm: Improve mdt.*.hsm.agents output in /proc

mdt.*.hsm.agents file contains a list of registered agents and a
couple of information for each of them. This patch improves the output
to clarify the meaning of each returned values.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: Id4858f7ac9387d539eba03389871c6e99476a5c9
Reviewed-on: http://review.whamcloud.com/7744
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-14 utils: allow formatting OST without VIRGIN flag

When reformatting a new target to replace an existing target, the
"mkfs.lustre --replace" option allows formatting an OST (or MDT?)
with the same index as a previously used OST without setting the
LDD_F_VIRGIN flag.

This is required in the case where an OST was lost due to massive
corruption or critical hardware failure.  Otherwise, the newly
formatted target will try to register with the MGS as a new target,
but will be refused by the MGS due to having an already-used index.

The OFD code skips precreating all of the objects in the filesystem
if the MDS requests an object ID too much larger than the current
LAST_ID.  In this case (which can happen if the OST is replaced
or restored from an older backup) only the most recent objects are
precreated, and the deletion of orphans from a too-large precreate
is left to lfsck.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Iea57167346627eeb85ac40c17f3ea4596b3ebbe5
Reviewed-on: http://review.whamcloud.com/7443
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>