Whamcloud - gitweb
fs/lustre-release.git
9 years agoLU-5465 scripts: handle added [spl,zfs]-dkms case 81/11381/3
Bruno Faccini [Fri, 8 Aug 2014 23:18:44 +0000 (01:18 +0200)]
LU-5465 scripts: handle added [spl,zfs]-dkms case

Get SPL/ZFS version also when [spl,zfs]-dkms RPMs have only
been added in DKMS framework and terminology.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I70f339331d6b759fc3c120d8a07cb2f98ccaa148
Reviewed-on: http://review.whamcloud.com/11381
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5394 doc: Update the routerstat man page 45/11345/3
James Nunez [Wed, 6 Aug 2014 16:38:00 +0000 (10:38 -0600)]
LU-5394 doc: Update the routerstat man page

Correct the description of output values, add
a description of additional lines printed when
providing an interval value, add an example,
and other minor editing.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I9d6221a5f2d3a164c39d550e635a9fc8d0967b69
Reviewed-on: http://review.whamcloud.com/11345
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5409 mdd: use DT wrappers 64/11264/4
John L. Hammond [Tue, 29 Jul 2014 15:02:27 +0000 (10:02 -0500)]
LU-5409 mdd: use DT wrappers

In lustre/mdd replace direct calls to members of dt_object_operations
with calls to the equivalent static inline functions.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Iaf21970e582f30f903e07615c59c306f413d16dc
Reviewed-on: http://review.whamcloud.com/11264
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5417 lustre: fix comparison between signed and unsigned 27/11327/2
Dmitry Eremin [Mon, 4 Aug 2014 17:24:41 +0000 (21:24 +0400)]
LU-5417 lustre: fix comparison between signed and unsigned

Cleanup in general headers.
* use size_t in cfs_size_round*()
* make unsigned index and len in lustre_cfg_*() and object_update_*()
* make iteration variable the same type as comparing value
* make unsigned pages counters
* fix printf formats

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I9af487f0c8e04825adfce94ae11fe0a64c71c2e5
Reviewed-on: http://review.whamcloud.com/11327
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5417 osp: fix comparison between signed and unsigned 15/11315/4
Dmitry Eremin [Mon, 4 Aug 2014 12:01:01 +0000 (16:01 +0400)]
LU-5417 osp: fix comparison between signed and unsigned

Make oxe_buflen, oxe_namelen and oxe_vallen unsigned in
struct osp_xattr_entry.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I087772016b52d8f14d60c83dcf4a1923cca76df0
Reviewed-on: http://review.whamcloud.com/11315
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2675 build: remove liblustre and libsysio 57/10657/7
John L. Hammond [Mon, 9 Jun 2014 18:13:16 +0000 (13:13 -0500)]
LU-2675 build: remove liblustre and libsysio

Remove the lustre/liblustre and libsysio subdirectories.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I53c06b8c76955519a33a7b1292b0d87495105607
Reviewed-on: http://review.whamcloud.com/10657
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5456 hsm: hold inode mutex around ll_setattr_raw() 49/11349/2
John L. Hammond [Wed, 6 Aug 2014 19:01:48 +0000 (14:01 -0500)]
LU-5456 hsm: hold inode mutex around ll_setattr_raw()

ll_setattr_raw() expects to be called with the inode mutex held so do
when calling it from ll_hsm_import().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I91ef3d431fdf6db23bf4be6e957f2981d3e016cd
Reviewed-on: http://review.whamcloud.com/11349
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4503 clio: lu_ref_del() mismatch ref add scope 70/8970/3
Bobi Jam [Thu, 23 Jan 2014 05:16:51 +0000 (13:16 +0800)]
LU-4503 clio: lu_ref_del() mismatch ref add scope

git commit 4fcbd1af9ec3b1e5f6424d925f43f0cb2910c3ec adds page to
a list and aggregate issuing them to writeback cache; A page add
is referenced in llite/vvp io scope, while writeback cache commit
de-refers it under osc sub io scope, and --enable-lu_ref will detect
this scope mismatch.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I368ac1f7118f420edde651ce84a595128d15b527
Reviewed-on: http://review.whamcloud.com/8970
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5434 mdd: disregard empty POSIX ACLs 00/11300/3
Ned Bass [Thu, 31 Jul 2014 22:07:32 +0000 (15:07 -0700)]
LU-5434 mdd: disregard empty POSIX ACLs

Some files may have a POSIX ACL consisting of only a struct
posix_acl_xattr_header, resulting in unexpected permission errors.
Update mdd_check_acl() to return -EAGAIN when such ACLs are
encountered so the caller falls back to standard UNIX
permissions.

These empty ACLs originate from tools like cp. In some cases (e.g.
'cp -rp') just POSIX_ACL_XATTR_VERSION is given as the value of the
system.posix_acl_default extended attribute.  Lustre accepts and
stores this value on disk, and the bad default ACL then propagates
from directories to newly created directory entries.  Separate
patches will prevent the storage of these bad ACLs.  This patch
mitigates problems caused by the ones already stored.

Other minor updates:
- Use the kernel function posix_acl_xattr_count() to count the
  number of ACL entries.
- Convert remainder of mdd_check_acl() to TAB indentation.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: Ib4f7b3874696b7645b9de3f1f10ef45dc4105646
Reviewed-on: http://review.whamcloud.com/11300
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5415 ldlm: high load because of negative timeout 27/11227/5
Li Xi [Fri, 25 Jul 2014 03:08:03 +0000 (11:08 +0800)]
LU-5415 ldlm: high load because of negative timeout

When the time of LRU resizing exceeds waiting period of
recalculation, the ldlm daemon will keep on resizing without any
interval of rest. That will cause high CPU load.

This patch fixes the problem by setting the recalculation timestamp
after LRU resizing finishes rather than before it. What is more, an
interval of one second is enforced between each recalculation.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I63b1951882754952e8ea8d921f42ddad1e6daa33
Reviewed-on: http://review.whamcloud.com/11227
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4976 osp: add comment to osp_dev.c 02/10502/15
Wang Di [Tue, 17 Jun 2014 19:10:14 +0000 (12:10 -0700)]
LU-4976 osp: add comment to osp_dev.c

1. Add comments to each function in osp_dev.c.
2. remove unnecessary rc in osp_recovery_complete.
3. remove unnecessary LASSERTF in osp_device_fini.
4. rename some single character variable name to more
   meaningful name, like m-->osp, l-->ld etc
5. rename osp_find_or_create to osp_find_or_create_local_file
   to indicate it is actually for finding or creating a local
   file.
Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ia9ca565818aa6fc6f9ff932c371d9150e926fb60
Reviewed-on: http://review.whamcloud.com/10502
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2675 build: remove WinNT "support" 85/11385/2
John L. Hammond [Sat, 9 Aug 2014 19:18:40 +0000 (14:18 -0500)]
LU-2675 build: remove WinNT "support"

Remove the WinNT "support" code. It's not maintained or used.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I361bfce148a040db60d68d3c34a399415f2dd628
Reviewed-on: http://review.whamcloud.com/11385
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5427 lbuild: Fix compilation with MPSS 3.3 65/11265/5
Dmitry Eremin [Fri, 25 Jul 2014 18:05:16 +0000 (22:05 +0400)]
LU-5427 lbuild: Fix compilation with MPSS 3.3

Adopt changes in names for MPSS 3.3 release:
* The name of main archive is not depends from OS name any more
  and named as mpss-<version>-linux.tar
* The name of MPSS OFED devel package was changed
* The name of MPSS OFED directory with headers was changed

Also few improvements:
* Remove internal URLs from Intel Intranet
* The version of MPSS in --mpss-version option can be specified
  without build number
