Whamcloud - gitweb
fs/lustre-release.git
6 years agoLU-4629 libcfs: fix buffer overflow of string buffer 89/9389/19
Dmitry Eremin [Tue, 25 Feb 2014 18:34:13 +0000 (22:34 +0400)]
LU-4629 libcfs: fix buffer overflow of string buffer

Buffer overflow of string buffer due to non null terminated string.
Use strlcpy() when it's justifiable.
Use sizeof(var) instead of constants.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ib8d5493898a292e3c764170d0a0870bee26b23a0
Reviewed-on: http://review.whamcloud.com/9389
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3544 xattr: xattr data may be gone with lock held 93/10693/2
Lai Siyao [Wed, 11 Jun 2014 14:44:01 +0000 (22:44 +0800)]
LU-3544 xattr: xattr data may be gone with lock held

Xattr cached data may be gone, but lock still held, in this case,
refetch xattr from server, otherwise client will return error.

Test-Parameters: alwaysuploadlogs envdefinitions=SLOW=yes testlist=parallel-scale-nfs,parallel-scale-nfs
Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: Id6fbbef339fea540728b181b2ae91799b8151fbd
Reviewed-on: http://review.whamcloud.com/10693
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3544 nfs: don't store parent fid 92/10692/2
Lai Siyao [Tue, 3 Jun 2014 08:40:00 +0000 (16:40 +0800)]
LU-3544 nfs: don't store parent fid

It's not necessary to store parent fid in lli_pfid, because MDT
can get it's parent fid from linkea, and now that DNE stripe
directory stores master inode fid in lli_pfid, stop storing parent
fid to avoid conflict.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I924c29a1d58b008026d37265978c81ca1aa21ebb
Reviewed-on: http://review.whamcloud.com/10692
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: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3544 fid: do open-by-fid by default 76/7476/23
Lai Siyao [Wed, 28 Aug 2013 07:04:24 +0000 (15:04 +0800)]
LU-3544 fid: do open-by-fid by default

Currently client open-by-fid often packs name into the request,
but the name may be invalid, eg. NFS export, and even if it's
valid, it may cause inconsistency because this operation is done
on this fid, which is globally unique, but name not.

Since open-by-fid doesn't pack name, for striped dir we can't know
parent stripe fid on client, so we set parent fid the same as
child fid, and MDT has to find its parent fid from linkea (this is
already supported by MDT).

M_CHECK_STALE becomes obsolete.

Unset MDS_OPEN_FL_INTERNAL from open syscall flags, because these
flags are internally used, and should not be set from user space.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: Id8d32a26497b2df944c7f9ef51a418ec136a6a9b
Reviewed-on: http://review.whamcloud.com/7476
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2827 mdt: Also handle resend for layout-lock 78/10378/2
Bruno Faccini [Tue, 20 May 2014 15:50:23 +0000 (17:50 +0200)]
LU-2827 mdt: Also handle resend for layout-lock

This patch is an add-on to the generic fix for resends
handling known as :
Lustre-commit: I9a23c13313d5168d0c232fdc0acbdab330089356
Lustre-change: http://review.whamcloud.com/5978/
This patch adds handling of resend during layout-lock

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: Ideb551779a884d77ded8036c513f62557b2dfcde
Reviewed-on: http://review.whamcloud.com/10378
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-2827 ldlm: wrong handling of ldlm resends 78/5978/10
Vitaly Fertman [Tue, 6 May 2014 19:18:03 +0000 (23:18 +0400)]
LU-2827 ldlm: wrong handling of ldlm resends

If a successful reply is lost for an intent
lock request, MDS will not correctly recover
from this situation on resend. Instead, a new
lock is created.

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Tested-by: Elena Gryaznova <elena_gryaznova@xyratex.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Change-Id: I9a23c13313d5168d0c232fdc0acbdab330089356
Tested-by: Andrey Bondarenko <andrey_bondarenko@xyratex.com>
Xyratex-bug-id: MRP-975 MRP-1798
Reviewed-on: http://review.whamcloud.com/5978
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@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>
6 years agoLU-3188 osc: shorten IO calling path 92/10292/5
Bobi Jam [Mon, 12 May 2014 14:04:23 +0000 (22:04 +0800)]
LU-3188 osc: shorten IO calling path

