Whamcloud - gitweb
fs/lustre-release.git
6 years agoLU-3097 build: fix 'deadcode' errors 67/7167/2
Sebastien Buisson [Mon, 29 Jul 2013 15:25:47 +0000 (17:25 +0200)]
LU-3097 build: fix 'deadcode' errors

Fix 'deadcode' issues found by Coverity version 6.5.1:
Logically dead code (DEADCODE)
Execution cannot reach this statement.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I720a5ae6f963cd2cc77208a854ca4587758a82d5
Reviewed-on: http://review.whamcloud.com/7167
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3097 build: fix 'stray semicolon' errors 65/7165/2
Sebastien Buisson [Mon, 29 Jul 2013 15:21:57 +0000 (17:21 +0200)]
LU-3097 build: fix 'stray semicolon' errors

Fix 'stray semicolon' issues found by Coverity version 6.5.1:
Stray semicolon (STRAY_SEMICOLON)
"if" statement with no "then" or "else" is suspicious.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Ieff4b45204f8be9ad4590cc9de9d06960c07d052
Reviewed-on: http://review.whamcloud.com/7165
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3433 clio: wrong cl_lock usage 09/6709/3
Vitaly Fertman [Thu, 6 Jun 2013 19:40:32 +0000 (23:40 +0400)]
LU-3433 clio: wrong cl_lock usage

granted lock is moved to HELD state in cl_wait_try() only which is
done after upcall for non-agl locks. as the result, lock unuse moves
cl_lock not to CACHED state, but to NEW state. A parallel thread
gets this lock and tries to enqueue it - instead of re-using a
cached lock, cl_enqueue_try() initiates a new enqueue and gets to
osc_lock_enqueue() where it asserts:

LASSERTF(ols->ols_state == OLS_NEW, ...);

the state of osc lock is RELEASED already - moved here by unuse.

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Change-Id: I611a6e8778871da184db13434d223036625443c8
Reviewed-on: http://review.whamcloud.com/6709
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2940 llite: Fix for oops in vvp_pgcache_show() 92/7192/2
Swapnil Pimpale [Wed, 31 Jul 2013 12:07:25 +0000 (17:37 +0530)]
LU-2940 llite: Fix for oops in vvp_pgcache_show()

Hold the lock protecting page tree (coh_page_guard) till the point the page is
being accessed.

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Change-Id: I9d1d5129d9cac8f1fa5eec77f554320c0c255fc2
Reviewed-on: http://review.whamcloud.com/7192
Tested-by: Hudson
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: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3656 tests: use full path to directio 73/7173/2
Elena Gryaznova [Tue, 30 Jul 2013 06:21:50 +0000 (10:21 +0400)]
LU-3656 tests: use full path to directio

The sanity-benchmark iozone directio test is skipped if started not
from lustre/tests directory because of related path used.
Patch fixes this test to use DIRECTIO instead of ./directio

Signed-off-by: Elena Gryaznova <elena_gryaznova@xyratex.com>
Xyratex-bug-id: MRP-1170
Change-Id: I4dec24b38300df8a14fb8f74f84b4f91c0cde910
Reviewed-on: http://review.whamcloud.com/7173
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3669 mdt: getxattr intent should check object existence 91/7191/3
Andrew Perepechko [Wed, 31 Jul 2013 11:53:36 +0000 (15:53 +0400)]
LU-3669 mdt: getxattr intent should check object existence

Make getxattr intent use HABEO_CORPUS similar to
REINT_GETXATTR to avoid crashes on race conditions.

Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Change-Id: Ic277525152847118fbe95fcc73448945acba699d
Reviewed-on: http://review.whamcloud.com/7191
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-3565 mdt: a new param to allocate sequences 27/7027/11
Jinshan Xiong [Mon, 5 Aug 2013 17:23:03 +0000 (10:23 -0700)]
LU-3565 mdt: a new param to allocate sequences

sequence controller (aka master sequence server) exports
FLDB in proc/fs/lustre/seq/ctl-*/fldb. the same entry
can be used to modify FLDB using available sequences:
lctl set_param
  seq.ctl*.fldb="[0x0000000280000400-0x0000000280000600):0:mdt"

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I2640811c23cacb00e423fcd408318cac2ac89c6f
Reviewed-on: http://review.whamcloud.com/7027
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3677 mdt: Set HSM dirty open-for-write file when evicted. 95/7195/2
Aurelien Degremont [Wed, 12 Jun 2013 10:22:03 +0000 (12:22 +0200)]
LU-3677 mdt: Set HSM dirty open-for-write file when evicted.

Fix regression introduced by LU-1303 (5165cdd). Previously,
MDS_CLOSE_CLEANUP was used to detect file closing, due to eviction.
This flag is no more since 5165cdd.

It completely removed this symbol.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: I20e18103fe085672f499c956e831564e45bd5200
Reviewed-on: http://review.whamcloud.com/7195
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3661 dt: Fix assertion of method in dt_capa_get() 71/7171/2
Li Xi [Wed, 31 Jul 2013 23:28:45 +0000 (16:28 -0700)]
LU-3661 dt: Fix assertion of method in dt_capa_get()

dt_capa_get() should assert that do_capa_get method is defined
rather than do_ref_del.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: Ibeb3f3dcd0bd9d8783e87be8c6d82c4e3e5bd460
Reviewed-on: http://review.whamcloud.com/7171
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3691 llapi: do not use GOTO 31/7231/2
Alex Zhuravlev [Mon, 5 Aug 2013 04:20:32 +0000 (08:20 +0400)]
LU-3691 llapi: do not use GOTO

as it's not defined in lustre_idl.h anymore.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: If4bceb33ab2db5aa8c507e1c5f2857896ac39852
Reviewed-on: http://review.whamcloud.com/7231
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3343 mdt: HSM coordinator main thread 12/6912/14
jcl [Sat, 6 Jul 2013 12:57:08 +0000 (14:57 +0200)]
LU-3343 mdt: HSM coordinator main thread

This patch implements the HSM coordinator. It is a MDT
thread in charge of schedulling HSM requests to
agents.

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I18fb2fad94b3972b9a09fd093e259f4ad50d810f
Reviewed-on: http://review.whamcloud.com/6912
Tested-by: Hudson
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3633 test: Sanity test 101d fails due to full OST 79/7179/3
James Nunez [Tue, 30 Jul 2013 17:20:49 +0000 (11:20 -0600)]
LU-3633 test: Sanity test 101d fails due to full OST

Sanity test 101d checks the available space on the file
system against the size of the file before writing, but
the file stripe is never checked or set. So, test 101d
has failed with enough space on the file system to write
the file, but the default stripe was 1 and there was not
enough space on that single OST for the file.

This patch sets the stripe of the file to -1 (all OSTs)
before writing to the file system.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I69b8f24bc6e6fe05c7179160bf89610516b9c5cb
Reviewed-on: http://review.whamcloud.com/7179
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2902 test: ost stat parameters were not present 64/6564/10
Keith Mannthey [Fri, 12 Jul 2013 05:33:04 +0000 (22:33 -0700)]
LU-2902 test: ost stat parameters were not present

A few tests use roc_hit to sort out cache hits. These tests
were failing for a while because the lproc stats needed were not
present.

Use roc_hit_init with setstripe to correctly identify that basic
cache_access stats are working for each individual ost before
using roc_hit.

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: Iea501433ddcdb367fe5d9614361b4aff049cb1f1
Reviewed-on: http://review.whamcloud.com/6564
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-1715 ptlrpc: flock deadlock detection does not work 53/3553/19
Andriy Skulysh [Tue, 23 Jul 2013 23:08:51 +0000 (02:08 +0300)]
LU-1715 ptlrpc: flock deadlock detection does not work

Flock deadlocks are checked on the first attempt to grant
the flock only. If we try again to grant it after its
blocking lock is cancelled, we don't check for deadlocks
which also may exist.

Perform deadlock detection during reprocess

Xyratex-bug-id: MRP-393
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-by: Bruce Korb <bruce_korb@xyratex.com>
Change-Id: Ie4d21da0a0b18458f786c9903663372aa24700fb
Reviewed-on: http://review.whamcloud.com/3553
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>
6 years agoLU-2062 utils: HSM Posix CopyTool 37/4737/29
jcl [Thu, 2 Dec 2010 20:57:59 +0000 (21:57 +0100)]
LU-2062 utils: HSM Posix CopyTool

