Whamcloud - gitweb
fs/lustre-release.git
9 years agoLU-5108 llite: define per open file cache for ll_cl_context 03/10503/6
Jinshan Xiong [Thu, 29 May 2014 23:36:37 +0000 (16:36 -0700)]
LU-5108 llite: define per open file cache for ll_cl_context

In ll_readpage and ll_write_begin, it needs to find out the cl_env
and cl_io, a.k.a ll_cl_context, when the IO is initialized. It used
to call cl_env_get() to figure it out but turned out to be contended
if multiple threads are doing IO.

In this patch, a per open file ll_cl_context cache is created. When
IO type of CIT_READ, CIT_WRITE and CIR_FAULT is initialized, it will
add a ll_cl_context into the cache maintained in ll_file_data. In this
case, the ll_cl_context can be found in ll_readpage and ll_write_begin
later.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I757d1df44f60c8b79be7bb458df59350be72d86b
Reviewed-on: http://review.whamcloud.com/10503
Tested-by: Jenkins
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4841 osc: revise unstable pages accounting 03/10003/11
Jinshan Xiong [Thu, 15 May 2014 16:47:11 +0000 (09:47 -0700)]
LU-4841 osc: revise unstable pages accounting

A few changes are made in this patch for unstable pages tracking:

1. Remove kernel NFS unstable pages tracking because it killed
   performance
2. Track unstable pages as part of LRU cache. Otherwise Lustre
   can use much more memory than max_cached_mb
3. Remove obd_unstable_pages tracking to avoid using global
   atomic counter
4. Make unstable pages track optional. Tracking unstable pages is
   turned off by default, and can be controled by
   llite.*.unstable_stats.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I3bfae9376aac2e2c38539577d9db29a375bc95af
Reviewed-on: http://review.whamcloud.com/10003
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-5110 test: use different dryrun option in sanity-scrub.sh 21/10621/5
Emoly Liu [Thu, 5 Jun 2014 16:18:11 +0000 (00:18 +0800)]
LU-5110 test: use different dryrun option in sanity-scrub.sh

Use --dryrun on/off in sanity-scrub.sh test_15 scripts to
work with 2.5.x interop tests.

Test-Parameters: envdefinitions=SLOW=yes,ONLY=15 testlist=sanity-scrub
Test-Parameters: envdefinitions=SLOW=yes,ONLY=15 testlist=sanity-scrub \
ossjob=lustre-b2_5 mdsjob=lustre-b2_5 ossbuildno=61 mdsbuildno=61
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: I11fba4510b16fbf52aa2591574d5d1c71805a132
Reviewed-on: http://review.whamcloud.com/10621
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
9 years agoLU-5175 kernel: kernel update [SLES11 SP3 3.0.101-0.31] 87/10687/2
Bob Glossman [Wed, 11 Jun 2014 19:22:38 +0000 (12:22 -0700)]
LU-5175 kernel: kernel update [SLES11 SP3 3.0.101-0.31]

update target and config files for new version

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ie476fd2493c1eedb6f6c7619e0c4b07fd562fe23
Reviewed-on: http://review.whamcloud.com/10687
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5132 tests: Add version check to sanity/160c 57/10557/4
Nathaniel Clark [Wed, 4 Jun 2014 06:10:24 +0000 (14:10 +0800)]
LU-5132 tests: Add version check to sanity/160c

Account for what versions of Lustre this test should work for.
This test was added in http://review.whamcloud.com/9723 and that
was included in 2.5.58 and prior to 2.5.2 in the b2_5 branch.

Test-Parameters: alwaysuploadlogs envdefinitions=ONLY=160c \
ossjob=lustre-b2_5 mdsjob=lustre-b2_5 ossbuildno=42 mdsbuildno=42 \
testlist=sanity

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I12a8fbfe1ba09b97e0346f148884d5355eb704e4
Reviewed-on: http://review.whamcloud.com/10557
Tested-by: Jenkins
Reviewed-by: Patrick Farrell <paf@cray.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-5133 tests: Add version check in sanity/238 59/10559/5
Nathaniel Clark [Wed, 4 Jun 2014 04:51:12 +0000 (12:51 +0800)]
LU-5133 tests: Add version check in sanity/238

Fix for LU-4659 was not included until after 2.5.57 and after 2.5.1.
Ensure MDS is running one of these valid branches before allowing the
test to run.

Test-Parameters: alwaysuploadlogs envdefinitions=ONLY=238 \
ossjob=lustre-b2_5 mdsjob=lustre-b2_5 ossbuildno=42 mdsbuildno=42 \
testlist=sanity

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: If0601c048e6641b2cfcd27b7a6f62d8662440018
Reviewed-on: http://review.whamcloud.com/10559
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2234 man: Add zfs options to mkfs.lustre man page 29/10629/4
Nathaniel Clark [Fri, 6 Jun 2014 14:13:09 +0000 (10:13 -0400)]
LU-2234 man: Add zfs options to mkfs.lustre man page

Document zfs options in mkfs.lustre(8).  Also update index and fsname
options to match current requirements.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I06e018c41b29d8f9ca8d1f2ef595140bed16096e
Reviewed-on: http://review.whamcloud.com/10629
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Cliff White <cliff.white@intel.com>
9 years agoLU-5039 mdd: do orphan cleanup asynchronously 84/10584/2
Niu Yawei [Wed, 4 Jun 2014 10:14:09 +0000 (06:14 -0400)]
LU-5039 mdd: do orphan cleanup asynchronously

Orphan cleanup shouldn't block mount process, it can be done
asynchronously.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: Ib282dbece0cf789b33105aaeaeef04bd6f1dcf70
Reviewed-on: http://review.whamcloud.com/10584
Tested-by: Jenkins
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-4629 obdclass: Fix uninitialized variables 13/10613/2
Dmitry Eremin [Thu, 5 Jun 2014 18:52:15 +0000 (22:52 +0400)]
LU-4629 obdclass: Fix uninitialized variables

'sd.page_link' is used uninitialized in this function.
'ss.page_link' is used uninitialized in this function.
'sl.page_link' is used uninitialized in this function.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I5f571fe2b5dc9007720601292484dbf24a348b83
Reviewed-on: http://review.whamcloud.com/10613
Tested-by: Jenkins
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: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-4629 osd-ldiskfs: Fix null pointer dereference 10/10610/3
Dmitry Eremin [Thu, 5 Jun 2014 17:27:56 +0000 (21:27 +0400)]
LU-4629 osd-ldiskfs: Fix null pointer dereference

Null pointer 'ooc' that comes from line 1036 may be dereferenced
at line 1083.

Pointer 'it' checked for NULL at line 1036 may be passed to function
and may be dereferenced there by passing argument 2 to function
'osd_scrub_wakeup' at line 1089. Also there is one similar error on
line 1089.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Iaffa27e48063fbff8b09f390760c24a1da8dd6b3
Reviewed-on: http://review.whamcloud.com/10610
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>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4629 osd-ldiskfs: Fix use after free 09/10609/2
Dmitry Eremin [Thu, 5 Jun 2014 16:50:36 +0000 (20:50 +0400)]
LU-4629 osd-ldiskfs: Fix use after free

Object 'dir' was dereferenced at line 3343 after being freed
by calling 'kfree' at line 3332.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Id8d216868798622f12773b621acf46e81988b954
Reviewed-on: http://review.whamcloud.com/10609
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
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-5117 lfsck: naming rules for orphan 82/10482/6
Fan Yong [Wed, 30 Apr 2014 02:14:06 +0000 (10:14 +0800)]
LU-5117 lfsck: naming rules for orphan

The rules for naming orphan under /ROOT/.lustre/lost+found/MDTxxxx/
are as following:

1) The orphan's name should start with the "FID" to simplify the
   sorting by FID.

2) The name needs to contain the orphan type to indicate why the
   orphan is created.

3) To resolve the name conflict, there is the conflict version
   in the name.

4) There can be infix in the name to indicate more information,
   such as its original name, the original stripe offset, etc.

