Displaying 1 50 of 4,511 commits (0.007s)

ZFS on Linux — cmd/zpool zpool_main.c, include libzfs.h

Dashes for zero latency values in zpool iostat -p

This prints dashes instead of zeros for zero latency values in
'zpool iostat -p'.  You'll get zero latencies reported when the
disk is idle, but technically a zero latency is invalid, since you
can't measure the latency of doing nothing.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Closes #6210

ZFS on Linux — module/icp/core kcf_sched.c, module/zfs dmu_object.c

Add kpreempt_disable/enable around CPU_SEQID uses

In zfs/dmu_object and icp/core/kcf_sched, the CPU_SEQID macro
should be surrounded by `kpreempt_disable` and `kpreempt_enable`
calls to avoid a Linux kernel BUG warning.  These code paths use
the cpuid to minimize lock contention and is is safe to reschedule
the process to a different processor at any time.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Morgan Jones <me at numin.it>
Closes #6239

ZFS on Linux — cmd/zinject zinject.c, include/sys zfs_ioctl.h

Inject zinject(8) a percentage amount of dev errs

In the original form of device error injection, it was an all or nothing
situation.  To help simulate intermittent error conditions, you can now
specify a real number percentage value. This is also very useful for our
ZFS fault diagnosis testing and for injecting intermittent errors during
load testing.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Don Brady <don.brady at intel.com>
Closes #6227

ZFS on Linux — .github PULL_REQUEST_TEMPLATE.md CONTRIBUTING.md

Provide links to info about ZFS Buildbot options

Add links for information about the ZFS buildbot options
to the contributing guidelines and PR template.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Closes #6235

ZFS on Linux — module/zfs zvol.c

Fix zvol_state_t->zv_open_count race

5559ba0 added zv_state_lock to protect zvol_state_t internal data:
this, however, doesn't guard zv->zv_open_count and
zv->zv_disk->private_data in zvol_remove_minors_impl().

Fix this by taking zv->zv_state_lock before we check its zv_open_count.

P1 (z_zvol)                       P2 (systemd-udevd)
---                               ---
zvol_remove_minors_impl()
: zv->zv_open_count==0
                                  zvol_open()
                                  ->mutex_enter(zv_state_lock)
                                  : zv->zv_open_count++
                                  ->mutex_exit(zv_state_lock)
->mutex_enter(zv->zv_state_lock)
->zvol_remove(zv)
->mutex_exit(zv->zv_state_lock)
: zv->zv_disk->private_data = NULL
->zvol_free()
-->ASSERT(zv->zv_open_count==0) *
                                  zvol_release()
                                  : zv = disk->private_data
                                  ->ASSERT(zv && zv->zv_open_count>0) *

    [7 lines not shown]
Delta File
+21 -11 module/zfs/zvol.c
+21 -11 1 file

ZFS on Linux — man/man5 zfs-module-parameters.5

Fix manual description of zfs_arc_dnode_limit

In arc_evict_state() we start pruning when arc_dnode_size >
arc_dnode_limit, i.e. arc_dnode_limit is a ceiling rather than a
floor.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Chris Dunlop <chris at onthe.net.au>
Closes #6228
Delta File
+1 -1 man/man5/zfs-module-parameters.5
+1 -1 1 file

ZFS on Linux — module/zfs zvol.c

Avoid 'queue not locked' warning at pool import.

Use queue_flag_set_unlocked() in zvol_alloc().

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Boris Protopopov <boris.protopopov at actifio.com>
Issue #6226
Delta File
+1 -1 module/zfs/zvol.c
+1 -1 1 file

ZFS on Linux — include/sys dmu.h, module/zfs zvol.c dmu.c

Make zvol operations use _by_dnode routines

This continues what was started in
0eef1bde31d67091d3deed23fe2394f5a8bf2276 by fully converting zvols
to avoid unnecessary dnode_hold() calls. This saves a small amount
of CPU time and slightly improves latencies of operations on zvols.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Richard Yao <richard.yao at prophetstor.com>
Closes #6058
Delta File
+10 -12 module/zfs/zvol.c
+2 -2 module/zfs/dmu.c
+3 -0 include/sys/dmu.h
+15 -14 3 files