POSIX HSM CopyTool utils named lhsmtool_posix.
This user space command is the 'glue" between Lustre-HSM
and a POSIX filesytem used as a backend.
The main functionalities implemented are:
daemon mode:
- archive: read in lustre write with POSIX backend
- restore: read in POSIX backend write to Lustre
- remove: remove an entry from backend
cmd line mode:
- import: create in lustre a released file from a backend file
- rebind: change the FID associated to a file in the backend
- maxseq: get the larger sequence of FID found in the backend

The 2 last options are used for disaster recovery mode

This tools is also used for all the non regression tests made in
sanity-hsm.sh

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: I2d6cf5c9bd1f714ad407929f4603f68c5b8f5ec3
Reviewed-on: http://review.whamcloud.com/4737
Tested-by: Hudson
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3155 mgs: set_param -P option that sets value permanently 25/6025/19
Artem Blagodarenko [Thu, 11 Apr 2013 07:31:43 +0000 (11:31 +0400)]
LU-3155 mgs: set_param -P option that sets value permanently

set_param and conf_param have different syntaxes. Also conf_param
has unimplemented paths and no wildcarding support.

This patch adds set_param -P option, that replaces the whole
conf_param "direct" proc access with a simple upcall-type mechanism
from the MGC. Option conf_param is saved now for compatibility.

Xyratex-bug-id: MRP-272
Signed-off-by: Artem Blagodarenko <artem_blagodarenko@xyratex.com>
Change-Id: I19ec3f14e339f780ef1403f2902f6baa9e789614
Reviewed-on: http://review.whamcloud.com/6025
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
6 years agoLU-3604 kernel: Kernel update [RHEL6.4 2.6.32-358.14.1.el6] 55/7055/2
yangsheng [Fri, 19 Jul 2013 05:18:03 +0000 (13:18 +0800)]
LU-3604 kernel: Kernel update [RHEL6.4 2.6.32-358.14.1.el6]

Update RHEL6.4 kernel to 2.6.32-358.14.1.el6

Signed-off-by: yang sheng <yang.sheng@intel.com>
Change-Id: Ie6c65c7e0ca88da3dbfdccc1e40fd4f555b8b816
Reviewed-on: http://review.whamcloud.com/7055
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3462 build: Repair "make dist" 54/7054/2
Christopher J. Morrone [Sat, 20 Jul 2013 00:57:11 +0000 (17:57 -0700)]
LU-3462 build: Repair "make dist"

The "make dist" target should assemble a canonical tarball of the
lustre source tree.  Generally speaking, it should not be effected
by command line options given to the configure script.

For instance, all source files should appear in the tarball regardless
of whether or "--disable-server" is engadged.  Some recent LU-1330
landings have broken this by making compilation of some source files
optional, but failing to add those optional source files to EXTRA_DIST.

Change-Id: I20dc0f791a2a70f921d78c62b00992aa90aa0eaf
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/7054
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Liu Xuezhao <xuezhao.liu@emc.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3230 osp: bail out of precreate_reserve on I/O errors 88/6988/3
Nathaniel Clark [Mon, 15 Jul 2013 17:52:11 +0000 (13:52 -0400)]
LU-3230 osp: bail out of precreate_reserve on I/O errors

Allow osp_precreate_reserve to propogate error if
precreate_cleanup_ophans recives EIO.

Test-Parameters: testgroup=review-zfs
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ib6a109df82be610a21391777b9c293d78b2114e6
Reviewed-on: http://review.whamcloud.com/6988
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-1606 idl: remove LASSERT/CLASSERT from lustre_idl.h 82/5682/3
Andreas Dilger [Thu, 22 Nov 2012 21:40:29 +0000 (14:40 -0700)]
LU-1606 idl: remove LASSERT/CLASSERT from lustre_idl.h

Remove the usage of LASSERT() and CLASSERT() from lustre_idl.h, so
that it is usable from userspace programs if needed.  These have
crept in over the years, but are not intended to be there.

The CLASSERT() checks for fid swabbing were largely redundant, and
have been moved to lustre/fid/fid_handler.c.

The fid_is_sane() macro has been modified to remove the check that
f_ver == 0, since this will eventually not be true, and the client
or server should not crash if it sees such a FID during usage.

There are still a few LASSERTs that need to be removed when FID-on-OST
is landed, but I don't want to remove them before that code lands.

There are also uses of CERROR() that could be removed at that time.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I04901d7713dc31b489685d4639e7bf857decab07
Reviewed-on: http://review.whamcloud.com/5682
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
6 years agoLU-3283 llite: pass correct pointer to obd_iocontrol() 74/6274/5
John L. Hammond [Mon, 6 May 2013 21:42:32 +0000 (16:42 -0500)]
LU-3283 llite: pass correct pointer to obd_iocontrol()

In copy_and_ioctl() use the kernel space copy as the karg to
obd_iocontrol().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I9b714675b4b63737efc08eec1b08463de1d63d1b
Reviewed-on: http://review.whamcloud.com/6274
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3335 scrub: convert filter_fid_old to LMA 43/7143/3
Fan Yong [Sat, 6 Jul 2013 10:14:57 +0000 (18:14 +0800)]
LU-3335 scrub: convert filter_fid_old to LMA

The OI scrub will generate FID-in-LMA for old OST-object, which will
unify OSD behaviors. To make LMA to fit into the 256-byte OST inode,
it will shrink the filter_fid_old as filter_fid, and the parent FID
will be kept.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ife669f88b4657928abee774b089115d78b53c380
Reviewed-on: http://review.whamcloud.com/7143
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3486 llite: remove ll_d_root_ops 97/6797/7
Lai Siyao [Thu, 27 Jun 2013 10:22:59 +0000 (18:22 +0800)]
LU-3486 llite: remove ll_d_root_ops

Mnt root dentry will never be revalidated, but its d_op->d_compare
will be called for its children, to simplify code, we use the same
ll_d_ops as normal dentries.
But its attribute may be invalid before access, this won't cause
any issue because it always exists, and the only operation depends
on its attribute is .permission, which has revalidated it in lustre
code.

So it's okay to remove ll_d_root_ops, and remove unnecessary checks
in lookup/revalidate/statahead.

This patch also includes several small fixes:
* don't d_add() for create only files, because the dentry is fake,
  and will be released right after use.
* alloc ll_dentry_data may fail, add check for this.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I97b71a9540146809171d80aa5d1a9d4f308faf7f
Reviewed-on: http://review.whamcloud.com/6797
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3467 seq: unified SEQ handler 65/6765/11
Mikhail Pershin [Mon, 24 Jun 2013 04:23:37 +0000 (08:23 +0400)]
LU-3467 seq: unified SEQ handler

move SEQ handler from MDT to the FID module so it can
be used from any target.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I1777eddd748486aab275e4440f96685bed0b104a
Reviewed-on: http://review.whamcloud.com/6765
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3467 target: FLD to use unified request handler 64/6764/11
Mikhail Pershin [Fri, 14 Jun 2013 17:05:22 +0000 (21:05 +0400)]
LU-3467 target: FLD to use unified request handler

FLD is switched to unified target code, now it provides
own handler to be called by unified request handler.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I04fd6af9d11f2208ad220be25bb3245cc5edcccd
Reviewed-on: http://review.whamcloud.com/6764
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3467 target: move OUT to the unified target code 63/6763/10
Mikhail Pershin [Thu, 13 Jun 2013 18:22:10 +0000 (22:22 +0400)]
LU-3467 target: move OUT to the unified target code

- Move OUT handler to the unified target code, so it can be
  used by both MDS and OST.
- Make OFD able to handle OUT requests.
- Rename MDS_MDS_PORTAL to the OUT_PORTAL and MDS_OUT_... defines
  just OUT_... since they are independent from MDS now.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I3d595f18245f1db2619b7d15f94e4b61e882f114
Reviewed-on: http://review.whamcloud.com/6763
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoRevert "LU-3627 quota: Fix incorrect NULL return value of qsd_init()" 97/7197/2
Oleg Drokin [Wed, 31 Jul 2013 20:59:18 +0000 (20:59 +0000)]
Revert "LU-3627 quota: Fix incorrect NULL return value of qsd_init()"

This reverts commit 7c93d397d18f5f5380a969f52a806c28b2c78d54

Change-Id: I87d20ff338775a5cfdbc22cc7243ffdb5b0957eb
Reviewed-on: http://review.whamcloud.com/7197
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3363 api: HSM import uses new released pattern 36/6536/14
jcl [Wed, 20 Feb 2013 10:18:23 +0000 (11:18 +0100)]
LU-3363 api: HSM import uses new released pattern