So the name will be like:
${FID}-${infix}-${type}-${conflict_version}

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I6eaa0daff39729f401a4f45eae4c1efdd527275a
Reviewed-on: http://review.whamcloud.com/10482
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: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5122 lfsck: maintain the MDT devices list properly 07/10507/3
Fan Yong [Mon, 28 Apr 2014 15:42:13 +0000 (23:42 +0800)]
LU-5122 lfsck: maintain the MDT devices list properly

The layout LFSCK needs to know which MDT/OST devices have taken part
in the LFSCK, it maintains two lists for that. When the layout LFSCK
starts/stops, it should handle the two lists separately and properly.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I26103ddc7796dbb1706f5c4da3737df297214e68
Reviewed-on: http://review.whamcloud.com/10507
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-5053 ptlrpc: Add schedule point to ptlrpc_check_set() 58/10358/3
Christopher J. Morrone [Wed, 4 Jun 2014 02:11:47 +0000 (19:11 -0700)]
LU-5053 ptlrpc: Add schedule point to ptlrpc_check_set()

Most ptlrpc sets are believed to be small and bounded in length.  However
at the very least the ptlrpcd reuses the ptlrpc sets at its primary work
queue.  This work queue can easily have work added faster than the ptlrpcd
thread can process the work.  The unbounded work can lead to the ptlrpcd
monopolizing a CPU for hundreds of seconds.  Obviously a well-behaved
kernel function should obey the scheduler and share the processor.

We address that problem by inserting a cond_resched() at the top of the
main loop of ptlrpc_check_set().

Some have suggested putting the cond_resched() lower in the loop.  However,
the only current way to bound the number of loops that we exceed our
allocated run time is to put the call at the top of the loop.  Putting it
lower would allow an unknown number (and since it is unknown, it might be
excessively large at times) of cycles through the loop before a
resched is allowed.

Change-Id: If46a6e1af1d0fdae24af623045aaf902a04fc589
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/10358
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
9 years agoLU-4629 utils: fix NULL pointer dereference 36/10136/4
Dmitry Eremin [Mon, 28 Apr 2014 20:00:58 +0000 (00:00 +0400)]
LU-4629 utils: fix NULL pointer dereference

'uuid' and 'lnet' can be NULL. So check for this case.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I06ead7470649054ca5bd0e0395f5e817c08bc2db
Reviewed-on: http://review.whamcloud.com/10136
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4793 clio: Reduce memory overhead of per-page allocation 70/10070/5
Jinshan Xiong [Wed, 23 Apr 2014 20:11:22 +0000 (13:11 -0700)]
LU-4793 clio: Reduce memory overhead of per-page allocation

A page in clio used to occupy 584 bytes, which will use size-1024
slab cache. This patch reduces the per-page overhead to 512 bytes
so it can use size-512 instead.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: I54d7ed7b64d5987ddaafbf16edafa5cdf491b0a1
Reviewed-on: http://review.whamcloud.com/10070
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
9 years agoLU-4214 target: LWP failover should create new export 65/8465/5
Mikhail Pershin [Tue, 3 Dec 2013 13:30:15 +0000 (17:30 +0400)]
LU-4214 target: LWP failover should create new export

Upon reconnection from new NID LWP client need to create new
export and destroy old one like that is done for MDS connection

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: Id21a742a978f629e2324bc568a1a50c2922fe3cc
Reviewed-on: http://review.whamcloud.com/8465
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
9 years agoLU-5151 lnet: return +ve for blocked lnet messsage 25/10625/6
Liang Zhen [Fri, 6 Jun 2014 09:28:07 +0000 (17:28 +0800)]
LU-5151 lnet: return +ve for blocked lnet messsage

returned value of lnet_post_send_locked and
lnet_post_routed_recv_locked are changed to -ve by:
http://review.whamcloud.com/#/c/9369/

this is wrong because callers rely on +ve to identify blocked
message which is not a failure.

To respect linux kernel coding style and not use positive error
code, this patch adds two macros as non-error returned values of
these functions:
  LNET_CREDIT_OK has credit for message
  LNET_CREDIT_WAIT no credit and message is blocked

both these functions will return these two values instead of 0
and EAGAIN

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Id809e4fa6e22780a0bd9ad9c0f0ef96b2c9aa879
Reviewed-on: http://review.whamcloud.com/10625
Tested-by: Jenkins
Reviewed-by: Chris Horn <hornc@cray.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 agoLU-4957 ofd: convert FID to OSTID before put it on wire 80/10580/4
Wang Di [Fri, 6 Jun 2014 09:20:55 +0000 (02:20 -0700)]
LU-4957 ofd: convert FID to OSTID before put it on wire

For the compatible purpose, OFD has to convert the FID(IDIF)
to ost_id before reply to MDT(in ofd_create_hdl), because the
old MDT(<2.6) can not deal with IDIF, but only ostid.

Do not LASSERT for comparing OFD precreate fids with local
used FID, instead it will just return -ESTALE.

Change-Id: Ic35cca7a78bff2e4ca24f507a2c32666ab032579
Signed-off-by: Wang Di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/10580
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-4438 utils: handle ct_setup() errors 53/9853/10
Bruno Faccini [Sun, 30 Mar 2014 15:44:43 +0000 (17:44 +0200)]
LU-4438 utils: handle ct_setup() errors

Problem has been encountered causing sanity-hsm/test_402 errors
because copytool threads were found still alive after MDCs
deactivation. This appears to be due to no ct_setup() error
handling with continuing+unnecessary startup actions to occur.
Also, now that copytool will exit earlier, HSMTOOL_NOERROR variable
has been added to allow errors in copytool_setup().

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I108ea679faf2731f2a64fb08d2f8fba9db01c71f
Reviewed-on: http://review.whamcloud.com/9853
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5102 utils: Look for modules in $LUSTRE/utils/.libs 68/10468/3
Nathaniel Clark [Wed, 28 May 2014 15:32:43 +0000 (11:32 -0400)]
LU-5102 utils: Look for modules in $LUSTRE/utils/.libs

This allows locally built lustre utils to look for files outside of
the normal libdir location, and thus be tested without a full install.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I0f3c3446ddc9aed3cf494c597f4c0a4c432478de
Reviewed-on: http://review.whamcloud.com/10468
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@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-5120 Don't really need the default-base rpm 85/10485/7
Brian J. Murrell [Thu, 29 May 2014 11:49:46 +0000 (07:49 -0400)]
LU-5120 Don't really need the default-base rpm

The kernel-default-base is not actually needed to build Lustre
on SLES11 so get rid of it.
Clean up the fetching of needed packages.

Signed-off-by: Brian J. Murrell <brian.murrell@intel.com>
Change-Id: Ieee2b01f9a8c280de5d2cc4c43ff672539eea7ef
Reviewed-on: http://review.whamcloud.com/10485
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.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-2675 mdt: add mbo_ prefix to members of struct mdt_body 02/10202/4
John L. Hammond [Fri, 2 May 2014 23:39:06 +0000 (18:39 -0500)]
LU-2675 mdt: add mbo_ prefix to members of struct mdt_body

Rename each member of struct mdt_body, adding the prefix mbo_.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: If229b803a5ccdb27378f6fc44445c1c9bf120d8b
Reviewed-on: http://review.whamcloud.com/10202
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>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
9 years agoLU-4416 osd-ldiskfs: remove unused 'optional_mutex' argument 62/10162/12
Jeff Mahoney [Sun, 1 Jun 2014 20:01:23 +0000 (16:01 -0400)]
LU-4416 osd-ldiskfs: remove unused 'optional_mutex' argument

osd_ldiskfs_map_inode_pages doesn't actually use the
optional_mutex argument. Removing it now makes it easier to
integrate the ext4_map_blocks changes.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ic87114b8d7adadf386a0794c2e6ece79c83601b4
Reviewed-on: http://review.whamcloud.com/10162
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-4416 osd-ldiskfs: vfs structs use fully typed uid/gid 61/10161/12
Jeff Mahoney [Fri, 30 May 2014 13:54:57 +0000 (09:54 -0400)]
LU-4416 osd-ldiskfs: vfs structs use fully typed uid/gid