* Don't fails if no URLs for download. It will fail later if there
  is no file in download cache
* Support all versions of MPSS releases (x.y and x.y.z)

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I23e93b8ce5a449d18aa52584999691359c2718da
Reviewed-on: http://review.whamcloud.com/11265
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5410 mdd: return errors from mdo_declare_ref_add() 22/11222/2
John L. Hammond [Thu, 24 Jul 2014 19:59:05 +0000 (14:59 -0500)]
LU-5410 mdd: return errors from mdo_declare_ref_add()

In mdd_declare_object_initialize() ensure that errors from
mdo_declare_ref_add() are returned.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I8ae9fa009577f862522f905b15fc6ee71ee00306
Reviewed-on: http://review.whamcloud.com/11222
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.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>
9 years agoLU-5431 lmv: release locks if lmv_intent_lock() fails 19/11319/2
John L. Hammond [Mon, 4 Aug 2014 21:05:37 +0000 (16:05 -0500)]
LU-5431 lmv: release locks if lmv_intent_lock() fails

In lmv_intent_lock() if we will return an error then first release any
locks referenced by the intent.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I43fa0d3869cf365175750b0cf944145c13f31006
Reviewed-on: http://review.whamcloud.com/11319
Tested-by: Jenkins
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5417 lod: fix comparison between signed and unsigned 16/11316/3
Dmitry Eremin [Mon, 4 Aug 2014 12:18:02 +0000 (16:18 +0400)]
LU-5417 lod: fix comparison between signed and unsigned

Make few members/variables related to size or indexes as unsigned.
Fix incorrect comparison between signed and unsigned variables.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I1bb3dff189e5ad4f37c7696ffd51832af60bd8f1
Reviewed-on: http://review.whamcloud.com/11316
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5417 tgt: incorrect return code from tgt_handle_lfsck_query 90/11290/3
Dmitry Eremin [Thu, 31 Jul 2014 09:31:27 +0000 (13:31 +0400)]
LU-5417 tgt: incorrect return code from tgt_handle_lfsck_query

Incorrect comparison of unsigned int with zero always false.
Therefore tgt_handle_lfsck_query() always return success.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Idcb321880fb5071c93bebbba0a55961cdbe286dd
Reviewed-on: http://review.whamcloud.com/11290
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5414 mdt: avoid shrinking reply buffers on error 47/11247/3
John L. Hammond [Mon, 28 Jul 2014 14:31:36 +0000 (09:31 -0500)]
LU-5414 mdt: avoid shrinking reply buffers on error

In mdt_getattr() if the LOV xattr size cannot be determined then
return err_serious(rc) and avoid shrinking the nonexistent reply
buffers.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I234ed3044c426e34cf35575eb26f7f961b03c0bd
Reviewed-on: http://review.whamcloud.com/11247
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.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>
9 years agoLU-5367 mdt: handle failed PDO lock in mdt_object_local_lock() 19/11219/3
John L. Hammond [Thu, 24 Jul 2014 18:03:02 +0000 (13:03 -0500)]
LU-5367 mdt: handle failed PDO lock in mdt_object_local_lock()

In mdt_object_local_lock() call mdt_object_unlock() if mdt_fid_lock()
fails on the PDO lock. This is needed because ldlm_cli_enqueue_local()
may initialize the passed in lock handle and then fail later.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I17a01d569a77a86f8ce72a1617f0cb8ed500985b
Reviewed-on: http://review.whamcloud.com/11219
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: wangdi <di.wang@intel.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>
9 years agoLU-5308 ofd: handle errors in ofd_fs_setup() path 27/11027/2
John L. Hammond [Wed, 9 Jul 2014 17:56:32 +0000 (12:56 -0500)]
LU-5308 ofd: handle errors in ofd_fs_setup() path

In ofd_seqs_init() add calls to ofd_fid_fini() and ofd_fld_fini() in
the error path. In ofd_fs_setup() call ofd_seqs_fini() on error and do
not pass a NULL object to lu_object_put().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Id7738ff69328411257abcb641da59180c2f9c8c6
Reviewed-on: http://review.whamcloud.com/11027
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3373 osd-ldiskfs: Use ext4_map_blocks for IO map 16/8116/14
Yang Sheng [Wed, 30 Jul 2014 19:39:35 +0000 (15:39 -0400)]
LU-3373 osd-ldiskfs: Use ext4_map_blocks for IO map

Use ext4_map_blocks instead patch ext4 code too much.

Signed-off-by: yang sheng <yang.sheng@intel.com>
Change-Id: Ifc0cf2e45fbcbff688c57d4da52e17471bd55386
Reviewed-on: http://review.whamcloud.com/8116
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5442 lustre: always include libcfs.h in lustre_idl.h 08/11308/3
John L. Hammond [Fri, 1 Aug 2014 16:12:41 +0000 (11:12 -0500)]
LU-5442 lustre: always include libcfs.h in lustre_idl.h

