Whamcloud - gitweb
fs/lustre-release.git
9 years agoLU-5512 lfsck: repair dangling name entry 30/11330/29
Fan Yong [Wed, 6 Aug 2014 07:02:54 +0000 (15:02 +0800)]
LU-5512 lfsck: repair dangling name entry

If the MDT-object referenced by the name entry is lost, then the
namespace LFSCK needs to repair the inconsistency as required:

1) Keep the inconsistency there and report the inconsistency case,
   then give the chance to the application to find related issues,
   and the users can make the decision about how to handle it with
   more human knownledge. (by default)

2) Re-create the missed MDT-object with the FID (in the name entry)

The LFSCK will allow the administrator to specify how to handle the
dangling name entry via a new option "-C" when trigger the LFSCK:

[-Coff] or [--create_mdtobj=off]:
Report the inconsistency via log, but keep the dangling name entry
there without repairing. (by default)

-C[on] or --create_mdtobj[=on]:
Create the lost MDT-object.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I78231914023b8d02daf4f6cde6176c1ef655f862
Reviewed-on: http://review.whamcloud.com/11330
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5511 lfsck: repair unmatched parent-child pairs 86/11486/22
Fan Yong [Mon, 4 Aug 2014 12:33:58 +0000 (20:33 +0800)]
LU-5511 lfsck: repair unmatched parent-child pairs

If the parent directry_A reference the child directory_B via the
name entry_C, but the child directory_B back references another
parent directory_D via its ".." name entry, then the namespace
LFSCK should can find out such inconsistency in the second-stage
scanning and repair it by trusting the name entry_B basically.

Usually, for local filesystem or Lustre backend system, such as
ldiskfs, the local filesystem consistency verification tools,
such as e2fsck can guarantee such consistency. So the namespace
LFSCK will mainly focus on the corss-MDTs parent-child pairs
consistency verification.

Lustre does not support hardlink on directory object. So if the
directory contains multiple linkEA entries or bad linkEA entry,
then the namespace LFSCK should can find out and repair related
inconsistency.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: If8cb02f76329fe04fe3a6c280e6926d014654322
Reviewed-on: http://review.whamcloud.com/11486
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4975 ofd: documenting ofd_io.c 56/11156/5
Mikhail Pershin [Mon, 21 Jul 2014 10:30:41 +0000 (14:30 +0400)]
LU-4975 ofd: documenting ofd_io.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_io.c file and add
function comment blocks to all functions in it.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: Ic45e8a53f6df127c815f332ef2f5e219506727aa
Reviewed-on: http://review.whamcloud.com/11156
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
9 years agoLU-4974 doc: comments to lod_qos.c 38/11138/5
Alex Zhuravlev [Fri, 18 Jul 2014 10:00:19 +0000 (14:00 +0400)]
LU-4974 doc: comments to lod_qos.c

The comments to the functions in doxygen style.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I2224170759b9bfb852b467c4950a6d0c73374d53
Reviewed-on: http://review.whamcloud.com/11138
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoNew tag 2.6.53 2.6.53 v2_6_53 v2_6_53_0
Oleg Drokin [Fri, 26 Sep 2014 23:20:03 +0000 (19:20 -0400)]
New tag 2.6.53

Change-Id: Ia13f23d3ffdafa88be9aab5642347ec370b470c8

9 years agoLU-5396 lnet/klnds: add sparse annotation __user wherever needed 24/11824/5
frank zago [Mon, 1 Sep 2014 15:39:14 +0000 (10:39 -0500)]
LU-5396 lnet/klnds: add sparse annotation __user wherever needed

This fixes sparse warnings such as:

  .../api-ni.c:1639:33: warning: incorrect type in argument 3
                             (different address spaces)
  .../api-ni.c:1639:33:    expected struct lnet_process_id_t
                             [noderef] [usertype] <asn:1>*ids
  .../api-ni.c:1639:33:    got struct lnet_process_id_t
                             [usertype] *<noident>

There is no code change.

Change-Id: I34620392863d622ea419e777f9e4110f26135853
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11824
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5396 obd: add sparse annotation __user wherever needed 21/11821/2
frank zago [Fri, 29 Aug 2014 23:49:15 +0000 (18:49 -0500)]
LU-5396 obd: add sparse annotation __user wherever needed

This fixes sparse warnings such as:

  .../api-ni.c:1639:33: warning: incorrect type in argument 3
                             (different address spaces)
  .../api-ni.c:1639:33:    expected struct lnet_process_id_t
                             [noderef] [usertype] <asn:1>*ids
  .../api-ni.c:1639:33:    got struct lnet_process_id_t
                             [usertype] *<noident>

There is no code change.

Change-Id: I9040163eedf5ee89be58d78aa7c8d374ed22b981
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11821
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5396 ioctl: add sparse annotation __user wherever needed 20/11820/2
frank zago [Fri, 29 Aug 2014 23:49:01 +0000 (18:49 -0500)]
LU-5396 ioctl: add sparse annotation __user wherever needed

This fixes sparse warnings such as:

  .../api-ni.c:1639:33: warning: incorrect type in argument 3
                             (different address spaces)
  .../api-ni.c:1639:33:    expected struct lnet_process_id_t
                             [noderef] [usertype] <asn:1>*ids
  .../api-ni.c:1639:33:    got struct lnet_process_id_t
                             [usertype] *<noident>

There is no code change.

Change-Id: I5dae6291e4d22353973088f440083b197010528b
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11820
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5396: ni: make local functions static 06/11306/4
Frank Zago [Thu, 31 Jul 2014 21:22:19 +0000 (16:22 -0500)]
LU-5396: ni: make local functions static

This reduces the code size by about 400 bytes.

Change-Id: I158c3b2c5c68f92938c29090faab1c0153d19e2e
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11306
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5647 kernel: kernel update RHEL7 [3.10.0-123.8.1.el7] 24/12024/2
Bob Glossman [Mon, 22 Sep 2014 22:43:31 +0000 (15:43 -0700)]
LU-5647 kernel: kernel update RHEL7 [3.10.0-123.8.1.el7]

Update RHEL7 kernel to 3.10.0-123.8.1.el7

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I0483fa61ff675158f6c367cb4845dd7480162bdf
Reviewed-on: http://review.whamcloud.com/12024
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5547 mdt: handle NULL parent in mdt_getattr_name_lock() 10/11610/2
John L. Hammond [Tue, 26 Aug 2014 22:11:22 +0000 (17:11 -0500)]
LU-5547 mdt: handle NULL parent in mdt_getattr_name_lock()

In mdt_getattr_name_lock() if the parent object (from mti_object) is
NULL then return -ENOENT rather than asserting.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I081cb54068bba7825e2a5593f293f48cb2eda874
Reviewed-on: http://review.whamcloud.com/11610
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5654 osd-ldiskfs: Handle holes in osd_ldiskfs_read() 35/12035/3
Li Wei [Wed, 24 Sep 2014 04:12:37 +0000 (12:12 +0800)]
LU-5654 osd-ldiskfs: Handle holes in osd_ldiskfs_read()

Current osd_ldiskfs_read() incorrectly returns zero and leaves the
corresponding portion of the buffer untouched when a block to be read
is not allocated.

Change-Id: Idfd441656b99aa039a6bb4f7141b5407553855da
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/12035
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4539 mdt: return errors from mdt_unpack_req_pack_rep() 50/11650/2
John L. Hammond [Fri, 29 Aug 2014 14:02:03 +0000 (09:02 -0500)]
LU-4539 mdt: return errors from mdt_unpack_req_pack_rep()

In mdt_intent_opc() if mdt_unpack_req_pack_rep() fails then return its
return value rather than -EPROTO. Also convert mdt_intent_opc()
to the usual error handling style.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I20189171a0d31b6264b680344a8290e604371fe4
Reviewed-on: http://review.whamcloud.com/11650
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5584 llite: call truncate_inode_page_final() in evict_inode 09/12009/3
Yang Sheng [Mon, 22 Sep 2014 18:12:11 +0000 (02:12 +0800)]
LU-5584 llite: call truncate_inode_page_final() in evict_inode

In evict_inode we should invoke truncate_inode_pages_final()
as inode will cleanup.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: Ifba1014cf997475a248bf3d0898ae373bd3a7f9c
Reviewed-on: http://review.whamcloud.com/12009
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4856 misc: Reduce exposure to overflow on page counters. 37/10537/8
Stephen Champion [Tue, 26 Aug 2014 12:12:40 +0000 (05:12 -0700)]
LU-4856 misc: Reduce exposure to overflow on page counters.