Since Linux 3.5, struct inode and iattr have used type kuid_t
and kgid_t for uids and gids. There was a compatibility mode
to avoid build failures with older code but it was removed in
3.14. Furthermode, SLES12 builds with UIDGID_STRICT_TYPE_CHECKS
enabled, and needs to use the shim interfaces to build.

This patch provides the shims for older releases without them.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: If4c70b10b4bc13aa90d729d56b25edbe1f52fa98
Reviewed-on: http://review.whamcloud.com/10161
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4423 lnet: switch to kernel_sendmsg() 25/10125/6
Oleg Drokin [Sun, 1 Jun 2014 19:52:23 +0000 (15:52 -0400)]
LU-4423 lnet: switch to kernel_sendmsg()

Upstream commit by Al Viro:
lustre: switch to kernel_sendmsg()
(casts are due to misannotations in lustre; it uses iovec where kvec
would be correct type; too much noise to properly annotate right now).

Linux-commit: 480f40de91e74190281309fd0ecb2d0414603c2e

Change-Id: I1f6e27cd158bd3e15d06b88d3e973dc7f99a5e60
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10125
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
9 years agoLU-4423 lnet: don't open-code kernel_recvmsg() 24/10124/6
Oleg Drokin [Sun, 1 Jun 2014 14:30:12 +0000 (10:30 -0400)]
LU-4423 lnet: don't open-code kernel_recvmsg()

Upstream commit from Al Viro. b2f42cfeeb0452ca3e004c3014cda99b53554d47

Change-Id: Ide4efaab18268d3a69790231b9efa3b8b3e6f928
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10124
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
9 years agoLU-5090 tests: disable MPI tests for Phi build 08/10508/3
Dmitry Eremin [Fri, 30 May 2014 10:24:24 +0000 (14:24 +0400)]
LU-5090 tests: disable MPI tests for Phi build

MPI tests are not supported for Phi build. So, disable them.
Fix configure messages and caching result of check.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I1fab50500883e6d155c8f324a98bed01e5d96397
Reviewed-on: http://review.whamcloud.com/10508
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: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4970 tests: EXCEPT sanity-lfsck/14 for ZFS 73/10473/2
Nathaniel Clark [Wed, 28 May 2014 20:04:09 +0000 (16:04 -0400)]
LU-4970 tests: EXCEPT sanity-lfsck/14 for ZFS

Due to sanity-lfsck/14 recurrent failures, EXCEPT it until it can be
better root-caused, to allow review-zfs to be enforced.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I7d267169fe7080c9702ccd9b8f5697fb8b63121f
Reviewed-on: http://review.whamcloud.com/10473
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
9 years agoLU-4441 test: improve run-llog.sh to print more information 66/9966/6
Emoly Liu [Sun, 20 Apr 2014 23:09:04 +0000 (07:09 +0800)]
LU-4441 test: improve run-llog.sh to print more information

Improve run-llog.sh script so that it can print more useful
information when "Module llog_test is in use" happens again.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: Id07e253a6f22b6a7235ab6d41a30fe701286f8d7
Reviewed-on: http://review.whamcloud.com/9966
Tested-by: Jenkins
Reviewed-by: Jian Yu <jian.yu@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-4582 mgc: replace hard-coded MGC_ENQUEUE_LIMIT value 17/9217/2
Cheng Shao [Tue, 11 Feb 2014 03:36:16 +0000 (19:36 -0800)]
LU-4582 mgc: replace hard-coded MGC_ENQUEUE_LIMIT value

During client mount, the client will send an LDLM_ENQUEUE request to
MGS with send delay set to MGC_ENQUEUE_LIMIT, which is hard coded to
50 seconds. On the other hand, the interval for pinger is deduced from
obd_timeout. When obd_timeout is configured for a longer period of
time, so does the pinger. We know that connecting to the secondary MGS
node is triggered by the pinger. Now that we have a longer interval,
the pinger will not be able to try the secondary before the
LDLM_ENQUEUE request fails the mount using the same delay limit.

This code change will replace the hard-coded send delay being
mentioned above with a value that is long enough to give the client a
chance to connect to the secondary MGS if exists.

Xyratex-bug-id: MRP-1516
Signed-off-by: Cheng Shao <cheng_shao@xyratex.com>
Change-Id: I256c533ca80a93e547afa21c4722d628911ae919
Reviewed-on: http://review.whamcloud.com/9217
Reviewed-by: Ryan Haasken <haasken@cray.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3696 mdd: decref volatile object after creation 79/10179/4
Andreas Dilger [Tue, 27 May 2014 21:15:02 +0000 (15:15 -0600)]
LU-3696 mdd: decref volatile object after creation

Drop the nlink count on a volatile file after it is created.
It is created with a single reference and then added to the PENDING
directory, which adds a second reference to the inode.  When it is
closed it is left with an nlink count=1 and not unlinked as it should
be.

Do not insert volatile files into the ChangeLog, since they are
intended to be temporary files that cannot be accessed after creation
and should not be synched to a backup filesystem.

If llapi_create_volatile_idx() is used on a non-Lustre filesystem then
it should also unlink the temporary filename after opening it, so that
the behaviour is the same.  Improve the comments for this function.

Minor cleanups of related functions found during investigation.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I4bd37395a8eff94458e62414a5a4e7206b76d32d
Reviewed-on: http://review.whamcloud.com/10179
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5093 test: dir_remote.sh change stripe count 90/10390/5
Patrick Farrell [Mon, 2 Jun 2014 15:24:03 +0000 (10:24 -0500)]
LU-5093 test: dir_remote.sh change stripe count

dir_remote.sh currently creates only directories with
$MDTCOUNT stripes. This patch makes it create directories
with from 1 to $MDTCOUNT stripes, which also creates
non-striped remote directories (stripe_count = 1).

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I8334661b40620c1e0ecc03dd29756fb607e3e3ca
Reviewed-on: http://review.whamcloud.com/10390
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-3469 osp: osp_sync() to flush pending changes synchronously 46/10046/7
Alex Zhuravlev [Wed, 30 Apr 2014 04:46:17 +0000 (12:46 +0800)]
LU-3469 osp: osp_sync() to flush pending changes synchronously

also a test added to sanity to verify this.

Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Iab153ec5ff1e9031a721530c5eee10a1f01adf7a
Reviewed-on: http://review.whamcloud.com/10046
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>
9 years agoLU-5069 mds: check if the object exist before subdir check 40/10340/3
wang di [Thu, 15 May 2014 13:15:56 +0000 (06:15 -0700)]
LU-5069 mds: check if the object exist before subdir check

In mdt_rename_sanity, it should check whether the object exist
before mdo_is_subdir, otherwise the un-exist object will cause
LBUG in mdd_is_subdir.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I862392ca6a758bcf63406b2a8df9306d0c531aa5
Reviewed-on: http://review.whamcloud.com/10340
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@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-5100 llite: set dir LOV xattr length variable 53/10453/4
Hongchao Zhang [Fri, 9 May 2014 16:53:14 +0000 (00:53 +0800)]
LU-5100 llite: set dir LOV xattr length variable

the LOV xattr of directory could be either lov_user_md_v1
(size is 32) or lov_user_md_v3 (size is 48), then the actual
size of the LOV xattr should be return.

this patch also changes lod_verify_stripe to make it to accept
lov stripe from user and it's "pattern" is "LOV_PATTERN_RAID0".

Change-Id: I1ccba6da19aef0b7464c43b1b50871df44ce0eb7
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/10453
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5041 osd-zfs: Prefetch dnodes 95/10395/2
Brian Behlendorf [Tue, 20 May 2014 23:07:48 +0000 (16:07 -0700)]
LU-5041 osd-zfs: Prefetch dnodes

After a successful FID lookup prefetch the referenced dnode.  There's
every reason to believe the dnode will be immediately useful.  This
will not result in a spill block also being prefetched for that we
need the block pointer from the dnode.  However, once large dnodes
are supported spill blocks should be rarely needed.

Change-Id: I41c0d08249f5d852137a08e2f3b262fb664a15ea
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/10395
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-5058 llite: support root squash on newer kernels 25/10325/2
James Simmons [Tue, 13 May 2014 23:05:07 +0000 (19:05 -0400)]
LU-5058 llite: support root squash on newer kernels