Import creates a released file using new RAID pattern flag
Import used a new ioctl() to implement the import in the
client kernel.
Add a -L|--layout option to lfs getstripe and lfs find

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I39103e6f90bd73dc09cde49086d223d717e41cd2
Reviewed-on: http://review.whamcloud.com/6536
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3641 libcfs: Zero fill shrinker struct in cfs_set_shrinker 22/7122/3
Ann Koehler [Thu, 25 Jul 2013 21:07:57 +0000 (16:07 -0500)]
LU-3641 libcfs: Zero fill shrinker struct in cfs_set_shrinker

Dropping Lustre caches might not terminate if the Linux kernel
supports the customisable shrinker batch size feature (commit
e9299f5058595a655c3b207cda9635e28b9197e6). This kernel feature
added a new field (batch) to the shrinker struct. Lustre does
not initialize it. When the unitialized batch value is negative,
the kernel shrink_slab function never terminates its loop that
calls the Lustre shrinker function. The problem was observed
with the ldlm_pools_cli_shrink shrinker, but it could also happen
with other Lustre shrinkers.

The fix is to ensure that all fields of the shrinker struct are
initialized by zero filling the struct when cfs_set_shrinker
allocates it. Zero filling works with all versions of the kernel.

Signed-off-by: Ann Koehler <amk@cray.com>
Change-Id: I3efa3a858f5d367f73596f38bb4e40b51c2ac5e7
Reviewed-on: http://review.whamcloud.com/7122
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
6 years agoNew tag 2.4.53 2.4.53 v2_4_53 v2_4_53_0
Oleg Drokin [Wed, 31 Jul 2013 03:12:48 +0000 (23:12 -0400)]
New tag 2.4.53

Change-Id: I7d7f71e81dbffbd92dad92d6afb3daacc6cfedaf
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2934 lnet: Add LNet Router Priority parameter 63/5663/9
Doug Oucharek [Fri, 8 Mar 2013 18:10:22 +0000 (10:10 -0800)]
LU-2934 lnet: Add LNet Router Priority parameter

This change adds a priority parameter to the route module settings.
This paramter can be >= 0. Like hops, the lower the prioirty number
the higher the priority.  So lower numbered priorities will be
selected over higher numbers.

Signed-off-by: Doug Oucharek <doug.s.oucharek@intel.com>
Change-Id: Idca12ee44ec5e2a896f89c178334363ffdfef4b8
Reviewed-on: http://review.whamcloud.com/5663
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3651 mdt: upgrade 2.4.53 to 2.5.53 for rename lock 51/7151/2
wang di [Sat, 27 Jul 2013 07:08:16 +0000 (00:08 -0700)]
LU-3651 mdt: upgrade 2.4.53 to 2.5.53 for rename lock

Since cross-MDT rename will be supported in 2.6, so change
VERSION from 2.4.53 to 2.5.53 in mdt_rename_lock, until then
each MDT still use local rename lock to protect rename process.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I4b4e66bc3879cd0f6ad768ef01d388dfe004ee94
Reviewed-on: http://review.whamcloud.com/7151
Tested-by: Hudson
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3652 luref: Fix building 50/7150/2
Oleg Drokin [Sun, 28 Jul 2013 05:11:16 +0000 (01:11 -0400)]
LU-3652 luref: Fix building

Fix build when building with --enable-lu_ref
enum cfs_alloc_flags is no longer present when building for Linux.

Change-Id: I0f705939de5ee55bfc9b9d99a23d93accf5831db
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/7150
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
6 years agoLU-3649 lfsck: NOT cache lfsck local objects 53/7153/2
Fan Yong [Sat, 6 Jul 2013 01:01:09 +0000 (09:01 +0800)]
LU-3649 lfsck: NOT cache lfsck local objects

When LFSCK build its local objects, such as "lfsck_bookmark", the
stack maybe not fully setup, and the local_storage uses own stack
and we should drop those objects from cache immediately after put.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I4b122f5a8518499d5986e1abfae912c6fb3cff5f
Reviewed-on: http://review.whamcloud.com/7153
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2869 llite: extended attribute cache 37/5537/23
Andrew Perepechko [Fri, 26 Jul 2013 18:57:21 +0000 (22:57 +0400)]
LU-2869 llite: extended attribute cache

This patch implements an extended attribute cache for
a Lustre client. It is organized as a write-through
cache: reads are performed from cache, updates are sent
synchronously to the MDS. An additional inode bit
MDS_INODELOCK_XATTR is added to protect the cache.

Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Xyratex-bug-id: MRP-57
Change-Id: I16aae894a3c2f62448722eeade822ee22b20efa0
Reviewed-on: http://review.whamcloud.com/5537
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3635 hsm: Fix ASSERT(inode->i_nlink > 0) 11/7111/2
Aurelien Degremont [Fri, 19 Jul 2013 20:26:48 +0000 (22:26 +0200)]
LU-3635 hsm: Fix ASSERT(inode->i_nlink > 0)

Two different handlers were setup to access Agent LLOG.
One for coordinator access, and one for /proc accesses.
Both tried to clean the LLOG content when closing it, leading to
crashes.
Both now used handler initialized by MDS.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: Ia6f22e9173266faf56a25e77fa5c9ae1bf69dc71
Reviewed-on: http://review.whamcloud.com/7111
Tested-by: Hudson
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-1333 hsm: Add hsm_release feature. 28/7028/8
Jinshan Xiong [Fri, 19 Jul 2013 22:27:30 +0000 (15:27 -0700)]
LU-1333 hsm: Add hsm_release feature.

HSM Release is one of the key feature of HSM. To perform HSM
release, clients need to acquire the file lease exclusivelt and
flush dirty cache from clients. A special close REQ will be sent
to the MDT to release the lease and get rid of OST objects.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I77eeccf81a852955354a382d80b887df00d1c4fc
Reviewed-on: http://review.whamcloud.com/7028
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3643 ofd: get data version only if file exists 24/7124/3
Jinshan Xiong [Fri, 26 Jul 2013 00:48:22 +0000 (17:48 -0700)]
LU-3643 ofd: get data version only if file exists

In ofd_getattr(), dt_version_get() could be called on a non-existant
object, leading to a NULL pointer for its inode.
It should try to call dt_version_get() only if attr_get returns
success; otherwise it will crash.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: I450fb78b85ea86d813ccad4de2f14f5bd4fca645
Reviewed-on: http://review.whamcloud.com/7124
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3585 ptlrpc: Fix a crash when dereferencing NULL pointer 21/7121/2
Amir Shehata [Thu, 25 Jul 2013 20:13:55 +0000 (13:13 -0700)]
LU-3585 ptlrpc: Fix a crash when dereferencing NULL pointer

When a system runs out of memory and the function
ptlrpc_register_bulk() is called from ptl_send_rpc() the call to
LNetMEAttach() fails due to failure to allocate memory.  This forces
the code into an error path, which most probably previously went
untested.  The error path:
if (rc != 0) {
CERROR("%s: LNetMEAttach failed x"LPU64"/%d: rc = %dn",
desc->bd_export->exp_obd->obd_name, xid,
posted_md, rc);
break;
}
This print assumes that desc->bd_export is not NULL.  However, it is.
In fact it is expected to be NULL.  desc->bd_import is the correct
structure to access in this case.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I772ec757af224b9868956cc3fc9dc00e804fe84d
Reviewed-on: http://review.whamcloud.com/7121
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3636 llapi: llapi_hsm_copy_end() on correct FID on restore. 12/7112/2
Aurelien Degremont [Thu, 6 Jun 2013 10:27:32 +0000 (12:27 +0200)]
LU-3636 llapi: llapi_hsm_copy_end() on correct FID on restore.

When doing a llapi_hsm_copy_end(), the FID sent to kernel should
be the DATA FID, when restoring. To be sure of that, the FID in
hsm_progress is used.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: Ic378b76716057044f33a670089d738c950e07702
Reviewed-on: http://review.whamcloud.com/7112
Tested-by: Hudson
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2800 build: fix compilation issue with is_compat_task 18/7118/2
Dmitry Eremin [Thu, 25 Jul 2013 16:47:44 +0000 (20:47 +0400)]
LU-2800 build: fix compilation issue with is_compat_task