By using osc_io_unplug_aync() for osc_queue_sync_pages() to shorten
the IO calling path, to reduce the chance of stack overflow.

This is revive of git commit 83ae17df2bdce837e62473aec27c03d67312c8ea.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I2ac32866f7adbc4701370704612c849a18a5d1ac
Reviewed-on: http://review.whamcloud.com/10292
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>
6 years agoLU-5221 vvp: release mmap_sem in error case 41/10741/2
Patrick Farrell [Wed, 18 Jun 2014 02:48:44 +0000 (21:48 -0500)]
LU-5221 vvp: release mmap_sem in error case

The mmap_sem is downed in vvp_mmap_locks, but in case of
error from cl_io_lock_alloc_add, it is not upped.

Credit to Paul Casella at Cray for finding this.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: If172e7cb4c4e6400143d76eee8aa595ae767a20c
Reviewed-on: http://review.whamcloud.com/10741
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-5150 mdc: Handle empty but non-zero acl xattr 20/10620/2
Christopher J. Morrone [Fri, 6 Jun 2014 01:02:43 +0000 (18:02 -0700)]
LU-5150 mdc: Handle empty but non-zero acl xattr

We have found that posix_acl_access can have a value
of \002\000\000\000.  In that case body->aclsize is
non-zero, but the there are no actuall acls stored
in the xattr.

In mdc_unpack_acl(), it only checks IS_ERR() on the
pointer returned by posix_acl_from_xattr(), it does not
check for NULL.  Because of the above situation, the
xattr aclsize can be non-zero, but posic_acl_from_xattr()
still returns NULL.  Passing NULL to posix_acl_valid()
crashes the kernel.

We add a check to properly handle the NULL return value.

Change-Id: Ib4f623642b86db2c88923a27cd9e77c870f301af
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/10620
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>
6 years agoLU-4929 lfs: Add lfs dirstripe to the manpage 43/10643/10
Wang Di [Sat, 7 Jun 2014 20:18:11 +0000 (13:18 -0700)]
LU-4929 lfs: Add lfs dirstripe to the manpage

Add lfs-setdirstripe.1, lfs-getdirstripe and
lfs-mkdir.1 to the manpage.

Add -m mode to "lfs mkdir" help, and also mention lfs
setdirstripe can only be done on MDT0 with adminitrator
right.

lfs getdirstripe should honor -O MDTUUID to list the
stripe information of subdirectories located on that MDT.

Remove unnecessary error message in cb_getstripe.

Fix the default getdirstripe behavior, which should list all of
its subdirectories stripe pattern, like lfs getstripe.

Fix format of LMV stripe information.

Change-Id: I7ee6ef3d6df5df50e35f5874a27e176884d79704
Signed-off-by: Wang Di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/10643
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>
6 years agoLU-5164 osd: Limit lu_object cache 37/10237/3
Brian Behlendorf [Thu, 24 Apr 2014 20:47:47 +0000 (13:47 -0700)]
LU-5164 osd: Limit lu_object cache

For OSDs like ZFS to perform optimally it's import that they be allowed
to manage their own cache.  This maximizes the likelyhood that the ARC
will prefetch and cache the right buffers.  In the existing ZFS OSD
code a cached LU object pins buffers in the ARC preventing them from
being dropped.  As the LU cache grows it can consume the entire ARC
preventing buffers for other objects, such as the OIs, from being
cached and severely impacting the performance for FID lookups.

By default this patch will only limit the LU cache for ZFS OSDs.

NOTES:

* Setting LU_CACHE_NR_ZFS_LIMIT to 0 results in an LBUG on the MDS.
  This may be because an object is being used without a reference.
  Setting a minimum value of 256 was arbitrary, ideally we would
  set this value to 0.