When the number of an object in use or circulation is tied to memory
size of the system, very large memory systems can overflow 32 bit
counters.  This patch addresses overflow on page counters in the osc LRU
and obd accounting.

Signed-off-by: Stephen Champion <schamp@sgi.com>
Change-Id: I8deff55d7cc9774722f3dc38a2c7b15877e698f0
Reviewed-on: http://review.whamcloud.com/10537
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3963 libcfs: remove proc handler wrappers 63/11963/3
James Simmons [Wed, 17 Sep 2014 21:50:16 +0000 (17:50 -0400)]
LU-3963 libcfs: remove proc handler wrappers

Libcfs has wrappers to handle other platforms proc
handling  which is no longer needed. This patch unwinds
those wrappers.

Change-Id: I529a5c3ac0fe6eed9e967782d9d24e40215d3840
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/11963
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: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5633 ptlrpc: hold rq_lock when modify rq_flags 57/11957/2
Niu Yawei [Wed, 17 Sep 2014 08:00:01 +0000 (04:00 -0400)]
LU-5633 ptlrpc: hold rq_lock when modify rq_flags

In after_reply(), take the rq_lock for changing the rq_resend.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Id2025f0d5c6e7b0991f9ced031433a4d69dd1a16
Reviewed-on: http://review.whamcloud.com/11957
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5577 lmv: change type of lmv_obd->tgts_size to __u32 81/11881/2
Dmitry Eremin [Thu, 11 Sep 2014 19:39:44 +0000 (23:39 +0400)]
LU-5577 lmv: change type of lmv_obd->tgts_size to __u32

tgts_size is used as unsigned.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ia910f034605a787b45539952a9d1f0c0d04e8891
Reviewed-on: http://review.whamcloud.com/11881
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5577 obd: change type of lmv_tgt_desc->ltd_idx to __u32 79/11879/3
Dmitry Eremin [Thu, 11 Sep 2014 19:03:38 +0000 (23:03 +0400)]
LU-5577 obd: change type of lmv_tgt_desc->ltd_idx to __u32

ltd_idx is used as unsigned.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Iae119e03b4cb58dddca2ce230d963d380255a57a
Reviewed-on: http://review.whamcloud.com/11879
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.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>
9 years agoLU-4665 tests: support specifying arbitrary OST indices 22/9722/8
Jian Yu [Sat, 20 Sep 2014 00:05:55 +0000 (20:05 -0400)]
LU-4665 tests: support specifying arbitrary OST indices

This patch improves Lustre test framework to support specifying
arbitrary OST indices via OST_INDEX_LIST or OSTINDEX${num}.

For example,

OSTINDEX1="1"
OSTINDEX2="2"
OSTINDEX3="4"
......
or
OST_INDEX_LIST="[1,2,4-6,8]" #[n-m,l-k,...], where n < m and l < k

The default index of an individual OST is its facet number minus 1.

Function facet_index() is added to get index for a facet.

Test-Parameters: alwaysuploadlogs \
envdefinitions=OST_INDEX_LIST=[0-5] ostcount=7 \
testlist=sanity,conf-sanity

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: Icf5d377d4d10995c2fb501bf7762ec8937466fdc
Reviewed-on: http://review.whamcloud.com/9722
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>
9 years agoLU-5040 osd: fix osd declare credit for quota 85/11085/16
Bobi Jam [Mon, 14 Jul 2014 05:51:05 +0000 (13:51 +0800)]
LU-5040 osd: fix osd declare credit for quota

osd_attr_set() always calls ll_vfs_dq_init() to initialize dquot for
the inode, while in some cases osd_declare_attr_set() does not reserve
credit for it.

This patch fixes this issue. This patch also corrects the quota credit
accounting in osd_declare_qid() by judging whether the inode's
i_dquot[quota_type] has been allocated, while old code judgement is
based on the file uid/gid existence, which is not correct.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I16555cb1097e1a3e75cdcb4852a2c5e1772ddd88
Reviewed-on: http://review.whamcloud.com/11085
Tested-by: Jenkins
Reviewed-by: Niu Yawei <yawei.niu@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-3536 osp: move update packing into out_lib.c 21/9321/23
Wang Di [Sat, 7 Jun 2014 19:57:47 +0000 (12:57 -0700)]
LU-3536 osp: move update packing into out_lib.c

Move osp_update_insert to out_lib.c, so OSP/LOD/OUT
can all pack update into OUT RPC.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: If087a0bc6a858e9e6c128311ed0d80e4392ffaff
Reviewed-on: http://review.whamcloud.com/9321
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5468 llite: don't call make_bad_inode() on an old inode 09/11609/2
John L. Hammond [Tue, 26 Aug 2014 21:36:03 +0000 (16:36 -0500)]
LU-5468 llite: don't call make_bad_inode() on an old inode

In ll_iget() if ll_update_inode() fails then do not call
make_bad_inode() on the inode since it may still be in use.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I10bb0ad606fad2eff6f6cf5cc7da157e9db59c94
Reviewed-on: http://review.whamcloud.com/11609
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5639 lnet: portal spreading rotor should be unsigned 36/11936/3
Liang Zhen [Tue, 16 Sep 2014 03:49:40 +0000 (11:49 +0800)]
LU-5639 lnet: portal spreading rotor should be unsigned

Portal spreading rotor should be unsigned, otherwise lnet may get
negative CPT number and access invalid addresses.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Change-Id: Id7f40da241af3b01483fdedd366b09329f530163
Reviewed-on: http://review.whamcloud.com/11936
Reviewed-by: Amir Shehata <amir.shehata@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Tested-by: Jenkins
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4788 lfsck: enable verification for remote object 17/11317/25
Fan Yong [Fri, 1 Aug 2014 01:00:31 +0000 (09:00 +0800)]
LU-4788 lfsck: enable verification for remote object

Based on the LFSCK 1.5 framework, enable the namespace LFSCK
scanning for remote object.

During the first-stage scanning, if the object contains remote
linkEA entry or multiple linkEA entries or claims as multiple
linked, then it will be recorded in the namespace LFSCK tracing
file for double scanning.

Some cleanup for the namespace LFSCK tracing file (lfsck_namespace)
and other code cleanup.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ibc87ae9a5c6b7f67a9215140cf2cb89640bce0a9
Reviewed-on: http://review.whamcloud.com/11317
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5506 lfsck: skip orphan OST-object handling for failed OSTs 96/10996/21
Fan Yong [Tue, 29 Jul 2014 10:32:07 +0000 (18:32 +0800)]
LU-5506 lfsck: skip orphan OST-object handling for failed OSTs

The layout LFSCK will record the failed OSTs in the LFSCK tracing
file (lfsck_layout) during the first-stage scanning, then when moves
to the second-stage scanning, the layout LFSCK will know which OSTs
contain the OST-objects that have not been verified or failed to be
verified during the first-stage scanning. Then the layout LFSCK will
skip the orphan OST-objects handling on those OSTs. But other OSTs
can be handled as normal case without affected by the failed OSTs.

This patch also builds the framework of recording failed MDTs for
namespace LFSCK

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I4d7a9fc2e22cb8c6ef1c4cf73383ec588c95da53
Reviewed-on: http://review.whamcloud.com/10996
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.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>
9 years agoLU-4788 lfsck: namespace LFSCK uses assistant thread 03/10603/24
Fan Yong [Tue, 29 Jul 2014 19:02:18 +0000 (03:02 +0800)]
LU-4788 lfsck: namespace LFSCK uses assistant thread

Move the lfsck assistant thread from layout.c to engine.c, and
make it to be shared by both layout LFSCK and namespace LFSCK.

With using assistant thread, the namespace LFSCK can make the
async pipeline for scanning the directory as the layout LFSCK
does for scanning the stripes, then the LFSCK main engine will
not be blocked by cross-MDT verification.

The namesapce LFSCK assistant thread is necessary, because both
the layout LFSCK and the namespace LFSCK are driven by the same
LFSCK main engine. If the LFSCK main engine is blocked because
of namespace handling, then the layout LFSCK will also be blocked.
Currently, the LFSCK main engine and the layout LFSCK assistant
thread has composed a async pipeline, then the LFSCK main engine
will not be blocked by layout related remote operations. So it is
necessary to make another pipeline for namespace related handling
to avoid the LFSCK main engine to be blocked for namespace related
remote operations.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I99e18ab1d85ad4d74b16b2387767422907781d5e
Reviewed-on: http://review.whamcloud.com/10603
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3331 llite: remove llite proc root on init failure 20/6420/6
John L. Hammond [Wed, 17 Sep 2014 22:00:21 +0000 (18:00 -0400)]
LU-3331 llite: remove llite proc root on init failure