After removing LIBCFS_HAVE_IS_COMPAT_TASK test we have a
compilation issue with kernels configured without CONFIG_COMPAT.
The fix for Change-Id: Ieffc3b32611e00f2a19aa2645205ec6e1cf57a20

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I2725e892aea1a86bd43fe19ab099f6f116d1fdd8
Reviewed-on: http://review.whamcloud.com/7118
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3634 llapi: Fix returned value of llapi_hsm_copy_start/end. 09/7109/2
Aurelien Degremont [Mon, 22 Jul 2013 11:57:27 +0000 (13:57 +0200)]
LU-3634 llapi: Fix returned value of llapi_hsm_copy_start/end.

Both function were doing a ioctl and were returning ioctl()
return code instead of returning errno.

Signed-off-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Change-Id: Ibd4c6f5188bb50e7fa8875e2d4fa3442c2c69888
Reviewed-on: http://review.whamcloud.com/7109
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>
6 years agoLU-3305 quota: Update SuSE kernel to handle quota changes in 2.4+ 32/7032/3
James Simmons [Thu, 18 Jul 2013 16:44:22 +0000 (12:44 -0400)]
LU-3305 quota: Update SuSE kernel to handle quota changes in 2.4+

This patch address two issues needed for SuSE systems. The first
is 64 bit quotas are not properly support in SLES11 SP1. We update
quota-support-64-bit-quota-format, which is no longer needed for
RHEL system, to allow 64 bit quotas for SP1. The second is the port
of the patch to handle the global lock contention inside the
dqget()/dqput(). We'd avoid calling dqget()/dqput() in
dquot_initialize().

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I16a989a68925dfcd098415f6e1f621a6e5c2a9b1
Reviewed-on: http://review.whamcloud.com/7032
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3427 build: fix 'error handling' issues 03/7103/2
Sebastien Buisson [Wed, 24 Jul 2013 15:22:37 +0000 (17:22 +0200)]
LU-3427 build: fix 'error handling' issues

Fix 'error handling' issues found by Coverity version 6.5.1:
Unchecked return value (CHECKED_RETURN)
Calling function without checking return value.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I67d667b405f292604290a49e69c963500d98278e
Reviewed-on: http://review.whamcloud.com/7103
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobbie Lind <bobbie.j.lind@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3627 quota: Fix incorrect NULL return value of qsd_init() 00/7100/2
Li Xi [Fri, 26 Jul 2013 11:01:57 +0000 (04:01 -0700)]
LU-3627 quota: Fix incorrect NULL return value of qsd_init()

qsd_init() might return NULL in some cases, which is not correct and
may make kernel crash. This patch fixes this problem.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I604077f2f9143e500badb5148a6f0d9a246e375f
Reviewed-on: http://review.whamcloud.com/7100
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3389 build: Fix build fails on RHEL6.4 kernel with OFED-3.5 48/6448/5
Shuichi Ihara [Fri, 24 May 2013 18:29:50 +0000 (03:29 +0900)]
LU-3389 build: Fix build fails on RHEL6.4 kernel with OFED-3.5

OFED-3.5.1 supports RHEL6.4 kernel. CONFIG_COMPAT_RHEL_6_4 macro
needs to build lustre with them.

Signed-off-by: Shuichi Ihara <sihara@ddn.com>
Change-Id: Id64aeedecd7b034fbf618c41f774852c967e6eb7
Reviewed-on: http://review.whamcloud.com/6448
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>
6 years agoLU-3405 build: fix 'control flow' errors 66/6466/5
Sebastien Buisson [Mon, 27 May 2013 15:13:09 +0000 (17:13 +0200)]
LU-3405 build: fix 'control flow' errors

Fix 'control flow' issues found by Coverity version 6.5.1:
Logically dead code (DEADCODE)
Execution cannot reach this statement.
Missing break in switch (MISSING_BREAK)
This case is not terminated by a 'break' statement.
Stray semicolon (STRAY_SEMICOLON)
"if" statement with no "then" or "else" is suspicious.
Unsigned compared against 0 (NO_EFFECT)
This greater-than-or-equal-to-zero comparison of an unsigned value
is always true.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: Ia737603bd9ef4dd6b01891b9b13edd59dec11891
Reviewed-on: http://review.whamcloud.com/6466
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3204 build: clean up unused variables and dead code 39/6139/14
Dmitry Eremin [Wed, 24 Apr 2013 13:25:14 +0000 (17:25 +0400)]
LU-3204 build: clean up unused variables and dead code

Clean up the code from really unused variables and rearrange other
to remove SET_BUT_UNUSED and UNUSED macro usage if possible.

Clean up or comment on some dead code.

Removed never implemented suspend timeouts functionality from pinger.c
which was commented out since 2007 and going to be replaced by adaptive
timeouts. Also removed all references to this functionality from
ldlm_lockd.c, ldlm_request.c and import.c which actually nevers executes
or do nothing.

 pinger.c commit d2d56f38da01001c92a09afc6b52b5acbd9bc13c
 Author: tappro <tappro>
 Date:   Mon Jul 30 21:08:59 2007 +0000
    - make HEAD from b_post_cmd3

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: If7b6b3576d3ecc79948a7a1eb46a08c27a3bbc03
Reviewed-on: http://review.whamcloud.com/6139
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3310 tests: add version check code to sanity test 17o 17/7017/2
Jian Yu [Wed, 17 Jul 2013 08:43:15 +0000 (16:43 +0800)]
LU-3310 tests: add version check code to sanity test 17o

This patch adds Lustre version check codes into sanity test
17o to make the test work with servers which do not have the
following patch:

Lustre-commit: 20544bd96269dbda51a76d31c2d09935637e8b2d
Lustre-change: http://review.whamcloud.com/6121

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes,ONLY=17 \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 serverjob=lustre-b2_1 serverbuildno=215 \
testlist=sanity

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I590a4fb03d6dd406ff1d859825f9033a24ceb66c
Reviewed-on: http://review.whamcloud.com/7017
Tested-by: Hudson
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3517 llite: don't check for O_CREAT in it_create_mode 86/6786/5
John L. Hammond [Mon, 1 Jul 2013 17:26:15 +0000 (12:26 -0500)]
LU-3517 llite: don't check for O_CREAT in it_create_mode

ll_lookup_it() checks for O_CREAT in struct lookup_intent's
it_create_mode member which is nonsensical, as it_create_mode is used
for file mode bits (S_IFREG, S_IRUSR, ...). Fix this by just checking
for IT_CREATE in it_op and do the same in llu_lookup_it(). This will
not affect the behavior of either function, since if O_CREATE (0100)
is actually set in o_create_mode then IT_CREATE must have been set in
it_op. In ll_atomic_open() check for O_CREAT in the open_flags
parameter rather than testing mode.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I301964222ec043e6f0cc3b000678fe3c881a2381
Reviewed-on: http://review.whamcloud.com/6786
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3079 osd-zfs: Change header order to avoid build fail 68/6968/2
yangsheng [Fri, 12 Jul 2013 19:49:24 +0000 (03:49 +0800)]
LU-3079 osd-zfs: Change header order to avoid build fail

SPL redefined list_move_tail() in sys/list.h. It will
confused if system & lustre header use list_move_tail()
after SPL header.

Signed-off-by: yang sheng <yang.sheng@intel.com>
Change-Id: I946e810b57affdeedbfc16bb5e502ebde0716039
Reviewed-on: http://review.whamcloud.com/6968
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3589 tests: Access changelog record FIDs by name. 98/6998/4
Henri Doreau [Tue, 16 Jul 2013 09:33:16 +0000 (11:33 +0200)]
LU-3589 tests: Access changelog record FIDs by name.

Update sanity test_160 to make it parse changelog records
in a more robust way. Access target and parent FIDs by name
instead of relying on their position on the line.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: Ib5836a8e624f04a971b80f9ff9b9e978bbff7bee
Reviewed-on: http://review.whamcloud.com/6998
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3582 test: Add run_test to Runtests 14/7014/3
Keith Mannthey [Fri, 19 Jul 2013 01:57:11 +0000 (18:57 -0700)]
LU-3582 test: Add run_test to Runtests

There is no run_test in this script so add one
so logging in Autotest will greatly improve.
It seems some of the test is dependant so I did a
very minimal change to get the better logging.

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: I2e892a39a48eb4020ab699cce9b83708800ebf58
Reviewed-on: http://review.whamcloud.com/7014
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3364 tests: fix Lustre version number in sanity-lfsck.sh 19/7019/3
Jian Yu [Wed, 17 Jul 2013 11:26:41 +0000 (19:26 +0800)]
LU-3364 tests: fix Lustre version number in sanity-lfsck.sh

The sanity-lfsck.sh was added by the following patch, which was included
since Lustre 2.3.60 instead of 2.2.90.