Unconditionally include libcfs.h in lustre_idl.h. Since the landing of
LU-5327 libcfs: add libcfs/types.h it is possible to get definitions
for LPU64 without including libcfs.h. (Technically it was always
possible, but now it's much easier.)  The outer include guard was
added in LU-113: make lustre_{idl,user}.h nice to userspace. Since we
no longer package lustre_idl.h we remove this guard.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I55a453669fcd821f974d6f69ebc741595984d98d
Reviewed-on: http://review.whamcloud.com/11308
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5463 osc: update kms in brw_interpret() properly 74/11374/4
Niu Yawei [Fri, 8 Aug 2014 04:11:02 +0000 (00:11 -0400)]
LU-5463 osc: update kms in brw_interpret() properly

In brw_interpret(), we forgot page offset when calculating
write offset, that leads to wrong kms for sync write.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I9be90fefa384f9738c11737580637bcec96e5126
Reviewed-on: http://review.whamcloud.com/11374
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Li Dongyang <dongyang.li@anu.edu.au>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5370 mdt: return -MDT_EREMOTE_OPEN for remote open 18/11218/3
John L. Hammond [Thu, 24 Jul 2014 17:56:20 +0000 (12:56 -0500)]
LU-5370 mdt: return -MDT_EREMOTE_OPEN for remote open

Add a special magical errno MDT_EREMOTE_OPEN for communicaiton between
mdt_reint_open() and mdt_intent_reint() which means return the lock to
the client for subsequent cross ref open. Previously we used plain
-EREMOTE but other functions called in that path might return it too
and confuse us. This is not returned to the client.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I7a498adc341c2b52b29c94f65e66431c5de06917
Reviewed-on: http://review.whamcloud.com/11218
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5403 kernel: kernel update RHEL6.5 [2.6.32-431.23.3.el6] 11/11211/4
Yang Sheng [Thu, 24 Jul 2014 03:05:22 +0000 (11:05 +0800)]
LU-5403 kernel: kernel update RHEL6.5 [2.6.32-431.23.3.el6]

Update RHEL6.5 kernel to [2.6.32-431.23.3.el6].

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I597ef883695ebca8e827a0e3479e5dc36ce3ead3
Reviewed-on: http://review.whamcloud.com/11211
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4975 ldlm: fix comments for ldlm_glimpse_ast() 35/11135/3
Andreas Dilger [Fri, 18 Jul 2014 01:15:54 +0000 (19:15 -0600)]
LU-4975 ldlm: fix comments for ldlm_glimpse_ast()

While reviewing comments on ofd_intent_policy() I realized that the
comment for ldlm_glimpse_ast() has become outdated.  The handling of
glimpse errors was moved to ldlm_handle_ast_error() back in commit
f10cebc5729 (b=23174).

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I369698b828d32fae899a10a0ede2b06b8ba6048b
Reviewed-on: http://review.whamcloud.com/11135
Tested-by: Jenkins
Reviewed-by: Ned Bass <bass6@llnl.gov>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-1892 doc: updates to include/dt_object.h 89/11089/11
Alex Zhuravlev [Mon, 14 Jul 2014 15:50:14 +0000 (19:50 +0400)]
LU-1892 doc: updates to include/dt_object.h

describing the details of OSD API.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I90dbaede3181519f8ee3ee1a14bcef57860a2444
Reviewed-on: http://review.whamcloud.com/11089
Tested-by: Jenkins
Reviewed-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4975 ofd: documenting ofd_fmd.c 51/10851/5
Mikhail Pershin [Thu, 26 Jun 2014 17:14:26 +0000 (21:14 +0400)]
LU-4975 ofd: documenting ofd_fmd.c

Fix up GPL header block to reference proper GPLv2 license URL.
Remove mention of contacting Sun, since they don't exist anymore.
Add introductory comment block for the ofd_fmd.c file and add
function comment blocks to all functions in it.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I343e2085deac950b909af0a944a0ed20cabbaa95
Reviewed-on: http://review.whamcloud.com/10851
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
9 years agoLU-5422 obdclass: Fix null pointer derefs in lu_cache_shrink() 44/11244/3
Li Wei [Mon, 28 Jul 2014 03:57:14 +0000 (11:57 +0800)]
LU-5422 obdclass: Fix null pointer derefs in lu_cache_shrink()

When lu_cache_shrink() is called on a machine with no Lustre targets
mounted, the following null pointer dereference may happen:

  BUG: unable to handle kernel NULL pointer dereference at (null)
  IP: [<ffffffffa0aed076>] lu_cache_shrink+0x156/0x310 [obdclass]

This is a regression introduced recently by 8701e7e.  lu_sites must be
initialized before the lu_sites shrinker is registered.  And, it
cannot be re-initialized every time when an lu_site is initialized.

Change-Id: Ieebd2ff1bcde4096037658a22956355283122182
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/11244
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5409 obd: add CFS_FAULT_CHECK() 63/11263/3
John L. Hammond [Mon, 28 Jul 2014 23:30:54 +0000 (18:30 -0500)]
LU-5409 obd: add CFS_FAULT_CHECK()

Add the macro CFS_FAULT_CHECK() which behaves like CFS_FAIL_CHECK()
except that any site may be matched by setting CFS_FAULT (0x02000000)
in cfs_fail_loc. Add cfs_fail_err for use as a return value with
CFS_FAULT_CHECK(). Add fault injection points to the DT object
operation wrappers using CFS_FAULT_CHECK().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I9841dbe0c62a13107c62382c8d7a73af207b1ef4
Reviewed-on: http://review.whamcloud.com/11263
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Robert Read <robert.read@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3072 test: add more operations to racer 36/5936/7
John L. Hammond [Wed, 3 Apr 2013 22:39:56 +0000 (17:39 -0500)]
LU-3072 test: add more operations to racer

Add chown, chmod, truncate, delxattr, getxattr, setxattr, and mknod to
racer. In lustre/utils/truncate.c print errors to stderr. Add a
default definition for MCREATE to init_test_env() in test-framework.sh
and remove definitions of MCREATE in various tests.

Test-Parameters: testlist=racer
Test-Parameters: testlist=racer
Test-Parameters: testlist=racer
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ic366ac8e397035cd68cee5ebeda8408252a2c388
Reviewed-on: http://review.whamcloud.com/5936
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5398 ldlm: handle NULL lock in ldlm_handle_enqueue0() 97/11197/3
John L. Hammond [Wed, 23 Jul 2014 20:08:48 +0000 (15:08 -0500)]
LU-5398 ldlm: handle NULL lock in ldlm_handle_enqueue0()

In ldlm_handle_enqueue0() if ldlm_lock_create() fails then set lock to
NULL before jumping to the exit code. In the exit code test lock for
NULL rather than using IS_ERR().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I5e2680988bd5356f2a84bd5eb9e2d40138d6d250
Reviewed-on: http://review.whamcloud.com/11197
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4969 nodemap: nodemap key hash comparison 47/10147/4
Joshua Walgenbach [Mon, 28 Apr 2014 19:22:29 +0000 (21:22 +0200)]
LU-4969 nodemap: nodemap key hash comparison

Changed the keymap comparison for the nodemap hash to the fix that
Andreas suggested, and fixed a bug with the idmap tree that resulted
in an incorrect deletion of idmaps.

Signed-off-by: Joshua Walgenbach <jjw@iu.edu>
Change-Id: I464fa8c97cf77b57e7a0918a2bb5aee935bfc891
Reviewed-on: http://review.whamcloud.com/10147
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
9 years agoLU-5424 mdt: allow open by FID to create striping 48/11248/4
John L. Hammond [Mon, 28 Jul 2014 14:49:49 +0000 (09:49 -0500)]
LU-5424 mdt: allow open by FID to create striping

In mdt_create_data() remove the check on parent that prevent open by
FID from creating striping. In sanity.sh check that open by FID may
create striping.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I4d948d83dca8a542b15945d8bf3b9feaded0f5ef
Reviewed-on: http://review.whamcloud.com/11248
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
9 years agoLU-5327 libcfs: add libcfs/types.h 70/11070/3
John L. Hammond [Fri, 11 Jul 2014 19:31:26 +0000 (14:31 -0500)]
LU-5327 libcfs: add libcfs/types.h

Add libcfs/include/libcfs/types.h which unconditionally includes
linux/types.h and defines the LP*64 macros by testing for
_ASM_GENERIC_INT_L64_H or _ASM_GENERIC_INT_LL64_H. Remove autoconf
tests to determine in __u64 is unsigned long or unsigned long
long. Remove the headers posix-types.h and posix-wordsize.h. This
fixes two problems:

  1) Use of the LP*64 macros may make lustre headers unusable when
     config.h is not included (like when the headers are used out of
     tree).

  2) Some platforms (like powerpc64) define __u64 to be unsigned long
     in the kernel and unsigned long long in userspace. This means
     that a single autoconf test cannot be used to determine how to
     define the terrible LP*64 macros.

Imaginary ports of Lustre to non-Linux platforms may handle this
change by adding linux/types.h somewhere in their include path and
putting the right typedefs and defines therein.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Iaab8e552d2d8a1c87ca2675f5068bc2943d8ce18
Reviewed-on: http://review.whamcloud.com/11070
Tested-by: Jenkins
Reviewed-by: Robert Read <robert.read@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-4656 tests: Add MOUNT_FLAGS variable and rename MOUNTOPT 32/9332/16
Ryan Haasken [Thu, 20 Feb 2014 21:13:50 +0000 (15:13 -0600)]
LU-4656 tests: Add MOUNT_FLAGS variable and rename MOUNTOPT

This patch adds a MOUNT_FLAGS variable which can be set to any extra
flags to the mount command, such as "-n".  MOUNTOPT was renamed to
MOUNT_OPTS to reflect that is a list of options. It should now contain
just a comma-separated list of mount options which will be passed to
the mount command as "-o $MOUNT_OPTS".  MOUNT_OPTS should not include
the "-o" anymore.

MOUNT_FLAGS was added to the mount commands and output messages in
zconf_mount and zconf_mount_clients in test-framework.sh.  MOUNT_OPTS
was prepended with the "-o" before being passed to the mount command.
MOUNT_FLAGS was given an empty default value in cfg/local.sh, and some
short documentation was added above MOUNT_OPTS and MOUNT_FLAGS.  Any
place which called zconf_mount or zconf_mount_clients was updated to
pass the mount options without the "-o".