ZFS on Linux — tests/zfs-tests/tests/functional/cli_root/zpool_import zpool_import_all_001_pos.ksh

Fix zpool_import_all_001_pos

Cleanup zpool_import_all_001_pos to no longer use devices.
The test is meant to test zpool import -a and by no longer
requiring devices, a number of dependencies are no longer
necessary.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Closes #6198

ZFS on Linux — module/zfs dsl_dir.c

Reduce stack usage of dsl_dir_tempreserve_impl

Buildbots and zfs-tests regularly see 7 kilobytes of stack
usage with this function. Convert self-calls to iterations

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: DHE <git at dehacked.net>
Closes #6219
Delta File
+19 -6 module/zfs/dsl_dir.c
+19 -6 1 file

ZFS on Linux — lib/libzfs libzfs_mount.c

OpenZFS 8331 - zfs_unshare returns wrong error code for smb unshare failure

Authored by: Andrew Stormont <astormont at racktopsystems.com>
Reviewed by: Marcel Telka <marcel at telka.sk>
Reviewed by: Toomas Soome <tsoome at me.com>
Approved by: Dan McDonald <danmcd at omniti.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Ported-by: Giuseppe Di Natale <dinatale2 at llnl.gov>

OpenZFS-issue: https://www.illumos.org/issues/8331
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/4f4378c
Closes #6255
Delta File
+6 -4 lib/libzfs/libzfs_mount.c
+6 -4 1 file

ZFS on Linux — tests/zfs-tests/include libtest.shlib

Use log_must_busy in destroy_pool

The log function log_must_busy was added in commit e623aea2 for
this purpose.  Update destroy_pool to use it.

Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #6217

ZFS on Linux — cmd/zfs zfs_main.c

Add missing \n for "invalid optionusage" output

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: DHE <git at dehacked.net>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: Jack Draak <jackdraak at gmail.com>
Signed-off-by: Kash Pande <kash at tripleback.net>
Closes #6203
Delta File
+1 -1 cmd/zfs/zfs_main.c
+1 -1 1 file

ZFS on Linux — cmd/ztest ztest.c, include/sys zil_impl.h trace_zil.h

OpenZFS 7578 - Fix/improve some aspects of ZIL writing

- After some ZIL changes 6 years ago zil_slog_limit got partially broken
due to zl_itx_list_sz not updated when async itx'es upgraded to sync.
Actually because of other changes about that time zl_itx_list_sz is not
really required to implement the functionality, so this patch removes
some unneeded broken code and variables.

 - Original idea of zil_slog_limit was to reduce chance of SLOG abuse by
single heavy logger, that increased latency for other (more latency critical)
loggers, by pushing heavy log out into the main pool instead of SLOG.  Beside
huge latency increase for heavy writers, this implementation caused double
write of all data, since the log records were explicitly prepared for SLOG.
Since we now have I/O scheduler, I've found it can be much more efficient
to reduce priority of heavy logger SLOG writes from ZIO_PRIORITY_SYNC_WRITE
to ZIO_PRIORITY_ASYNC_WRITE, while still leave them on SLOG.

 - Existing ZIL implementation had problem with space efficiency when it
has to write large chunks of data into log blocks of limited size.  In some
cases efficiency stopped to almost as low as 50%.  In case of ZIL stored on
spinning rust, that also reduced log write speed in half, since head had to
uselessly fly over allocated but not written areas.  This change improves
the situation by offloading problematic operations from z*_log_write() to
zil_lwb_commit(), which knows real situation of log blocks allocation and
can split large requests into pieces much more efficiently.  Also as side

    [24 lines not shown]
Delta File
+64 -54 module/zfs/zil.c
+20 -29 module/zfs/zvol.c
+15 -22 module/zfs/zfs_log.c
+18 -2 include/sys/zil_impl.h
+8 -9 module/zfs/zio.c
+5 -3 man/man5/zfs-module-parameters.5
+3 -9 4 files not shown
+133 -128 10 files

ZFS on Linux — cmd/mount_zfs mount_zfs.c

Add MS_MANDLOCK mount failure message