* In order to be able to quickly determine the number of objects in
  the hash table the CFS_HASH_COUNTER flag is added.  This adds an
  atomic_inc/dec to the hash insert/remove paths but is not expected
  to have any measurable impact of performance.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Change-Id: Ia64838d50395f1d22e558631adbfa39d44e91606
Patch-Set: 3
Reviewed-on: http://review.whamcloud.com/10237
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: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-4906 llite: read page from LMV/MDC for readdir 22/10622/8
Wang Di [Fri, 6 Jun 2014 08:49:37 +0000 (01:49 -0700)]
LU-4906 llite: read page from LMV/MDC for readdir

This patch will change readdir iteration from read entry to read
page. During rm -rf, the statahead thread will enqueue the lock for
each entry in mdc_read_entry, in the mean time, MDT will revoke
the lock when it deletes each entry, which causes ldlm lock ping
pong behavior, and a lot extra RPC.

With this patch, llite will read one page from MDC each time, then
stat ahead thread will hold the page and do getattr for all entries
in this page. Note: it does not need to hold ldlm lock after it
get the page, because stat ahead thread can live with -ENOENT
or ESTALE, if the entry becomes stale during this time.

With this patch, the performance of "rm -rf" will be improved
for current master.

1. without this patch on master

[root@mds tests]# ./createmany -o /mnt/lustre/test1/f- 10000
total: 10000 creates in 11.98 seconds: 835.02 creates/second
[root@mds tests]# ls /mnt/lustre/test1/ | wc
  10000   10000   68890
[root@mds tests]# time rm -rf /mnt/lustre/test1

real 1m4.496s
user 0m0.014s
sys 0m3.832s

2. with this patch on master

[root@mds tests]# ./createmany -o /mnt/lustre/test1/f- 10000
total: 10000 creates in 11.72 seconds: 853.50 creates/second
[root@mds tests]# time rm -rf /mnt/lustre/test1

real 0m8.151s
user 0m0.012s
sys 0m2.242s

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I189f0039b5624455b70d1381b43d452cc8766543
Reviewed-on: http://review.whamcloud.com/10622
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-1538 tests: keep /sbin/mount.lustre until cleanup 81/10481/2
Andreas Dilger [Wed, 28 May 2014 23:15:25 +0000 (17:15 -0600)]
LU-1538 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: Ied7b69f536bad87333cf5c543384723415500c1e
Reviewed-on: http://review.whamcloud.com/10481
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-4416 osd-ldiskfs: set I_LINKABLE for inc_nlink 75/10375/8
Jeff Mahoney [Fri, 6 Jun 2014 19:52:58 +0000 (15:52 -0400)]
LU-4416 osd-ldiskfs: set I_LINKABLE for inc_nlink

Linux commit f4e0c30c191 (allow the temp files created by open() to be
linked to) put in a check to warn if I_LINKABLE was not set
when trying to pull nlinks up from 0. This patch sets the flag
to properly allow it.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I2a71d0515f3735f8eb3e94d190e68e41a36e0f68
Reviewed-on: http://review.whamcloud.com/10375
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>
6 years agoLU-4629 obdclass: compile issues with variable not being initialized 05/10705/2
James Simmons [Thu, 12 Jun 2014 21:27:26 +0000 (17:27 -0400)]
LU-4629 obdclass: compile issues with variable not being initialized

One of the versions of gcc I have refuses to build obd_mount.c due to
index not be initialized in function lmd_make_exclusion before it is
used.

Change-Id: Ib549e595492e647364441c5d96df86ec513ad6c6
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10705
Reviewed-by: John L. Hammond <john.hammond@intel.com>
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>
6 years agoLU-4629 ldlm: fix uninitialized variable 64/10664/3
Dmitry Eremin [Tue, 10 Jun 2014 17:46:55 +0000 (21:46 +0400)]
LU-4629 ldlm: fix uninitialized variable

'rc' might be used uninitialized in this function.