The fix for the root squash bug for LU-1778 does not
handle the new namespace changes in newer kernels.
This patch restores that functionality.

Change-Id: I2b3bd8a18b94108cc78f55e33f61fa788e353721
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10325
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Grégoire Pichon <gregoire.pichon@bull.net>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5051 hsm: do not reallocate hsm receive buffer 99/10299/4
Frank Zago [Thu, 22 May 2014 18:27:56 +0000 (13:27 -0500)]
LU-5051 hsm: do not reallocate hsm receive buffer

Instead of allocating 1MB for every call to
llapi_hsm_copytool_recv, allocate that buffer once in
llapi_hsm_copytool_register. The application must not call
llapi_hsm_copytool_recv until it has cleared the data from
the previous call, which lhsmtool_posix already does. This
also make llapi_hsm_action_list_free unnecessary.

Signed-off-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Frank Zago <fzago@cray.com>
Change-Id: Ie9e15a5cb4e3ba6d3fe23d40ee2bb47330280abf
Reviewed-on: http://review.whamcloud.com/10299
Tested-by: Jenkins
Reviewed-by: Faccini Bruno <bruno.faccini@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-5047 tests: correct cleanup files in sanity.sh 91/10291/9
Dmitry Eremin [Fri, 16 May 2014 12:16:37 +0000 (16:16 +0400)]
LU-5047 tests: correct cleanup files in sanity.sh

Don't remove all files from Lustre share. Create files that will be
cleaned up at the end tests session in check_and_cleanup_lustre().

Fix cleanup for test_54c.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I23624b9d14e7de3423b82b4a5b8508c4820c55d4
Reviewed-on: http://review.whamcloud.com/10291
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3953 build: fix paths for generated headers 60/10160/8
Jeff Mahoney [Wed, 30 Apr 2014 02:59:38 +0000 (22:59 -0400)]
LU-3953 build: fix paths for generated headers

Headers that are generated during kernel build and placed
in various include/generated directories are always in
the kernel build dir. There are several places in which the kernel
source dir is used instead. This causes configure/build failures
on systems using separate build and source directories.

This patch cleans those paths up.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Change-Id: I7335a8088d25f1e3bf64d8c131b542dfce38fff0
Reviewed-on: http://review.whamcloud.com/10160
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2675 obd: remove dead code 84/9784/8
John L. Hammond [Sun, 25 May 2014 23:37:01 +0000 (19:37 -0400)]
LU-2675 obd: remove dead code

Remove unused OBD functions: obdo_to_inode(), is_osp_on_mdt(),
oti_init(), oti_alloc_cookies(), oti_free_cookies(),
obdo_from_iattr(), obdo_from_md(), obd_create_async(), obd_pin(),
obd_unpin(), obd_llog_connect(), obd_pin_observer(),
obd_unpin_observer(), md_is_subdir(), md_readpage(), obdo2fid().

Remove several unused, get-only, and set-only structure members.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I4a9567798259cfde0cf0ab0ae691daac21e29b9c
Reviewed-on: http://review.whamcloud.com/9784
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: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-4416 mm: Backport shrinker changes from upstream 00/9300/21
Yang Sheng [Thu, 24 Apr 2014 03:43:09 +0000 (11:43 +0800)]
LU-4416 mm: Backport shrinker changes from upstream

Convert shrinker to new count/scan API.
--ptlrpc shrinker
--lu_object shrinker
--ldlm pool shrinker

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: Idbd7cd3b7488202e5e8f6fdf757ae6d20e28d642
Reviewed-on: http://review.whamcloud.com/9300
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: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3222 ofd: use of ofd_XXX helpers 80/8780/5
Emoly Liu [Wed, 21 May 2014 14:48:32 +0000 (10:48 -0400)]
LU-3222 ofd: use of ofd_XXX helpers

Replace explicit use of some obd fields by ofd helpers.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I83bf64f0f41eac834b47c216d02f9cac8d505207
Reviewed-on: http://review.whamcloud.com/8780
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>
9 years agoLU-5116 ptlrpc: race at req processing 71/10471/2
Alexander.Boyko [Wed, 28 May 2014 17:52:13 +0000 (21:52 +0400)]
LU-5116 ptlrpc: race at req processing

Race between ptlrpc_resend_req() and ptlrpc_check_set().
1 thread do ptlrpc_check_set()->after_reply()
2 thread do ptlrpc_resend_req()
The result is request with rq_resend = 1 and MSG_REPLY flag.
When this request will came to server it will cause client eviction.
The patch skip ptlrpc_resend_req logic if rq_replied is set,
and clear rq_resend flag at reply_in_callback() when client got
reply.

Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Xyratex-bug-id: MRP-1888
Change-Id: If47b9a1f559ab16e4b416332ada7c73a8758d46c
Reviewed-on: http://review.whamcloud.com/10471
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5090 build: restore enable-mpitest option 84/10384/4
James Simmons [Wed, 21 May 2014 14:37:21 +0000 (10:37 -0400)]
LU-5090 build: restore enable-mpitest option

Originally the enable-mpitests configure option was deeply
embedded in the liblustre configuration test. With the
removal of liblibustre this option got accidentally removed.
This patch restores this option.

Change-Id: I92ab1d3f187f579dca4bb6825a5bf1e80dbbee06
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10384
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
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: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5113 osd: add striped dir feature flag to LMA 63/10463/2
wang di [Tue, 27 May 2014 21:14:25 +0000 (14:14 -0700)]
LU-5113 osd: add striped dir feature flag to LMA

Add striped directory feature flag(LMAI_STRIPED) to LMA, so
once MDS is downgraded, the striped directory will be accessed
by old lustre(< 2.6) on MDT.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I763217e3554dc4d68ee2f72d53c0e119fff6cbef
Reviewed-on: http://review.whamcloud.com/10463
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@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-4932 doc: desgin doc for LFSCK 33/10033/5
Richard Henwood [Mon, 21 Apr 2014 15:40:15 +0000 (16:40 +0100)]
LU-4932 doc: desgin doc for LFSCK

LFSCK design documentation has previously been recorded in an wiki
external to the souce code. This commit adds a first draft of the
design highlights of the LFSCK feature. A new directory has been
created to house this and other future design documents modelled
after the Linux Kernel 'Documentation' directory.

This document includes an introduction, quick usage and features.
In addition there are sections that cover the two phase design of
LFSCK as well as a overview of the file system traversal methods
that design have been implemented. Finally, a further reading
section is included as well as a glossary of Lustre specific
terms.

Change-Id: I598261efd7fc4ac71a32a301b8afe8c60b592ace
Signed-off-by: Richard Henwood <richard.henwood@intel.com>
Reviewed-on: http://review.whamcloud.com/10033
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>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4345 osp: store valid bits in setattr record 23/10223/5
Niu Yawei [Tue, 6 May 2014 05:23:12 +0000 (01:23 -0400)]
LU-4345 osp: store valid bits in setattr record

We'd store LA_UID/LA_GID bit along with the UID/GID in the setattr
llog record, otherwise, osp could set a random uid/gid to the OST
object.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I17de21071127325ade8dea6f8618b622fec1768d
Reviewed-on: http://review.whamcloud.com/10223
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>
9 years agoLU-4929 llite: use the correct mode for striped directory 28/10028/8
wang di [Fri, 18 Apr 2014 21:33:59 +0000 (14:33 -0700)]
LU-4929 llite: use the correct mode for striped directory

Create striped directory with correct mode, which should be
handling same as mkdir.

Add -m option to setdirstripe so the user can create stripedir
with specified mode.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I4d7d186d4c820cfbdddd0aac9012e7e5e2454278
Reviewed-on: http://review.whamcloud.com/10028
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-4098 lmv: Match MDT where the FID locates first 19/8019/8
wang di [Fri, 18 Oct 2013 07:00:16 +0000 (00:00 -0700)]
LU-4098 lmv: Match MDT where the FID locates first

With DNE every object can have two locks in different namespaces:
lookup lock in space of MDT storing direntry and update/open lock
in space of MDT storing inode. In lmv_find_cbdata/lmv_lock_lock,
it should try the MDT that the FID maps to first, since this can
be easily found, and only try others if that fails.