Commit torvalds/linux at 9e8925b6 allowed for kernels to be built
without support for mandatory locking (MS_MANDLOCK).  This will
result in 'zfs mount' failing when the nbmand=on property is set
if the kernel is built without CONFIG_MANDATORY_FILE_LOCKING.

Unfortunately we can not reliably detect prior to the mount(2) system
call if the kernel was built with this support.  The best we can do
is check if the mount failed with EPERM and if we passed 'mand'
as a mount option and then print a more useful error message. e.g.

  filesystem 'tank/fs' has the 'nbmand=on' property set, this mount
  option may be disabled in your kernel.  Use 'zfs set nbmand=off'
  to disable this option and try to mount the filesystem again.

Additionally, switch the default error message case to use
strerror() to produce a more human readable message.

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #4729
Closes #6199
Delta File
+15 -2 cmd/mount_zfs/mount_zfs.c
+15 -2 1 file

ZFS on Linux — cmd/mount_zfs mount_zfs.c

Add MS_MANDLOCK mount failure message

Commit torvalds/linux at 9e8925b6 allowed for kernels to be built
without support for mandatory locking (MS_MANDLOCK).  This will
result in 'zfs mount' failing when the nbmand=on property is set
if the kernel is built without CONFIG_MANDATORY_FILE_LOCKING.

Unfortunately we can not reliably detect prior to the mount(2) system
call if the kernel was built with this support.  The best we can do
is check if the mount failed with EPERM and if we passed 'mand'
as a mount option and then print a more useful error message. e.g.

  filesystem 'tank/fs' has the 'nbmand=on' property set, this mount
  option may be disabled in your kernel.  Use 'zfs set nbmand=off'
  to disable this option and try to mount the filesystem again.

Additionally, switch the default error message case to use
strerror() to produce a more human readable message.

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #4729
Closes #6199
Delta File
+15 -2 cmd/mount_zfs/mount_zfs.c
+15 -2 1 file

ZFS on Linux — tests/zfs-tests/tests/functional/cli_root/zpool_create zpool_create_024_pos.ksh, tests/zfs-tests/tests/functional/write_dirs write_dirs_002_pos.ksh

Skip tests that are slow on 32-bit builders

zpool_create_024_pos, zvol_misc_002_pos, write_dirs_002_pos are slow
on the buildbot 32-bit builder. Skip the test cases for now on 32-bit
builders.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Closes #6195

ZFS on Linux — tests/zfs-tests/tests/functional/features/async_destroy async_destroy_001_pos.ksh setup.ksh

Reduce async_destroy_001_pos memory requirements

The number of blocks which can be freed per TXG is controlled
by the zfs_free_max_blocks module option (defaults to 100,000).
Both speed up this test case and reduce the memory requirements
by only creating 4 TXGs worth of blocks to be freed.

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Issue #5479
Closes #6192

ZFS on Linux — cmd/zpool zpool_vdev.c, tests/runfiles linux.run

Allow add of raidz and mirror with same redundancy

Allow new members to be added to a pool mixing raidz and mirror vdevs
without giving -f, as long as they have matching redundancy.  This case
was missed in #5915, which only handled zpool create.

Add zfstest zpool_add_010_pos.ksh, with test of zpool create
followed by zpool add of mixed raidz and mirror vdevs.

Add some more mixed raidz and mirror cases to zpool_create_006_pos.ksh.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Haakan Johansson <f96hajo at chalmers.se>
Issue #5915
Closes #6181

ZFS on Linux — module/zfs zfs_ctldir.c

Linux 4.9 compat: fix zfs_ctldir xattr handling

Since torvalds/linux at d0a5b99 IOP_XATTR is used to indicate the inode
has xattr support: clear it for the ctldir inodes to avoid EIO errors.

Reviewed-by: Chunwei Chen <david.chen at osnexus.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu at gmail.com>
Closes #6189
Delta File
+3 -0 module/zfs/zfs_ctldir.c
+3 -0 1 file

ZFS on Linux — module/zfs zfs_ctldir.c

Linux 4.9 compat: fix zfs_ctldir xattr handling

Since torvalds/linux at d0a5b99 IOP_XATTR is used to indicate the inode
has xattr support: clear it for the ctldir inodes to avoid EIO errors.