In init_lustre_lite() ensure that /proc/fs/lustre/llite is removed in
case of failure. Generally rework the cleanup code in this function.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I95844622dd39d2529d227b99fffbc938fd17910a
Reviewed-on: http://review.whamcloud.com/6420
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-5522 ldlm: remove expired lock from per-export list 34/11634/2
Johann Lombardi [Thu, 28 Aug 2014 12:42:56 +0000 (14:42 +0200)]
LU-5522 ldlm: remove expired lock from per-export list

Expired locks processed by the ldlm_elt thread might still be
referenced in the per-export BL AST list. Most of the time, it
has not impact except when a request for this export is still
being processed for this export and might scan the per-export
BL AST list.

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: I23745770983507ffd986de9ba056a03b11199a78
Reviewed-on: http://review.whamcloud.com/11634
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2675 obd: rename LUSTRE_STRIPE_MAXBYTES 00/11800/2
John L. Hammond [Mon, 8 Sep 2014 14:01:14 +0000 (09:01 -0500)]
LU-2675 obd: rename LUSTRE_STRIPE_MAXBYTES

Rename LUSTRE_STRIPE_MAXBYTES to LUSTRE_EXT3_STRIPE_MAXBYTES and
correct the comment describing its use.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I320c86b3f90e8b0c12fd91d6ca95684fb84fe36c
Reviewed-on: http://review.whamcloud.com/11800
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
9 years agoLU-2675 lustre: remove linux/lustre_log.h 02/11502/2
John L. Hammond [Mon, 18 Aug 2014 18:28:48 +0000 (13:28 -0500)]
LU-2675 lustre: remove linux/lustre_log.h

Remove lustre/include/linux/lustre_log.h.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ibc4d042df9d95301b8d2a8e3df39d7075752ab9d
Reviewed-on: http://review.whamcloud.com/11502
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
9 years agoLU-2675 lustre: remove lustre_lite.h 01/11501/3
John L. Hammond [Mon, 18 Aug 2014 18:24:00 +0000 (13:24 -0500)]
LU-2675 lustre: remove lustre_lite.h

Remove the unused struct lustre_rw_params and the unused function
lustre_build_lock_params(). Move several definition only used in
lustre/llite/ to lustre/llite/llite_internal.h. Remove
lustre/include/{,linux/}lustre_lite.h and fixup the missing includes
in other headers that this exposes.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Iac27e0e50407e39122b121d6040244a5fe1b9f15
Reviewed-on: http://review.whamcloud.com/11501
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-5416 ofd: improve error handling in ofd_precreate_objects() 70/11370/2
John L. Hammond [Thu, 7 Aug 2014 19:37:17 +0000 (14:37 -0500)]
LU-5416 ofd: improve error handling in ofd_precreate_objects()

In ofd_precreate_objects() fix two invalid assertions triggered by
errors in the first iterations of the declare loop and the create
loop.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I8bee1528dc58d5b8b35ac89056c667370cc347c5
Reviewed-on: http://review.whamcloud.com/11370
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4974 doc: comments to the functions in lod_dev.c 15/11115/5
Alex Zhuravlev [Wed, 16 Jul 2014 10:52:47 +0000 (14:52 +0400)]
LU-4974 doc: comments to the functions in lod_dev.c

Comments to lod_dev using doxygen markup.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: Richard Henwood <richard.henwood@intel.com>
Change-Id: I60cbb7ac3d8edb225c75ac4c7fe93fb17a87994c
Reviewed-on: http://review.whamcloud.com/11115
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-4975 ofd: documenting ofd_obd.c 58/10658/7
Mikhail Pershin [Tue, 10 Jun 2014 05:35:24 +0000 (09:35 +0400)]
LU-4975 ofd: documenting ofd_obd.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_obd.c file and add
function comment blocks to all functions in it.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I3a4e48ffbc6dffac6647e357f16e3aac2902fd23
Reviewed-on: http://review.whamcloud.com/10658
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-4975 ofd: documenting ofd_dev.c 39/10639/6
Mikhail Pershin [Wed, 28 May 2014 08:55:48 +0000 (12:55 +0400)]
LU-4975 ofd: documenting ofd_dev.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_dev.c file and add
function comment blocks to all functions in it.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I8ed91764cff36f51eae78a025efbc34a61fd825c
Reviewed-on: http://review.whamcloud.com/10639
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-4974 doc: comments to lod_lov.c 31/10431/7
Alex Zhuravlev [Fri, 23 May 2014 09:05:17 +0000 (13:05 +0400)]
LU-4974 doc: comments to lod_lov.c

and fix up GPL header block to reference proper GPLv2 license URL.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: I6d087980cf80b418cd92974cd9eab7a55bda6c80
Reviewed-on: http://review.whamcloud.com/10431
Tested-by: Jenkins
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-4416 tests: small fixes for conf_sanity 83/10783/8
Yang Sheng [Thu, 18 Sep 2014 16:11:18 +0000 (12:11 -0400)]
LU-4416 tests: small fixes for conf_sanity

--In util-linux 2.23.2, umount will call stat() on
  mountpoint. So have to use 'umount -f' in test_5a.
  Else the test will block forever.
--Invoke cleanup_fs2 in test_24b.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: Ie7540d6cfd6790417c63ea1efb50381cacc8345f
Reviewed-on: http://review.whamcloud.com/10783
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5607 ptlrpc: restore posix_acl_xattr checks 33/11933/2
John L. Hammond [Mon, 15 Sep 2014 23:49:57 +0000 (18:49 -0500)]
LU-5607 ptlrpc: restore posix_acl_xattr checks

Restore the wiretest checks on posix_acl_xattr_entry and
posix_acl_xattr_header.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I3935ac2f8b7e894896949ff8a5c44fe6f78e1cae
Reviewed-on: http://review.whamcloud.com/11933
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
9 years agoLU-4749 mgs: Recognize colons in failover.node values 56/11956/3
Li Wei [Wed, 17 Sep 2014 05:55:33 +0000 (13:55 +0800)]
LU-4749 mgs: Recognize colons in failover.node values

Current mgs assumes that all the NIDs in a single failover.node
parameter belong to one node.  This is not the case, even prior to
http://review.whamcloud.com/11161, because mkfs.lustre options like

  --servicenode=<nid1>,<nid2>:<nid3>,<nid4>

are allowed.

Change-Id: If3e2ebc0e81093e9c8304e496afdca24edf456ef
Signed-off-by: Li Wei <wei.g.li@intel.com>
Reviewed-on: http://review.whamcloud.com/11956
Tested-by: Jenkins
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
9 years agoLU-5396 mdc: add sparse annotation __user wherever needed 22/11822/3
frank zago [Fri, 29 Aug 2014 23:50:31 +0000 (18:50 -0500)]
LU-5396 mdc: add sparse annotation __user wherever needed

This fixes sparse warnings such as:

  .../api-ni.c:1639:33: warning: incorrect type in argument 3
                             (different address spaces)
  .../api-ni.c:1639:33:    expected struct lnet_process_id_t
                             [noderef] [usertype] <asn:1>*ids
  .../api-ni.c:1639:33:    got struct lnet_process_id_t
                             [usertype] *<noident>

There is no code change.

Change-Id: Ie3acf675d284a595d4aa871b522a0c409973da18
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11822
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.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-5396 llite: add sparse annotation __user wherever needed 18/11818/3
Frank Zago [Wed, 23 Jul 2014 21:30:22 +0000 (16:30 -0500)]
LU-5396 llite: add sparse annotation __user wherever needed

This fixes sparse warnings such as:

  .../api-ni.c:1639:33: warning: incorrect type in argument 3
                             (different address spaces)
  .../api-ni.c:1639:33:    expected struct lnet_process_id_t
                             [noderef] [usertype] <asn:1>*ids
  .../api-ni.c:1639:33:    got struct lnet_process_id_t
                             [usertype] *<noident>

There is no code change.

Change-Id: Ia56bf32ab880c34f8a121f7ba3a7cce546308448
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11818
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.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-5531 osc: Debug to match extent to brw RPC 48/11548/3
Patrick Farrell [Thu, 21 Aug 2014 20:59:23 +0000 (15:59 -0500)]
LU-5531 osc: Debug to match extent to brw RPC

