LU-5342 lmv: fix some byte order issues

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

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I0aa623a544c1b4d05a0ecf6ac99863c0e75daa54
Reviewed-on: http://review.whamcloud.com/11106
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5390 rpms: Replace whamcloud URL in wireshark spec file

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

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: If77ad7c833a045e0d74c5ee1328a3d33a661171f
Reviewed-on: http://review.whamcloud.com/11180
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Joshua Kugler <joshua.kugler@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4975 ofd: documenting ofd_lvb.c

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

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: Ic80fc32d62c2accab3b774d6587a27621c469a6e
Reviewed-on: http://review.whamcloud.com/10854
Tested-by: Jenkins
Reviewed-by: Ned Bass <bass6@llnl.gov>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-5323 utils: fix memory leak in lfs_hsm_request()

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

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I9c01400fafb53e3914b9ed5eb9c8c9e575423551
Reviewed-on: http://review.whamcloud.com/11116
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: frank zago <fzago@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-5359 quota: typo in s-q script

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

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I9aa178cd4dc51065d23580c72884851b0baef6e1
Reviewed-on: http://review.whamcloud.com/11125
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
LU-5399 build: fix lbuild to build OFED 3.12

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

Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: Ie448a235ff4e4e6c38efc12868b83195d33219df
Reviewed-on: http://review.whamcloud.com/11188
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5436 quota: use OBD_SLAB_FREE_PTR() to free lqe

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

Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: I07effa69ae877537b5339fe1c20fabce44468822
Reviewed-on: http://review.whamcloud.com/11289
Tested-by: Jenkins
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3660 acl: support mount option "noacl" for zfs

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

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

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

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I11075a9de8759fde956e7ae8b715840a56d0428e
Reviewed-on: http://review.whamcloud.com/11157
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5150 acl: 'cp -rp' set empty default ACL

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

add sanity 103c to verify this.

Signed-off-by: Lai Siayo <lai.siyao@intel.com>
Change-Id: I2b6947e241675c291a43999e6324bbb295d3c88d
Reviewed-on: http://review.whamcloud.com/11158
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Li Wei <wei.g.li@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4480 tests: set fail_val in sanity test_36f

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

Patch set fail_val=0 along with fail_loc in test_36f

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Change-Id: I3966a6c8a7f07fd6232a2f70329eb34cfdd95cee
Reviewed-on: http://review.whamcloud.com/8842
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
LU-4656 tests: Add MOUNT_FLAGS variable and rename MOUNTOPT

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

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

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

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

Test-Parameters:     envdefinitions=MOUNT_OPTS=user_xattr,MOUNT_FLAGS="-o flock"
Signed-off-by: Ryan Haasken <haasken@cray.com>
Change-Id: I32d078fc6b64ee93199ad7b881791e872590f711
Reviewed-on: http://review.whamcloud.com/9332
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Robert Read <robert.read@intel.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-5327 libcfs: add libcfs/types.h

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

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

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

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

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Iaab8e552d2d8a1c87ca2675f5068bc2943d8ce18
Reviewed-on: http://review.whamcloud.com/11070
Tested-by: Jenkins
Reviewed-by: Robert Read <robert.read@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-5424 mdt: allow open by FID to create striping

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

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I4d948d83dca8a542b15945d8bf3b9feaded0f5ef
Reviewed-on: http://review.whamcloud.com/11248
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>