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>