Currently, it's difficult to match brw RPCs to objects and
extents from client logs.  This patch adds a D_RPCTRACE
debug message giving the necessary information.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: Ic3470a805f00b5d9c0f6f72470d3f3eb48a10b7a
Reviewed-on: http://review.whamcloud.com/11548
Tested-by: Jenkins
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@seagate.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Ann Koehler <amk@cray.com>
Reviewed-by: Ryan Haasken <haasken@cray.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5631 obdclass: Proper swabbing of llog_rec_tail. 37/11937/2
Henri Doreau [Tue, 16 Sep 2014 10:34:07 +0000 (12:34 +0200)]
LU-5631 obdclass: Proper swabbing of llog_rec_tail.

A variable-length structure preceeds llog_rec_tail within an llog
block. Thus cr_tail shouldn't be accessed directly as a structure
member but its actual location should be computed dynamically.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: I2d244797d107cf52f647e19b2db780138e910925
Reviewed-on: http://review.whamcloud.com/11937
Tested-by: Jenkins
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3331 obdclass: return errors from class_procfs_init() 35/11935/2
John L. Hammond [Tue, 16 Sep 2014 00:02:49 +0000 (19:02 -0500)]
LU-3331 obdclass: return errors from class_procfs_init()

In class_procfs_init() if /proc/fs/lustre/ or /proc/fs/lustre/devices
cannot be created then cleanup and return an error.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I236a4af31c44b73207d411c02873c10ee7478ca7
Reviewed-on: http://review.whamcloud.com/11935
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-2456 lnet: DLC user/kernel space glue code 23/8023/48
Amir Shehata [Fri, 18 Oct 2013 02:24:02 +0000 (19:24 -0700)]
LU-2456 lnet: DLC user/kernel space glue code

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

This patch enables the user space to call into the kernel space
DLC code.  Added handlers in the LNetCtl function to call
the new functions added for Dynamic Lnet Configuration

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: I19af05abaee827ce8ce7be38ffb2f80611a9f0ca
Reviewed-on: http://review.whamcloud.com/8023
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5104 build: utilities cleanup 54/10654/19
Dmitry Eremin [Fri, 30 May 2014 14:38:24 +0000 (18:38 +0400)]
LU-5104 build: utilities cleanup

- remove unused utilities: lustre_createcsv, lustre_config, lustre_up14
- move req_layout, loadgen, wirecheck and wiretest to tests RPM
- add dependency tests from utils (multiop from liblustreapi)
- make corrent mapping for configure parameters
  "--enable-*/--disable-*" to "--with/--without *"
- fix find command for empty results
- fix utils building (add ifdef UTILS and fix .spec file)
- don't install few server scripts and utils for client build

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I947ea4739526f74a18427dd853c4198871dd0e21
Reviewed-on: http://review.whamcloud.com/10654
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5396 lov: add sparse annotation __user wherever needed 23/11823/2
frank zago [Mon, 1 Sep 2014 01:16:09 +0000 (20:16 -0500)]
LU-5396 lov: add sparse annotation __user wherever needed

This fixes sparse warnings such as:

  .../api-ni.c:1639:33: warning: incorrect type in argument 3
                             (different address spaces)
  .../api-ni.c:1639:33:    expected struct lnet_process_id_t
                             [noderef] [usertype] <asn:1>*ids
  .../api-ni.c:1639:33:    got struct lnet_process_id_t
                             [usertype] *<noident>

There is no code change.

Change-Id: I67c89e141a30d175091673034d48c1aa75148891
Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11823
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: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3963 libcfs: remove last of cfs list wrappers 97/11797/2
James Simmons [Sun, 7 Sep 2014 15:19:24 +0000 (11:19 -0400)]
LU-3963 libcfs: remove last of cfs list wrappers

Delete the cfs wrappers for linux list and hlist api.
Removal of these wrappers exposed last remaining
unconverted list operators.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: If72e68e93663174c5c3540e2444cc50d37d04a48
Reviewed-on: http://review.whamcloud.com/11797
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5588 mdt: fix NULL pointer 'obd' can be dereferenced 68/11768/2
Dmitry Eremin [Fri, 5 Sep 2014 12:59:03 +0000 (16:59 +0400)]
LU-5588 mdt: fix NULL pointer 'obd' can be dereferenced

Pointer 'obd' checked for NULL at line 3992 will be dereferenced
at line 4040. Pointer 'obd' checked for NULL at line 4120 will be
dereferenced at line 4170.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I1478cb67f3b17646e631ab38b4a9bbadf82fac31
Reviewed-on: http://review.whamcloud.com/11768
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-5556 target: limit bulk transfer time 17/11717/5
Johann Lombardi [Mon, 1 Sep 2014 13:03:51 +0000 (15:03 +0200)]
LU-5556 target: limit bulk transfer time

Messages lost during bulk transfer are not resent, so there is no
point in waiting for a very long time (up to at_max/600s has been
seen). This patch adds a new static timeout for the bulk transfer
(100s by default).

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: I3926a7a8f2bce4cbd00b8fe54094a8e9cbec1508
Reviewed-on: http://review.whamcloud.com/11717
Tested-by: Jenkins
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
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-5521 grant: quiet message on grant waiting timeout 16/11716/3
Johann Lombardi [Mon, 1 Sep 2014 10:38:31 +0000 (12:38 +0200)]
LU-5521 grant: quiet message on grant waiting timeout

Use at_max in osc_enter_cache() to bound how long we wait for grant
space before switching to synchronous I/Os. Do not print a message
on the console when the timeout is hit since such long wait can
be legitimate with flaky network (i.e. BRW is resent multiple times).

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: I9c507a11ea4a3612e932e22bebb5087dbdcf248a
Reviewed-on: http://review.whamcloud.com/11716
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2675 lustre: remove linux/lustre_lib.h 00/11500/2
John L. Hammond [Mon, 18 Aug 2014 17:58:29 +0000 (12:58 -0500)]
LU-2675 lustre: remove linux/lustre_lib.h

Remove lustre/include/linux/lustre_lib.h. Remove some unused
declarations from lustre/include/lustre_lib.h and move some others to
more natural headers.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I30b032e5e766cc052dbf6af34eb2e5d3f1af589e
Reviewed-on: http://review.whamcloud.com/11500
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5453 mdt: mdt_reint_setattr() and mdt_attr_set() fixes 53/11353/4
John L. Hammond [Wed, 6 Aug 2014 19:38:55 +0000 (14:38 -0500)]
LU-5453 mdt: mdt_reint_setattr() and mdt_attr_set() fixes

In mdt_reint_setattr() add early checks that the object exists and is
local. Remove the invalid assertion in mdt_attr_set() that the object
is local. Replace several assertions on wire data with -EPROTO
returns. In mdt_attr_set() when locking the slaves of a striped
directory use a PW lock for slave 0. Remove the unused flags parameter
of mdt_attr_set().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I2aa5a645b8398c1e2890291cb61ffa280ec82443
Reviewed-on: http://review.whamcloud.com/11353
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2675 llite: remove generic operations from llite/namei.c 69/10769/6
John L. Hammond [Fri, 20 Jun 2014 17:32:19 +0000 (12:32 -0500)]
LU-2675 llite: remove generic operations from llite/namei.c

Remove the llite inode operation wrappers ll_mknod(), ll_unlink(),
ll_mkdir(), ll_rmdir(), ll_symlink(), ll_link(), and ll_rename(),
replacing them with calls to ll_mknod_generic(), but rename these
functions to drop the _generic suffix. Remove several variables that
are always NULL after this transformation. Simplify some control flow,
using the knowledge that certain variables are never NULL. Replace
calls to ll_d_mountpoint() with equivalent calls to d_mountpoint() and
remove the then unused function ll_d_mountpoint(). Remove the
effectively unused lookup_flags parameter from ll_create_it().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ib1757399c66a119e842d3361f184128ce2b96a78
Reviewed-on: http://review.whamcloud.com/10769
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4788 lfsck: verify .lustre/lost+found at the LFSCK start 87/10987/18
Fan Yong [Sat, 26 Jul 2014 23:49:29 +0000 (07:49 +0800)]
LU-4788 lfsck: verify .lustre/lost+found at the LFSCK start

/ROOT/.lustre/lost+found/ is a special directory to hold the
objects that the LFSCK does not exactly know how to handle,
such as orphans. So before the LFSCK scanning the system,
the consistency of such directory needs to be verified firstly
to allow the users it during the LFSCK.