All code which added an option to MOUNT_OPTS was updated to add the
option correctly, with a comma only if necessary.  Wherever possible,
the new mount options were passed to zconf_mount* to avoid modifying
global state.  In som_mode_switch, som_preview was removed from the
options correctly, removing a comma if necessary.

Two lines in test_132 were also edited to use "lctl get_param -n"
instead of piping the output of "lctl get_param" through an awk
command.

Test-Parameters:     envdefinitions=MOUNT_OPTS=user_xattr,MOUNT_FLAGS="-o flock"
Signed-off-by: Ryan Haasken <haasken@cray.com>
Change-Id: I32d078fc6b64ee93199ad7b881791e872590f711
Reviewed-on: http://review.whamcloud.com/9332
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Robert Read <robert.read@intel.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4480 tests: set fail_val in sanity test_36f 42/8842/4
Mikhail Pershin [Tue, 14 Jan 2014 14:58:33 +0000 (18:58 +0400)]
LU-4480 tests: set fail_val in sanity test_36f

The OBD_FAIL_OST_BRW_PAUSE_BULK needs fail_val to be passed
as amount of seconds to wait or 0 for default value.
That was not set to any of those values in test_36f.

Patch set fail_val=0 along with fail_loc in test_36f

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I3966a6c8a7f07fd6232a2f70329eb34cfdd95cee
Reviewed-on: http://review.whamcloud.com/8842
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
9 years agoLU-5150 acl: 'cp -rp' set empty default ACL 58/11158/2
Lai Siyao [Mon, 30 Jun 2014 13:33:25 +0000 (21:33 +0800)]
LU-5150 acl: 'cp -rp' set empty default ACL

'cp -rp' will set an empty default ACL on target, MDD should treat
this as removing specified ACL.

add sanity 103c to verify this.

Signed-off-by: Lai Siayo <lai.siyao@intel.com>
Change-Id: I2b6947e241675c291a43999e6324bbb295d3c88d
Reviewed-on: http://review.whamcloud.com/11158
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3660 acl: support mount option "noacl" for zfs 57/11157/2
Lai Siyao [Thu, 26 Jun 2014 16:20:46 +0000 (00:20 +0800)]
LU-3660 acl: support mount option "noacl" for zfs

zfs parse mount option in zpl layer, but osd-zfs calls dmu
directly, since ldiskfs parse "noacl" at mount time, osd-zfs
should do the same in osd_mount().

Similar to ldiskfs, osd-zfs should check whether ACL is enabled
for ACL operations, if not -EOPNOTSUPP is returned.

add sanity test 103b for "noacl" mount option.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I11075a9de8759fde956e7ae8b715840a56d0428e
Reviewed-on: http://review.whamcloud.com/11157
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5436 quota: use OBD_SLAB_FREE_PTR() to free lqe 89/11289/2
Johann Lombardi [Thu, 31 Jul 2014 08:24:50 +0000 (10:24 +0200)]
LU-5436 quota: use OBD_SLAB_FREE_PTR() to free lqe

lquota entries are allocated with OBD_SLAB_ALLOC_PTR() and should be
freed with OBD_SLAB_FREE_PTR() instead of OBD_FREE_PTR().
This issue has no real side effect since the Linux VM picks up the
correct slab.
This patch also fixes some incorrect error messages.

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: I07effa69ae877537b5339fe1c20fabce44468822
Reviewed-on: http://review.whamcloud.com/11289
Tested-by: Jenkins
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5399 build: fix lbuild to build OFED 3.12 88/11188/5
Minh Diep [Wed, 23 Jul 2014 01:37:14 +0000 (18:37 -0700)]
LU-5399 build: fix lbuild to build OFED 3.12

Remove --with-sdp-mod (ofed stopped support since
ofed 3.5)
Fix parsing daily ofed build tarball

Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: Ie448a235ff4e4e6c38efc12868b83195d33219df
Reviewed-on: http://review.whamcloud.com/11188
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5359 quota: typo in s-q script 25/11125/2
Niu Yawei [Thu, 17 Jul 2014 03:39:55 +0000 (23:39 -0400)]
LU-5359 quota: typo in s-q script

quota_scan() should report group quota when group is
specified, however, it reports user quota mistakenly.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I9aa178cd4dc51065d23580c72884851b0baef6e1
Reviewed-on: http://review.whamcloud.com/11125
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
9 years agoLU-5323 utils: fix memory leak in lfs_hsm_request() 16/11116/3
Nathaniel Clark [Wed, 16 Jul 2014 15:03:56 +0000 (11:03 -0400)]
LU-5323 utils: fix memory leak in lfs_hsm_request()

Fix memory leak in error case in lfs_hsm_request().  hur is allocated,
and should be freed befor being overwritten.
Cleanup error messages.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I9c01400fafb53e3914b9ed5eb9c8c9e575423551
Reviewed-on: http://review.whamcloud.com/11116
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: frank zago <fzago@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-4975 ofd: documenting ofd_lvb.c 54/10854/6
Mikhail Pershin [Thu, 26 Jun 2014 18:43:51 +0000 (22:43 +0400)]
LU-4975 ofd: documenting ofd_lvb.c

Fix up GPL header block to reference proper GPLv2 license URL.
Remove mention of contacting Sun, since they don't exist anymore.
Add introductory comment block for the ofd_lvb.c file and add
function comment blocks to all functions in it.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: Ic80fc32d62c2accab3b774d6587a27621c469a6e
Reviewed-on: http://review.whamcloud.com/10854
Tested-by: Jenkins
Reviewed-by: Ned Bass <bass6@llnl.gov>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-5390 rpms: Replace whamcloud URL in wireshark spec file 80/11180/3
Nathaniel Clark [Tue, 22 Jul 2014 12:34:21 +0000 (08:34 -0400)]
LU-5390 rpms: Replace whamcloud URL in wireshark spec file

Replace whamcloud with hpdd.intel in URL line in wireshark example
spec file.  Also remove download URL since it doesn't work.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: If77ad7c833a045e0d74c5ee1328a3d33a661171f
Reviewed-on: http://review.whamcloud.com/11180
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Joshua Kugler <joshua.kugler@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5342 lmv: fix some byte order issues 06/11106/2
John L. Hammond [Tue, 15 Jul 2014 14:12:00 +0000 (09:12 -0500)]
LU-5342 lmv: fix some byte order issues

In the handler for LL_IOC_LMV_GETSTRIPE convert stripe FIDs from
little to CPU endian when unpacking lmv_user_md. In lmv_unpack_md_v1()
fix a double conversion of the stripe count. In
lustre_swab_lmv_user_md() do not convert stripe FIDs.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I0aa623a544c1b4d05a0ecf6ac99863c0e75daa54
Reviewed-on: http://review.whamcloud.com/11106
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5349 include: use __vmalloc() to avoid __GFP_FS default 90/11190/4 dne2
Bruno Faccini [Wed, 23 Jul 2014 09:03:54 +0000 (11:03 +0200)]
LU-5349 include: use __vmalloc() to avoid __GFP_FS default

When possible, try to Direct use of __vmalloc() which allows
for protection flag specification, and particularly to not
set __GFP_FS, which can cause some deadlock situations in our
code.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I25fc4a55374c09c12156b2a2f8d8b2434b4cd689
Reviewed-on: http://review.whamcloud.com/11190
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5263 llite: update ras stride offset 81/11181/2
Bobi Jam [Tue, 1 Jul 2014 08:14:47 +0000 (16:14 +0800)]
LU-5263 llite: update ras stride offset