Reviewed-by: Chunwei Chen <david.chen at osnexus.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu at gmail.com>
Closes #6189
Delta File
+3 -0 module/zfs/zfs_ctldir.c
+3 -0 1 file

ZFS on Linux — . configure.ac zfs-script-config.sh.in, cmd/zpool zpool_main.c zpool_iter.c

zpool iostat/status -c improvements

Users can now provide their own scripts to be run
with 'zpool iostat/status -c'. User scripts should be
placed in ~/.zpool.d to be included in zpool's
default search path.

Provide a script which can be used with
'zpool iostat|status -c' that will return the type of
device (hdd, sdd, file).

Provide a script to get various values from smartctl
when using 'zpool iostat/status -c'.

Allow users to define the ZPOOL_SCRIPTS_PATH
environment variable which can be used to override
the default 'zpool iostat/status -c' search path.

Allow the ZPOOL_SCRIPTS_ENABLED environment
variable to enable or disable 'zpool status/iostat -c'
functionality.

Use the new smart script to provide the serial command.

Install /etc/sudoers.d/zfs file which contains the sudoer

    [9 lines not shown]

ZFS on Linux — module/zfs zfs_ioctl.c zvol.c, tests/runfiles linux.run

Fix "snapdev" property issues

When inheriting the "snapdev" property to we don't always call
zfs_prop_set_special(): this prevents device nodes from being created in
certain situations. Because "snapdev" is the only *special* property
that is also inheritable we need to call zfs_prop_set_special() even
when we're not reverting it to the received value ('zfs inherit -S').

Additionally, fix a NULL pointer dereference accidentally introduced in
5559ba0 that can be triggered when setting the "snapdev" property to
the value "hidden" twice.

Finally, add a new test case "zvol_misc_snapdev" to the ZFS Test Suite.

Reviewed by: Boris Protopopov <bprotopopov at hotmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu at gmail.com>
Closes #6131
Closes #6175
Closes #6176

ZFS on Linux — . TEST

Retire filebench testing

We no longer perform automated filebench testing.  Remove
references to it for the automated testing.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Closes #6186
Delta File
+0 -13 TEST
+0 -13 1 file

ZFS on Linux — module/zfs zvol.c

Fix memory leak in zvol_set_volsize()

Move kmem_free() so it's called for every error path: this is
preferred over making `dmu_object_info_t doi` local to accommodate
older kernels with limited stacks.

Reviewed by: Boris Protopopov <bprotopopov at hotmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu at gmail.com>
Closes #6177
Delta File
+2 -1 module/zfs/zvol.c
+2 -1 1 file

ZFS on Linux — .github CONTRIBUTING.md

Explain reason for Signed-off-by in CONTRIBUTING

Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Haakan T Johansson <f96hajo at chalmers.se>
Signed-off-by: Kash Pande <kash at tripleback.net>
Closes #6183
Delta File
+6 -2 .github/CONTRIBUTING.md
+6 -2 1 file

ZFS on Linux — module/zfs zvol.c

Fix ida leak in zvol_create_minor_impl

Added missing ida_simple_remove() in the error handling path.

Reviewed-by: Chunwei Chen <david.chen at osnexus.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Boris Protopopov <boris.protopopov at actifio.com>
Closes #6159
Closes #6172
Delta File
+7 -0 module/zfs/zvol.c
+7 -0 1 file

ZFS on Linux — module/zfs bpobj.c

Don't dirty bpobj if it has no entries

In certain cases (dsl_scan_sync() is one), we may end up calling
bpobj_iterate() on an empty bpobj. Even though we don't end up
modifying the bpobj it still gets dirtied, causing unneeded writes
to the pool.

This patch adds an early bail from bpobj_iterate_impl() if bpobj
is empty to prevent unneeded writes.

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Signed-off-by: Alek Pinchuk <apinchuk at datto.com>
Closes #6164
Delta File
+4 -0 module/zfs/bpobj.c
+4 -0 1 file

ZFS on Linux — module/zfs zfs_ioctl.c zvol.c, tests/runfiles linux.run

Revert "Fix "snapdev" property inheritance behaviour"