In the error handler of lmv_add_targets, it should check whether
ld_tgt_count is being increased before ld_tgt_count is being -1.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Idf90ff97421102da97febb0aebaff3f702ff5df7
Reviewed-on: http://review.whamcloud.com/8019
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
9 years agoLU-4573 tests: check all MDTs for open files 07/10107/3
Andreas Dilger [Tue, 27 May 2014 12:13:18 +0000 (20:13 +0800)]
LU-4573 tests: check all MDTs for open files

sanityn.sh test_76 verifying mdt.*.exports.*.open_files content
did not check all of the MDTs. It was broken by commit 370de927fc5,
which created all directories striped across all MDTs by default.

There is actually no need to special-case striped or remote
directories in this test, and it should be possible to just check
for open files on all MDTs, and this also simplifies the test.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I2b7b434052946c8d84bffef1fc7358cc29b00b75
Reviewed-on: http://review.whamcloud.com/10107
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
9 years agoLU-4675 lfsck: new pattern flag for partially repaired file 42/10042/19
Fan Yong [Mon, 21 Apr 2014 13:59:00 +0000 (21:59 +0800)]
LU-4675 lfsck: new pattern flag for partially repaired file

When the layout LFSCK repairs orphan OST-object, if the parent
MDT-object was lost, then it will re-create the MDT-object and
regenerate the LOV EA and fill the target LOV EA slot with the
orphan information, and fill other slots with zero (LOV hole);
if related LOV EA slot is invalid or hole, then it will refill
the target LOV EA slot; if the target slot exceeds current LOV
EA tail, then extend the LOV EA, and fill the gaps as zero.

Some of the LOV EA holes may cannot be re-filled finally because
of lost some OST-objects. And even if they can be re-filled, but
there are still some possible race accessings from client before
the re-filling. If the client access the LOV EA with hole(s), it
may cause some strange behaviour, such as trigger LBUG()/LASSERT()
on the client.

So we will make the client to be aware of the LOV EA is incomplete.
We introduce a new LOV EA pattern flag LOV_PATTERN_F_HOLE for that:
any time when the LFSCK repairs the LOV EA with hole(s), the LOV EA
will be marked as LOV_PATTERN_F_HOLE; when all the holes in the LOV
EA are refilled, the LOV_PATTERN_F_HOLE will be dropped.

For a new client, it recongizes the pattern flag LOV_PATTERN_F_HOLE,
then it can permit/forbid some opertions on the file with LOV holes:

1) Normal read/write the file with LOV EA hole is permitted, but the
   application will get EIO error when read data from the dummy slot
   or write data to the dummy slot.

2) The users can dump the recovered data via some common read tools,
   such as "dd conv=sync,noerror".

3) Append data to the file which has LOV EA hole will get EIO failure.

4) Other operations will skip the LOV EA hole(s), and will not get
   failures, such as {s,g}etattr, {s,g}getxattr, stat, chown/chgrp,
   chmod, touch, unlink, and so on.

For an old client, since it will not recognize the new pattern flag
LOV_PATTERN_F_HOLE. So the LOV EA with hole will be dicarded with
failure, but it will not cause the client to be crashed.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ic4a7fd08b229752cc155606515b6c9ddd380213e
Reviewed-on: http://review.whamcloud.com/10042
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-5068 mdt: check default LMV EA when set reply EA size 38/10338/2
wang di [Thu, 15 May 2014 09:25:14 +0000 (02:25 -0700)]
LU-5068 mdt: check default LMV EA when set reply EA size

MDT should also check default LMV EA size when setting reply EA
size, otherwise the following xattr get will not be able to hold
default LMV EA in its reply buffer.

Add test cases to verify default stripe count.

Minor cleanup for the output of default LMV EA.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I2f94d6e87ba05720e5e4aa694dce3246d6a27664
Reviewed-on: http://review.whamcloud.com/10338
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@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-5091 build: Support alternate locations of libzfs.so 01/10401/5
Nathaniel Clark [Wed, 21 May 2014 18:08:30 +0000 (14:08 -0400)]
LU-5091 build: Support alternate locations of libzfs.so

Due to the change for with-zfs-devel (LU-3497), also add support to
search for libzfs.so along with the alternate locations supplied with
the header files.
Also need to unpack zfs{,-devel}.  The zfs RPM is needed because it
has the actual libraries in it and the zfs-devel RPM only has un-
versioned symlinks to the libraries in the zfs RPM.
This will all change one day when we have a libzfs RPM per
https://github.com/zfsonlinux/zfs/issues/2329 and it looks like it
could be one day soon: https://github.com/zfsonlinux/zfs/pull/2341.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: Brian J. Murrell <brian.murrell@intel.com>
Change-Id: Ic78bd0eb88d8ab0f2456b8cf684bb8b9c0c0833a
Reviewed-on: http://review.whamcloud.com/10401
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-216 ldiskfs: use proper arguments for ldiskfs_free_blocks 20/1720/4
Andreas Dilger [Thu, 20 Feb 2014 22:00:08 +0000 (14:00 -0800)]
LU-216 ldiskfs: use proper arguments for ldiskfs_free_blocks

In ldiskfs_ext_new_extent_cb(), the extent length argument
is confusingly converted from le16 using cpu_to_le16() instead
of le16_to_cpu().  While this is functionally correct, it is
semantically incorrect and can confuse static code analysis.

Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I8b3a684677c66d96fe4828fa771fc309c21755b8
Reviewed-on: http://review.whamcloud.com/1720
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
9 years agoLU-5094 Fetch SLES11SP3 build artifacts automatically 96/10396/13
Brian J. Murrell [Tue, 20 May 2014 23:40:27 +0000 (19:40 -0400)]
LU-5094 Fetch SLES11SP3 build artifacts automatically

If the user has an account at nu.novell.com for getting SLES packages,
they must configure that account info in the standard .netrc file for
wget/curl to use when trying to get packages from nu.novell.com.

Signed-off-by: Brian J. Murrell <brian.murrell@intel.com>
Change-Id: Ic3cbfc78e0a813d7ac5051bc4a4a358caac0d5a7
Reviewed-on: http://review.whamcloud.com/10396
Reviewed-by: Minh Diep <minh.diep@intel.com>
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-5088 kernel: kernel update [SLES11 SP3 3.0.101-0.29] 91/10391/2
Bob Glossman [Tue, 20 May 2014 20:30:01 +0000 (13:30 -0700)]
LU-5088 kernel: kernel update [SLES11 SP3 3.0.101-0.29]

update target and config files for new version

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I8b3ef29db6f5ae87ed4c681ce9d96e811d5db641
Reviewed-on: http://review.whamcloud.com/10391
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4937 osc: get rid of old checksum initial value 54/10354/2
Bobi Jam [Tue, 13 May 2014 11:59:08 +0000 (19:59 +0800)]
LU-4937 osc: get rid of old checksum initial value

Old code residue assumes initial checksum value as ~0, and relies on
that to check whether OST server has calculated bulk data checksum.
That is not the case anymore.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I99779eaf02d22b470978448ad3f17b35f0e9a475
Reviewed-on: http://review.whamcloud.com/10354
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-3319 procfs: Move NRS TBF proc handling to seq_files 84/9384/5
James Simmons [Wed, 21 May 2014 14:27:03 +0000 (10:27 -0400)]
LU-3319 procfs: Move NRS TBF proc handling to seq_files

With newer kernels moving their proc file system handling
to seq_files this patch migrates the proc handling for NRS
TBF to this new approach.

Change-Id: I121755b611296bf7b9527de65d0e6cf8c4980151
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/9384
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
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-3319 procfs: move osp proc handling to seq_files 36/7936/17
James Simmons [Thu, 24 Apr 2014 16:04:57 +0000 (12:04 -0400)]
LU-3319 procfs: move osp proc handling to seq_files

With 3.10 linux kernel and above proc handling now only
uses struct seq_files. This patch migrates the osp
layer proc entries over to using seq_files.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Id8f77d72fd35755f1b7b1c17fcf27e0731bd5ac1
Reviewed-on: http://review.whamcloud.com/7936
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-4913 mgc: mgc import reconnect race 67/9967/6
Andriy Skulysh [Thu, 15 May 2014 12:29:12 +0000 (15:29 +0300)]
LU-4913 mgc: mgc import reconnect race