fid_seq_is_dot_lustre() is a duplication of fid_seq_is_dot(),
drop it and cleanup the code.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I95cac84bed1ae16c8c86e495db0120d964395b5e
Reviewed-on: http://review.whamcloud.com/10987
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5509 osd: get PFID from linkEA for remote dir on ldiskfs 85/11485/12
Fan Yong [Sat, 26 Jul 2014 22:20:22 +0000 (06:20 +0800)]
LU-5509 osd: get PFID from linkEA for remote dir on ldiskfs

On the ldiskfs backend, for a directory which parent resides on
remote MDT, to satisfy the local e2fsck, we insert it into the
/REMOTE_PARENT_DIR locally. On the other hand, to make the lookup(..)
on the directory can return the real parent FID, we append the real
parent FID after its ".." name entry in the /REMOTE_PARENT_DIR.

Unfortunately, such PFID-in-dirent cannot be preserved via file-level
backup. So after the restore, we cannot get the right parent FID from
its ".." name entry in the /REMOTE_PARENT_DIR. Under such case, since
we have stored the real parent FID in the directory object's linkEA,
we can parse the linkEA for the real parent FID.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Icf1e24ec911818b3a49a253f67c72334a4b75712
Reviewed-on: http://review.whamcloud.com/11485
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5508 osp: RPC adjustment for remote transaction 82/11382/12
Fan Yong [Sat, 26 Jul 2014 22:15:42 +0000 (06:15 +0800)]
LU-5508 osp: RPC adjustment for remote transaction

1) For remote transaction, the set_attr/set_xattr RPC should not be
   prepared in declare phase. According to our current transaction/
   dt_object_lock framework, the transaction sponsor will start the
   transaction firstly, then try to acquire related dt_object_lock
   if needed. That is a general rule, and the LFSCK needs to follow
   such rule when repair inconsistent linkEA, in spite of local or
   remote MDT-object.

   For linkEA repairing case, before the LFSCK thread obtained the
   dt_object_lock on the target MDT-object, it cannot know whether
   the MDT-object has linkEA or not, neither invalid or not.

   Since the LFSCK cannot hold dt_object_lock before the (remote)
   transaction start (otherwise there will be potential deadlock),
   it cannot prepare related RPC for repairing during the declare
   phase as other normal transactions do.

   To resolve the trouble, we will make OSP to prepare related RPC
   (set_attr/set_xattr/del_xattr) after remote transaction started,
   and trigger the remote updating (RPC sending) when trans_stop.
   Then the up layer users, such as LFSCK, can follow the general
   rule to handle trans_start/dt_object_lock for repairing linkEA
   inconsistency without distinguishing remote MDT-object.

2) Some adjustment for OSP object attributes cache maintainig to make
   the logic more clear and reasonable.
2.1) Update the cached attribute in osp_attr_set(), but not in the
     osp_declare_attr_set().
2.2) Update the cached extended attribute in osp_xattr_set(), but not
     in the osp_declare_xattr_set().
2.3) Drop the cached extended attribute in osp_xattr_del().

3) Typo fixing and code cleanup.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I43c88a8fd3b184c91a4b3cbd4104e35f9915ee24
Reviewed-on: http://review.whamcloud.com/11382
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5610 tests: Handle quoted module options 87/11887/3
Stephen Champion [Fri, 12 Sep 2014 00:03:01 +0000 (17:03 -0700)]
LU-5610 tests: Handle quoted module options

When test-framework.sh translates module options to environment
variables for remote nodes, quotes sould be escaped to the subshell.

Signed-off-by: Stephen Champion <schamp@sgi.com>
Change-Id: I937cc28b96b54ea75082c7d8789c762b4db16c5f
Reviewed-on: http://review.whamcloud.com/11887
Tested-by: Jenkins
Reviewed-by: Jian Yu <jian.yu@intel.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-5596 lnet: Remove obsolete LNET variable 25/11825/3
James Nunez [Mon, 8 Sep 2014 23:08:14 +0000 (17:08 -0600)]
LU-5596 lnet: Remove obsolete LNET variable

For Lustre version 2.6.50 and later, the variable
session_features is defined as "LST_FEATS_MASK". For
earlier versions of Lustre, the same variable is defined
as "LST_FEATS_EMPTY.

Since Lustre master is at 2.6.52 or later, the second
definition of "session_features" can be removed.

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I52e7a914880509cfcd4961032ab7775bbaf626a8
Reviewed-on: http://review.whamcloud.com/11825
Tested-by: Jenkins
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4746 libcfs: Use Linux kernel current_umask() function 42/11642/2
James Simmons [Thu, 28 Aug 2014 18:58:50 +0000 (14:58 -0400)]
LU-4746 libcfs: Use Linux kernel current_umask() function

Lustre not using kernel current_umask() function breaks GRSecurity
umask handling. This is also needed for the linux api cleanup.

Replaces current->fs->umask with more secure current_umask() function

Change-Id: Ide0b83eb3e6c69e1e2178ede37ce708227f1c107
Signed-off-by: Andrew Prout <ajprout@hotmail.com>
Signed-off-by: Cliff White <cliffwhi@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/11642
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
9 years agoLU-5499 tests: keep /sbin/mount.lustre until cleanup 59/11259/7
Andreas Dilger [Wed, 28 May 2014 23:15:25 +0000 (17:15 -0600)]
LU-5499 tests: keep /sbin/mount.lustre until cleanup

Don't unmount /sbin/mount.lustre in the middle of running tests
on a local test system if it is not doing final cleanup.  Otherwise,
later mounts may fail.

The current /sbin/mount.lustre mountpoint is an empty stub that
returns success (0) if executed, but doesn't mount the filesystem.
Instead, create a mountpoint that prints an message if executed and
returns an error to the caller, so it is easier to debug problems.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ied7b69f536bad87333cf5c543384723412500c1e
Reviewed-on: http://review.whamcloud.com/11259
Reviewed-by: frank zago <fzago@cray.com>
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-1669 vvp: Use lockless __generic_file_aio_write 72/6672/12
Prakash Surya [Thu, 3 Oct 2013 00:16:51 +0000 (17:16 -0700)]
LU-1669 vvp: Use lockless __generic_file_aio_write

Testing multi-threaded single shard file write performance has shown
the inode mutex to be a limiting factor when using the
generic_file_aio_write function. To work around this bottle neck, this
change replaces the locked version of that call with the lock less
version, specifically, __generic_file_aio_write.

In order to maintain posix consistency, Lustre must now employ it's
own locking mechanism in the higher layers. Currently writes are
protected using the lli_write_mutex in the ll_inode_info structure.
To protect against simultaneous write and truncate operations, since
we no longer take the inode mutex during writes, we must down the
lli_trunc_sem semaphore.

Unfortunately, this change by itself does not garner any performance
benefits. Using FIO on a single machine with 32 GB of RAM, write
performance tests were ran with and without this change applied; the
results are below:

    +---------+-----------+---------+--------+--------+
    |     fio v2.0.13     |   Write Bandwidth (KB/s)  |
    +---------+-----------+---------+--------+--------+
    | # Tasks | GB / Task | Test 1  | Test 2 | Test 3 |
    +---------+-----------+---------+--------+--------+
    |    1    |    64     |  452446 | 454623 | 457653 |
    |    2    |    32     |  850318 | 565373 | 602498 |
    |    4    |    16     | 1058900 | 463546 | 529107 |
    |    8    |     8     | 1026300 | 468190 | 576451 |
    |   16    |     4     | 1065500 | 503160 | 462902 |
    |   32    |     2     | 1068600 | 462228 | 466963 |
    |   64    |     1     |  991830 | 556618 | 557863 |
    +---------+-----------+---------+--------+--------+

 * Test 1: Lustre client running 04ec54f. File per process write
           workload. This test was used as a baseline for what we
           _could_ achieve in the single shared file tests if the
           bottle necks were removed.

 * Test 2: Lustre client running 04ec54f. Single shared file
           workload, each task writing to a unique region.

 * Test 3: Lustre client running 04ec54f + this patch. Single shared
           file workload, each task writing to a unique region.

In order to garner any real performance benefits out of a single
shared file workload, the lli_write_mutex needs to be broken up into a
range lock. That would allow write operations to unique regions of a
file to be executed concurrently. This work is left to be done in a
follow up patch.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: I0023132b5d941b3304f39f015f95106542998072
Reviewed-on: http://review.whamcloud.com/6672
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.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>
9 years agoLU-1669 llite: Replace write mutex with range lock 20/6320/20
Prakash Surya [Wed, 19 Jun 2013 17:30:36 +0000 (10:30 -0700)]
LU-1669 llite: Replace write mutex with range lock

