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

ZFS on Linux — man/man8 zpool.8

Minor fixes in zpool iostat -c documentation (#6370)

- Use nested [] notation to denote optional script list elements
- Fix space before comma after smarctl(8)
- Fix typo and formatting error in reference to -v option
- Fix spelling errors

Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Signed-off-by: Ned Bass <bass6 at llnl.gov>
Closes #6370
Delta File
+9 -9 man/man8/zpool.8
+9 -9 1 file

ZFS on Linux — cmd/zpool zpool_main.c

Fix coverity defects: CID 165757

CID 165757: Control flow issues (MISSING_BREAK)

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: George Melikov <mail at gmelikov.ru>
Closes #6348
Delta File
+1 -0 cmd/zpool/zpool_main.c
+1 -0 1 file

ZFS on Linux — . META

Tag 0.7.0-rc5

Fifth release candidate.

Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
`
Delta File
+1 -1 META
+1 -1 1 file

ZFS on Linux — lib/libspl/include assert.h

Fixed VERIFY3_IMPL() bug from 682ce104

When VERIFY3_IMPL() was adjusted in 682ce104, the values of
the operands were omitted from the variadic arguments list.
This patch simply corrects this.

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: Tom Caputi <tcaputi at datto.com>
Closes #6343
Delta File
+2 -1 lib/libspl/include/assert.h
+2 -1 1 file

ZFS on Linux — include/sys zvol.h, include/sys/fs zfs.h

Add port of FreeBSD 'volmode' property

The volmode property may be set to control the visibility of ZVOL
block devices.

This allow switching ZVOL between three modes:
   full - existing fully functional behaviour (default)
   dev  - hide partitions on ZVOL block devices
   none - not exposing volumes outside ZFS

Additionally the new zvol_volmode module parameter can be used to
control the default behaviour.

This functionality can be used, for instance, on "backup" pools to
avoid cluttering /dev with unneeded zd* devices.

Original-patch-by: mav <mav at FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Ported-by: loli10K <ezomori.nozomu at gmail.com>
Signed-off-by: loli10K <ezomori.nozomu at gmail.com>

FreeBSD-commit: https://github.com/freebsd/freebsd/commit/dd28e6bb
Closes #1796
Closes #3438
Closes #6233

ZFS on Linux — module/zfs zio.c

Fix vdev_probe() call outside SCL_STATE_ALL lock

When an IO fails then zio_vdev_io_done() can call vdev_probe()
to determine the health of the vdev.  This is safe as long as
the original zio was submitted with zio_wait() and holds the
SCL_STATE_ALL lock over the operation.

If zio_no_wait() was used then the done callback will submit
the probe IO outside the SCL_STATE_ALL lock and hit this
ASSERT in zio_create()

  ASSERT(!vd || spa_config_held(spa, SCL_STATE_ALL, RW_READER));

Resolve the issue by only allowing vdev_probe() to be called
when there's a waiter indicating the caller is using zio_wait().
This assumes that caller is still holding SCL_STATE_ALL.

This issue isn't MMP specific but was surfaced when testing.
Without this patch it can be reproduced by running:

  zpool set multihost on <pool>
  zinject -d <vdev> -e io -T write -f 50 <pool> -L uber

Reviewed-by: Olaf Faaland <faaland1 at llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>

    [3 lines not shown]
Delta File
+1 -1 module/zfs/zio.c
+1 -1 1 file

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

Multi-modifier protection (MMP)

Add multihost=on|off pool property to control MMP.  When enabled
a new thread writes uberblocks to the last slot in each label, at a
set frequency, to indicate to other hosts the pool is actively imported.
These uberblocks are the last synced uberblock with an updated
timestamp.  Property defaults to off.

During tryimport, find the "best" uberblock (newest txg and timestamp)
repeatedly, checking for change in the found uberblock.  Include the
results of the activity test in the config returned by tryimport.
These results are reported to user in "zpool import".

Allow the user to control the period between MMP writes, and the
duration of the activity test on import, via a new module parameter
zfs_multihost_interval.  The period is specified in milliseconds.  The
activity test duration is calculated from this value, and from the
mmp_delay in the "best" uberblock found initially.

Add a kstat interface to export statistics about Multiple Modifier
Protection (MMP) updates. Include the last synced txg number, the
timestamp, the delay since the last MMP update, the VDEV GUID, the VDEV
label that received the last MMP update, and the VDEV path.  Abbreviated
output below.


    [34 lines not shown]
Delta File
+475 -0 module/zfs/mmp.c
+254 -29 module/zfs/spa.c
+212 -3 module/zfs/spa_stats.c
+186 -0 tests/zfs-tests/tests/functional/mmp/mmp.kshlib
+123 -30 cmd/zpool/zpool_main.c
+40 -91 cmd/zdb/zdb.c
+1,356 -97 50 files not shown
+2,646 -250 56 files

ZFS on Linux — tests/test-runner/cmd test-runner.py

Exit test-runner with non-zero if tests are KILLED

fe46eeb introduced non-zero exit codes to test-runner.
A non-zero exit code should be returned when test-runner
decided to kill a test and mark it as KILLED.

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 #6325

ZFS on Linux — tests/zfs-tests/tests/functional/chattr chattr_001_pos.ksh

Fix chattr_001_pos

Commands should be eval()ed if they involve a shell redirection,
otherwise we end up writing log_* functions messages to the output.

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>
Signed-off-by: loli10K <ezomori.nozomu at gmail.com>
Closes #6300
Closes #6323

ZFS on Linux — config deb.am

Prevent dependencies on Debianized packages

Call dpkg-shlibdeps with arguments excluding the Debianized packages
lib{uutil1,nvpair1,zfs2,zpool2}linux from the auto-generated
dependencies of generated .debs. A shim dh_shlibdeps that calls the
real dh_shlibdeps with corresponding arguments is installed into a
temporary directory, which is in turn pre-pended to the PATH for the
alien call, working around alien's inability to directly alter the
dependencies of its output debs. Resolves #6106.

Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Antonio Russo <antonio.e.russo at gmail.com>
Closes #6309
Closes #6106
Delta File
+16 -1 config/deb.am
+16 -1 1 file

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

Fix 'zpool clear' on readonly pools

Illumos 4080 inadvertently allows 'zpool clear' on readonly pools: fix
this by reintroducing a check (POOL_CHECK_READONLY) in zfs_ioc_clear
registration code.

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

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

Implemented zpool scrub pause/resume

Currently, there is no way to pause a scrub. Pausing may
be useful when the pool is busy with other I/O to preserve
bandwidth.

This patch adds the ability to pause and resume scrubbing.
This is achieved by maintaining a persistent on-disk scrub state.
While the state is 'paused' we do not scrub any more blocks.
We do however perform regular scan housekeeping such as
freeing async destroyed and deadlist blocks while paused.

Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed by: Thomas Caputi <tcaputi at datto.com>
Reviewed-by: Serapheim Dimitropoulos <serapheimd at gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alek Pinchuk <apinchuk at datto.com>
Closes #6167

ZFS on Linux — module/zfs zvol.c

Reschedule processes on -ERESTARTSYS

On the single core machine the system may hang when the
spa_namespare_lock acquisition fails in the zvol_first_open
function. It returns -ERESTARTSYS error what causes the
endless loop in __blkdev_get function.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Arkadiusz Bubała <arkadiusz.bubala at open-e.com>
Closes #6283
Closes #6312
Delta File
+2 -0 module/zfs/zvol.c
+2 -0 1 file

ZFS on Linux — tests/zfs-tests/tests/functional/acl/posix posix_003_pos.ksh posix_001_pos.ksh, tests/zfs-tests/tests/functional/history history_common.kshlib

ZTS: replace su commands by run_user function

Needed for PATH variable to be passed into su.  The
posix* tests were fixed, but they need further investigation
before they can be enabled.

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

ZFS on Linux — lib/libspl/include assert.h

Musl libc fixes

Musl libc's <stdio.h> doesn't include <stdarg.h>, which cause
`va_start` and `va_end` end up being undefined symbols.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Leorize <alaviss at users.noreply.github.com>
Closes #6310
Delta File
+1 -0 lib/libspl/include/assert.h
+1 -0 1 file

ZFS on Linux — module/icp/asm-x86_64/sha2 sha256_impl.S sha512_impl.S

Clang fixes

Clang doesn't support `/` as comment in assembly, this patch replaces
them with `#`.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Leorize <alaviss at users.noreply.github.com>
Closes #6311

ZFS on Linux — scripts zfs-tests.sh, tests README.md

ZTS: minor typo and old default values

Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: George Melikov <mail at gmelikov.ru>
Closes #6298
Delta File
+2 -2 tests/README.md
+1 -1 scripts/zfs-tests.sh
+3 -3 2 files

ZFS on Linux — tests/test-runner/cmd test-runner.py

On failure tests-runner should do non-zero exit

Right now test runner will always exit(0).
It's helpful to have zfs-tests.sh provide different
exit values depending on if everything passed or not.
We can then use common shell cmds to run tests until failure.

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: Alek Pinchuk <apinchuk at datto.com>
Closes #6285

ZFS on Linux — tests/test-runner/include logapi.shlib

Print fail messages before callbacks in test suite

Reorder operations in _endlog so failure messages get
printed prior to performing callbacks and cleanup. This
helps clarify why a test failed and places the message
closer to the point of incident in the resulting logs.

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 #6281

ZFS on Linux — cmd/ztest ztest.c, module/zfs dbuf.c dnode.c

Clean up large dnode code

Resolves issues discovered when porting to OpenZFS.

* Lint warnings.
* Made dnode_move_impl() large dnode aware.  This
  functionality is currently unused on Linux.

Reviewed-by: Ned Bass <bass6 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Matthew Ahrens <mahrens at delphix.com>
Closes #6262
Delta File
+2 -1 module/zfs/dbuf.c
+2 -1 module/zfs/dnode.c
+1 -0 cmd/ztest/ztest.c
+5 -2 3 files

ZFS on Linux — module/zfs arc.c

Set arc_meta_limit, arc_dnode_limit on change

Make zfs_arc_meta_limit_percent and zfs_arc_dnode_limit_percent behave
as you would expect from zfs-module-parameters.5.

- recalculate arc_meta_limit if zfs_arc_meta_limit_percent changes
- recalculate arc_dnode_limit if zfs_arc_dnode_limit_percent changes
- correctly set arc_meta_limit and arc_dnode_limit if zfs_arc_max or
  zfs_arc_meta_min changes

Reviewed-by: Tim Chase <tim at chase2k.com>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Chris Dunlop <chris at onthe.net.au>
Closes #6269
Delta File
+24 -18 module/zfs/arc.c
+24 -18 1 file

ZFS on Linux — man/man8 zfs.8

Convert man zfs.8 to mdoc (OpenZFS sync)

* Fixed some typos
* Additional description for some commands arguments
* Text reworked to be in sync with OpenZFS
* Added Linux as .Os type

Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #6282
Delta File
+3,923 -3,800 man/man8/zfs.8
+3,923 -3,800 1 file

ZFS on Linux — cmd/ztest Makefile.am, config user-no-format-truncation.m4 user.m4

GCC 7.1 fixes

GCC 7.1 with will warn when we're not checking the snprintf()
return code in cases where the buffer could be truncated. This
patch either checks the snprintf return code (where applicable),
or simply disables the warnings (ztest.c).

Reviewed-by: Chunwei Chen <david.chen at osnexus.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tony Hutter <hutter2 at llnl.gov>
Closes #6253

ZFS on Linux — config kernel-bio-op.m4

Fix RHEL 7.4 bio_set_op_attrs build error

On RHEL 7.4, include/linux/bio.h now includes a macro for
bio_set_op_attrs that conflicts with the ifndef in ZFS
include/linux/blkdev_compat.h.  This patch fixes the build.

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 #6234
Closes #6271
Delta File
+1 -1 config/kernel-bio-op.m4
+1 -1 1 file

ZFS on Linux — module/zfs vdev_queue.c

Cap maximum aggregate IO size

Commit 8542ef8 allowed optional IOs to be aggregated beyond
the specified aggregation limit.  Since the aggregation limit
was also used to enforce the maximum block size, setting
`zfs_vdev_aggregation_limit=16777216` could result in an
attempt to allocate an ABD larger than 16M.

Reviewed by: Matthew Ahrens <mahrens at delphix.com>
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 #6259
Closes #6270
Delta File
+5 -2 module/zfs/vdev_queue.c
+5 -2 1 file

ZFS on Linux — tests/zfs-tests/tests/functional/cli_root/zpool_add zpool_add_005_pos.ksh

Fix zpool_add_005_pos

Under Linux the existence of a block device in /etc/fstab is
not sufficient to prevent the use of the force flag.  Without
the force flag a warning will be printed that the device has
a filesystem of a given type.  Providing the force option
will overwrite that filesystem as long as it is not actively
mounted.

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>
Tested-by: bunder2015 <omfgbunder at gmail.com>
Signed-off-by: bunder2015 <omfgbunder at gmail.com>
Closes #6267
Closes #6272

ZFS on Linux — module/zfs arc.c

OpenZFS 5220 - L2ARC does not support devices that do not provide 512B access

Authored by: Andriy Gapon <avg at FreeBSD.org>
Reviewed by: George Wilson <george.wilson at delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel at delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov at nexenta.com>
Approved by: Dan McDonald <danmcd at joyent.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Ported-by: Giuseppe Di Natale <dinatale2 at llnl.gov>

OpenZFS-issue: https://www.illumos.org/issues/5220
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/403a8da
Closes #6260
Delta File
+56 -11 module/zfs/arc.c
+56 -11 1 file

ZFS on Linux — include libzfs_core.h, lib/libzfs libzfs_dataset.c

OpenZFS 8264 - want support for promoting datasets in libzfs_core

Authored by: Andrew Stormont <astormont at racktopsystems.com>
Reviewed by: Andriy Gapon <avg at FreeBSD.org>
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed by: Dan McDonald <danmcd at kebe.com>
Approved by: Dan McDonald <danmcd at kebe.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Ported-by: Giuseppe Di Natale <dinatale2 at llnl.gov>

OpenZFS-issue: https://www.illumos.org/issues/8264
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/a4b8c9a
Closes #6254

ZFS on Linux — tests/zfs-tests/tests/functional/cli_root/zfs_clone zfs_clone_010_pos.ksh

Fix arithmetic error message in zfs_clone_010_pos

zfs_clone_010_pos.ksh: line 234: ZFS_MAXPROPLEN: arithmetic syntax error

Reviewed-by: Kash Pande <kash at tripleback.net>
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: bunder2015 <omfgbunder at gmail.com>
Closes #6268

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

Call cv_signal() with mutex held

In bqueue_dequeue(), call cv_signal() with bq_lock held.
Re-enable rsend_009_pos to test the fix.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Boris Protopopov <boris.protopopov at actifio.com>
Closes #5887

ZFS on Linux — include/sys abd.h

OpenZFS 8426 - mark immutable buffer arguments as such in abd.h

Authored by: Andriy Gapon <avg at FreeBSD.org>
Reviewed by: Matt Ahrens <mahrens at delphix.com>
Approved by: Robert Mustacchi <rm at joyent.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/8426
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/37359a6
Closes #6287
Delta File
+2 -2 include/sys/abd.h
+2 -2 1 file

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 — lib/libzfs libzfs_dataset.c

OpenZFS 8418 - zfs_prop_get_table() call in zfs_validate_name() is a no-op

Authored by: Marcel Telka <marcel at telka.sk>
Reviewed by: Vitaliy Gusev <gusev.vitaliy at icloud.com>
Approved by: Matthew Ahrens <mahrens at delphix.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/8418
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/e09ba01
Closes #6305
Delta File
+0 -1 lib/libzfs/libzfs_dataset.c
+0 -1 1 file

ZFS on Linux — include/sys abd.h

OpenZFS 8416 - abd.h is not C++ friendly

Authored by: Andriy Gapon <avg at FreeBSD.org>
Reviewed by: Igor Kozhukhov <igor at dilos.org>
Reviewed by: Dan Kimmel <dan.kimmel at delphix.com>
Reviewed by: Alek Pinchuk <pinchuk.alek at gmail.com>
Approved by: Robert Mustacchi <rm at joyent.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/8416
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/589c189
Closes #6288
Delta File
+1 -1 include/sys/abd.h
+1 -1 1 file

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 — man/man8 zpool.8

Convert man zpool.8 to mdoc (OpenZFS sync)

* Fixed some typos
* Additional description for some commands arguments
* `listsnapshots` remained
* Text reworked to be in sync with OpenZFS
* Added Linux as .Os type
* Updated `zpool events` section.
* Updated `zpool iostat|status -c` sections
* Added zed(8) reference to SEE ALSO

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: George Melikov <mail at gmelikov.ru>
Closes #6245
Delta File
+2,242 -2,653 man/man8/zpool.8
+2,242 -2,653 1 file

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 zvol.c

Refine use of zv_state_lock.

Use zv_state_lock to protect all members of zvol_state structure, add
relevant ASSERT()s. Take zv_suspend_lock before zv_state_lock, do not
hold zv_state_lock across suspend/resume.

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

ZFS on Linux — include/sys spa.h, module/zfs dsl_deadlist.c spa_errlog.c

OpenZFS 5428 - provide fts(), reallocarray(), and strtonum()

Authored by: Yuri Pankov <yuri.pankov at nexenta.com>
Reviewed by: Robert Mustacchi <rm at joyent.com>
Approved by: Joshua M. Clulow <josh at sysmgr.org>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Ported-by: Brian Behlendorf <behlendorf1 at llnl.gov>

Porting Notes:
* All hunks unrelated to ZFS were dropped.

OpenZFS-issue: https://www.illumos.org/issues/5428
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/4585130
Closes #6326

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