mgc import can be reconnected by pinger or
ptlrpc_reconnect_import().
ptlrpc_invalidate_import() isn't protected against
alteration of imp_invalid state. Import can be
reconnected by pinger which makes imp_invalid
equal to false. Thus LASSERT(imp->imp_invalid) fails
in ptlrpc_invalidate_import().

It is safe to call ptlrpc_invalidate_import() when
import is deactivated, but ptlrpc_reconnect_import() doesn't
deactivate it.
Let's use only pinger when available to reconnect import

Xyratex-bug-id: MRP-1746
Change-Id: I2feb45c5f3e96da30dd5639d5824068f8a126c7d
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-on: http://review.whamcloud.com/9967
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4843 mdt: disallow old clients access striped dir 56/9956/11
wang di [Fri, 18 Apr 2014 08:31:17 +0000 (01:31 -0700)]
LU-4843 mdt: disallow old clients access striped dir

1. When old clients access striped directory, it should
return -ENOTSUPP.

2. After we send create remote directory to the MDT where
child is reside, we need check whether the parent is
resided on MDT0.

3. add hash_type description.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I20c0b04c7e1d9a0cab4241dc39d0648f5631f2f4
Reviewed-on: http://review.whamcloud.com/9956
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoRevert "LU-4933 osc: Automatically tune the max_dirty_mb" 02/10402/2
Andreas Dilger [Wed, 21 May 2014 18:18:01 +0000 (18:18 +0000)]
Revert "LU-4933 osc: Automatically tune the max_dirty_mb"

This causes frequent test failures in conf-sanity.sh
test_76a() due to changing max_dirty_mb automatically.

This reverts commit 5303c139e3cef8ed09b85cf828afbbe24ea0d7db.

Change-Id: I013d75ac85010262419a57575552bf55eff9fcdd
Reviewed-on: http://review.whamcloud.com/10402
Reviewed-by: Patrick Farrell <paf@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4925 lmv: validate lock with correct stripe FID 26/10026/20
wang di [Fri, 18 Apr 2014 19:28:45 +0000 (12:28 -0700)]
LU-4925 lmv: validate lock with correct stripe FID

In ll_lookup_it_finish, we need use the real parent(stripe)
FID to validate the parent UPDATE lock.

Add test81 in sanityn to verify the case.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Iba07f9e17103867ad7f3d78a5adcc3c9857999d6
Reviewed-on: http://review.whamcloud.com/10026
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>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4603 lmv: a few fixes about readdir of striped dir. 91/9191/29
wang di [Mon, 31 Mar 2014 14:45:46 +0000 (07:45 -0700)]
LU-4603 lmv: a few fixes about readdir of striped dir.

The offset of dir should be set to EOF as soon as
ll_dir_read() has nothing to read. Otherwise, "ls"
on NFS client will return -ELOOP.

And ll_dir_entry_start() should be able to start reading
from the beginning of the offset. Otherwise, some files
might be missing when "ls" on NFS client.

Skip . and .. for slave stripe.

If user buffer is full in ll_dir_read, remember
the last unsuccessful entry in op_hash_offset, so in next
read, it will locate entry by >= hash_offset,  instead
of >.

It will use op_same_hash_offset to remember entry offset among
the same hash entries, so mdc_read_entry will tell which entry
the caller needs.

Signed-off-by: Di Wang <di.wang@intel.com>
Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I93f94836ce59f523794581301f3bc3c491c956a5
Reviewed-on: http://review.whamcloud.com/9191
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Li Xi <pkuelelixi@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4991 test: check files in sanity 56s 60/10360/2
Wei Liu [Sat, 17 May 2014 04:45:18 +0000 (21:45 -0700)]
LU-4991 test: check files in sanity 56s

In sanity 56s, run lfs getstripe -R to check
files in case of failure.

Change-Id: I52a55aae4e669c4b6af0bea869d75cc2cfff85c3
Signed-off-by: Wei Liu <wei3.liu@intel.com>
Reviewed-on: http://review.whamcloud.com/10360
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
9 years agoLU-4606 utils: Mount uses so for backing fstype 93/10193/9
Nathaniel Clark [Thu, 1 May 2014 21:13:45 +0000 (17:13 -0400)]
LU-4606 utils: Mount uses so for backing fstype

Make mount/mkfs/tunefs functionality a per backing FSTYPE shared
object that is loadable, and seperately buildable and installable
in the appropriate lustre-osd-FSTYPE rpm.

For ZFS this allows the shared object to be directly linked to libzfs
and thus remove the hardcoding of a libzfs.so version in the lustre
source. This also has the benefit of making lustre-osd-zfs explicitly
requires libzfs (which it needs to do mount/mkfs operations).

Adjust build system to allow building of loadable module.  Including
requiering libtool as part of the build.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I8fc0f41161dc08405c1f951f12e675f364ff62c3
Reviewed-on: http://review.whamcloud.com/10193
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@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-5065 utils: uninclude lustre_idl.h from lfs 36/10336/2
John L. Hammond [Thu, 15 May 2014 12:33:38 +0000 (07:33 -0500)]
LU-5065 utils: uninclude lustre_idl.h from lfs

Move the definition of OBD_OCD_VERSION() and similar macros from
lustre_idl.h to lustre_ver.h (via lustre_ver.h.in). These macros are
primarily used in comparisons to LUSTRE_VERSION_CODE which is defined
in lustre_ver.h and so should be defined there as well. Move a few
definitions (related to FIDs, quota and striping) from lustre_idl.h to
lustre_user.h. Add some preprocessor gunk to the end of lfs.c to
ensure that lustre_idl.h has not been included indirectly or
otherwise.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I0923ff823ddaa1fd6bc5493a434470543d27f273
Reviewed-on: http://review.whamcloud.com/10336
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-4993 llite: Support 3.14 kernel changes to bio api 37/10337/2
James Simmons [Thu, 15 May 2014 16:04:03 +0000 (12:04 -0400)]
LU-4993 llite: 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 changed impacted the lustre loop device.
This patch brings support of these changes to the loop
device lustre uses.

Change-Id: I7cc9565bbf56e87e4465a76b7b5b959b063c3971
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10337
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>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5034 llite: Change readdir BRW metrics 75/10275/2
Jinshan Xiong [Fri, 9 May 2014 00:08:14 +0000 (17:08 -0700)]
LU-5034 llite: Change readdir BRW metrics

To simplify the code, change the metrics from bytes to pages.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: If458cb64ba5de14ed709f6fe03db956935201566
Reviewed-on: http://review.whamcloud.com/10275
Tested-by: Jenkins
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-3963 libcfs: move mgs, osd-ldiskfs, osp, quota to linux list api 47/10247/4
James Simmons [Fri, 9 May 2014 16:46:16 +0000 (12:46 -0400)]
LU-3963 libcfs: move mgs, osd-ldiskfs, osp, quota to linux list api

First part of the move of several of the server components
over to the linux list api.

Change-Id: Ib14d7c295f98decdca415e0904fe4fb710b83696
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10247
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-4974 lod: add prefix to struct lod_pool_iterator 45/10245/4
Andreas Dilger [Wed, 7 May 2014 06:51:47 +0000 (00:51 -0600)]
LU-4974 lod: add prefix to struct lod_pool_iterator

Add "lpi_" prefix to all fields in struct lod_pool_iterator (formerly
just "pool_iterator") so that the fields are easier to identify,
instead of having to grep for common names.

Fix up some CERROR() messages to be CDEBUG(), since they can be
printed under normal usage and are not very critical.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I5d271eec836622401a59d30edd045e220e500c1e
Reviewed-on: http://review.whamcloud.com/10245
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4961 build: remove libsysio and liblustre autoconf tests 01/10201/2
John L. Hammond [Fri, 2 May 2014 20:50:23 +0000 (15:50 -0500)]
LU-4961 build: remove libsysio and liblustre autoconf tests