When a read ahead does not reach the end of the region reserved from
ras, we'd set ras::ras_next_readahead back to where we left off; For
stride read ahead, it needs to make sure that the offset is no less
than ras_stride_offset, so that the stride read ahead can work
correctly.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I4996f0d8174fa72ea4ef5994daddc0ab2f922f38
Reviewed-on: http://review.whamcloud.com/11181
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoRevert "LU-5276 ldiskfs: Remove extents-mount-option patch" 67/11267/2
Oleg Drokin [Tue, 29 Jul 2014 17:37:05 +0000 (17:37 +0000)]
Revert "LU-5276 ldiskfs: Remove extents-mount-option patch"

This is causing LU-5425

This reverts commit e09c9f2bcb598b691945e96e86eb8fcef9072888.

Change-Id: I7edd7d2cf6d08b743d7625eb30bd8871934bf431
Reviewed-on: http://review.whamcloud.com/11267
Tested-by: Jenkins
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5013 llite: add LL_LEASE_{RD,WR,UN}LCK 33/10233/2
John L. Hammond [Tue, 6 May 2014 14:16:49 +0000 (09:16 -0500)]
LU-5013 llite: add LL_LEASE_{RD,WR,UN}LCK

Define new constants LL_LEASE_{RD,WR,UN}LCK for use as the argument to
and return value from the LL_IOC_{GET,SET}_LEASE ioctls. As arguments,
these contants replace the use of F_{RD,WR,UN}LCK from fcntl.h. As
return values they replace the use of FMODE_{READ,WRITE} which are
internal to the Linux kernel source and not under the control of the
Lustre ioctl interface.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I2643d7c548f84dd91cd2855894bf22f94fd20e98
Reviewed-on: http://review.whamcloud.com/10233
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5418: compilation fix when using newer readline lib 31/11231/3
Frank Zago [Fri, 25 Jul 2014 18:30:58 +0000 (13:30 -0500)]
LU-5418: compilation fix when using newer readline lib

Newer versions of readline have removed (or hidden) CPPFunction,
leading to the following compilation issue:

util/parser.c: In function 'init_input':
util/parser.c:308:45: error: 'CPPFunction' undeclared
                              (first use in this function)

Remove all the casts in init_input and fix the involded functions
instead. Also, make init_input() static, fix its declaration, and
convert some spaces to tabs.

Change-Id: I4896aaa01f8b8f91bd5cb81f858c759d71d52a56
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11231
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Robert Read <robert.read@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4367 llite: Make revalidate return 0 for opens 62/11062/4
Oleg Drokin [Fri, 11 Jul 2014 04:30:54 +0000 (00:30 -0400)]
LU-4367 llite: Make revalidate return 0 for opens

This is important so that we can properly engage opencache when needed.

This also reshuffles some other logic in ll_revalidate_dentry to
more properly handle intermediate component revalidate logic.

Change-Id: Ib4f272155096d33fe3f45b781e21e5bd4f44ff58
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/11062
Tested-by: Jenkins
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-5379 ptlprc: return 0 if buf in struct seq_file is overflow 54/11154/4
Wu Libin [Mon, 21 Jul 2014 10:04:19 +0000 (18:04 +0800)]
LU-5379 ptlprc: return 0 if buf in struct seq_file is overflow

Former version would get error if the length of content in
nrs_tbf_rul is larger than one page. This patch fix this
problem, now nrs policy tbf could make rules as many as
possible.

Ptlrpc_nrs_policy_control return -ENOSPC means the buf in
parameter struct seq_file is overflow, we return 0 in this
situation to make upper layer function seq_read to alloc a more
larger memory area and do this process again.

Signed-off-by: Wu Libin <lwu@ddn.com>
Change-Id: I436a6b5b58e33e46fb896b6f4d56f64a8ff5a732
Reviewed-on: http://review.whamcloud.com/11154
Tested-by: Jenkins
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Li Xi <pkuelelixi@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4975 ofd: documenting the ofd_objects.c 44/10644/5
Mikhail Pershin [Sun, 8 Jun 2014 15:30:17 +0000 (19:30 +0400)]
LU-4975 ofd: documenting the ofd_objects.c

Fix up GPL header block to reference proper GPLv2 license URL.
Remove mention of contacting Sun, since they don't exist anymore.
Add introductory comment block for the ofd_objects.c file and add
function comment blocks to all functions in it.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: Ib70053abb0f81452938403d64aafaa8a568678c0
Reviewed-on: http://review.whamcloud.com/10644
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Ned Bass <bass6@llnl.gov>
9 years agoLU-2456 lnet: Dynamic LNet Configuration (DLC) 30/9830/5
Amir Shehata [Thu, 27 Mar 2014 23:51:21 +0000 (16:51 -0700)]
LU-2456 lnet: Dynamic LNet Configuration (DLC)

This is the first patch of a set of patches that enables DLC.

This patch adds some cleanup in the config.c as well as some
preparatory changes in peer.c to enable dynamic network
configuration

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I8c8bbf3b55acf4d76f22a8be587b553a70d31889
Reviewed-on: http://review.whamcloud.com/9830
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5389: optimize ll_fid2path() 67/11167/7
Frank Zago [Sat, 19 Jul 2014 18:55:09 +0000 (13:55 -0500)]
LU-5389: optimize ll_fid2path()

The only parameter from userspace that matters is the length of the
buffer. We don't need to allocate then import the whole structure. By
importing only that length, we can save a memory allocation.

Add sparse annotations to that function.

Change-Id: I4baa941f0128f9bcc19fade112915f3c52cd5b8b
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11167
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-3963 ofd: convert to linux list api 21/10921/3
James Simmons [Tue, 15 Jul 2014 16:01:27 +0000 (12:01 -0400)]
LU-3963 ofd: convert to linux list api

Move from the cfs_[h]list api to the native linux api for
all the code related to OFD.

Change-Id: I83ee0ed2bff48a517174113859cc3f4c07fd797e
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10921
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3963 ptlrpc: convert to linux list api 26/10526/5
James Simmons [Mon, 30 Jun 2014 17:47:44 +0000 (13:47 -0400)]
LU-3963 ptlrpc: convert to linux list api

Move from the cfs_[h]list api to the native linux api for
the ptlrpc layer.

Change-Id: I6bc059be4530c53bbd4b51d2fdd84608727ee371
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10526
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
9 years agoLU-3963 obdclass: convert to linux list api 25/10525/5
James Simmons [Tue, 15 Jul 2014 16:37:58 +0000 (12:37 -0400)]
LU-3963 obdclass: convert to linux list api

Move from the cfs_[h]list api to the native linux api for
all the code related to obdclass.

Change-Id: Id773b6c83b22cac5b210b6d41b470a2c8d6e206d
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10525
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5331 obdclass: serialize lu_site purge 99/11099/2
Niu Yawei [Tue, 15 Jul 2014 03:06:09 +0000 (23:06 -0400)]
LU-5331 obdclass: serialize lu_site purge

Umount process relies on lu_site_purge(-1) to purge all
objects before umount, however, if there happen to have a
cache shrinker which calls lu_site_purge(nr) in parallel,
some objects may still being freed by cache shrinker even
after the lu_site_purge(-1) called by umount done.

This can be simply fixed by serializing purge threads,
since it doesn't make any sense to have them in parallel.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Iec5d7fd1d5714ad0e4bd12a50a837858a60b2b1c
Reviewed-on: http://review.whamcloud.com/11099
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5061 obd: add rnb_ prefix to struct niobuf_remote members 52/10452/3
John L. Hammond [Fri, 30 May 2014 09:41:13 +0000 (04:41 -0500)]
LU-5061 obd: add rnb_ prefix to struct niobuf_remote members