Lustre-commit: 21a9805abde3cbe1ffe046f2d9958d968303b8d3
Lustre-change: http://review.whamcloud.com/4911

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 serverjob=lustre-b2_3 serverbuildno=41 \
testlist=sanity-lfsck

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I0f35b22409853852d8c7336e67f7b3661aa89f95
Reviewed-on: http://review.whamcloud.com/7019
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2527 tests: add version check code to sanity test 183 94/6994/2
Jian Yu [Tue, 16 Jul 2013 03:48:20 +0000 (11:48 +0800)]
LU-2527 tests: add version check code to sanity test 183

This patch adds Lustre version check codes into sanity test
183 to make the test work with servers which do not have the
following patch:

Lustre-commit: ef75b59800d643e666d7c44c20287a8002e0a166
Lustre-change: http://review.whamcloud.com/4458

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes,ONLY=183 \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 serverjob=lustre-b2_1 serverbuildno=215 \
testlist=sanity

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I5de38207ed1a3a7d69294abf979dc64be69a8135
Reviewed-on: http://review.whamcloud.com/6994
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3597 wireshark: Add new MDS opcodes 05/7005/2
Nathaniel Clark [Tue, 16 Jul 2013 17:39:21 +0000 (13:39 -0400)]
LU-3597 wireshark: Add new MDS opcodes

Add new HSM and other MDS opcodes.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Idf888489ec66197053a2ba08c65289f119b1e144
Reviewed-on: http://review.whamcloud.com/7005
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-1199 lbuild: Syntax fix of previous commit 09/7009/2
Dmitry Eremin [Tue, 16 Jul 2013 19:33:07 +0000 (23:33 +0400)]
LU-1199 lbuild: Syntax fix of previous commit