Remove the libsysio and liblustre tests from config/lustre-build.m4,
lnet/autoconf/lustre-lnet.m4, and lustre/autoconf/lustre-core.m4,
leaving a temporary AM_CONDITIONAL(LIBLUSTRE, false) in their
place. Remove related bits from lustre-spec.in and debian/rules.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I9483bc9114fa0682b84e6a9014123e5838f1c1a7
Reviewed-on: http://review.whamcloud.com/10201
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Brian J. Murrell <brian.murrell@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4569 hsm: Prevent copytool from importing existing file. 85/10185/3
Henri Doreau [Thu, 1 May 2014 09:57:34 +0000 (11:57 +0200)]
LU-4569 hsm: Prevent copytool from importing existing file.

Requesting import of an already existing FID can lead to data
corruption since both inodes in lustre would refer to the same
file in the backend.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Change-Id: I38bab1c890ff84b22f8816597f6d0b367aba4b38
Reviewed-on: http://review.whamcloud.com/10185
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2675 fid: remove liblustre includes 69/10169/2
John L. Hammond [Wed, 30 Apr 2014 20:40:02 +0000 (15:40 -0500)]
LU-2675 fid: remove liblustre includes

In lustre/fid/ remove includes for liblustre builds.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I609f8ad09ac4ea59fd48b5a7cb1d29c96d0359c9
Reviewed-on: http://review.whamcloud.com/10169
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: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3953 build: look for kconfig.h in $LINUX 59/10159/3
Jeff Mahoney [Wed, 7 May 2014 13:20:54 +0000 (09:20 -0400)]
LU-3953 build: look for kconfig.h in $LINUX

On SLES systems, the kernel source and objects are not in the same
directory. kconfig.h is in the source tree, not the object tree.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I9c382a319181ff2d9958821a40d4eef6877f5867
Reviewed-on: http://review.whamcloud.com/10159
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.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-4933 osc: Automatically tune the max_dirty_mb 34/10034/3
Li Xi [Mon, 21 Apr 2014 14:20:27 +0000 (22:20 +0800)]
LU-4933 osc: Automatically tune the max_dirty_mb

When RPC size or the max RPCs in flight is increased, the actual
limit might be max_dirty_mb value. This patch automatically set
that max_dirty_mb value at connection time and when the related
values are tuned manually by proc file system.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I95e3e32294a96c4022bcefe392d375583f879b2e
Reviewed-on: http://review.whamcloud.com/10034
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-4904 test: write_append_truncate failed with divide error 48/9948/4
Andriy Skulysh [Sun, 4 May 2014 11:46:22 +0000 (14:46 +0300)]
LU-4904 test: write_append_truncate failed with divide error

fix trunc_size calculation in case of append_size == 1
Don't allow to specify write_max and append_max < 2.

Change-Id: I2a9ded4b10ef90a9e02b1b0f1229c87177f046d4
Xyratex-bug-id: MRP-1779
Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Reviewed-on: http://review.whamcloud.com/9948
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-3319 procfs: move mdt/mds proc handling to seq_files 36/8036/19
James Simmons [Fri, 9 May 2014 20:30:46 +0000 (16:30 -0400)]
LU-3319 procfs: move mdt/mds proc handling to seq_files

With 3.10 linux kernel and above proc handling now only
uses struct seq_files. This patch migrates the mdt/mds
layer proc entries over to using seq_files.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Icbafdcd2c2fe3959a51dda3f9c715b0ff8d95742
Reviewed-on: http://review.whamcloud.com/8036
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
9 years agoLU-3319 procfs: move lod proc handling to seq_files 10/8010/13
James Simmons [Wed, 26 Mar 2014 23:57:44 +0000 (19:57 -0400)]
LU-3319 procfs: move lod proc handling to seq_files

With 3.10 linux kernel and above proc handling now only
uses struct seq_files. This patch migrates the lod
layer proc entries over to using seq_files.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Iaa0f617fcd430e91f12afbc0faf6906fd275a7a5
Reviewed-on: http://review.whamcloud.com/8010
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-1330 obdclass: splits server-side procfs handling 77/2677/16
Liu Xuezhao [Mon, 5 May 2014 13:16:36 +0000 (09:16 -0400)]
LU-1330 obdclass: splits server-side procfs handling

Moves some server-side procfs routines to lprocfs_status_server.c.
Only compiles lprocfs_jobstats.c for server.

Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I32d5feda324bf76386a176e8bd78d74e59643f43
Reviewed-on: http://review.whamcloud.com/2677
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-2059 mgs: don't fail on missing params log 11/10311/4
Mikhail Pershin [Tue, 13 May 2014 14:34:03 +0000 (18:34 +0400)]
LU-2059 mgs: don't fail on missing params log

The mgc_process_cfg_log() fails if 'params' log is not
accessinble and has no local copy. In fact that log is
optional and may be just empty.

Patch allows 'params' log to be empty and checks also for
'params' log in other places to avoid wrong error messages.
There was also deprecated code in mgs_write_log_direct_all()
which creates lustre-params log which is not used by anyone now.
Third change is removal of exceptions in conf-sanity.sh and
insanity.sh related to LU-2059

The only exception is insanity test_1 which is still failed due
to other reason.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I1ad024a87b0a10665f9669fa8ff7cca2d07a09fe
Reviewed-on: http://review.whamcloud.com/10311
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
9 years agoLU-4883 lmv: disable sub-stripe access from .lustre/fid 60/10060/17
wang di [Sun, 11 May 2014 17:53:27 +0000 (10:53 -0700)]
LU-4883 lmv: disable sub-stripe access from .lustre/fid

1. Disable sub-stripe access from .lustre/fid.

2. A few fixes for fid2patch with striped directory.

3. Add sanity 162b to test such cases.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ic9372f456d452fbee4a3b05849026422264a00f6
Reviewed-on: http://review.whamcloud.com/10060
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4981 test: Fix IO redirect in sanity 133g 81/10181/4
wang di [Wed, 30 Apr 2014 20:22:20 +0000 (13:22 -0700)]
LU-4981 test: Fix IO redirect in sanity 133g

Redirect error message of badarea_io to /dev/null in
133g.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: If75628a6502511684886ffc2f1eb9711b59991de
Reviewed-on: http://review.whamcloud.com/10181
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-5018 libcfs: don't depend on configure for lustre_user.h 58/10258/5
Andreas Dilger [Fri, 9 May 2014 04:38:58 +0000 (22:38 -0600)]
LU-5018 libcfs: don't depend on configure for lustre_user.h

Don't depend on configure to detect the presence of <linux/types.h>
in order to define the __u8, __u16, __u32, and __u64 types.  Instead,
just define these types directly if <linux/types.h> is not included
already.

The <linux/types.h> header is available on Linux systems with GCC
installed, which is required to build Lustre anyway.  On non-Linux
systems they should create an appropriate <linux/types.h> compat
header in the include path.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ida0915fe1b5829f3378e459c782844cf9df060e6
Reviewed-on: http://review.whamcloud.com/10258
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoNew tag 2.5.59 2.5.59 v2_5_59 v2_5_59_0
Oleg Drokin [Thu, 15 May 2014 16:30:06 +0000 (12:30 -0400)]
New tag 2.5.59

Change-Id: Ifcb48b768cec2216939ce7ee70b1339b71f62358

9 years agoLU-4998 lustre: unpackage several headers 15/10215/5
John L. Hammond [Tue, 6 May 2014 17:30:02 +0000 (12:30 -0500)]
LU-4998 lustre: unpackage several headers

Remove lustre_idl.h, libiam.h and lustre_lfsck_user.h from the list of
packaged headers. Move conf-sanity 74a (checking that Lustre client
api program can compile and link) to sanity 400a. Add sanity 400b to
check that the headers installed in /usr/include/lustre/ (with the
exception liblustreapi.h) can be compiled without warning.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I0e99e3e0d18907488f2f8c94e33c58990262ee8a
Reviewed-on: http://review.whamcloud.com/10215
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: Robert Read <robert.read@intel.com>
9 years agoLU-2099 osd: clear iobuf up on I/O completion 05/10305/3
Alex Zhuravlev [Tue, 13 May 2014 06:33:03 +0000 (10:33 +0400)]
LU-2099 osd: clear iobuf up on I/O completion