ldlm_lib.c:1902: 'rc' is declared.
ldlm_lib.c:1910: req->rq_export->exp_disconnected is false
ldlm_lib.c:1951: 'rc' is used, but is uninitialized.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I0cea444d564f3806ed1d926ca5f4909f7005e240
Reviewed-on: http://review.whamcloud.com/10664
Reviewed-by: John L. Hammond <john.hammond@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>
6 years agoLU-4579 ldlm: Properly display time on lock timeout 01/10601/3
Oleg Drokin [Thu, 5 Jun 2014 02:14:11 +0000 (22:14 -0400)]
LU-4579 ldlm: Properly display time on lock timeout

When lock timeout happens, need to printtime since last lock
activity, not since when the lock was granted.
As such set l_last_activity to current time when sending callbacks too.

Change-Id: I31d0de6d9add67865cfcb16af903647f7cb932a0
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/10601
Tested-by: Jenkins
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
6 years agoLU-5162 mdc: Add exception entry check for radix_tree 09/10709/2
Yang Sheng [Fri, 13 Jun 2014 03:33:02 +0000 (11:33 +0800)]
LU-5162 mdc: Add exception entry check for radix_tree

We need check exception entry after radix_tree lookup.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Change-Id: I9a8493e0de7d44f04b00d43919ed5f3ab6c1d0d9
Reviewed-on: http://review.whamcloud.com/10709
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>
6 years agoLU-5140 build: Make ko2iblnd buildable with Mellanox and newer kernels 71/10571/3
James Simmons [Thu, 5 Jun 2014 00:36:17 +0000 (20:36 -0400)]
LU-5140 build: Make ko2iblnd buildable with Mellanox and newer kernels

The libcfs layer handles different level of support for process
namespace support. It does this by examining the uidgid.h
header. Both newer kernels and the Mellanox external OFED stack
supply their own uidgid.h header. In the current ko2iblnd
driver it completely ignores the Mellanox uidgid.h version
which ends up conflicting with the native uidgid.h header. The
reason libcfs misses the Mellanox handling is because the libcfs
and lnet headers are placed before the Mellanox headers so the
definations are missed. This patch moves all the libcfs and lnet
headers after the Mellanox header section.

Change-Id: Ibd7425b4a4d5b0f59c48e2007d870c67adb5f63d
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10571
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Shuichi Ihara <sihara@ddn.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-4587 utils: remove llapi_ping_target() 66/10566/3
John L. Hammond [Tue, 3 Jun 2014 07:04:51 +0000 (02:04 -0500)]
LU-4587 utils: remove llapi_ping_target()

Remove llapi_ping_target(). This ioctl() based function was prototyped
in lustreapi.h but not provided by lustreapi. Replace its only use (in
lfs) with the equivalent /proc based function llapi_target_check(),
which is provided by lustreapi. Remove the now unnecessary calls to
ptl_initialize(), obd_initialize() and obd_finalize() in lfs main().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I02d7ea706f02827bbd4bd1b9bf0d216b0e2c131b
Reviewed-on: http://review.whamcloud.com/10566
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
6 years agoLU-3319 procfs: move mdd/ofd proc handling to seq_files 49/8049/18
James Simmons [Thu, 22 May 2014 18:25:52 +0000 (14:25 -0400)]
LU-3319 procfs: move mdd/ofd proc handling to seq_files

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

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I61b7df6bfd5efd0f12e3ca1a1813b7b62d493168
Reviewed-on: http://review.whamcloud.com/8049
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: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3319 procfs: update zfs proc handling to seq_files 34/7934/7
James Simmons [Wed, 23 Apr 2014 13:31:09 +0000 (09:31 -0400)]
LU-3319 procfs: update zfs proc handling to seq_files

Migrate all zfs proc handling to using strictly seq_files.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I6dc7e65c3e74e7934a17939815ec3c334fac58c7
Reviewed-on: http://review.whamcloud.com/7934
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: Yang Sheng <yang.sheng@intel.com>
6 years agoLU-5142 test: add version check to conf-sainty.sh test_43 75/10675/2
Emoly Liu [Fri, 6 Jun 2014 14:45:00 +0000 (22:45 +0800)]
LU-5142 test: add version check to conf-sainty.sh test_43

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