A Change-Id: I68636f599937cec2ea9298a395df0c875762215e introduced
an error: ./lbuild: line 265: [: argument expected
Just fix this typo.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ieedfbd38f7f43684516ec3be00451984b57df4b8
Reviewed-on: http://review.whamcloud.com/7009
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3571 kernel: kernel update [SLES11 SP2 3.0.80-0.7] 91/6991/2
Bob Glossman [Tue, 9 Jul 2013 17:03:18 +0000 (10:03 -0700)]
LU-3571 kernel: kernel update [SLES11 SP2 3.0.80-0.7]

Update of config and build files to new kernel version.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I5ded6caea683e88772955b0550700ced259ef641
Reviewed-on: http://review.whamcloud.com/6991
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Hudson
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3514 tests: combine dependent sanity tests 84/6784/4
James Nunez [Fri, 12 Jul 2013 14:39:32 +0000 (08:39 -0600)]
LU-3514 tests: combine dependent sanity tests

The tests 27c, 77c, 77e, 77h are skipped when previous
dependent test is not ran.

This patch combines the following sanity tests:
    tests 27b, 27c to test 27b
    tests 77b, 77c to test 77b
    tests 77d, 77e to test 77d
    tests 77g, 77h to test 77g
For the 77* tests $tfile is used for test file name.

Signed-off-by: Elena Gryaznova <elena_gryaznova@xyratex.com>
Xyratex-bug-id: MRP-983
Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I945442326237f8ed5225f1b31bb06fac1b40f28e
Reviewed-on: http://review.whamcloud.com/6784
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3079 kernel: f_vfsmnt replaced by f_path.mnt 99/5899/5
Alexey Shvetsov [Sun, 31 Mar 2013 16:13:21 +0000 (20:13 +0400)]
LU-3079 kernel: f_vfsmnt replaced by f_path.mnt

In linux 3.9 f_vfsmnt was killed and replaced

commit 182be684784334598eee1d90274e7f7aa0063616
Author: Al Viro <viro@zeniv.linux.org.uk>
Date:   Thu Jan 24 02:21:54 2013 -0500

    kill f_vfsmnt

    very few users left...

Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
Change-Id: I02f595f0b7bbe804c9695d6da2106deb2d17e0ee
Reviewed-on: http://review.whamcloud.com/5899
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3335 scrub: recover OST-objects from /lost+found 57/6857/8
Fan Yong [Thu, 27 Jun 2013 09:14:39 +0000 (17:14 +0800)]
LU-3335 scrub: recover OST-objects from /lost+found

Originally, Lustre used the tool ll_recover_lost_found_objs to recover
orphans under /lost+found under offline mode. With OI scrub introduced
it can be done by initial OI scrub during the OST mount automatically.

Test-Parameters: testlist=sanity-scrub
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ibf7e51cc0de10def47a117217b84c2afcd1209ca
Reviewed-on: http://review.whamcloud.com/6857
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3335 scrub: control OI scrub on OST from user space 98/6698/12
Fan Yong [Wed, 26 Jun 2013 14:54:31 +0000 (22:54 +0800)]
LU-3335 scrub: control OI scrub on OST from user space

Not all the OI inconsistency can be detected automatically, such as /O
entry lost case. So the OI scrub on OST should can be triggered by the
administrator manually.

Test-Parameters: testlist=sanity-scrub
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I9b23787b2fb14c8c93642462f9ebac948a181b70
Reviewed-on: http://review.whamcloud.com/6698
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3335 scrub: OI scrub on OST 69/6669/13
Fan Yong [Wed, 19 Jun 2013 16:14:29 +0000 (00:14 +0800)]
LU-3335 scrub: OI scrub on OST

OI scrub should has the ability to handle kinds of OI, including
both the OI files on MDT and the /O directory on OST.

We trust the FID in LMA for both MDT objects and OST objects. So
if some /O sub-item does not match related LMA, then the /O will
be updated, instead of the LMA.

To guarantee that the OI scrub can run without MDT0 involved for
FLDB, the OST object needs to store some flag in its LMA to tell
OI scrub that it is for an OST object, no need to query the MDT0.

Test-Parameters: testlist=sanity-scrub
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I2da3816b28a7c6d5ad0b7f8d5b43f98a9886ff0c
Reviewed-on: http://review.whamcloud.com/6669
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
6 years agoLU-3342 mdt: HSM coordinator agent interface 34/6534/13
jcl [Mon, 3 Jun 2013 15:37:34 +0000 (17:37 +0200)]
LU-3342 mdt: HSM coordinator agent interface

To move data with external storage, HSM coordinator
uses a Copy Tool running on a client named agent.
This patch implements the interface for these agents.

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I58773a7a975458de15d332f2d4b97988f92cd902
Reviewed-on: http://review.whamcloud.com/6534
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3426 build: fix 'resource leak' errors 09/6509/5
Sebastien Buisson [Fri, 31 May 2013 13:47:36 +0000 (15:47 +0200)]
LU-3426 build: fix 'resource leak' errors

Fix 'resource leak' defects found by Coverity version 6.5.1:
Resource leak (RESOURCE_LEAK)
Variable going out of scope leaks the storage it points to.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ieb45e4cceb26b6c1ca605ef1b1c78cf3f603dffa
Reviewed-on: http://review.whamcloud.com/6509
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3341 mdt: HSM coordinator client interface 32/6532/16
jcl [Mon, 3 Jun 2013 14:13:09 +0000 (16:13 +0200)]
LU-3341 mdt: HSM coordinator client interface

This patch implements the HSM coordinator methods
used by client to add/remove/list HSM actions on
FID.

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I0f2d7bfc3d98d98cb13040fad0f7f585c6f3dadf
Reviewed-on: http://review.whamcloud.com/6532
Tested-by: Hudson
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3611 quota: Fix order of locking and allocating memory. 65/7065/4
Li Xi [Wed, 24 Jul 2013 03:33:05 +0000 (20:33 -0700)]
LU-3611 quota: Fix order of locking and allocating memory.

mgs_pool_cmd() locks fsdb_mutex and then allocates mti. It will
leave fsdb_mutex locked if it fails to allocate memory.

This patch fixes the problem.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I10f92522c509052916a7d7134d73c4923cfaf33e
Reviewed-on: http://review.whamcloud.com/7065
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3437 mdd: Fix ACL/def_ACL during object creation. 52/6552/8
wang di [Wed, 5 Jun 2013 07:06:30 +0000 (00:06 -0700)]
LU-3437 mdd: Fix ACL/def_ACL during object creation.

In mdd_acl_init, after getting default ACL which will
be converted to ACL, then later(in mdd_create) the
acl_buf is re-used to set both default_ACL and ACL,
which is definitely wrong.

And also the remote directory creation does not use
correct ACL/default ACL.

This patch use different buf for def ACL and ACL to avoid
confusion.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I30177bc55e4c6b4d916ccf118ab3485f3394fa87
Reviewed-on: http://review.whamcloud.com/6552
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3562 tests: EXCEPT insanity/1 on ZFS 65/6965/3
Nathaniel Clark [Fri, 12 Jul 2013 16:10:29 +0000 (12:10 -0400)]
LU-3562 tests: EXCEPT insanity/1 on ZFS

Because there's no local config on ZFS nodes, this test won't pass
until LU-2059 is completed.

Test-Parameters: testgroup=review-dne-zfs mdscount=4 osscount=2  clientcount=2 testlist=insanity
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ic43159634a81f28c9d39fdf8207dcce2612fca93
Reviewed-on: http://review.whamcloud.com/6965
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoRevert "LU-2800 autoconf: remove LC_PROCFS_USERS test" 83/7083/2
Oleg Drokin [Tue, 23 Jul 2013 06:00:09 +0000 (06:00 +0000)]
Revert "LU-2800 autoconf: remove LC_PROCFS_USERS test"

Unfortunately this now breaks build due to a new user of the function emerged.

This reverts commit 663ef6abd788c3388cae8d5bc5421bad99979c8b

Change-Id: If69fe87cea77c83ae815a1125f2cdbce0caaa1db
Reviewed-on: http://review.whamcloud.com/7083
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3223 utils: multiple args for path2fid/fid2path 60/6160/7
Andreas Dilger [Thu, 25 Apr 2013 10:12:20 +0000 (04:12 -0600)]
LU-3223 utils: multiple args for path2fid/fid2path

Allow "lfs path2fid" to process multiple pathname arguments on
the command-line.  Like "grep" with multiple filenames, it will
print "filename: " at the beginning of the line when processing
multiple files.

Allow "lfd fid2path" to process multiple FID arguments on the
command-line.  All of the pathnames will be printed for each FID,
or can be limited to a single pathname per FID via "--link 0".

Add basic sanity tests for path2fid and fid2path, along with
tests of the multiple-argument options for each command.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Girish Shilamkar <gshilamkar@ddn.com>
Change-Id: I5c24b92af79cfeeafd4f5910e2f165dc3b500c1e
Reviewed-on: http://review.whamcloud.com/6160
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
6 years agoLU-3367 test: some fixes for lfsck test 94/6494/3
Emoly Liu [Sun, 19 May 2013 04:36:30 +0000 (12:36 +0800)]
LU-3367 test: some fixes for lfsck test

This patch includes the following fixes:
- the patch of LU-2780 (f9659fd87771122d01a4fafb09ba59c4cf0091ab),
changed ./lustre/fid to be an real inode, which breaks
is_empty_fs() of t-f, so update is_empty_fs() accordingly and add
version check code to check this change.
- some code cleanup
Part of this patch comes from
LU-3180 http://review.whamcloud.com/#change,6123 .

Test-Parameters: testlist=lfsck
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Signed-off-by: Liu Ying <emoly.liu@intel.com>
Change-Id: Ic9f517ca4adcf01e191a62c6a16b097ebcb4c9a5
Reviewed-on: http://review.whamcloud.com/6494
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2374 mkfs: Make order of --index and --ost irrelevant 42/5942/6
Girish Shilamkar [Mon, 20 May 2013 08:11:55 +0000 (13:41 +0530)]
LU-2374 mkfs: Make order of --index and --ost irrelevant

The order of --index and --ost should not prevent mkfs.lustre to
work. So reordered the checks which ensure that  mkfs with index is
done for ost and mdt only.

Signed-off-by: Girish Shilamkar <gshilamkar@ddn.com>
Change-Id: I228f6c9189aa85a5565393523d39e8e27e0eaddc
Reviewed-on: http://review.whamcloud.com/5942
Tested-by: Hudson
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-2800 autoconf: remove LC_PROCFS_USERS test 53/5353/7
James Simmons [Fri, 12 Jul 2013 15:32:05 +0000 (11:32 -0400)]
LU-2800 autoconf: remove LC_PROCFS_USERS test

In-procfs locking has been upstream since v2.6.23

We can remove the test and the dead code (lots of it). Further
review should be made to determine whether _lprocfs_lock is
still necessary at all.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I6384a9776fcb45de74d10beee8c1b8477b1ffad6
Reviewed-on: http://review.whamcloud.com/5353
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>
6 years agoLU-3059 lu: shrink lu_object by 8 bytes on x86_64 90/5890/9
John L. Hammond [Fri, 29 Mar 2013 16:15:16 +0000 (11:15 -0500)]
LU-3059 lu: shrink lu_object by 8 bytes on x86_64

Remove the lo_depth member from struct lu_object.  This field is never
set and only read in lu_object_print().  Remove the lo_flags member.
This field was only used in lu_object_alloc() and can be replaced with
an on-stack mask to keep trace of which layers have been allocated.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I998cfda0234f4c418227c9ba640850a78ca7893e
Reviewed-on: http://review.whamcloud.com/5890
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>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3576 mdc: prevent fall through in mdc_iocontrol() 62/6962/2
John L. Hammond [Fri, 12 Jul 2013 15:21:48 +0000 (10:21 -0500)]
LU-3576 mdc: prevent fall through in mdc_iocontrol()

In mdc_iocontrol() add a goto to the end of the LL_IOC_HSM_STATE_SET
case, preventing fall through into the next case. In the same
function, replace the return statement in OBD_IOC_QUOTACTL with a
goto, so that a reference to the module is not leaked.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ib3c04835f8cd761849869c8fb11672d66aa14025
Reviewed-on: http://review.whamcloud.com/6962
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2835 ptlrpc: Fix race during exp_flock_hash creation 71/5471/6
Andriy Skulysh [Thu, 16 May 2013 10:10:41 +0000 (13:10 +0300)]
LU-2835 ptlrpc: Fix race during exp_flock_hash creation

During race exp_flock_hash can be created 2 times.
It is created & assigned without any lock.

Move hash initialization from ldlm_flock_blocking_link()
to ldlm_init_export()

Xyratex-bug-id: MRP-855
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-by: Alexander Boyko <Alexander_Boyko@xyratex.com>
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
Tested-by: Kyrylo Shatskyy <kyrylo_shatskyy@xyratex.com>
Change-Id: Iaec171eb628396b69dede973260a59ac345b7e8c
Reviewed-on: http://review.whamcloud.com/5471
Tested-by: Hudson
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3297 lov: convert magic to host-endian in lov_dump_lmm() 90/6290/3
John L. Hammond [Wed, 8 May 2013 17:54:04 +0000 (12:54 -0500)]
LU-3297 lov: convert magic to host-endian in lov_dump_lmm()

In lov_dump_lmm(), convert the lmm_magic from little-endian to
host-endian byte order before the switch statement, as the other
lov_dump_xxx() and lov_verify_xxx() functions already do.  Remove the
unused macro LMM_ASSERT().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Icfa52f3043aaa13b0d0cc34f5be2f59792c3787e
Reviewed-on: http://review.whamcloud.com/6290
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3383 utils: typo in lfs print_quota() function 44/6444/4
Patrick Valentin [Fri, 24 May 2013 12:14:20 +0000 (14:14 +0200)]
LU-3383 utils: typo in lfs print_quota() function

In the print_quota() function of 'lfs quota' command, the following
sequence is to determine if the inode grace time is expired:
         if (dqb->dqb_btime > now) {
                 iover = 2;
The test must be done on dqb_itime (inode time), instead of
dqb_btime (data time).

Signed-off-by: Patrick Valentin <patrick.valentin@bull.net>
Change-Id: I1aa9dc9c25ba219ea2272165d21895220a9ef9a7
Reviewed-on: http://review.whamcloud.com/6444
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3470 llog: fix return value of llog_alloc_handle 44/6644/3
Li Xi [Fri, 14 Jun 2013 09:09:13 +0000 (17:09 +0800)]
LU-3470 llog: fix return value of llog_alloc_handle

llog_open() calls llog_alloc_handle() taking NULL as the error return
value. But llog_alloc_handle() returns ERR_PTR(-ENOMEM) instead when
error.

Signed-off-by: Li Xi <pkuelelixi@gmail.com>
Change-Id: Id0e9d94107776f65bf6fdaba21988bab1882d3b3
Reviewed-on: http://review.whamcloud.com/6644
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-3553 tests: volatile file test fails interop testing 87/6887/3
Bob Glossman [Wed, 3 Jul 2013 20:22:59 +0000 (13:22 -0700)]
LU-3553 tests: volatile file test fails interop testing

There is no volatile file support in servers before v2.3.60.
Add a version check and skip sanity test 185 entirely on old servers
to allow interop testing of 2.4+ clients on 2.3 servers.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: If6aef3a782307b5fe659ffcb8a8f8182f83354bd
Reviewed-on: http://review.whamcloud.com/6887
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-2800 autoconf: remove LC_SET_CPUS_ALLOWED test 84/5384/7
James Simmons [Wed, 10 Jul 2013 19:50:54 +0000 (15:50 -0400)]
LU-2800 autoconf: remove LC_SET_CPUS_ALLOWED test

set_cpus_allowed_ptr replaced set_cpus_allowed in v2.6.32.

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: I684589fd13b52a79fbe4aba6229d89273ff3d9da
Reviewed-on: http://review.whamcloud.com/5384
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2800 autoconf: remove LC_INVALIDATE_BDEV_2ARG test 45/5345/7
James Simmons [Wed, 10 Jul 2013 19:42:55 +0000 (15:42 -0400)]
LU-2800 autoconf: remove LC_INVALIDATE_BDEV_2ARG test

invalidate_bdev has taken one argument since v2.6.22
We can remove the test and the dead code.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Change-Id: I535f1cbe1c46fb5c98d5de046b85eb8365084d7b
Reviewed-on: http://review.whamcloud.com/5345
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>
6 years agoLU-2800 autoconf: remove LIBCFS_HAVE_IS_COMPAT_TASK test 93/5393/5
James Simmons [Wed, 10 Jul 2013 19:51:55 +0000 (15:51 -0400)]
LU-2800 autoconf: remove LIBCFS_HAVE_IS_COMPAT_TASK test

is_compat_task has been defined on all arches since v2.6.29.
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: Ieffc3b32611e00f2a19aa2645205ec6e1cf57a20
Reviewed-on: http://review.whamcloud.com/5393
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2800 autoconf: remove vectored fops tests 43/5343/7
James Simmons [Wed, 10 Jul 2013 19:41:47 +0000 (15:41 -0400)]
LU-2800 autoconf: remove vectored fops tests

file_operations.readv/writev have been removed since v2.6.19
We can remove the test and the dead code.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I6b4bd25d769c0ea2486faaca70e0945552c3b2cd
Reviewed-on: http://review.whamcloud.com/5343
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Christopher J. Morrone <chris.morrone.llnl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3544 nfs: writing to new files will return ENOENT 20/6920/4
Patrick Farrell [Thu, 11 Jul 2013 16:06:27 +0000 (11:06 -0500)]
LU-3544 nfs: writing to new files will return ENOENT

This happend with SLES11SP2 Lustre client, which in turn acts as an
NFS server, exporting a subtree of an Lustre fs through NFS.

We detected that whenever we are writing to a new file using, fx,
'echo blah > newfile', it will return ENOENT error. We found
out that this was caused by the anonymous dentry. In SLESS11SP2,
anonymous dentries are assigned '/' as the name, instead of an
empty string. When MDT handles the intent_open call, it will look
up the obj by the name if it is not an empty string, and thus
couldn't find it.

As MDS_OPEN_BY_FID is always set on this request, we never need
to send the name in this request.  The fid is already available
and should be used in case the file has been renamed.

Signed-off-by: Cheng Shao <cheng_shao@xyratex.com>
Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: Ia8bd6f2814d05350d0a197df8a3ffd9729e2081b
Reviewed-on: http://review.whamcloud.com/6920
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Hudson
Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org>
Reviewed-by: Lai Siyao <lai.siyao@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>
6 years agoLU-3079 kernel: 3.9 hlist_for_each_entry uses 3 args 98/5898/6
James Simmons [Wed, 15 May 2013 13:18:19 +0000 (09:18 -0400)]
LU-3079 kernel: 3.9 hlist_for_each_entry uses 3 args

In 3.9 hlist_for_each_entry use 3 args since commit

commit b67bfe0d42cac56c512dd5da4b1b347a23f4b70a
Author: Sasha Levin <sasha.levin@oracle.com>
Date:   Wed Feb 27 17:06:00 2013 -0800

    hlist: drop the node parameter from iterators

Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I8f38d562607de21771b03575e37cc0498867a570
Reviewed-on: http://review.whamcloud.com/5898
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2800 autoconf: remove topology checks 36/5336/7
James Simmons [Wed, 10 Jul 2013 19:27:04 +0000 (15:27 -0400)]
LU-2800 autoconf: remove topology checks

The topology API has been stable since 2.6.32, so we don't need to
check for it anymore.

The options defined by a series of tests in LC_EXPORT_NODE_TO_CPUMASK
and LC_EXPORT_CPUMASK_OF_NODE look like this:
HAVE_CPUMASK_OF_NODE=1 since v2.6.29
HAVE_NODE_TO_CPUMASK=0 since v2.6.29
HAVE_CPUMASK_COPY=1 since v2.6.28
HAVE_CPUMASK_SIZE=1 since v2.6.28
HAVE_TOPOLOGY_THREAD_SIBLINGS=0 since v2.6.32
HAVE_TOPOLOGY_CORE_SIBLINGS=0 since v2.6.32
HAVE_TOPOLOGY_THREAD_CPUMASK=1 since v2.6.30
HAVE_TOPOLOGY_CORE_CPUMAS=1K since v2.6.30
HAVE_CPU_TOPOLOGY=1 since v2.6.12

Let's eliminate all those tests and remove the dead code.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I9924eb496508f560bb7a38dfbcf5105c3713185e
Reviewed-on: http://review.whamcloud.com/5336
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>
6 years agoLU-2059 llog: MGC to use OSD API for backup logs 49/5049/19
Mikhail Pershin [Sun, 3 Mar 2013 20:06:41 +0000 (00:06 +0400)]
LU-2059 llog: MGC to use OSD API for backup logs

MGC uses lvfs API to access local llogs blocking removal of old code

- MGS is converted to use OSD API for local llogs
- llog_is_empty() and llog_backup() are introduced
- initial OSD start initialize run ctxt so llog can use it too
- shrink dcache after initial scrub in osd-ldiskfs to avoid holding
  data of unlinked objects until umount.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I137e38abb0e93c12406c6610c0922f4294e67290
Reviewed-on: http://review.whamcloud.com/5049
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2145 server: use unified request handler for MGS 26/4826/15
Mikhail Pershin [Thu, 13 Dec 2012 18:07:52 +0000 (22:07 +0400)]
LU-2145 server: use unified request handler for MGS

- Unify request handler. It finds target for particular request and
  calls appropriate handler for it. Generic handlers are moved to
  the unified target code. The tgt_session_info is introduced to
  store all request-related data and passed to all handlers.
- Pack reply in llog server functions early and use err_serious()
- remove obsoleted llog_origin_handle_cancel(), it is not used
  anymore
- remove push_ctxt/pop_ctxt from llog server function, it is based
  on OSD now.

Change-Id: Idded90d8112bcab74de9a58e7885fa17dd3340b8
Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Reviewed-on: http://review.whamcloud.com/4826
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
6 years agoLU-3264 tests: support failover testing with ZFS 29/6429/4
Nathaniel Clark [Wed, 10 Jul 2013 15:42:42 +0000 (11:42 -0400)]
LU-3264 tests: support failover testing with ZFS

This patch improves test-framework.sh to support failover testing with
ZFS under shared storage configuration.

After formatting a ZFS target, "cachefile=none" property will be set
on the ZFS storage pool so that the pool is not automatically imported
on system startup. And then the pool will be exported so as to leave
the import and export operations handled by mount_facet() and stop().

For SOFT failure mode (unmount and mount), "zpool export …" will be
run on the active server node to export the ZFS storage pool, and
"zpool import -f …" will be run on the failover partner node to import
the pool.

For HARD failure mode (power off and on), since the "cachefile=none"
property has been set on the ZFS storage pool on the active server
node, after the node is power-cycled, the pool will not be imported.
Then on the failover partner node, "zpool import -f …" can be run to
import the pool.

This is a reworked patch with fixes merged in.

Formerly Change-Id: I6b9646cb36f7fa4924af03a055ccb137187843a5
Formerly Reviewed-on: http://review.whamcloud.com/6258
Formerly Change-Id: I63ac141fdefcace99a1cf7c366e15f0067fa2a56
Formerly Reviewed-on: http://review.whamcloud.com/6358
Formerly Change-Id: I83678fd8b67de87f5174017634f108e6ae5b30e0
Formerly Reviewed-on: http://review.whamcloud.com/6408

Test-Parameters: envdefinitions=PTLDEBUG=-1,DEBUG_SIZE=128 mdtfilesystemtype=zfs mdsfilesystemtype=zfs ostfilesystemtype=zfs clientdistro=el6 serverdistro=el6 clientarch=x86_64 serverarch=x86_64 clientcount=4 osscount=2 mdscount=2 austeroptions=-R failover=true useiscsi=true testlist=recovery-double-scale
Signed-off-by: Jian Yu <jian.yu@intel.com>
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I6d2fffede5de7a7d4a6bde3d62dd7c6cb60f63fa
Reviewed-on: http://review.whamcloud.com/6429
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2901 ldlm: fix resource/fid check, use DLDLMRES 92/6592/5
Andreas Dilger [Fri, 7 Jun 2013 22:31:51 +0000 (16:31 -0600)]
LU-2901 ldlm: fix resource/fid check, use DLDLMRES

In ll_md_blocking_ast() the FID/resource comparison is incorrectly
checking for fid_ver() stored in res_id.name[2] instead of name[1]
changed since http://review.whamcloud.com/2271 (commit 4f91d5161d00)
landed.  This does not impact current clients, since name[2] and
fid_ver() are always zero, but it could cause problems in the future.

In ldlm_cli_enqueue_fini() use ldlm_res_eq() instead of comparing
each of the resource fields separately.

Use DLDLMRES/PLDLMRES when printing resource names everywhere.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I7b45d382d2ee87c1df813ebdd9c7f21029500c1e
Reviewed-on: http://review.whamcloud.com/6592
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
6 years agoLU-3093 lnet: Fix assert on empty group in selftest module 92/6092/16
Amir Shehata [Wed, 10 Jul 2013 17:45:35 +0000 (10:45 -0700)]
LU-3093 lnet: Fix assert on empty group in selftest module

The core of the issue is that the selftest module doesn't sanitize its
own API, but it depends on lst utility to do such checks.  As a result
this issue manifests itself in this particular LU through an assert
on an empty group.  If the NID is misspelled then an empty group is
added.  An error output is provided, but if that's never checked in a
batch script, as is the case with this issue, then the script will try
to add an empty group to a test to run in a batch, and that will cause
an assert

The fix is two fold.  Ensure that lst utility checks that a group is
added with at least one node.  If not the group is subsequently
deleted.  And the add_test command would fail, since the group no
longer exists.

The second fix is to ensure that the kernel module itself sanitizes
its own API in this particular case, so that if a different utility is
used other than lst to communicate with the selftest kernel module
then this error would be caught.  This fix looks up the batch and the
groups, src and dst, in the ioctl handle and sanitizes that input at
this point.  If the group looked up either doesn't exist or doesn't
have at least one ACTIVE node, then the command fails.

NOTE:there are many other cases in the code where the selftest kernel
module doesn't check for sanity of the input, but depends totally on
the lst module to do such checks.  Particularly around length of
strings passed in.  Thus it is possible to crash the selftest module
if someone tries to create another userspace app to communicate with
the selftest kernel module without ensuring sanity of the params sent
to the kernel module.  In effect, it's always assumed that lst is the
front end for selftest and no other front end is to be used.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: If2e59c1fadf8bd6cac759ea8fa761be386e71bd3
Reviewed-on: http://review.whamcloud.com/6092
Tested-by: Hudson
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2919 hsm: Implementation of exclusive open 30/6730/18
Jinshan Xiong [Fri, 12 Jul 2013 20:07:11 +0000 (13:07 -0700)]
LU-2919 hsm: Implementation of exclusive open

In this patch, a framework of lease is implemented. However,
only exclusive lease is supported right now.

To apply a lease, MDS_OPEN_LEASE must be set to open the file, EX
mode open lock is returned to the client side to hold a lease. From
that time on, if this file is opened again by other processes, the
open lock will be revoked so the client who holds the lease will
know the lease is already broken by checking that open lock.

To release a lease, normal close is used. The client will revoke the
open lock before sending CLOSE request.

Lease can be applied in two ways. ll_lease_open()/close() can be
called directly if the lease holder is in kernel space; or if the
lease holder lives in user space, it has to open the file first and
then use ioctl() with command LL_IOC_SET_LEASE to apply a lease. The
lease holder has to poll the lease status itself.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I181edbb0b31fcf60858656170528d2ffda9c9bb6
Reviewed-on: http://review.whamcloud.com/6730
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>
6 years agoLU-3340 mdt: HSM memory requests management 30/6530/10
jcl [Mon, 3 Jun 2013 14:12:24 +0000 (16:12 +0200)]
LU-3340 mdt: HSM memory requests management

HSM coordinator keeps an in memory list of running
requests send to the agents. This list keep track
of the progress of the data movement.
This patch implements the helpers used to create
add remove update component of this list.

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I6b68a1342ad485792037607ce84039a0b085d72e
Reviewed-on: http://review.whamcloud.com/6530
Tested-by: Hudson
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3474 mdd: mdd_links_read() to return linkea_init() errors 76/6676/5
Bruno Faccini [Thu, 4 Jul 2013 08:13:40 +0000 (10:13 +0200)]
LU-3474 mdd: mdd_links_read() to return linkea_init() errors

ASSERTION(ldata->ld_leh != ((void *)0)) can be triggered in
linkea_links_find() due to earlier mdd_links_read() call
missing to return linkea_init() errors and thus preventing
to detect that ld_leh is not populated.
Plus a few error handling fixes to avoid unnecessary msgs
and also prevent early return.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I35b1076d8eb036dd600e0fda711417634590b9df
Reviewed-on: http://review.whamcloud.com/6676
Tested-by: Hudson
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3233 llite: use correct FID in ll_och_fill() 95/6695/2
John L. Hammond [Wed, 19 Jun 2013 00:50:56 +0000 (19:50 -0500)]
LU-3233 llite: use correct FID in ll_och_fill()

When ll_intent_file_open() is called on a file with a stale dentry,
ll_och_fill() may incorrectly use the FID from the struct
ll_inode_info rather than the FID from the response body (which is the
correct FID for the close). Fix this, remove the ll_inode_info
parameter from ll_och_fill(), and move the call to ll_ioepoch_open()
from ll_och_fill() to ll_local_open().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ic4c97d82259b4b922e8b5be235d2db188406bc06
Reviewed-on: http://review.whamcloud.com/6695
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3233 mdt: validate open handle cookies 38/6938/3
John L. Hammond [Wed, 10 Jul 2013 20:45:18 +0000 (15:45 -0500)]
LU-3233 mdt: validate open handle cookies

Add a const void *h_owner member to struct portals_handle. Add a const
void *owner parameter to class_handle2object() which must be matched
by the h_owner member of the handle in addition to the cookie.  Adjust
the callers of class_handle2object() accordingly, using NULL as the
argument to the owner parameter, except in the case of
mdt_handle2mfd() where we add an explicit mdt_export_data parameter
which we use as the owner when searching for a MFD. When allocating a
new MFD, pass a pointer to the mdt_export_data into mdt_mfd_new() and
store it in h_owner. This allows the MDT to validate that the client
has not sent the wrong open handle cookie, or sent the right cookie to
the wrong MDT.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I4c26504d808db0c27cfc2f8ebcf7e1fa19719170
Reviewed-on: http://review.whamcloud.com/6938
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
6 years agoLU-3559 utils: mgs has no index 04/6904/3
Sebastien Buisson [Fri, 5 Jul 2013 11:33:16 +0000 (13:33 +0200)]
LU-3559 utils: mgs has no index

An MGS formatted with Lustre 2.1 does not have any index.
So mount.lustre must not require an index when starting
an MGS.

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: I12c1a2511509c4d34ef60a0ed937dda9e5fba4e4
Reviewed-on: http://review.whamcloud.com/6904
Tested-by: Hudson
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
6 years agoLU-3432 llite: Access to released file trigs a restore 37/6537/13
jcl [Mon, 3 Jun 2013 15:01:51 +0000 (17:01 +0200)]
LU-3432 llite: Access to released file trigs a restore

When a client accesses data in a released file,
or truncate it, client must trig a restore request.
During this restore, the client must not glimpse and
must use size from MDT. To bring the "restore is running"
information on the client we add a new t_state bit field
to mdt_info which will be used to carry transient file state.
To memorise this information in the inode we add a new flag
LLIF_FILE_RESTORING.

Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Change-Id: I4f3cde9cb247760075f6872b1d1c299ef369a7ae
Reviewed-on: http://review.whamcloud.com/6537
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>