it was a bad idea to clear iobuf on buffer release because the
same buffers can be used few times in case of transient ENOSPC.

Change-Id: Ic1d2ddaa0794f2f6f7d1ba71620e06b4ea7a99d2
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/10305
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Tested-by: Jinshan Xiong <jinshan.xiong@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-4977 llite: Fix the deadlock in balance_dirty_pages() 49/10149/3
Jinshan Xiong [Tue, 29 Apr 2014 04:52:54 +0000 (21:52 -0700)]
LU-4977 llite: Fix the deadlock in balance_dirty_pages()

If the page is already dirtied in ll_write_end() and kernel tries
to call balance_dirty_pages() to write back dirty pages in the same
thread, this is deadlock case if the page is already held by clio.

This can also fix the issue of LU-4873.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Iae7f6bd8956e5fc134568d776c9aa3a6b68b1ec5
Reviewed-on: http://review.whamcloud.com/10149
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@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-5048 ldiskfs: SLES ext4-mballoc-extra-checks patch fix 94/10294/2
Bruno Faccini [Mon, 12 May 2014 14:50:54 +0000 (16:50 +0200)]
LU-5048 ldiskfs: SLES ext4-mballoc-extra-checks patch fix

Original SLES patch version, from LU-1812, was missing a latest hunk.
This caused OSTs to be put in read-only mode due to wrong
inconsistencies detected.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: I9eb948a7ffbc6dbd11598d11ba94f51902e1e71e
Reviewed-on: http://review.whamcloud.com/10294
Tested-by: Jenkins
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
9 years agoLU-4713 tests: fix fhandle syscall test progarm 89/10189/3
Bob Glossman [Thu, 1 May 2014 15:51:51 +0000 (08:51 -0700)]
LU-4713 tests: fix fhandle syscall test progarm

Replace the incorrect local definitions in the fhandle test program
with more correct and current ones from SLES #include files.
Local defintions are only used in the case where the fhandle syscall
feature is present in the kernel, but support isn't present in glibc.
For now that particular config is only seen in SLES11SP3,
so the internal and local definitions must match the ones
from that distribution.

Test-Parameters: clientdistro=sles11sp3 testlist=sanity envdefinitions=ONLY=237
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: Ie2106325ecc2b2d2e6aeaba1cc3f8b995f503ba8
Reviewed-on: http://review.whamcloud.com/10189
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@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-4832 ptlrpc: fix incorrect name string in nrs_tbf 41/10241/3
Bob Glossman [Tue, 6 May 2014 23:16:32 +0000 (16:16 -0700)]
LU-4832 ptlrpc: fix incorrect name string in nrs_tbf

Mismatched entry name strings between lproc entry creation
and lproc entry removal led to noisy warnings a umount time.
This fix corrects the code to use "nrs_tbf_rule" for both calls.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I806b87d4571fb307d8199628e00261162f0fa089
Reviewed-on: http://review.whamcloud.com/10241
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Li Xi <pkuelelixi@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-2675 obd: decruft md_enqueue() and md_intent_lock() 05/10205/3
John L. Hammond [Fri, 28 Mar 2014 23:38:37 +0000 (18:38 -0500)]
LU-2675 obd: decruft md_enqueue() and md_intent_lock()

Remove the lmm and lmmsize parameters from both functions, storing
that data in md_op_data when needed. Remove the unused lookup_flags
parameter from md_intent_lock(), and the unused reqp parameter from
md_enqueue(). Add a union ldlm_policy_data * parameter to
md_enqueue(). Remove the unused function lmv_enqueue_remote().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ia914318a7c7cbeb59fe86d4a169559cd86f3ad57
Reviewed-on: http://review.whamcloud.com/10205
Tested-by: Jenkins
Reviewed-by: wangdi <di.wang@intel.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-4985 kernel: Store kthread_run result in task_struct ptr 66/10266/3
Ryan Haasken [Thu, 8 May 2014 14:18:36 +0000 (09:18 -0500)]
LU-4985 kernel: Store kthread_run result in task_struct ptr

The fix for LU-3498 changed most invocations of kthread_run to store
the result in a variable of task_struct pointer type and check whether
kthread_run returned an error using IS_ERR.  This change updates the
remaining calls to kthread_run to do this as well for consistency.

Signed-off-by: Ryan Haasken <haasken@cray.com>
Change-Id: I18edab018080ec51e9979164234e5bcd02a04f88
Reviewed-on: http://review.whamcloud.com/10266
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: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
9 years agoLU-4629 utils: fix array overflow 35/10135/3
Dmitry Eremin [Mon, 28 Apr 2014 19:57:36 +0000 (23:57 +0400)]
LU-4629 utils: fix array overflow

Array 'argv' of size 512 may use index value(s) 512.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I808b6f52f0e8b548978290dd08f1f5fc3ce929a1
Reviewed-on: http://review.whamcloud.com/10135
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@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-4916 lwp: don't add connection for missed LWP 72/10272/2
Mikhail Pershin [Thu, 8 May 2014 18:29:24 +0000 (22:29 +0400)]
LU-4916 lwp: don't add connection for missed LWP

The LWP isn't needed for some MDT-MDT connections,
e.g. for MDT0-MDT1, but lustre_lwp_add_conn() is called
for any 'add mdc' marker and cause error.

Patch add LWP connection only where it is needed.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I930559a14a37ee0de27cea93113a3608e7ddf9cc
Reviewed-on: http://review.whamcloud.com/10272
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: Andreas Dilger <andreas.dilger@intel.com>
9 years agoLU-5014 osd-ldiskfs: vfs_unlink api changed 35/10235/2
Bob Glossman [Tue, 6 May 2014 17:34:11 +0000 (10:34 -0700)]
LU-5014 osd-ldiskfs: vfs_unlink api changed

In newer kernels the vfs_unlink api changed to take
more arguments.  This patch creates a wrapper to let us adapt
to the different versions of vfs_unlink in old and new kernels.
As vfs_unlink is only used in server code
this only impacts server builds of lustre.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I3aa9a305530f74ee010fa5173527a37e048a9ef8
Reviewed-on: http://review.whamcloud.com/10235
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
9 years agoLU-4953 lprocfs: fix missing target_obds on multiple mounts 92/10192/3
James Simmons [Mon, 5 May 2014 16:30:19 +0000 (12:30 -0400)]
LU-4953 lprocfs: fix missing target_obds on multiple mounts

In the case of multiple mountes the target_obds only showed
up for the first mount. The reason for this was that we were
using procsym in obd_type to hold the pointer to the
proc_dir_entry for target_obds. But obd_type is shared across
all lmv/lov object instances. Instead we need to cache the
proc_dir_entry in the private data structure; lov_obd and
lmv_obd; for each type of obd device impacted. Later these
handles will be used for cleanup when the module unloads.

Change-Id: Idf7a78f9ca662af78c217bb1142409b9b0322192
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10192
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@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-4987 lustre: Remove static declaration in anonymous union 76/10176/2
Christopher J. Morrone [Wed, 30 Apr 2014 21:20:27 +0000 (14:20 -0700)]
LU-4987 lustre: Remove static declaration in anonymous union

It is not permitted in C++ to have a static declaration inside
of an anonymous union.  Before "LUSTRE_ANONYMOUS_UNION_NAME"
was added to the code in commit b40f6327bb19b6, the g++ compiler
most likely complained with an error like this:

  error: ‘struct ost_id::<anonymous union>::ostid’ invalid; an
  anonymous union can only have non-static data members [-fpermissive]

The fix from b40f6327bb19b6 conditionally eliminated the anonymous
union when a C++ compiler is being used.  That means that the API
varies depending on your choice of compiler, which is not at all
desirable.

The better fix is to address the static data member that the error
complained about.  This patch changes the code to use an unnamed
struct in place of "struct ostid" inside of the anonymous union.
That name declaration was completely unnecessary anyway, since it
was not used anywhere else.

Change-Id: I59f8341f5f9833d8a144cf2feaa178cb76e643dc
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/10176
Reviewed-by: Robert Read <robert.read@intel.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>