Displaying 1 50 of 4,623 commits (0.013s)

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

Fix remounting snapshots read-write

It's not enough to preserve/restore MS_RDONLY on the superblock flags
to avoid remounting a snapshot read-write: be explicit about our
intentions to the VFS layer so the readonly bit is updated correctly
in do_remount_sb().

Reviewed-by: Chunwei Chen <tuxoko at gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu at gmail.com>
Closes #6510
Closes #6515

ZFS on Linux — etc/init.d Makefile.am

Use /sbin/openrc-run for openrc init scripts

Using /sbin/runscript is deprecated and throws a QA warning
when still used in init scripts.

Reviewed-by: bunder2015 <omfgbunder at gmail.com>
Signed-off-by: BtbN <btbn at btbn.de>
Closes #6519
Delta File
+1 -1 etc/init.d/Makefile.am
+1 -1 1 file

ZFS on Linux — . zfs-script-config.sh.in Makefile.am, cmd Makefile.am

Retire legacy test infrastructure

* Removed zpios kmod, utility, headers and man page.

* Removed unused scripts zpios-profile/*, zpios-test/*,
  zpool-config/*, smb.sh, zpios-sanity.sh, zpios-survey.sh,
  zpios.sh, and zpool-create.sh.

* Removed zfs-script-config.sh.in.  When building 'make' generates
  a common.sh with in-tree path information from the common.sh.in
  template.  This file and sourced by the test scripts and used
  for in-tree testing, it is not included in the packages.  When
  building packages 'make install' uses the same template to
  create a new common.sh which is appropriate for the packaging.

* Removed unused functions/variables from scripts/common.sh.in.
  Only minimal path information and configuration environment
  variables remain.

* Removed unused scripts from scripts/ directory.

* Remaining shell scripts in the scripts directory updated to
  cleanly pass shellcheck and added to checked scripts.

* Renamed tests/test-runner/cmd/ to tests/test-runner/bin/ to

    [8 lines not shown]
Delta File
+0 -1,298 module/zpios/pios.c
+20 -768 scripts/common.sh.in
+0 -680 cmd/zpios/zpios_main.c
+0 -476 cmd/zpios/zpios_util.c
+171 -119 scripts/zimport.sh
+0 -281 scripts/zpios.sh
+413 -4,565 80 files not shown
+604 -8,187 86 files

ZFS on Linux — tests/zfs-tests/tests/functional/grow_pool setup.ksh

Fix ZTS grow_pool/setup

The addition of the large_dnode_008_pos test case, which runs
right before this one, exposed some racy behavior in grow_pool
setup.sh on the Ubuntu kmemleak builder.  Before creating
partitions on a device destroying any existing ones.

  ERROR: set_partition 1  100mb loop0 exited 1

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 #6499
Closes #6516

ZFS on Linux — cmd/vdev_id vdev_id, man/man5 vdev_id.conf.5

vdev_id: implement slot numbering by port id

With HPE hardware and hpsa-driven SAS adapters, only a single phy is
reported, but no individual per-port phys (ie. no phy* entry below
port_dir), which breaks topology detection in the current sas_handler
code. Instead, slot information can be derived directly from the port
number. This change implements a new slot keyword "port" similar to
"id" and "lun", and assumes a default phy/port of 0 if no individual
phy entry can be found. It allows to use the "sas_direct" topology with
current HPE Dxxxx and Apollo 45xx JBODs.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Daniel Kobras <d.kobras at science-computing.de>
Closes #6484
Delta File
+5 -1 cmd/vdev_id/vdev_id
+3 -1 man/man5/vdev_id.conf.5
+8 -2 2 files

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

Add corruption failure option to zinject(8)

Added a 'corrupt' error option that will flip a bit in the data
after a read operation.  This is useful for generating checksum
errors at the device layer (in a mirror config for example). It
is also used to validate the diagnosis of checksum errors from
the zfs diagnosis engine.

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

ZFS on Linux — contrib/dracut/02zfsexpandknowledge module-setup.sh.in, contrib/dracut/90zfs module-setup.sh.in

dracut: make module-setup.sh shebang explicit

while these are source by dracut (which is a bash script)
the practical difference is small, but it is more correct:

/bin/sh is not bash on all systems (e.g. Debian and its
derivatives use /bin/dash as /bin/sh by default).

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
Closes #6491

ZFS on Linux — . configure.ac, cmd/zdb zdb.c zdb_il.c

Native Encryption for ZFS on Linux

This change incorporates three major pieces:

The first change is a keystore that manages wrapping
and encryption keys for encrypted datasets. These
commands mostly involve manipulating the new
DSL Crypto Key ZAP Objects that live in the MOS. Each
encrypted dataset has its own DSL Crypto Key that is
protected with a user's key. This level of indirection
allows users to change their keys without re-encrypting
their entire datasets. The change implements the new
subcommands "zfs load-key", "zfs unload-key" and
"zfs change-key" which allow the user to manage their
encryption keys and settings. In addition, several new
flags and properties have been added to allow dataset
creation and to make mounting and unmounting more
convenient.

The second piece of this patch provides the ability to
encrypt, decyrpt, and authenticate protected datasets.
Each object set maintains a Merkel tree of Message
Authentication Codes that protect the lower layers,
similarly to how checksums are maintained. This part
impacts the zio layer, which handles the actual

    [20 lines not shown]
Delta File
+2,611 -0 module/zfs/dsl_crypt.c
+2,037 -0 module/zfs/zio_crypt.c
+1,612 -0 lib/libzfs/libzfs_crypto.c
+1,352 -259 module/zfs/arc.c
+681 -172 module/zfs/dmu_send.c
+455 -44 lib/libzfs/libzfs_sendrecv.c
+7,342 -728 157 files not shown
+16,090 -1,203 163 files

ZFS on Linux — module/zfs zfs_vnops.c

Fix NULL pointer when O_SYNC read in snapshot

When doing read on a file open with O_SYNC, it will trigger zil_commit.
However for snapshot, there's no zil, so we shouldn't be doing that.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Chunwei Chen <david.chen at osnexus.com>
Closes #6478
Closes #6494
Delta File
+3 -1 module/zfs/zfs_vnops.c
+3 -1 1 file

ZFS on Linux — lib/libspl/include/sys kstat.h, module/icp/spi kcf_spi.c

Allow longer SPA names in stats

The pool name can be 256 chars long. Today, in /proc/spl/kstat/zfs/
the name is limited to < 32 characters. This change is to allows
bigger pool names.

Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: loli10K <ezomori.nozomu at gmail.com>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: gaurkuma <gauravk.18 at gmail.com>
Closes #6481

ZFS on Linux — cmd/raidz_test raidz_test.c, cmd/ztest ztest.c

Simplify threads, mutexs, cvs and rwlocks

* Simplify threads, mutexs, cvs and rwlocks

* Update the zk_thread_create() function to use the same trick
  as Illumos.  Specifically, cast the new pthread_t to a void
  pointer and return that as the kthread_t *.  This avoids the
  issues associated with managing a wrapper structure and is
  safe as long as the callers never attempt to dereference it.

* Update all function prototypes passed to pthread_create() to
  match the expected prototype.  We were getting away this with
  before since the function were explicitly cast.

* Replaced direct zk_thread_create() calls with thread_create()
  for code consistency.  All consumers of libzpool now use the
  proper wrappers.

* The mutex_held() calls were converted to MUTEX_HELD().

* Removed all mutex_owner() calls and retired the interface.
  Instead use MUTEX_HELD() which provides the same information
  and allows the implementation details to be hidden.  In this
  case the use of the pthread_equals() function.


    [25 lines not shown]
Delta File
+59 -231 lib/libzpool/kernel.c
+41 -79 include/sys/zfs_context.h
+18 -28 cmd/ztest/ztest.c
+6 -4 module/zfs/txg.c
+8 -2 module/zfs/spa.c
+2 -4 cmd/raidz_test/raidz_test.c
+7 -6 4 files not shown
+141 -354 10 files

ZFS on Linux — module/zfs zio.c

zio_dva_throttle_done() should allow zinjected ZIO

If fault injection is enabled, the ZIO_FLAG_IO_RETRY could be set by
zio_handle_device_injection() to generate the FMA events and update
stats. Hence, ignore the flag and process such zios.

A better fix would be to add another flag in the zio_t to indicate that
the zio is failed because of a zinject rule. However, considering the
fact that we do this in debug bits, we could do with the crude check
using the global flag zio_injection_enabled which is set to 1 when
zinject records are added.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Sanjeev Bagewadi <sanjeev.bagewadi at gmail.com>
Closes #6383
Closes #6384
Delta File
+2 -1 module/zfs/zio.c
+2 -1 1 file

ZFS on Linux — man/man1 ztest.1, man/man5 zfs-module-parameters.5

Man page fixes

* ztest.1 man page: fix typo
* zfs-module-parameters.5 man page: fix grammar

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
Closes #6492

ZFS on Linux — tests/zfs-tests/tests/functional/rsend rsend_024_pos.ksh

Disable rsend_024_pos

The test case frequently hangs on buildbot
TEST builders. Disable it for now.

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

ZFS on Linux — . configure.ac, cmd/mount_zfs Makefile.am

Add libtpool (thread pools)

OpenZFS provides a library called tpool which implements thread
pools for user space applications.  Porting this library means
the zpool utility no longer needs to borrow the kernel mutex and
taskq interfaces from libzpool.  This code was updated to use
the tpool library which behaves in a very similar fashion.

Porting libtpool was relatively straight forward and minimal
modifications were needed.  The core changes were:

* Fully convert the library to use pthreads.
* Updated signal handling.
* lmalloc/lfree converted to calloc/free
* Implemented portable pthread_attr_clone() function.

Finally, update the build system such that libzpool.so is no
longer linked in to zfs(8), zpool(8), etc.  All that is required
is libzfs to which the zcommon soures were added (which is the way
it always should have been).  Removing the libzpool dependency
resulted in several build issues which needed to be resolved.

* Moved zfeature support to module/zcommon/zfeature_common.c
* Moved ratelimiting to to module/zfs/zfs_ratelimit.c
* Moved get_system_hostid() to lib/libspl/gethostid.c

    [11 lines not shown]

ZFS on Linux — module/zfs zvol.c

zv_suspend_lock in zvol_open()/zvol_release()

Acquire zv_suspend_lock on first open and last close only.

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

ZFS on Linux — include/sys trace_dbuf.h

Crash in dbuf_evict_one with DTRACE_PROBE

Update the dbuf__evict__one() tracepoint so that it can safely
handle a NULL dmu_buf_impl_t pointer.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: loli10K <ezomori.nozomu at gmail.com>
Signed-off-by: gaurkuma <gauravk.18 at gmail.com>
Closes #6463
Delta File
+39 -19 include/sys/trace_dbuf.h
+39 -19 1 file

ZFS on Linux — . META, rpm/generic zfs-kmod.spec.in zfs.spec.in

Tag zfs-0.7.1

META file and changelog updated.

Signed-off-by: Tony Hutter <hutter2 at llnl.gov>

ZFS on Linux — module/zfs dmu_send.c

Add debug log entries for failed receive records

Log contents of a receive record if an error occurs while writing
it out to the pool. This may help determine the cause when backup
streams are rejected as invalid.

Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Ned Bass <bass6 at llnl.gov>
Closes #6465
Delta File
+100 -7 module/zfs/dmu_send.c
+100 -7 1 file

ZFS on Linux — module/zfs dmu_send.c

Add debug log entries for failed receive records

Log contents of a receive record if an error occurs while writing
it out to the pool. This may help determine the cause when backup
streams are rejected as invalid.

Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Ned Bass <bass6 at llnl.gov>
Closes #6465
Delta File
+100 -7 module/zfs/dmu_send.c
+100 -7 1 file

ZFS on Linux — module/zfs dnode.c dmu_tx.c, tests/runfiles linux.run

Fix dnode allocation race

When performing concurrent object allocations using the new
multi-threaded allocator and large dnodes it's possible to
allocate overlapping large dnodes.

This case should have been handled by detecting an error
returned by dnode_hold_impl().  But that logic only checked
the returned dnp was not-NULL, and the dnp variable was not
reset to NULL when retrying.  Resolve this issue by properly
checking the return value of dnode_hold_impl().

Additionally, it was possible that dnode_hold_impl() would
misreport a dnode as free when it was in fact in use.  This
could occurs for two reasons:

* The per-slot zrl_lock must be held over the entire critical
  section which includes the alloc/free until the new dnode
  is assigned to children_dnodes.  Additionally, all of the
  zrl_lock's in the range must be held to protect moving
  dnodes.

* The dn->dn_ot_type cannot be solely relied upon to check
  the type.  When allocating a new dnode its type will be
  DMU_OT_NONE after dnode_create().  Only latter when

    [11 lines not shown]

ZFS on Linux — module/zfs dnode.c dmu_tx.c, tests/runfiles linux.run

Fix dnode allocation race

When performing concurrent object allocations using the new
multi-threaded allocator and large dnodes it's possible to
allocate overlapping large dnodes.

This case should have been handled by detecting an error
returned by dnode_hold_impl().  But that logic only checked
the returned dnp was not-NULL, and the dnp variable was not
reset to NULL when retrying.  Resolve this issue by properly
checking the return value of dnode_hold_impl().

Additionally, it was possible that dnode_hold_impl() would
misreport a dnode as free when it was in fact in use.  This
could occurs for two reasons:

* The per-slot zrl_lock must be held over the entire critical
  section which includes the alloc/free until the new dnode
  is assigned to children_dnodes.  Additionally, all of the
  zrl_lock's in the range must be held to protect moving
  dnodes.

* The dn->dn_ot_type cannot be solely relied upon to check
  the type.  When allocating a new dnode its type will be
  DMU_OT_NONE after dnode_create().  Only latter when

    [11 lines not shown]

ZFS on Linux — contrib/dracut/90zfs module-setup.sh.in

dracut: Install commands required for vdev_id

The vdev_id script requires awk, grep, and head.  Use dracut_install to
ensure that these commands are available in the initrd environment.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Karsten Kretschmer <kkretschmer at gmail.com>
Closes #6443
Closes #6452

ZFS on Linux — contrib/dracut/90zfs module-setup.sh.in

dracut: Install commands required for vdev_id

The vdev_id script requires awk, grep, and head.  Use dracut_install to
ensure that these commands are available in the initrd environment.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Karsten Kretschmer <kkretschmer at gmail.com>
Closes #6443
Closes #6452

ZFS on Linux — cmd/zpool zpool_main.c

Fix zpool events scripted mode tab separator

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: Sen Haerens <sen at senhaerens.be>
Closes #6444
Closes #6445
Delta File
+6 -3 cmd/zpool/zpool_main.c
+6 -3 1 file

ZFS on Linux — lib/libzfs libzfs_dataset.c

Fix parsable 'zfs get' for compressratios

This is consistent with the change introduced in bc2d809 where
'zpool get -p dedupratio' does not add a trailing "x" to the output.

Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu at gmail.com>
Closes #6436
Closes #6449
Delta File
+8 -3 lib/libzfs/libzfs_dataset.c
+8 -3 1 file

ZFS on Linux — tests/zfs-tests/tests/functional/reservation reservation_004_pos.sh, tests/zfs-tests/tests/functional/rsend rsend.kshlib send-c_lz4_disabled.ksh

Retry zfs destroy when busy in rsend tests

rsend tests in the test suite frequently create and
destroy datasets. It is possible for zfs destroy to
return an error code indicating the dataset is busy.
Simply use a log_must_busy in these cases to retry
destroying those datasets. Other fixes to rsend test
cases to avoid unmounting and remounting filesystems
and some cleanup.

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

ZFS on Linux — module/zfs zfs_vnops.c zfs_ctldir.c

Use SET_ERROR for constant non-zero return codes

Update many return and assignment statements to follow the convention
of using the SET_ERROR macro when returning a hard-coded non-zero
value from a function. This aids debugging by recording the error
codes in the debug log.

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Signed-off-by: Ned Bass <bass6 at llnl.gov>
Closes #6441

ZFS on Linux — module/zfs zio.c

Only record zio->io_delay on reads and writes

While investigating https://github.com/zfsonlinux/zfs/issues/6425 I
noticed that ioctl ZIOs were not setting zio->io_delay correctly.  They
would set the start time in zio_vdev_io_start(), but never set the end
time in zio_vdev_io_done(), since ioctls skip it and go straight to
zio_done().  This was causing spurious "delayed IO" events to appear,
which would eventually get rate-limited and displayed as
"Missed events" messages in zed.

To get around the problem, this patch only sets zio->io_delay for read
and write ZIOs, since that's all we care about anyway.

Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Closes #6425
Closes #6440
Delta File
+1 -1 module/zfs/zio.c
+1 -1 1 file

ZFS on Linux — module/zfs zio.c

Only record zio->io_delay on reads and writes

While investigating https://github.com/zfsonlinux/zfs/issues/6425 I
noticed that ioctl ZIOs were not setting zio->io_delay correctly.  They
would set the start time in zio_vdev_io_start(), but never set the end
time in zio_vdev_io_done(), since ioctls skip it and go straight to
zio_done().  This was causing spurious "delayed IO" events to appear,
which would eventually get rate-limited and displayed as
"Missed events" messages in zed.

To get around the problem, this patch only sets zio->io_delay for read
and write ZIOs, since that's all we care about anyway.

Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Closes #6425
Closes #6440
Delta File
+1 -1 module/zfs/zio.c
+1 -1 1 file

ZFS on Linux — tests/zfs-tests/tests/functional/mmp mmp_on_uberblocks.ksh mmp.kshlib

mmp_on_uberblocks: Use kstat for uberblock counts

Use kstat to get a more accurate count of uberblock updates.
Using a loop with zdb can potentially miss some uberblocks.

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

ZFS on Linux — tests/zfs-tests/tests/functional/mmp mmp_on_uberblocks.ksh mmp.kshlib

mmp_on_uberblocks: Use kstat for uberblock counts

Use kstat to get a more accurate count of uberblock updates.
Using a loop with zdb can potentially miss some uberblocks.

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

ZFS on Linux — module/zfs zvol.c, tests/zfs-tests/include libtest.shlib

Fix volmode=none property behavior at import time

At import time spa_import() calls zvol_create_minors() directly: with
the current implementation we have no way to avoid device node
creation when volmode=none.

Fix this by enforcing volmode=none directly in zvol_alloc().

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

ZFS on Linux — module/zfs zvol.c, tests/zfs-tests/include libtest.shlib

Fix volmode=none property behavior at import time

At import time spa_import() calls zvol_create_minors() directly: with
the current implementation we have no way to avoid device node
creation when volmode=none.

Fix this by enforcing volmode=none directly in zvol_alloc().

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

ZFS on Linux — rpm/generic zfs-kmod.spec.in, rpm/redhat zfs-kmod.spec.in

 Fix aarch64 build

Add aarch64 to the list of architecture which do not sanitize the
LDFLAGS from the environment.  See fb963d33 for details.

Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #6424

ZFS on Linux — rpm/generic zfs-kmod.spec.in, rpm/redhat zfs-kmod.spec.in

 Fix aarch64 build

Add aarch64 to the list of architecture which do not sanitize the
LDFLAGS from the environment.  See fb963d33 for details.

Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #6424

ZFS on Linux — tests/zfs-tests/tests/functional/cli_root/zfs_send zfs_send_007_pos.ksh

Disable zfs_send_007_pos

Test case zfs_send_007_pos regularly is killed
by test-runner during zfs-tests on buildbot. Disable
it for now until further investigation can be done.

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

ZFS on Linux — tests/zfs-tests/tests/functional/cli_root/zfs_send zfs_send_007_pos.ksh

Disable zfs_send_007_pos

Test case zfs_send_007_pos regularly is killed
by test-runner during zfs-tests on buildbot. Disable
it for now until further investigation can be done.

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

ZFS on Linux — lib/libzfs libzfs_dataset.c, module/zfs zfs_ioctl.c

zfs promote|rename .../%recv should be an error

If we are in the middle of an incremental 'zfs receive', the child
.../%recv will exist. If we run 'zfs promote' .../%recv, it will "work",
but then zfs gets confused about the status of the new dataset.
Attempting to do this promote should be an error.

Similarly renaming .../%recv datasets should not be allowed.

Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu at gmail.com>
Closes #4843
Closes #6339

ZFS on Linux — man/man8 Makefile.am

Correct man page generation

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>
Signed-off-by: bunder2015 <omfgbunder at gmail.com>
Closes #6409
Closes #6411
Delta File
+1 -1 man/man8/Makefile.am
+1 -1 1 file

ZFS on Linux — man/man8 Makefile.am

Correct man page generation

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>
Signed-off-by: bunder2015 <omfgbunder at gmail.com>
Closes #6409
Closes #6410
Delta File
+1 -1 man/man8/Makefile.am
+1 -1 1 file

ZFS on Linux — . META, rpm/generic zfs-kmod.spec.in zfs.spec.in

Tag zfs-0.7.0

META file and changelog updated.

Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Delta File
+3 -11 rpm/generic/zfs-kmod.spec.in
+3 -11 rpm/generic/zfs.spec.in
+1 -1 META
+7 -23 3 files

ZFS on Linux — module/zfs spa_history.c

OpenZFS 8508 - Mounting a zpool on 32-bit platforms panics

Authored by: Justin Hibbits <chmeeedalf at gmail.com>
Reviewed by: Matt Ahrens <mahrens at delphix.com>
Approved by: Dan McDonald <danmcd at joyent.com>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Ported-by: Giuseppe Di Natale <dinatale2 at llnl.gov>

OpenZFS-issue: https://www.illumos.org/issues/8508
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/15fc257
Closes #6404
Delta File
+1 -1 module/zfs/spa_history.c
+1 -1 1 file

ZFS on Linux — include/sys trace_dbgmsg.h sdt.h, man/man5 zfs-module-parameters.5

Add line info and SET_ERROR() to ZFS debug log

Redefine the SET_ERROR macro in terms of __dprintf() so the error
return codes get logged as both tracepoint events (if tracepoints are
enabled) and as ZFS debug log entries.  This also allows us to use
the same definition of SET_ERROR() in kernel and user space.

Define a new debug flag ZFS_DEBUG_SET_ERROR=512 that may be bitwise
or'd into zfs_flags. Setting this flag enables both dprintf() and
SET_ERROR() messages in the debug log. That is, setting
ZFS_DEBUG_SET_ERROR and ZFS_DEBUG_DPRINTF|ZFS_DEBUG_SET_ERROR are
equivalent (this was done for sake of simplicity). Leaving
ZFS_DEBUG_SET_ERROR unset suppresses the SET_ERROR() messages which
helps avoid cluttering up the logs.

To enable SET_ERROR() logging, run:

  echo 1 >   /sys/module/zfs/parameters/zfs_dbgmsg_enable
  echo 512 > /sys/module/zfs/parameters/zfs_flags

Remove the zfs_set_error_class tracepoints event class since
SET_ERROR() now uses __dprintf(). This sacrifices a bit of
granularity when selecting individual tracepoint events to enable but
it makes the code simpler.


    [8 lines not shown]

ZFS on Linux — man/man5 zpool-features.5

Fix zpool-features.5 indentation

The userobj_accounting feature described in the zpool-features.5
man page was incorrectly indented.  Fix it.

Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #6402
Delta File
+2 -0 man/man5/zpool-features.5
+2 -0 1 file

ZFS on Linux — cmd/zstreamdump zstreamdump.c, module/zfs dmu_send.c

Some additional send stream validity checking

Check in the DMU whether an object record in a send stream being
received contains an unsupported dnode slot count, and return an
error if it does. Failure to catch an unsupported dnode slot count
would result in a panic when the SPA attempts to increment the
reference count for the large_dnode feature and the pool has the
feature disabled. This is not normally an issue for a well-formed
send stream which would have the DMU_BACKUP_FEATURE_LARGE_DNODE flag
set if it contains large dnodes, so it will be rejected as
unsupported if the required feature is disabled. This change adds a
missing object record field validation.

Add missing stream feature flag checks in
dmu_recv_resume_begin_check().

Consolidate repetitive comment blocks in dmu_recv_begin_check().

Update zstreamdump to print the dnode slot count (dn_slots) for an
object record when running in verbose mode.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Signed-off-by: Ned Bass <bass6 at llnl.gov>
Closes #6396

ZFS on Linux — module/zfs zfs_ioctl.c

Fix 'zpool clear' on suspended pools

'zpool clear' should be able to resume I/O on suspended, but otherwise
healthy, pools.

4a283c7 accidentally introduced a new code path where we call
txg_wait_synced() on the suspended pool before we had the chance to
resume I/O via zio_resume(): this results in the 'zpool clear'
command hanging indefinitely, waiting for a TXG that cannot be synced.

Fix this by avoiding the call to txg_wait_synced().

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: loli10K <ezomori.nozomu at gmail.com>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #6399
Delta File
+2 -1 module/zfs/zfs_ioctl.c
+2 -1 1 file

ZFS on Linux — config kernel-bdi.m4

Fix autoconf detection of super_setup_bdi_name

The previous autoconf test for the presence of super_setup_bdi_name()
uses an invocation with an incorrect type signature, producing a
warning by the compiler when the test is run. This gets elevated to an
error when compiling with -Werror=format-security, causing autoconf to
falsely infer super_setup_bdi_name() is not present. This updates the
testing code to match the invocation used in
include/linux/vfs_compat.h.

Reviewed-by: loli10K <ezomori.nozomu at gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Justin Bedo <cu at cua0.org>
Closes #6398
Delta File
+2 -1 config/kernel-bdi.m4
+2 -1 1 file

ZFS on Linux — tests/zfs-tests/tests/functional/events events_common.kshlib

Increase delay for zed log in events tests

In zed event test cases, a brief delay was introduced
to allow for events to make it to the zed log. On at least
one buildbot builder, the 1 second delay is not long enough.
Therefore, increasing the delay should ensure the zed has
more than enough time to write to its log.

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

ZFS on Linux — module/zcommon zfs_namecheck.c

Fix buffer overflow in dsl_dataset_name()

If we're creating a pool with version >= SPA_VERSION_DSL_SCRUB (v11)
we need to account for additional space needed by the origin dataset
which will also be snapshotted: "poolname"+"/"+"$ORIGIN"+"@"+"$ORIGIN".

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Signed-off-by: loli10K <ezomori.nozomu at gmail.com>
Closes #6374
Delta File
+8 -1 module/zcommon/zfs_namecheck.c
+8 -1 1 file