Lustre-commit: 3064318df90ce7019b83c8a7f80e93a9634c00fa
Lustre-change: http://review.whamcloud.com/5700
Lustre-commit: 917b0a17d4e50db9f966763925a2dc860d932a3b
Lustre-change: http://review.whamcloud.com/9221

Test-Parameters: envdefinitions=SLOW=yes,ONLY=43 testlist=conf-sanity ossjob=lustre-b2_5 mdsjob=lustre-b2_5 ossbuildno=61 mdsbuildno=61
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: I9fad8d7002eb29b3da89213a6afc3c88de611b8f
Reviewed-on: http://review.whamcloud.com/10675
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
6 years agoLU-3496 ost: lprocfs batch update 56/6756/9
Andrew Perepechko [Tue, 3 Jun 2014 16:47:00 +0000 (20:47 +0400)]
LU-3496 ost: lprocfs batch update

Update lprocfs stats such as cache hits, misses, totals
using single calls to lprocfs_counter_add so as to
improve performance.

Non-zero number of hits/misses/totals for a single RPC
counts as a single sample for the respective hits/misses/totals
counter.

Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: Alexander Boyko <Alexander_Boyko@xyratex.com>
Reviewed-by: alexander_zarochentsev@xyratex.com
Reviewed-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
Xyratex-bug-id: MRP-999
Change-Id: I8771e81b7e0356436a1ffcb7e9c51b87580750a9
Reviewed-on: http://review.whamcloud.com/6756
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>
6 years agoLU-5160 build: warn on deprecated CFS_LIST_HEAD uses 49/10649/2
Emoly Liu [Thu, 5 Jun 2014 22:35:54 +0000 (06:35 +0800)]
LU-5160 build: warn on deprecated CFS_LIST_HEAD uses

Change checkpatch.pl script to report:
CFS_LIST_HEAD() is deprecated, use "struct list_head foo =
LIST_HEAD_INIT(foo);" instead.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: Ic667d4598c0740e2802416dd3800dacdaf378e73
Reviewed-on: http://review.whamcloud.com/10649
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
6 years agoLU-4975 ofd: add comments for ofd_capa.c functions 06/10606/4
Lai Siyao [Thu, 5 Jun 2014 15:18:20 +0000 (23:18 +0800)]
LU-4975 ofd: add comments for ofd_capa.c functions

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

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I7210ed43c7d089e86d978e6033c3f4659bc41f52
Reviewed-on: http://review.whamcloud.com/10606
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-5126 libcfs: fix illegal page access of tracefiled() 24/10524/2
Li Xi [Fri, 30 May 2014 15:13:18 +0000 (23:13 +0800)]
LU-5126 libcfs: fix illegal page access of tracefiled()

After failure happens and put_pages_back() returns the pages,
tracefiled() should not go on itering on the page list.
Otherwise, some pages might be accessed illegally.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I34dd91e3a7ca7d49e67c2bd587c481eb71873003
Reviewed-on: http://review.whamcloud.com/10524
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-4976 osp: add comments for osp_trans.c functions 61/10361/6
Fan Yong [Sat, 3 May 2014 02:39:24 +0000 (10:39 +0800)]
LU-4976 osp: add comments for osp_trans.c functions

1) Rename some structures and functions names to avoid misguiding
   others, including:
1.1) osp_async_update_interpterer_t => osp_async_request_interpreter_t
1.2) osp_insert_async_update => osp_insert_async_request
1.3) osp_unplug_async_update => osp_unplug_async_request
1.4) osp_async_update_item => osp_async_request
1.5) osp_async_update_item_init => osp_async_request_init
1.6) osp_async_update_item_fini => osp_async_request_fini
1.7) osp_insert_async_update => osp_insert_async_request

2) Add introductory comment block for the osp_trans.c file. And add
   function comment blocks to all functions in the osp_trans.c file.