Testing has shown the ll_inode_inode's lli_write_mutex to be a
limiting factor with single shared file write performance, when using
many writing threads on a single machine. Even if each thread is
writing to a unique portion of the file, the lli_write_mutex will
prevent no more than a single thread to ever write to the file
simultaneously.

This change attempts to remove this bottle neck, by replacing this
mutex with a range lock. This should allow multiple threads to write
to a single file simultaneously iff the threads are writing to unique
regions of the file.

Performance testing shows this change to garner a significant
performance boost to write bandwidth. Using FIO on a single machine
with 32 GB of RAM, write performance tests were run with and without
this change applied; the results are below:

    +---------+-----------+---------+--------+--------+--------+
    |     fio v2.0.13     |        Write Bandwidth (KB/s)      |
    +---------+-----------+---------+--------+--------+--------+
    | # Tasks | GB / Task | Test 1  | Test 2 | Test 3 | Test 4 |
    +---------+-----------+---------+--------+--------+--------+
    |    1    |    64     |  452446 | 454623 | 457653 | 463737 |
    |    2    |    32     |  850318 | 565373 | 602498 | 733027 |
    |    4    |    16     | 1058900 | 463546 | 529107 | 976284 |
    |    8    |     8     | 1026300 | 468190 | 576451 | 963404 |
    |   16    |     4     | 1065500 | 503160 | 462902 | 830065 |
    |   32    |     2     | 1068600 | 462228 | 466963 | 749733 |
    |   64    |     1     |  991830 | 556618 | 557863 | 710912 |
    +---------+-----------+---------+--------+--------+--------+

 * Test 1: Lustre client running 04ec54f. File per process write
           workload. This test was used as a baseline for what we
           _could_ achieve in the single shared file tests if the
           bottle necks were removed.

 * Test 2: Lustre client running 04ec54f. Single shared file
           workload, each task writing to a unique region.

 * Test 3: Lustre client running 04ec54f + I0023132b. Single shared
           file workload, each task writing to a unique region.

 * Test 4: Lustre client running 04ec54f + this patch.
           Single shared file workload, each task writing to a unique
           region.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: I71e060c190065d87a20dc8df3104f898883d0583
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/6320
Tested-by: Jenkins
Reviewed-by: Hiroya Nozaki <nozaki.hiroya@jp.fujitsu.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoRevert "LU-5261 osc: use wait_for_completion_killable() instead" 92/11892/2
Oleg Drokin [Fri, 12 Sep 2014 16:17:31 +0000 (16:17 +0000)]
Revert "LU-5261 osc: use wait_for_completion_killable() instead"

This is causing LU-5446

This reverts commit 2b3663dda896f669c87feb49e7f3c7d85a89cefe.

Change-Id: I8bd254137ad0d402bad5f5aac85aa52cd3d47f63
Reviewed-on: http://review.whamcloud.com/11892
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5600 kernel: kernel update RHEL6.5 [2.6.32-431.29.2.el6] 37/11837/2
Bob Glossman [Tue, 9 Sep 2014 19:59:10 +0000 (12:59 -0700)]
LU-5600 kernel: kernel update RHEL6.5 [2.6.32-431.29.2.el6]

Update RHEL6.5 kernel to 2.6.32-431.29.2.el6

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I4832cf12cb49eebd1c81fc4e07a53d0a1315500d
Reviewed-on: http://review.whamcloud.com/11837
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5520 ldlm: resend AST callbacks 35/9335/7
Vitaly Fertman [Sat, 21 Jun 2014 22:02:37 +0000 (02:02 +0400)]
LU-5520 ldlm: resend AST callbacks

While clients will resend client->server RPCs, servers would not
resend server->client RPCs such as LDLM callbacks (blocking
or completion callbacks/ASTs).  This could result in clients being
evicted from the server if blocking callbacks were dropped by the
network (a failed router or lossy network) and the client did not
cancel the requested lock in time.
In order to fix this problem, this patch adds the ability to resend
LDLM callbacks from the server and give the client a chance to
respond within the timeout period before it is evicted:

- resend BL AST within lock callback timeout period;
- still do not resend CANCEL_ON_BLOCK;
- regular resend for CP AST without BL AST embedded;
- prolong lock callback timeout on resend;

some fixes:
- recovery-small test_10 to actually evict the client
  with dropped BL AST;
- ETIMEDOUT to be returned if send limit is expired;

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Change-Id: Ie65fac94ea68defffd1769cbbb0f74381c11262c
Tested-by: Elena Gryaznova <Elena_Gryaznova@xyratex.com>
Reviewed-by: Alexey Lyashkov <Alexey_Lyashkov@xyratex.com>
Reviewed-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Xyratex-bug-id: MRP-417
Reviewed-on: http://review.whamcloud.com/9335
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5496 ldlm: reconstruct proper flags on enqueue resend 44/11644/2
Vitaly Fertman [Thu, 28 Aug 2014 22:33:54 +0000 (02:33 +0400)]
LU-5496 ldlm: reconstruct proper flags on enqueue resend

otherwise, waiting lock may get granted as no BLOCKED_GRANTED
flag is returned

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Xyratex-bug-id: MRP-1944
Change-Id: I5e938ff0454d5e8694b09f9fff3c1f82d746360d
Reviewed-on: http://review.whamcloud.com/11644
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-5592 ofd: fix incorrect check for NULL 73/11773/2
Dmitry Eremin [Fri, 5 Sep 2014 14:36:31 +0000 (18:36 +0400)]
LU-5592 ofd: fix incorrect check for NULL

Fix incorrect check for NULL in ofd_version_get_check()

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ia671f86ab051eafa5336ba18f0378cdac846f0c5
Reviewed-on: http://review.whamcloud.com/11773
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3192 osc: split different type of IO 30/10930/4
Alexander.Boyko [Tue, 1 Jul 2014 19:17:28 +0000 (23:17 +0400)]
LU-3192 osc: split different type of IO

Do not allow different type of pages at the same rpc.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Xyratex-bug-id: MRP-859
Change-Id: Ic595a29f685757faf4d9c3de9c2d2ae8fd039baf
Reviewed-on: http://review.whamcloud.com/10930
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4416 osd-ldiskfs: limit trans size to match reservations 76/10376/12
Jeff Mahoney [Wed, 3 Sep 2014 13:37:36 +0000 (09:37 -0400)]
LU-4416 osd-ldiskfs: limit trans size to match reservations

Linux commit 8f7d89f36 (jbd2: transaction reservation support)
shrunk the limit of a transaction size to be
j_max_transaction_buffers / 2 to accomodate the reservations.
This can have a perforamce impact so we limit this change to
3.10+ kernels. The same commit that changed this is the same
one that changed the number of arguments to ext4_journal_start
function so we use that test for this. This patch adjusts the
limit in osd_trans_start to match depending on the kernel
version.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I10a65474dbaf7b67fe7cd59cc2544759d1e3270d
Reviewed-on: http://review.whamcloud.com/10376
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-3676 llite: to configure max_cached_mb correctly 83/11783/2
Jinshan Xiong [Fri, 5 Sep 2014 19:31:59 +0000 (12:31 -0700)]
LU-3676 llite: to configure max_cached_mb correctly

If there exists MGS conf_param to reduce the memory cache
max_cached_mb it will fail because dt_exp is not initialized
yet.

It should just go ahead and configure it because certainly it
have enough free LRU slot to deduct ccc_lru_left.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I317e556413bc63086378dec294d8ba2792afca52
Reviewed-on: http://review.whamcloud.com/11783
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-5275 libcfs: cleanup the proc hash and cfs wrappers 43/11743/3
James Simmons [Wed, 3 Sep 2014 16:40:20 +0000 (12:40 -0400)]
LU-5275 libcfs: cleanup the proc hash and cfs wrappers

Remove the non seq file version of the cfs_hash functions.
Remove the basic cfs wrappers for procfs definations.

Change-Id: Ie4996656267998b78e44cdedfbf972f358e04d50
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/11743
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4334 utils: Only set a single property for nodes 61/11161/7
Nathaniel Clark [Mon, 21 Jul 2014 13:31:11 +0000 (09:31 -0400)]
LU-4334 utils: Only set a single property for nodes