Add the prefix rnb_ to the members of struct niobuf_remote. Delete the
relevant compat macros from ofd_internal.h.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I51cfba173b63f8d4213faa223130fff829fdd66c
Reviewed-on: http://review.whamcloud.com/10452
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
9 years agoLU-5061 obd: add lnb_ prefix to members of struct niobuf_local 51/10451/5
John L. Hammond [Thu, 29 May 2014 15:00:16 +0000 (10:00 -0500)]
LU-5061 obd: add lnb_ prefix to members of struct niobuf_local

Add the prefix lnb_ to the members of struct niobuf_local that do not
already have it. Delete the relevant compat macros from
ofd_internal.h. Change the struct dentry *lnb_dentry member to void
*lnb_data as it is not used to hold a pointer to struct dentry.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I65ef2b697dbb13d62aa8c408f68732f569f15a48
Reviewed-on: http://review.whamcloud.com/10451
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2675 llite: remove liblustre includes 72/10172/3
John L. Hammond [Wed, 30 Apr 2014 21:28:39 +0000 (16:28 -0500)]
LU-2675 llite: remove liblustre includes

Remove liblustre includes from llite/. Always assume a kernel build.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I8ed001998869d0ee0b875b80cda9c35c7ad226b5
Reviewed-on: http://review.whamcloud.com/10172
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
9 years agoLU-2675 llite: merge lclient/*.c into llite/ 71/10171/4
John L. Hammond [Wed, 30 Apr 2014 21:15:47 +0000 (16:15 -0500)]
LU-2675 llite: merge lclient/*.c into llite/

Merge the lclient directory into the llite directory.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I0f08d88289edce21b63810c23de66b6963718f21
Reviewed-on: http://review.whamcloud.com/10171
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
9 years agoLU-5276 ldiskfs: Remove extents-mount-option patch 88/11088/4
Yang Sheng [Mon, 14 Jul 2014 12:18:04 +0000 (20:18 +0800)]
LU-5276 ldiskfs: Remove extents-mount-option patch

Remove ext4-extents-mount-option.patch for ldiskfs. It
means '-o {extents|noextents}' option not support anymore.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I7989fbf9a94c1556728531c7837a887df67e6b19
Reviewed-on: http://review.whamcloud.com/11088
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3181 mdt: mdt_cross_open should allow open by FID on MDT1 38/8738/4
Swapnil Pimpale [Mon, 6 Jan 2014 14:42:27 +0000 (20:12 +0530)]
LU-3181 mdt: mdt_cross_open should allow open by FID on MDT1

Removed the check of fid_is_obf() in mdt_cross_open() to allow
opening by FIDs on MDT1.

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Change-Id: I0a2e470137c99d75a7af01a03041de72c84d2771
Reviewed-on: http://review.whamcloud.com/8738
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5044 mdd: do not return .lustre from readdir 86/11186/2
John L. Hammond [Tue, 22 Jul 2014 21:30:08 +0000 (16:30 -0500)]
LU-5044 mdd: do not return .lustre from readdir

In mdd_dir_page_build() skip dirents with the FID of .lustre
preventing that directory from being return by readdir on Lustre
clients. Add a sanity tets to this effect.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ieecb77a286748c4bf4df4dee68d7f33670a0c286
Reviewed-on: http://review.whamcloud.com/11186
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-5306: Update download and other whamcloud URLs 69/11169/3
Joshua Kugler [Mon, 21 Jul 2014 23:46:33 +0000 (15:46 -0800)]
LU-5306: Update download and other whamcloud URLs

We are updating *.whamcloud.com URLs to *.hpdd.intel.com URLs, as
well as downloads.lustre.org to downloads.hpdd.intel.com.

Signed-off-by: Joshua Kugler <joshua.kugler@intel.com>
Change-Id: I6ebd45f8bb1f905692ca992617805ef225e09849
Reviewed-on: http://review.whamcloud.com/11169
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Peter Jones <peter.a.jones@intel.com>
9 years agoLU-5371 lmv: Do not ignore ENOENT in lmv_unlink 70/11170/2
Wang Di [Mon, 21 Jul 2014 16:23:27 +0000 (09:23 -0700)]
LU-5371 lmv: Do not ignore ENOENT in lmv_unlink

Return correct value (rc) in lmv_unlink. In lmv_unlink,
-ENOENT might be ingored for local directory unlink.

Change-Id: Ic839fe5d3da4d7e5d111608c73ca4b07b81a14e4
Signed-off-by: Wang Di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/11170
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5261 osc: use wait_for_completion_killable() instead 21/11021/6
Emoly Liu [Mon, 14 Jul 2014 19:50:41 +0000 (03:50 +0800)]
LU-5261 osc: use wait_for_completion_killable() instead

Use wait_for_completion_killable() instead of wait_for_completion()
so that the user process can be killed if there is a problem on the
OST.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: Ia3ed5cb981755483bd2f4c3f2cb4cc90c3ca5207
Reviewed-on: http://review.whamcloud.com/11021
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-5397 obdclass: optimize busy loop wait 98/11198/5
Alexander Zarochentsev [Wed, 23 Jul 2014 20:10:24 +0000 (13:10 -0700)]
LU-5397 obdclass: optimize busy loop wait

two optimizations in the busy loop wait in class_cleanup():
(1) remove unnecessary spinlocks protecting obd_conn_inprogress
    access
(2) replace cond_resched by more suitable yield to unconditionally
    yield the CPU if the condition check fails.

Xyratex-bug-id: MRP-1991
Signed-off-by: Alexander Zarochentsev <alexander_zarochentsev@xyratex.com>
Change-Id: I9079b2d04afda7d6db902392c6dcb216706a7ae4
Reviewed-on: http://review.whamcloud.com/11198
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4735 lbuild: Build Xeon Phi client RPMs for SLES 52/9552/11
Dmitry Eremin [Fri, 7 Mar 2014 15:11:50 +0000 (19:11 +0400)]
LU-4735 lbuild: Build Xeon Phi client RPMs for SLES

autodetect_distro() returns DISTRO in following format:
  <name>-<major>.<minor>
The <minor> for SuSE Linux is patchlevel.

Adopt lbuild script for build Xeon Phi client RPMs for SLES.

Also add fake dependency to avoid add incorrect one.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I1ef97a9da00078ae3093037d1a822fae95da87b1
Reviewed-on: http://review.whamcloud.com/9552
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4976 osp: add comments for osp_md_object functions 59/10359/10
wang di [Wed, 14 May 2014 21:16:27 +0000 (14:16 -0700)]
LU-4976 osp: add comments for osp_md_object functions

1. Add introductory comments for osp_md_object.c.
2. Add comments for each function in osp_md_object.c.
3. Remove a few useless functions.
4. fix a typo in the error handler of osp_md_index_lookup.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I4ed8372f667f66e9ea15140ea39cc44a75f5abd6
Reviewed-on: http://review.whamcloud.com/10359
Tested-by: Jenkins
Reviewed-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4974 lod: use pool_key() to access key 44/10244/4
Andreas Dilger [Wed, 7 May 2014 06:24:23 +0000 (00:24 -0600)]
LU-4974 lod: use pool_key() to access key

In pool_hashkey_keycmp() use the pool_key() function instead of open
coding the key access.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ia618e25ed4f086321865a9439142e43405500c1e
Reviewed-on: http://review.whamcloud.com/10244
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4974 lod: use common hash function for OST pool 43/10243/4
Andreas Dilger [Wed, 7 May 2014 05:42:15 +0000 (23:42 -0600)]
LU-4974 lod: use common hash function for OST pool

Use the common djb2 hash function for OST pool lookup.  This is used
for string-based hashing in other parts of the code.  It doesn't make
sense to have a custom hash function just for OST pool lookup, since
there aren't expected to be a huge number of pools and there is no
expectation that one of these functions is better than the other.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I501a42bc169243204dfc847c0388240fc2500c1e
Reviewed-on: http://review.whamcloud.com/10243
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4974 lod: add comments for lod_pool.c functions 45/10145/7
Andreas Dilger [Tue, 29 Apr 2014 08:57:21 +0000 (02:57 -0600)]
LU-4974 lod: add comments for lod_pool.c functions

Fix up GPL header block to reference proper GPLv2 license URL.
Remove mention of contacting Sun, since they don't exist anymore.

Add introductory comment block for the lod_pool.c file.
Add function comment blocks to all functions in the lod_pool.c file.

Minor cleanup of variable and function names for consistency, since
they affect the code comments.  Other code changes for issues found
during commenting will be in separate follow-on patches.

This patch specifically excludes changing cfs_list_t->struct list_head
and similar cleanups, since they would touch too many lines of code in
the patch to review easily.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Id914f54bd67138d36041b5867541703a5a500c1e
Reviewed-on: http://review.whamcloud.com/10145
Tested-by: Jenkins
Reviewed-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4975 ofd: documenting the ofd_trans.c 52/10852/4
Mikhail Pershin [Thu, 26 Jun 2014 17:36:21 +0000 (21:36 +0400)]
LU-4975 ofd: documenting the ofd_trans.c

Fix up GPL header block to reference proper GPLv2 license URL.
Remove mention of contacting Sun, since they don't exist anymore.
Add introductory comment block for the ofd_trans.c file and add
function comment blocks to all functions in it.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I3064afb8574f92c093efaa2bcc3178b33d15932d
Reviewed-on: http://review.whamcloud.com/10852
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-5334 lnet: fix build with OFED-3.5-2-MIC-beta1 04/11104/2
Dmitry Eremin [Tue, 15 Jul 2014 12:21:23 +0000 (16:21 +0400)]
LU-5334 lnet: fix build with OFED-3.5-2-MIC-beta1

The stuff for RHEL6.4 should be guarded by CONFIG_COMPAT_RHEL_6_4
also in RHEL6.5. So, we need both _COMPAT_ defines in RHEL6.5.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I3ce8ce50c7f823a867638f594c82d018d99c9e79
Reviewed-on: http://review.whamcloud.com/11104
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5252: Do not unconditionally delete the HSM event fifo 09/10809/4
Frank Zago [Fri, 20 Jun 2014 17:23:26 +0000 (12:23 -0500)]
LU-5252: Do not unconditionally delete the HSM event fifo

The lustreapi HSM library will use a pipe if it already exists.
However the deregistration will unconditionally delete that pipe,
which is not correct.

An admin may want to create the pipe with certain rights/ownership,
which the llapi_hsm_register_event_fifo() doesn't allow. In that case,
llapi_hsm_unregister_event_fifo() should not delete it.

Change-Id: I487f6efea06c6f6bc88b2f838153c0239e369461
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/10809
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4691 lmv: honor MDT index when creating volatile file 66/10866/12
Wang Di [Thu, 10 Jul 2014 08:57:45 +0000 (01:57 -0700)]
LU-4691 lmv: honor MDT index when creating volatile file

LMV should honor MDT index embedded in the name of volatile
file, then during hsm restore, the file under striped dir can
be restored to the right MDT.

Add test 405 in sanity-hsm to verify it.

Change-Id: I05170beee5255cf6581a2ea43edb6cc434a7cf8e
Signed-off-by: Wang Di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/10866
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4669 lmv: remove unused lmv_adjust_dirpages() 10/9810/4
Jian Yu [Fri, 11 Jul 2014 07:01:40 +0000 (00:01 -0700)]
LU-4669 lmv: remove unused lmv_adjust_dirpages()

This patch fixes the following compile error by removing the
dead codes: "error: 'lmv_adjust_dirpages' defined but not used".
This code was moved to mdc_adjust_dirpages() in commit 4e0c8aeb94
(http://review.whamcloud.com/7043).

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I0cc7dbb5aad50727cc4d5cc36cce964a236077a3
Reviewed-on: http://review.whamcloud.com/9810
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-5322 libcfs: handle vfs_rename change in 3.15+ kernels 58/11058/3
James Simmons [Thu, 10 Jul 2014 21:46:46 +0000 (17:46 -0400)]
LU-5322 libcfs: handle vfs_rename change in 3.15+ kernels

Starting with 3.15 kernels vfs_rename takes 6 arguments.
This patch adds support for this change.

Change-Id: I64ac982a3d7be03c61005fc899786b710f2fde57
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/11058
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2675 lmv: remove liblustre includes 95/10195/2
John L. Hammond [Thu, 1 May 2014 11:13:15 +0000 (06:13 -0500)]
LU-2675 lmv: remove liblustre includes

Remove liblustre includes in lmv/. Always assume a kernel build.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ia0e61d11cb8238e362e934a7d424b9e768e713fe
Reviewed-on: http://review.whamcloud.com/10195
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2675 lov: remove liblustre includes 96/10196/2
John L. Hammond [Thu, 1 May 2014 11:27:10 +0000 (06:27 -0500)]
LU-2675 lov: remove liblustre includes

Remove liblustre includes from lov/. Remove Darwin cruft from lov
autocrud. Always assume a Linux kernel build.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I181d5f40bc77ff93103d1e5226080232c895c42a
Reviewed-on: http://review.whamcloud.com/10196
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5038 llog: do not scan for empty llogs at initialization 08/10308/6
Alex Zhuravlev [Tue, 13 May 2014 10:25:23 +0000 (14:25 +0400)]
LU-5038 llog: do not scan for empty llogs at initialization

in some cases the catalog can contain lots of non-empty llogs
(e.g. robinhood isn't running all the time and this lead to
many alive plain llogs) and scanning this in the context of
mount can take a lot. instead we can do this during normal
llog processing.

Change-Id: I6c23b02b4a9733f80599314d37ffac6d2ee57001
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/10308
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5325 build: fix obsolete rpm dependency 69/11069/2
Bob Glossman [Fri, 11 Jul 2014 18:50:53 +0000 (11:50 -0700)]
LU-5325 build: fix obsolete rpm dependency

Replace obsolete name modutils with more current module-init-tools
in Requires line of lustre spec file.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ic46a7df4be8bbc58d9667d0505f20de215bb9d2b
Reviewed-on: http://review.whamcloud.com/11069
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-5022 build: enable building redhat 7 lustre client 08/10708/13
Minh Diep [Mon, 7 Jul 2014 16:10:43 +0000 (09:10 -0700)]
LU-5022 build: enable building redhat 7 lustre client

Create series, target file, and lbuild-rhel7

Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: Ifb04bc0b5b64d1b533cab8f0bd23a02f754352fa
Reviewed-on: http://review.whamcloud.com/10708
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5322 socklnd: handle sk_ready_data change in 3.15+ kernels 59/11059/3
James Simmons [Thu, 10 Jul 2014 21:43:59 +0000 (17:43 -0400)]
LU-5322 socklnd: handle sk_ready_data change in 3.15+ kernels

Starting with 3.15 kernels the sk_ready_data method in struct
sock only takes a single argument instead of two in earlier
kernels. Support this change in newer kernels.

Change-Id: Ifb740a931f454e806c74065c79ff912ed97e4e10
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/11059
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5304: use kzalloc/vzalloc instead of [kv]malloc+memset 29/11029/4
Frank Zago [Wed, 9 Jul 2014 16:58:11 +0000 (11:58 -0500)]
LU-5304: use kzalloc/vzalloc instead of [kv]malloc+memset

Changed __OBD_VMALLOC_VERBOSE to use vzalloc instead of vmalloc + memset.

Changed LIBCFS_ALLOC_GFP / LIBCFS_ALLOC_POST to use kzalloc or vzalloc,
instead of the regular kmalloc/vmalloc followed by a memset.

Fixed a minor typo (VEROBSE->VERBOSE) in the vicinity.

Change-Id: Ie8ef6036c24bc4557a88d1aa04f34f6ec0c13109
Signed-off-by: Frank Zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11029
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
9 years agoLU-5305 ldlm: fix a use after free in ldlm_resource_get() 17/11017/2
John L. Hammond [Tue, 8 Jul 2014 20:26:09 +0000 (15:26 -0500)]
LU-5305 ldlm: fix a use after free in ldlm_resource_get()

If lvbo initialization has failed then save the return status (from
lr_lvb_len) before putting the resource.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I2d36adcf85f24d5347279e7809bc571a56d87f1e
Reviewed-on: http://review.whamcloud.com/11017
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
9 years agoLU-2740 utils: Add support for --version option 14/11014/6
James Nunez [Tue, 8 Jul 2014 19:37:50 +0000 (13:37 -0600)]
LU-2740 utils: Add support for --version option

For mount.lustre, mkfs.lustre, lfs, and lctl, a
--version option was added that will print the
LUSTRE_VERSION_STRING.

lctl has an option called lustre_build_version that prints
both the Lustre version and the lctl version, which is
BUILD_VERSION. Printing the lctl version was removed from
the 'lctl lustre_build_version' output since
BUILD_VERSION and LUSTRE_VERSION_STRING are very different
strings and this could be confusing to the user.

Also, mount.lustre and mkfs.lustre prints the version number
when printing help/usage. This was removed to make all
Lustre utilities have a more uniform output.

The lctl, lfs and mkfs.lustre man pages were updated to include
the --version option.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I301258562f51640f041dd7ac6aa695450270c385
Reviewed-on: http://review.whamcloud.com/11014
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
9 years agoLU-5304: do not memset after LIBCFS_ALLOC 12/11012/4
Frank Zago [Mon, 7 Jul 2014 22:39:13 +0000 (17:39 -0500)]
LU-5304: do not memset after LIBCFS_ALLOC

LIBCFS_ALLOC already zero out the memory allocated, so there is no
need to zero out the memory again.

Signed-off-by: Frank Zago <fzago@cray.com>
Change-Id: Iac0210eefa999e6ef52bb16cacc67854ef5a8cfa
Reviewed-on: http://review.whamcloud.com/11012
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5304: no need to zero out the allocated memory when GFP_ZERO is set 11/11011/3
Frank Zago [Mon, 7 Jul 2014 23:09:04 +0000 (18:09 -0500)]
LU-5304: no need to zero out the allocated memory when GFP_ZERO is set

The kernel will zero out the memory allocated when GFP_ZERO is set,
so no need to zero it out again.

It is possible the original intent was to memset the allocated memory
if GFP_ZERO was not set. However the only two existing callers of this
function already set GFP_ZERO.

Signed-off-by: Frank Zago <fzago@cray.com>
Change-Id: Ia7f365f91aa2ce7a302e4f794706c978222317bb
Reviewed-on: http://review.whamcloud.com/11011
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
9 years agoLU-5290 clio: reorder initialization in cl_req_alloc() 09/11009/3
John L. Hammond [Tue, 8 Jul 2014 20:35:18 +0000 (15:35 -0500)]
LU-5290 clio: reorder initialization in cl_req_alloc()

In cl_req_alloc() ensure that the list heads crq_pages and crq_layers
have been initialized before passing the request to
cl_req_completion(). This fixes an oops in the error path.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I1f4ff994ca5db974e97b41452f7351f68ed350f8
Reviewed-on: http://review.whamcloud.com/11009
Tested-by: Jenkins
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5128 obdclass: fix a race in recovery 49/10849/3
Hongchao Zhang [Sat, 24 May 2014 08:46:07 +0000 (16:46 +0800)]
LU-5128 obdclass: fix a race in recovery

in "class_export_recovery_cleanup", the check of the flag
"exp->exp_req_replay_needed" should be protected by "exp_lock".

Change-Id: I9a1b0583cb15df896e4a608ee0e396bb90486888
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/10849
Tested-by: Jenkins
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5252 hsm: llapi_hsm_event_fd is local, so make it static. 08/10808/3
Frank Zago [Fri, 20 Jun 2014 17:01:01 +0000 (12:01 -0500)]
LU-5252 hsm: llapi_hsm_event_fd is local, so make it static.

Change-Id: I9905d0251702a11a9c2546ba4bd78fd00658d28a
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/10808
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5252 hsm: make path argument to fifo event a const 07/10807/5
Frank Zago [Fri, 20 Jun 2014 16:58:50 +0000 (11:58 -0500)]
LU-5252 hsm: make path argument to fifo event a const

Neither llapi_hsm_register_event_fifo() nor
llapi_hsm_unregister_event_fifo() take a const as their argument.
This leads to the following compilation warning when a caller is
using a const char *:

  ... warning: passing argument 1 of ‘llapi_hsm_register_event_fifo’
         discards ‘const’ qualifier from pointer target type
         [enabled by default]
   rc = llapi_hsm_register_event_fifo(lustre_fifo_event);
   ^
  ... note: expected ‘char *’ but argument is of type ‘const char *’
  extern int llapi_hsm_register_event_fifo(char *path);

Making path a const fixes this warning.

Change-Id: Ia2544cafefef8d5d1e4cf4cfc6408aac373c447b
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/10807
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5243 utils: use goto rather than GOTO() 91/10791/5
John L. Hammond [Mon, 23 Jun 2014 21:04:12 +0000 (16:04 -0500)]
LU-5243 utils: use goto rather than GOTO()

In lfs.c, liblustreapi.c, nidstrings.c and lustre_rsync.c use
return, assignments and goto statements rather than the GOTO()
and RETURN() macros.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I5e5b5e9e73baadacfbad06ed9eefa1e0d4b9e612
Reviewed-on: http://review.whamcloud.com/10791
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5031 tests: obdfilter-survey fixes 64/10264/3
Rahul Deshmukh [Thu, 8 May 2014 11:22:11 +0000 (16:52 +0530)]
LU-5031 tests: obdfilter-survey fixes

There are couple of problems in obdfilter-survey:
- Type of test brw i.e. "g" was not followed with npages,
- Target netdisk was not set properly and
- Turn ON async flag only for mode 3.
This patch fixed the above mention problems.

Signed-off-by: Rahul Deshmukh <rahul_deshmukh@xyratex.com>
Change-Id: I4360b52d1b8d828def6cf316abc09383fcaaaa94
Reviewed-on: http://review.whamcloud.com/10264
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Cliff White <cliff.white@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4755 ptlrpc: enlarge OST_MAXREQSIZE for 4MB RPC 99/9599/5
Li Xi [Wed, 12 Mar 2014 11:25:52 +0000 (19:25 +0800)]
LU-4755 ptlrpc: enlarge OST_MAXREQSIZE for 4MB RPC

This patch enlarges OST_MAXREQSIZE so as to make the
request size large enough for 4MB RPC.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I6195c05ced9e6c533c2ad88f21a941f1dddb53e6
Reviewed-on: http://review.whamcloud.com/9599
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>