This reverts commit 959f56b99366c8727647b5b19fb3d47555c96cf3.
An issue was uncovered by the new zvol_misc_snapdev test case
which needs to be investigated and resolved.

Reviewed-by: loli10K <ezomori.nozomu at gmail.com>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #6174
Issue #6131

ZFS on Linux — module/zfs zfs_ioctl.c zvol.c, tests/runfiles linux.run

Fix "snapdev" property inheritance behaviour

When inheriting the "snapdev" property to we don't always call
zfs_prop_set_special(): this prevents device nodes from being created in
certain situations. Because "snapdev" is the only *special* property
that is also inheritable we need to call zfs_prop_set_special() even
when we're not reverting it to the received value ('zfs inherit -S').

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu at gmail.com>
Closes #6131

ZFS on Linux — module/zfs spa.c

Fix import wrong spare/l2 device when path change

If, for example, your aux device was /dev/sdc, but now the aux device is
removed and /dev/sdc points to other device. zpool import will still
use that device and corrupt it.

The problem is that the spa_validate_aux in spa_import, rather than
validate the on-disk label, it would actually write label to disk. We
remove them since spa_load_{spares,l2cache} seems to do everything we
need and they would actually validate on-disk label.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Chunwei Chen <david.chen at osnexus.com>
Closes #6158
Delta File
+0 -6 module/zfs/spa.c
+0 -6 1 file

ZFS on Linux — module/zfs spa.c

Fix import wrong spare/l2 device when path change

If, for example, your aux device was /dev/sdc, but now the aux device is
removed and /dev/sdc points to other device. zpool import will still
use that device and corrupt it.

The problem is that the spa_validate_aux in spa_import, rather than
validate the on-disk label, it would actually write label to disk. We
remove them since spa_load_{spares,l2cache} seems to do everything we
need and they would actually validate on-disk label.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Chunwei Chen <david.chen at osnexus.com>
Closes #6158
Delta File
+0 -6 module/zfs/spa.c
+0 -6 1 file

ZFS on Linux — include/linux vfs_compat.h, module/zfs zfs_vfsops.c

Linux 4.12 compat: fix super_setup_bdi_name() call

Provide a format parameter to super_setup_bdi_name() so we don't
create duplicate names in '/devices/virtual/bdi' sysfs namespace which
would prevent us from mounting more than one ZFS filesystem at a time.

Reviewed-by: Chunwei Chen <david.chen at osnexus.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu at gmail.com>
Closes #6147

ZFS on Linux — include/linux vfs_compat.h, module/zfs zfs_vfsops.c

Linux 4.12 compat: fix super_setup_bdi_name() call

Provide a format parameter to super_setup_bdi_name() so we don't
create duplicate names in '/devices/virtual/bdi' sysfs namespace which
would prevent us from mounting more than one ZFS filesystem at a time.

Reviewed-by: Chunwei Chen <david.chen at osnexus.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu at gmail.com>
Closes #6147

ZFS on Linux — config kernel.m4

config: allow --with-linux without --with-linux-obj

Don't use `uname -r` to determine kernel build directory when the user
specified kernel source with --with-linux. Otherwise, the user is forced
to use --with-linux-obj even if they are the same directory, which is
very counterintuitive.

Signed-off-by: Chunwei Chen <david.chen at osnexus.com>
Requires-spl: refs/pull/617/head
Delta File
+2 -1 config/kernel.m4
+2 -1 1 file

ZFS on Linux — . .gitignore, module .gitignore

Improve gitignore

Ignore .*.d and exclude Makefile.in in module/
Also, ignore *.patch and *.orig files

Signed-off-by: Chunwei Chen <david.chen at osnexus.com>
Delta File
+3 -0 module/.gitignore
+2 -0 .gitignore
+5 -0 2 files

ZFS on Linux — lib/libzfs libzfs_import.c

Fix import finding spare/l2cache when path changes

When spare or l2cache device path changes, zpool import will not fix up
their paths like normal vdev. The issue is that when you supply a pool
name argument to zpool import, it will use it to filter out device which
doesn't have the pool name in the label. Since spare and l2cache device
never have that in the label, they'll always get filtered out.

We fix this by making sure we never filter out a spare or l2cache
device.