3) Typo fixing and code cleanup.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I3dc4e9d6613baa035d228f2254306b6a71b2d48c
Reviewed-on: http://review.whamcloud.com/10361
Reviewed-by: Richard Henwood <richard.henwood@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-4975 ofd: documenting the ofd_fs.c 17/10417/5
Mikhail Pershin [Wed, 21 May 2014 20:02:29 +0000 (00:02 +0400)]
LU-4975 ofd: documenting the ofd_fs.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_fs.c file and add
function comment blocks to all functions in it.
Couple tiny helpers are moved inside caller code because they are
called just from one place and contains few lines of code.
This patch changes cfs_list_t->struct list_head also in several
places.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: Ifa231f941c80c98bb9a0c20bdd56e1ae379f496a
Reviewed-on: http://review.whamcloud.com/10417
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>
6 years agoLU-4423 llite: remove ll_readlink as unnecessary 23/10123/8
Oleg Drokin [Sun, 1 Jun 2014 14:27:20 +0000 (10:27 -0400)]
LU-4423 llite: remove ll_readlink as unnecessary

Taken from kernel upstrem by Al Viro:
lustre: generic_readlink() is just fine there, TYVM...

Linux-commit: 4efcc9ffcd4fc53f1f7de539842cdffa1f8e5ecc

Change-Id: I3693f5b7871f9a013c98f962eb9299ffbe32b705
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10123
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>
6 years agoLU-1199 build: Remove unused lbuild options. 22/9922/3
Ashley Pittman [Wed, 9 Apr 2014 14:05:00 +0000 (10:05 -0400)]
LU-1199 build: Remove unused lbuild options.

Remove the --tag, --ldiskfs, --reuserpm and --disable-timestamps
options entirely.

Signed-off-by: Ashley Pittman <apittman@ddn.com>
Change-Id: Icea6886730cc58f9703fb441a9cb94b58a790314
Reviewed-on: http://review.whamcloud.com/9922
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
6 years agoLU-4227 utils: mgs option is required to format a MDT/OST 87/8387/5
Emoly Liu [Mon, 9 Jun 2014 11:20:37 +0000 (19:20 +0800)]
LU-4227 utils: mgs option is required to format a MDT/OST

When running mkfs.lustre to format a MDT, --mgs or --mgsnode option
is required; while to format a OST, --mgsnode option is required.
conf-sanity.sh test_79 is added to verify the fix.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: Ia65b382aad2bc31496f3da62f15349ec38990ea0
Reviewed-on: http://review.whamcloud.com/8387
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
6 years agoLU-3382 build: clean unused link dependencies 27/6427/11
Thomas Stibor [Mon, 9 Jun 2014 14:30:14 +0000 (10:30 -0400)]
LU-3382 build: clean unused link dependencies

Compiled executable Lustre files such as:
lst, lstclient, loadgen, lustre_rsync, lctl, lfs,
debugctl and ptlctl are linked against libtinfo.so.5
and libncurses.so.5, however none of the library's
symbols are used. Same issue with multiop which is
linked against librt.so.1, however uses none of the
library's symbols, and liblustre.so which is linked
against libz.so.1 and uses none of the library's
symbols as well.

Signed-off-by: Thomas Stibor <thomas@stibor.net>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: I861878ca93dc0a07e2d4d718870a960eb86974a9
Reviewed-on: http://review.whamcloud.com/6427
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-4800 obdclass: runtime load lustre client when needed 87/10587/8
Bob Glossman [Wed, 4 Jun 2014 15:23:11 +0000 (08:23 -0700)]
LU-4800 obdclass: runtime load lustre client when needed

Manually force loading of lustre.ko during client
mounts with request_module for cases where
autoloading doesn't happen.

Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Change-Id: I807fc5cd04cf5a97d9c131208b7b13037dc10ee6
Reviewed-on: http://review.whamcloud.com/10587
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-4970 tests: turn up debugging for sanity-lfsck/14 72/10472/2
Nathaniel Clark [Wed, 28 May 2014 19:16:01 +0000 (15:16 -0400)]
LU-4970 tests: turn up debugging for sanity-lfsck/14