For servicenode, failnode and mgsnode only set a single property but
concatenate data.  ZFS can only set a single property for a given
name so this prevents erroneously overwritting previous entries.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ia0316e138b0d68dcda1d14811e43db3bbed64457
Reviewed-on: http://review.whamcloud.com/11161
Tested-by: Jenkins
Reviewed-by: Isaac Huang <he.huang@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3270 statahead: statahead thread wait for RPCs to finish 63/9663/7
Lai Siyao [Sun, 7 Sep 2014 15:09:20 +0000 (11:09 -0400)]
LU-3270 statahead: statahead thread wait for RPCs to finish

Statahead thread should wait for inflight stat RPCs to finish in
case statahead RPC callback may access data allocated in statahead
thread context.

ll_sa_entry_fini() should keep old entry if stat RPC is not
finished yet.

Simplify sai refcounting:
* newly allocated sai will hold one refcount, and it will put it
  after starting statahead thread.
* statahead thread holds one refcount.
* agl thread holds one refcount.
* stat process calls do_statahead_enter() which will try to get
  sai, and if it's valid, it will revalidate from statahead cache,
  and put refcount after use.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I55a4fe66a5f6c04595d3bc84f0cd3750f20e0ee4
Reviewed-on: http://review.whamcloud.com/9663
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4993 osd-ldiskfs: Support 3.14 kernel changes to bio api 95/10995/9
James Simmons [Mon, 11 Aug 2014 13:50:42 +0000 (09:50 -0400)]
LU-4993 osd-ldiskfs: Support 3.14 kernel changes to bio api

In the 3.14 kernel code base several data fields in
struct bio were moved into a new structure called
bvec_iter. This patch updates osd-ldiskfs to handle
this api change.

Change-Id: I849a1d62462c58a79766c176060b27c621627646
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10995
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-5200 llite: Cmp of unsigned value against 0 is always true 17/11217/2
Dmitry Eremin [Thu, 24 Jul 2014 17:39:17 +0000 (21:39 +0400)]
LU-5200 llite: Cmp of unsigned value against 0 is always true

Comparison of unsigned value against 0 is always true.
desc->bd_iov_count declared as int and atomic_sub_return() have
first argument int also.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I89cedc4991d1a117f824ce6b5d8cf045595fdc0f
Reviewed-on: http://review.whamcloud.com/11217
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.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>
9 years agoLU-2675 lnet: add lnet/nidstr.h 06/11506/6
John L. Hammond [Thu, 14 Aug 2014 19:17:28 +0000 (14:17 -0500)]
LU-2675 lnet: add lnet/nidstr.h

Add lnet/include/lnet/nidstr.h to break the include loop between
libcfs/libcfs.h and lnet/types.h. Where possible include lnet/types.h
or lnet/nidstr.h rather than lnet/lnet.h. Remove the unneccessary
headers lnet/{,darwin/,linux/}api-support.h.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ide4cd79295eba8705c0d413449cbb812343cbec9
Reviewed-on: http://review.whamcloud.com/11506
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.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>
9 years agoLU-2675 lustre: move lustre_intent.h to lustre/include 99/11499/2
John L. Hammond [Mon, 18 Aug 2014 17:30:28 +0000 (12:30 -0500)]
LU-2675 lustre: move lustre_intent.h to lustre/include

Move lustre_intent.h from lustre/include/linux to lustre/include.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I8b3947bc558e6721e4a238526497124d3ad193d0
Reviewed-on: http://review.whamcloud.com/11499
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
9 years agoLU-2675 lustre: remove linux/lustre_handles.h 98/11498/2
John L. Hammond [Mon, 18 Aug 2014 17:06:57 +0000 (12:06 -0500)]
LU-2675 lustre: remove linux/lustre_handles.h

Remove the cfs_rcu_head_t typedef and remove
lustre/include/linux/lustre_handles.h.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I75a9d455ae68de6173b3c47b9e10a6a6eda65989
Reviewed-on: http://review.whamcloud.com/11498
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
9 years agoLU-2675 lustre: remove linux/lustre_dlm.h 97/11497/2
John L. Hammond [Mon, 18 Aug 2014 16:57:47 +0000 (11:57 -0500)]
LU-2675 lustre: remove linux/lustre_dlm.h

Remove lustre/include/linux/lustre_dlm.h.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I7895cbe7a42146e4be14a0c36fecd28f642d1cd1
Reviewed-on: http://review.whamcloud.com/11497
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2675 lustre: remove linux/lustre_debug.h 96/11496/2
John L. Hammond [Mon, 18 Aug 2014 16:50:34 +0000 (11:50 -0500)]
LU-2675 lustre: remove linux/lustre_debug.h

Move the definition of LL_CDEBUG_PAGE() to
lustre/include/lustre_debug.h and remove
lustre/include/linux/lustre_debug.h.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ie5450ea76bfb1abeef8256da27aac5ea3009a1f2
Reviewed-on: http://review.whamcloud.com/11496
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5030 utils: fix hard-coded /proc/fs/lustre in scripts 34/10534/8
Chao Wang [Fri, 1 Aug 2014 16:14:58 +0000 (12:14 -0400)]
LU-5030 utils: fix hard-coded /proc/fs/lustre in scripts

In the upstream Linux kernel, the files under /proc/fs/lustre and lnet
will be moved in the future to use sysfs. Lustre handles this by
providing access to this data with the tool lctl which is independent
of where the data is located. Many scripts directly access the proc file
system instead of using lctl so this patch migrates those scripts to
do the proper thing.

Signed-off-by: Chao Wang <chao.ornl@gmail.com>
Change-Id: I1d96ccd27fee2b0eb0bf173a4e37adacb628f83c
Reviewed-on: http://review.whamcloud.com/10534
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5276 build: handle RHEL ldiskfs series more accurated 98/11398/4
Yang Sheng [Thu, 7 Aug 2014 11:05:31 +0000 (19:05 +0800)]
LU-5276 build: handle RHEL ldiskfs series more accurated

Since RHEL7 change RHEL_RELEASE macro format. So we need
a unified way to handle it. Change using RHEL_MAJOR &
RHEL_MINOR to decided which ldiskfs series to be choose.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I147c4ff01372f4aafcdbce6197c7a85e9d64027b
Reviewed-on: http://review.whamcloud.com/11398
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3963 libcfs: remove last cfs wrappers for cpu node handling 29/11729/2
James Simmons [Tue, 2 Sep 2014 14:14:05 +0000 (10:14 -0400)]
LU-3963 libcfs: remove last cfs wrappers for cpu node handling

Th last of the cfs wrapper cfs_for_each_possible_cpu is removed
with this patch.

Change-Id: I2c626e587343c3950599d1da6442cd25cb2d27a6
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/11729
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
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-5538 mdc: Report D_CHANGELOG messages as D_HSM. 58/11558/3
Henri Doreau [Fri, 22 Aug 2014 13:50:48 +0000 (15:50 +0200)]
LU-5538 mdc: Report D_CHANGELOG messages as D_HSM.

Removed the D_CHANGELOG pseudo-debug flag that wasn't actually defined
as a usable one. Report the D_CHANGELOG messages as D_HSM ones instead
since this is the primary user of these messages.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: I4d82b16935d053e1b7e43512a1b9368f4b0316b5
Reviewed-on: http://review.whamcloud.com/11558
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-5504 utils: add const qualifier to changelog accessors. 17/11517/2
Thomas Leibovici [Tue, 19 Aug 2014 11:51:05 +0000 (13:51 +0200)]
LU-5504 utils: add const qualifier to changelog accessors.

The following accessors don't need to modify their argument:
changelog_rec_size(), changelog_rec_name(), changelog_rec_snamelen(),
changelog_rec_sname().
Make their prototype more rigorous by adding a "const" qualifier.

Signed-off-by: Thomas Leibovici <thomas.leibovici@cea.fr>
Change-Id: I7915a2487b2b772482c777c4c19ec947b7015b74
Reviewed-on: http://review.whamcloud.com/11517
Tested-by: Jenkins
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5275 obdclass: remove lproc_var argument to lprocfs_add_simple 32/11732/2
James Simmons [Tue, 2 Sep 2014 15:44:38 +0000 (11:44 -0400)]
LU-5275 obdclass: remove lproc_var argument to lprocfs_add_simple

The struct lproc_var argument is no longer used so we can
simplify the lprocfs_add_simple function.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I2099e92c9e93c67843a41fb8e46a481a75fbd004
Reviewed-on: http://review.whamcloud.com/11732
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-5543 ldiskfs: export ldiskfs_map_blocks 91/11591/3
Bob Glossman [Tue, 26 Aug 2014 03:04:59 +0000 (20:04 -0700)]
LU-5543 ldiskfs: export ldiskfs_map_blocks