Reviewed by: Richard Elling <Richard.Elling at RichardElling.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Chunwei Chen <david.chen at osnexus.com>
Closes #6158
Delta File
+19 -2 lib/libzfs/libzfs_import.c
+19 -2 1 file

ZFS on Linux — lib/libzfs libzfs_import.c

Fix import finding spare/l2cache when path changes

When spare or l2cache device path changes, zpool import will not fix up
their paths like normal vdev. The issue is that when you supply a pool
name argument to zpool import, it will use it to filter out device which
doesn't have the pool name in the label. Since spare and l2cache device
never have that in the label, they'll always get filtered out.

We fix this by making sure we never filter out a spare or l2cache
device.

Reviewed by: Richard Elling <Richard.Elling at RichardElling.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Chunwei Chen <david.chen at osnexus.com>
Closes #6158
Delta File
+16 -2 lib/libzfs/libzfs_import.c
+16 -2 1 file

ZFS on Linux — tests/zfs-tests/tests/functional/cli_root/zpool_get zpool_get.cfg

OpenZFS 8077 - zfs-tests suite fails zpool_get_002_pos

Authored by: Yuri Pankov <yuri.pankov at nexenta.com>
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed by: John Kennedy <jwk404 at gmail.com>
Approved by: Richard Lowe <richlowe at richlowe.net>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Ported-by: bunder2015 <omfgbunder at gmail.com>

Porting Notes:
* Also corrected a quoting mistake found in our copy

OpenZFS-issue: https://www.illumos.org/issues/8077
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/481467d
Closes #6163

ZFS on Linux — tests/zfs-tests/tests/functional/rootpool rootpool_002_neg.ksh

OpenZFS 8076 - zfs-tests suite fails rootpool_002_neg

Authored by: Yuri Pankov <yuri.pankov at nexenta.com>
Reviewed by: John Kennedy <jwk404 at gmail.com>
Reviewed by: Prakash Surya <prakash.surya at delphix.com>
Approved by: Richard Lowe <richlowe at richlowe.net>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Ported-by: bunder2015 <omfgbunder at gmail.com>

OpenZFS-issue: https://www.illumos.org/issues/8076
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/ab3407e
Closes #6162

ZFS on Linux — tests/zfs-tests/tests/functional/cli_root/zpool_destroy zpool_destroy_002_pos.ksh, tests/zfs-tests/tests/functional/xattr xattr_009_neg.ksh

OpenZFS 8071 - zfs-tests: 7290 missed some cases

Authored by: Yuri Pankov <yuri.pankov at nexenta.com>
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed by: John Kennedy <jwk404 at gmail.com>
Approved by: Richard Lowe <richlowe at richlowe.net>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Ported-by: bunder2015 <omfgbunder at gmail.com>

OpenZFS-issue: https://www.illumos.org/issues/8071
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/e84991e
Closes #6161

ZFS on Linux — module/zfs dbuf.c dsl_scan.c

OpenZFS 8070 - Add some ZFS comments

Authored by: Alan Somers <asomers at gmail.com>
Reviewed by: Yuri Pankov <yuri.pankov at gmail.com>
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Approved by: Robert Mustacchi <rm at joyent.com>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Ported-by: bunder2015 <omfgbunder at gmail.com>

OpenZFS-issue: https://www.illumos.org/issues/8070
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/40713f2
Closes #6160
Delta File
+5 -0 module/zfs/dbuf.c
+2 -0 module/zfs/dsl_scan.c
+7 -0 2 files

ZFS on Linux — module/zfs zvol.c

Fix zvol_init error handling

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Richard Yao <richard.yao at prophetstor.com>
Delta File
+1 -0 module/zfs/zvol.c
+1 -0 1 file

ZFS on Linux — module/zfs lz4.c

Fix LZ4_uncompress_unknownOutputSize caused panic

Sync with kernel patches for lz4

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/log/lib/lz4

4a3a99 lz4: add overrun checks to lz4_uncompress_unknownoutputsize()
d5e7ca LZ4 : fix the data abort issue
bea2b5 lib/lz4: Pull out constant tables
99b7e9 lz4: fix system halt at boot kernel on x86_64