More information is needed to to understand the issue behind LU-4970
this enables full debugging for the duration of this test.

Test-Parameters: mdsfilesystemtype=zfs mdtfilesystemtype=zfs ostfilesystemtype=zfs testlist=sanity-lfsck
Test-Parameters: mdsfilesystemtype=zfs mdtfilesystemtype=zfs ostfilesystemtype=zfs testlist=sanity-lfsck
Test-Parameters: mdsfilesystemtype=zfs mdtfilesystemtype=zfs ostfilesystemtype=zfs testlist=sanity-lfsck
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ie5405476481bd47e797a4860dfcc604b2b9250ae
Reviewed-on: http://review.whamcloud.com/10472
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>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-5073 ptlrpc: unlink request buffer correctly 53/10353/3
Alexey Lyashkov [Fri, 16 May 2014 17:10:05 +0000 (21:10 +0400)]
LU-5073 ptlrpc: unlink request buffer correctly

outgoning buffer may be hold by lnet and don't unlinked fast,
it's break unloading a lustre modules as request hold a
reference to the export/obd

Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Change-Id: I74e59e35a1c4b0c02a3ffa2db8c788c84683b7d6
Xyratex-bug-id: MRP-1848
Reviewed-on: http://review.whamcloud.com/10353
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-3962 utils: improve names of iokit tools 83/10183/6
Andreas Dilger [Thu, 1 May 2014 05:36:18 +0000 (23:36 -0600)]
LU-3962 utils: improve names of iokit tools

Some of the names of scripts in the lustre-iokit package are very
generic and may easily cause confusion for users, or conflict with
other installations.  Rename them to more unique names and update
the files that reference them.

Fix whitespace in renamed files.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I733428467e5604bf9db916491e041253323ebbe5
Reviewed-on: http://review.whamcloud.com/10183
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-4824 utils: lfs find should continue after errors 94/9794/11
Matt Ezell [Wed, 26 Mar 2014 15:00:16 +0000 (11:00 -0400)]
LU-4824 utils: lfs find should continue after errors

'lfs find' stops as soon as it encounters an error, such as EACCES.
Change the behavior to match the regular find command: just note the
failure but continue on, returning a non-zero exit code at the end.

Signed-off-by: Matt Ezell <ezellma@ornl.gov>
Change-Id: I16ca35ec193e36134e7b93d91a20ff1d0778fe60
Reviewed-on: http://review.whamcloud.com/9794
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-4524 ldlm: improve ldlm_lock_create() return value 04/9004/8
Emoly Liu [Mon, 9 Jun 2014 03:52:50 +0000 (11:52 +0800)]
LU-4524 ldlm: improve ldlm_lock_create() return value

ldlm_lock_create() and ldlm_resource_get() always return NULL as
error reporting and "NULL" is interpretted as ENOMEM incorrectly
sometimes.
This patch fixes this problem by using ERR_PTR() rather than NULL.

Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: Ifa2e9494406617c9d29c0463cd9fcffba36cc5ae
Reviewed-on: http://review.whamcloud.com/9004
Reviewed-by: Bobi Jam <bobijam@gmail.com>
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>
6 years agoLU-4629 llite: Fix uninitialized variable 63/10663/2
Dmitry Eremin [Tue, 10 Jun 2014 17:36:17 +0000 (21:36 +0400)]
LU-4629 llite: Fix uninitialized variable

'f.f_flags' might be used uninitialized in this function.

xattr.c:248: 'f.f_flags' is declared.
xattr.c:244: lump!= ( (void* )0) is true
xattr.c:254: 'f.f_flags' is used, but is uninitialized.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I99a3679b99f2980b6e78ebfb32dfa34e047c9756
Reviewed-on: http://review.whamcloud.com/10663
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>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-4629 osd-ldiskfs: fix uninitialized members 14/10614/3
Dmitry Eremin [Thu, 5 Jun 2014 19:06:09 +0000 (23:06 +0400)]
LU-4629 osd-ldiskfs: fix uninitialized members

'new.dt' is used uninitialized in this function.