Regression caused by reccnt commit
31190547864cbcac1f6b85e88fd129dfe7de0977.  Seen only in sles11sp3 as
it requires a server build on a 3.0 or later kernel to make it happen.
sles11sp3 is the only currently supported distro where that is true.

New code in osd-ldiskfs that is conditional when
HAVE_LDISKFS_MAP_BLOCKS is set by autoconf calls ldiskfs_map_blocks.
That entry point exists in ext4/ldiskfs code, but isn't exported with
EXPORT_SYMBOL.  This causes a runtime failure at module load time of
osd-ldiskfs with an error like:

osd_ldiskfs: Unknown symbol ldiskfs_map_blocks (err 0)

This mod adds the needed EXPORT_SYMBOL() to an ldiskfs patch.

Test-Parameters: mdsdistro=sles11sp3 ossdistro=sles11sp3 clientdistro=sles11sp3 mdsfilesystemtype=ldiskfs mdtfilesystemtype=ldiskfs ostfilesystemtype=ldiskfs
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I0722bfaf73d736247f07d5402aea05dadcfcd394
Reviewed-on: http://review.whamcloud.com/11591
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5275 obdclass: Remove lprocfs_vars argument from class_register_type function 40/11640/2
James Simmons [Thu, 28 Aug 2014 17:32:50 +0000 (13:32 -0400)]
LU-5275 obdclass: Remove lprocfs_vars argument from class_register_type function

Lustre no longer uses struct lprocfs_vars with any instance
of class_register_type function. We can safely remove it.

Change-Id: Ia4ecabab4f286bfe9991d1a860e2485694fca5d0
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/11640
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-5275 obdclass: Remove non seq file proc routines 51/11451/5
James Simmons [Thu, 28 Aug 2014 17:24:12 +0000 (13:24 -0400)]
LU-5275 obdclass: Remove non seq file proc routines

Now that we have moved everything over to seq_files
for the proc handling we can remove all non seq_file
routines in lustre.

Change-Id: I20bd22fe920e430183b266219029a64beeb9747a
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/11451
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-5540 lnet: fix crash due to NULL networks string 26/11626/5
Amir Shehata [Wed, 27 Aug 2014 23:21:11 +0000 (16:21 -0700)]
LU-5540 lnet: fix crash due to NULL networks string

If there is an invalid networks or ip2nets lnet_parse_networks()
gets called with a NULL 'network' string parameter

lnet_parse_networks() needs to sanitize its input string now that
it's being called from multiple places.  Instead, check for
a NULL string everytime the function is called, which reduces the
probability of errors with other code modifications.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Change-Id: Ifcc1f6f74a3e0e804cb65e3d1b83f85a24f44d9b
Reviewed-on: http://review.whamcloud.com/11626
Tested-by: Jenkins
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2675 lustre: remove linux/lustre_common.h 95/11495/2
John L. Hammond [Mon, 18 Aug 2014 16:43:31 +0000 (11:43 -0500)]
LU-2675 lustre: remove linux/lustre_common.h

Remove lustre/include/linux/lustre_common.h and several unnecessary
calls to cfs_cleanup_group_info().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I149673dea6559b02a5de1c0a160836d67ea96119
Reviewed-on: http://review.whamcloud.com/11495
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-4928 utils: LLAPI helpers for file leases 22/10022/8
Henri Doreau [Fri, 18 Apr 2014 19:47:37 +0000 (21:47 +0200)]
LU-4928 utils: LLAPI helpers for file leases

Introduced llapi_lease_{get,check,put} functions to abstract the ioctl
implementation to manipulate file leases.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: I956408defe550c1b432526e142825ea736d0e285
Reviewed-on: http://review.whamcloud.com/10022
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-3963 libcfs: Delete empty source files for linux layer 25/11725/3
James Simmons [Tue, 2 Sep 2014 14:26:22 +0000 (10:26 -0400)]
LU-3963 libcfs: Delete empty source files for linux layer

Some of the files in libcfs/libcfs/linux are actually
empty. Remove them.

Change-Id: Ic49d3bea7777488ab51fdcdc1f93ed516654c665
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/11725
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@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-4975 doxygen: add comments for lproc_osp.c 93/10893/6
Lai Siyao [Mon, 30 Jun 2014 03:45:21 +0000 (11:45 +0800)]
LU-4975 doxygen: add comments for lproc_osp.c

- Fix up GPL header block to reference proper GPLv2 license URL.
- Remove mention of contacting Sun.
- Add introductionary comment block for the lproc_osp.c file.
- Add function comments blocks to all functions in the lproc_osp.c
  file

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: If037ab1777b0640e8cd6b66f0a78ca54339907ff
Reviewed-on: http://review.whamcloud.com/10893
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-4788 lfsck: take ldlm lock before modifying visible object 86/10986/11
Fan Yong [Sun, 13 Jul 2014 12:14:10 +0000 (20:14 +0800)]
LU-4788 lfsck: take ldlm lock before modifying visible object

Before the LFSCK modifying on the namespace visible object,
it needs to acquire related ibits lock to pervent the client
to cache stale information. The .lustre/lost+found/ and its
sub-directories also needs related ldlm locks.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I439e02e1b7b24e87e7e6e25c5084f1c98116e7f7
Reviewed-on: http://review.whamcloud.com/10986
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-5395 lfsck: deadlock between LFSCK and destroy 73/11373/6
Fan Yong [Sun, 13 Jul 2014 12:11:56 +0000 (20:11 +0800)]
LU-5395 lfsck: deadlock between LFSCK and destroy

There is potential deadlock race condition between object
destroy and layout LFSCK. Consider the following scenario:

1) The LFSCK thread obtained the parent object firstly, at
   that time, the parent object has not been destroyed yet.

2) One RPC service thread destroyed the parent and all its
   children objects. Because the LFSCK is referencing the
   parent object, then the parent object will be marked as
   dying in RAM. On the other hand, the parent object is
   referencing all its children objects, then all children
   objects will be marked as dying in RAM also.

3) The LFSCK thread tries to find some child object with
   the parent object referenced. Then it will find that the
   child object is dying. According to the object visibility
   rules: the object with dying flag cannot be returned to
   others. So the LFSCK thread has to wait until the dying
   object has been purged from RAM, then it can allocate a
   new object (with the same FID) in RAM. Unfortunately, the
   LFSCK thread itself is referencing the parent object, and
   cause the parent object cannot be purged, then cause the
   child object cannot be purged also. So the LFSCK thread
   will fall into deadlock.

We introduce non-blocked version lu_object_find() to allow
the LFSCK thread to return failure immediately (instead of
wait) when it finds dying (child) object, then the LFSCK
thread can check whether the parent object is dying or not.
So avoid above deadlock.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I7f465259011ad5fb92ef1b4dba0ff9f46d134352
Reviewed-on: http://review.whamcloud.com/11373
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>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5395 lfsck: misc patch to prevent lfsck hung 04/11304/12
Fan Yong [Sun, 13 Jul 2014 12:08:23 +0000 (20:08 +0800)]
LU-5395 lfsck: misc patch to prevent lfsck hung

1) When the LFSCK rebuilt the crashed LAST_ID files, it will
   notify the MDS to sync lastid information via disconnecting
   the connection. OFD should hold the export reference before
   disconnecting to allow to send RPC reply message.

2) When the layout LFSCK scans on the OST, it needs to handle
   the IDIF objects specially (use fid_idif_id() to get the
   OST object ID) to avoid to regard the LAST_ID file as
   corrupted by wrong.

3) The LFSCK should check the ostid_to_fid() return value for
   corrupted OSTID and/or index.

4) If the LAST_ID file is not crashed, then do not update the
   LAST_ID file.

5) NOT change the lu_buf::lb_len once the lu_buf::lb_buf is
   allocated to prevent accessing released or non-allocated
   RAM space by wrong.

6) Other small fixes and code cleanup.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I84726ddcf0b8fa6b334163fb13d9bae273033d20
Reviewed-on: http://review.whamcloud.com/11304
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4788 lfsck: LFSCK code framework adjustment (1) 93/10493/16
Fan Yong [Sun, 13 Jul 2014 11:19:23 +0000 (19:19 +0800)]
LU-4788 lfsck: LFSCK code framework adjustment (1)

The LFSCK wrap functions are only used by the LFSCK engines.
So move these functions from lfsck_lib.c to lfsck_engine.c.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ic192c71101c1718fe893b64f8e4ff74f4992914b
Reviewed-on: http://review.whamcloud.com/10493
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>