Reviewed-by: Chunwei Chen <david.chen at osnexus.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Feng Sun <loyou85 at gmail.com>
Closes #5975
Closes #5973
Delta File
+19 -8 module/zfs/lz4.c
+19 -8 1 file

ZFS on Linux — . configure.ac, cmd/zpool zpool_main.c

Implemented zpool sync command

This addition will enable us to sync an open TXG to the main pool
on demand. The functionality is similar to 'sync(2)' but 'zpool sync'
will return when data has hit the main storage instead of potentially
just the ZIL as is the case with the 'sync(2)' cmd.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Signed-off-by: Alek Pinchuk <apinchuk at datto.com>
Closes #6122

ZFS on Linux — cmd/zpool zpool_main.c, include libzfs.h

Force fault a vdev with 'zpool offline -f'

This patch adds a '-f' option to 'zpool offline' to fault a vdev
instead of bringing it offline.  Unlike the OFFLINE state, the
FAULTED state will trigger the FMA code, allowing for things like
autoreplace and triggering the slot fault LED.  The -f faults
persist across imports, unless they were set with the temporary
(-t) flag.  Both persistent and temporary faults can be cleared
with zpool clear.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Closes #6094

ZFS on Linux — . TEST, scripts zconfig.sh Makefile.am

Retire zconfig.sh

All of the test coverage provided by this script is now handled
as part of the ZFS Test Suite.  Remove it.

Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #6128
Delta File
+0 -696 scripts/zconfig.sh
+0 -4 TEST
+0 -1 scripts/Makefile.am
+0 -701 3 files

ZFS on Linux — module/zfs zfs_fm.c

Fixed small memory leak in ereport handling

One pre-check in zfs_ereport_start() was being called after
the nvlists were being allocated. This simply corrects that
issue.

Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tom Caputi <tcaputi at datto.com>
Closes #6140
Delta File
+6 -6 module/zfs/zfs_fm.c
+6 -6 1 file

ZFS on Linux — tests/runfiles linux.run, tests/zfs-tests/tests/functional/xattr xattr_011_pos.ksh xattr_004_pos.ksh

Enable xattr tests

Updated the xattr_common.ksh helper functions to use the attr
command on Linux to manipulate xattrs.  Added an xattr.cfg file
and reworked the user/group functionality to be consist with
the existing delegate test cases.  The intent of each test
case was preserved.

* xattr_001_pos, xattr_002_neg - Updated to verity xattr=on
  and xattr=sa sytle xattrs.

* xattr_003_neg - Use user_run helper instead of su.

* xattr_004_pos - Updated to work with ext2 xattrs.

* xattr_007_neg - Updated to use attr instead of runat.

* xattr_008_pos, xattr_009_neg8_pos, xattr_010_neg -
  Test cases disables since they aren't applicable to Linux.

* xattr_011_pos - Updated to expected behavior from GNU
  versions of the tested utilities.

* xattr_012_pos - Updated to use xattrtest to create many
  small xattrs instead of a single large one.

    [5 lines not shown]

ZFS on Linux — cmd/zed zed_disk_event.c, cmd/zed/agents zfs_mod.c

Enable remaining tests

Enable most of the remaining test cases which were previously
disabled.  The required fixes are as follows:

* cache_001_pos - No changes required.

* cache_010_neg - Updated to use losetup under Linux.  Loopback
  cache devices are allowed, ZVOLs as cache devices are not.
  Disabled until all the builders pass reliably.

* cachefile_001_pos, cachefile_002_pos, cachefile_003_pos,
  cachefile_004_pos - Set set_device_dir path in cachefile.cfg,
  updated CPATH1 and CPATH2 to reference unique files.

* zfs_clone_005_pos - Wait for udev to create volumes.

* zfs_mount_007_pos - Updated mount options to expected Linux names.

* zfs_mount_009_neg, zfs_mount_all_001_pos - No changes required.

* zfs_unmount_005_pos, zfs_unmount_009_pos, zfs_unmount_all_001_pos -
  Updated to expect -f to not unmount busy mount points under Linux.

* rsend_019_pos - Observed to occasionally take a long time on both

    [74 lines not shown]