osd_compat.c:162: 'new.dt' is declared
osd_compat.c:179: 'new.dt' is used, but is uninitialized.

osd_compat.c:354: 'new.dt' is declared
osd_compat.c:382: 'new.dt' is used, but is uninitialized.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: Ic37b0fd93a83d5d1a9270fd41b8bfec2f08d4b2a
Reviewed-on: http://review.whamcloud.com/10614
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
6 years agoLU-5153 fld: lsf_lock in update_from_controller 31/10631/5
Patrick Farrell [Mon, 9 Jun 2014 18:26:27 +0000 (13:26 -0500)]
LU-5153 fld: lsf_lock in update_from_controller

The lsf_lock mutex must be held for calls to
fld_index_create, and is currently taken before calls to
fld_insert_entry.

This patch adds a comment and an assertion to
fld_insert_entry, and takes the mutex for the call in
fld_update_from_controller.

Also adds subsystem description from Di Wang to header file.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I3dcc9a53589d128343d9f386eaf7265f39ff5840
Reviewed-on: http://review.whamcloud.com/10631
Tested-by: Jenkins
Reviewed-by: wangdi <di.wang@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>
6 years agoLU-4725 obd: lu_object_find_at hung 84/10484/4
Vitaly Fertman [Thu, 5 Jun 2014 11:28:36 +0000 (15:28 +0400)]
LU-4725 obd: lu_object_find_at hung

lu_object_find_at hungs if called 2 times and object is removed
in between. It makes mdt_rename_sanity not workable for rename.
Change mdt_rename_sanity to work on existing object.

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Xyratex-bug-id: MRP-1700
Change-Id: I173e2fe3f87bc88fcc73c1813cfe4298fb515c50
Reviewed-on: http://review.whamcloud.com/10484
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-5144 mdt: rename vs link deadlock 70/10570/4
Vitaly Fertman [Tue, 3 Jun 2014 10:58:13 +0000 (14:58 +0400)]
LU-5144 mdt: rename vs link deadlock

it may happen that tgt child for rename is a directory, which is used
as tgt dir for link in parallel, as the result rename locks src child,
tgt child what may deadlock with tgt dir, src file locking of link.

As not dir cannot replace dir, check it before locking the tgt child.

Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
Xyratex-bug-id: MRP-1921
Change-Id: If8b91d27e4d978853e4b8fbb025667d22c9d2f02
Reviewed-on: http://review.whamcloud.com/10570
Tested-by: Jenkins
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
6 years agoLU-4973 mdd: only check links limit for non-directories 50/10150/6
Wang Di [Fri, 6 Jun 2014 08:54:33 +0000 (01:54 -0700)]
LU-4973 mdd: only check links limit for non-directories

Since directory(for ldiskfs) might exceed maximum link count, so we
do not check maximum link count for dir in MDD layer.

Also add a few comments to mdd_may_xxx() to describe the input
parameters and return values.

Clean up a couple of error messages that are spewed when doing
invalid namespace operations.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I36c354f6f05f1c0fb8f632dfc23f8e2ef63ebbe5
Reviewed-on: http://review.whamcloud.com/10150
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
6 years agoLU-4833 osd-zfs: object leak in __osd_object_create 62/10362/3
Isaac Huang [Mon, 19 May 2014 05:59:16 +0000 (23:59 -0600)]
LU-4833 osd-zfs: object leak in __osd_object_create

__osd_object_create() should free newly created
object upon error.

Signed-off-by: Isaac Huang <he.huang@intel.com>
Change-Id: Ie1d487765b8b4e85c3136161f21ab8260a6177b2
Reviewed-on: http://review.whamcloud.com/10362
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: Oleg Drokin <oleg.drokin@intel.com>
6 years agoNew tag 2.5.60 2.5.60 v2_5_60 v2_5_60_0
Oleg Drokin [Thu, 12 Jun 2014 18:53:18 +0000 (14:53 -0400)]
New tag 2.5.60

Change-Id: I4a65f5d7df148e409266267ae9b036e738bb51e0

6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>