Displaying 1 50 of 4,714 commits (0.009s)

ZFS on Linux — module/zfs vdev_disk.c

Fix printk() calls missing log level

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: DHE <git at dehacked.net>
Closes #6672
Delta File
+4 -3 module/zfs/vdev_disk.c
+4 -3 1 file

ZFS on Linux — . configure.ac, cmd/zfs zfs_main.c

Fix some ZFS Test Suite issues

* Add 'zfs bookmark' coverage (zfs_bookmark_cliargs)

 * Add OpenZFS 8166 coverage (zpool_scrub_offline_device)

 * Fix "busy" zfs_mount_remount failures

 * Fix bootfs_003_pos, bootfs_004_neg, zdb_005_pos local cleanup

 * Update usage of $KEEP variable, add get_all_pools() function

 * Enable history_008_pos and rsend_019_pos (non-32bit builders)

 * Enable zfs_copies_005_neg, update local cleanup

 * Fix zfs_send_007_pos (large_dnode + OpenZFS 8199)

 * Fix rollback_003_pos (use dataset name, not mountpoint, to unmount)

 * Update default_raidz_setup() to work properly with more than 3 disks

 * Use $TEST_BASE_DIR instead of hardcoded (/var)/tmp for file VDEVs

 * Update usage of /dev/random to /dev/urandom

    [9 lines not shown]

ZFS on Linux — cmd/ztest ztest.c, tests/zfs-tests/tests/functional/mmp mmp_active_import.ksh mmp_exported_import.ksh

Fix ZTS MMP tests and ztest -M behavior

Quote "$MMP_IMPORT_MSG" when it is passed as an argument, as it is a
multi-word string.  Some tests were passing when they should not have,
because the grep was only testing for the first word.

Correct the message expected when no hostid is set and the test attempts
to enable multihost.  It did not match the actual output in that
situation.

Disable ztest_reguid() when ztest is invoked with the -M option.  If
ztest performs a reguid, a concurrent import attempt may fail with the
error "one or more devices is currently unavailable" if the guid sum is
calculated on the original device guids but compared against the guid
sum ztest wrote based on the new device guids.

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: Olaf Faaland <faaland1 at llnl.gov>
Closes #6666

ZFS on Linux — config ax_code_coverage.m4

Fix "--enable-code-coverage" debug build

When --enable-code-coverage is provided it should not result
in NDEBUG being defined.  This is controlled by --enable-debug.

Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #6674
Delta File
+1 -1 config/ax_code_coverage.m4
+1 -1 1 file

ZFS on Linux — . README.markdown, .github codecov.yml

Update codecov.yml

Update the codecov.yml to make the following functional changes.

* Do not require the CI testing to pass before posting results.
* Set red-yellow-green coverage percent from 50%-100%
* Allow a 1% drop in coverage to still be considered a pass.
* Reduce the size of the comment posted to the issue.

Additionally, the top level README.markdown has been updated
to include the codecov.io badge and the project summary reworded.

Reviewed-by: Prakash Surya <prakash.surya at delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #6669
Delta File
+26 -5 .github/codecov.yml
+6 -6 README.markdown
+32 -11 2 files

ZFS on Linux — . Makefile.am configure.ac, config ax_code_coverage.m4 zfs-build.m4

Add support for "--enable-code-coverage" option

This change adds support for a new option that can be passed to the
configure script: "--enable-code-coverage". Further, the "--enable-gcov"
option has been removed, as this new option provides the same
functionality (plus more).

When using this new option the following make targets are available:

 * check-code-coverage
 * code-coverage-capture
 * code-coverage-clean

Note: these make targets can only be run from the root of the project.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Prakash Surya <prakash.surya at delphix.com>
Closes #6670
Delta File
+264 -0 config/ax_code_coverage.m4
+0 -31 config/zfs-build.m4
+2 -0 Makefile.am
+2 -0 config/Rules.am
+1 -1 configure.ac
+269 -32 5 files

ZFS on Linux — module/zfs mmp.c

Reimplement vdev_random_leaf and rename it

Rename it as mmp_random_leaf() since it is defined in mmp.c.

The earlier implementation could end up spinning forever if a pool had a
vdev marked writeable, none of whose children were writeable.  It also
did not guarantee that if a writeable leaf vdev existed, it would be
found.

Reimplement to recursively walk the device tree to select the leaf.  It
searches the entire tree, so that a return value of (NULL) indicates
there were no usable leaves in the pool; all were either not writeable
or had pending mmp writes.

It still chooses the starting child randomly at each level of the tree,
so if the pool's devices are healthy, the mmp writes go to random leaves
with an even distribution.  This was verified by testing using
zfs_multihost_history enabled.

Reviewed by: Thomas Caputi <tcaputi at datto.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: Olaf Faaland <faaland1 at llnl.gov>
Closes #6631
Closes #6665
Delta File
+26 -36 module/zfs/mmp.c
+26 -36 1 file

ZFS on Linux — scripts zloop.sh

Cleanup zloop working directory after each pass

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed by: John Kennedy <jwk404 at gmail.com>
Reviewed-by: Olaf Faaland <faaland1 at llnl.gov>
Signed-off-by: Don Brady <don.brady at delphix.com>
Issue #6595
Closes #6663
Delta File
+9 -2 scripts/zloop.sh
+9 -2 1 file

ZFS on Linux — . Makefile.am, .github suppressions.txt

Correct cppcheck errors (#6662)

ZFS buildbot STYLE builder was moved to Ubuntu 17.04
which has a newer version of cppcheck. Handle the
new cppcheck errors.

uu_* functions removed in this commit were unused
and effectively dead code. They are now retired.

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

ZFS on Linux — module/zfs arc.c

Increase default arc_c_min

Increase the default arc_c_min value to which whichever is larger,
either 32M or 1/32 of total system memory.  This is advantageous for
systems with more than 1G of memory where performance issues may
occur when the ARC is allowed to collapse below a minimum size.
At the same time we want to use the bare minimum value which is
still functional so the filesystem can be used in very low memory
environments.

Reviewed-by: Tim Chase <tim at chase2k.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 #6659
Delta File
+4 -3 module/zfs/arc.c
+4 -3 1 file

ZFS on Linux — module/zfs arc.c

Increase default arc_c_min

Increase the default arc_c_min value to which whichever is larger,
either 32M or 1/32 of total system memory.  This is advantageous for
systems with more than 1G of memory where performance issues may
occur when the ARC is allowed to collapse below a minimum size.
At the same time we want to use the bare minimum value which is
still functional so the filesystem can be used in very low memory
environments.

Reviewed-by: Tim Chase <tim at chase2k.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 #6659
Delta File
+4 -3 module/zfs/arc.c
+4 -3 1 file

ZFS on Linux — module/zfs dmu_tx.c

Export symbol dmu_tx_mark_netfree()

This symbol is needed by Lustre for the same reason it was needed
by the ZPL.  It should have been exported when the original patch
was merged.

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Alex Zhuravlev <bzzz at whamcloud.com>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #6660
Delta File
+1 -0 module/zfs/dmu_tx.c
+1 -0 1 file

ZFS on Linux — module/zfs dmu_tx.c

Export symbol dmu_tx_mark_netfree()

This symbol is needed by Lustre for the same reason it was needed
by the ZPL.  It should have been exported when the original patch
was merged.

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Alex Zhuravlev <bzzz at whamcloud.com>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #6660
Delta File
+1 -0 module/zfs/dmu_tx.c
+1 -0 1 file

ZFS on Linux — config kernel-generic_io_acct.m4 kernel-bio_set_dev.m4, include/linux blkdev_compat.h

Linux 4.14 compat: IO acct, global_page_state, etc (#6655)

generic_start_io_acct/generic_end_io_acct in the master
branch of the linux kernel requires that the request_queue
be provided.

Move the logic from freemem in the spl to arc_free_memory
in arc.c. Do this so we can take advantage of global_page_state
interface checks in zfs.

Upstream kernel replaced struct block_device with
struct gendisk in struct bio. Determine if the
function bio_set_dev exists during configure
and have zfs use that if it exists.

bio_set_dev https://github.com/torvalds/linux/commit/74d4699
global_node_page_state https://github.com/torvalds/linux/commit/75ef718
io acct https://github.com/torvalds/linux/commit/d62e26b

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

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

ZFS on Linux — module/zfs zfs_znode.c zpl_file.c

misc: fix meaningless values

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Tim Chase <tim at chase2k.com>
Signed-off-by: Feng Sun <loyou85 at gmail.com>
Closes #6658

ZFS on Linux — . Makefile.am, .github suppressions.txt

Correct cppcheck errors

ZFS buildbot STYLE builder was moved to Ubuntu 17.04
which has a newer version of cppcheck. Handle the
new cppcheck errors.

uu_* functions removed in this commit were unused
and effectively dead code. They are now retired.

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

ZFS on Linux — tests/zfs-tests/tests/functional/slog slog_replay_volume.ksh

ZTS fix slog_replay_volume.ksh failure

The slog_replay_volume.ksh test case will fail when the pool is
layered on files in a filesystem which does not support discard.
Avoid this issue by creating the pool using DISKS which will
either be loopback device or real disk.

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

ZFS on Linux — tests/zfs-tests/tests/functional/slog slog_replay_volume.ksh

ZTS fix slog_replay_volume.ksh failure

The slog_replay_volume.ksh test case will fail when the pool is
layered on files in a filesystem which does not support discard.
Avoid this issue by creating the pool using DISKS which will
either be loopback device or real disk.

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

ZFS on Linux — cmd/zed/agents zfs_retire.c zfs_diagnosis.c, include libzfs_impl.h libzfs.h

Remove FRU and LIBTOPO Support

FRU and LIBTOPO support are illumos only features that will not be ported to
Linux and make the code more complicated than necessary. This commit
makes way for further cleanups of the zed/FMA code.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: David Quigley <david.quigley at intel.com>
Closes #6641

ZFS on Linux — scripts zfs.sh zimport.sh

Correct shellcheck errors

The ZFS buildbot moved to using Ubuntu 17.04 for the
STYLE builder which has a newer version of shellcheck.
Correct the new issues it discovers.

Reviewed-by: loli10K <ezomori.nozomu at gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Closes #6647
Delta File
+9 -9 scripts/zfs.sh
+9 -9 scripts/zimport.sh
+5 -5 scripts/zfs-helpers.sh
+23 -23 3 files

ZFS on Linux — tests/zfs-tests/tests/functional/events events_002_pos.ksh

ZTS fix events_002_pos.sh failure

Fix spurious events_002_pos failures by waiting longer before
grabbing the log to check for the resilver_finish event.  It
would be better to rework this logic to wait only as long as
needed rather than a fixed timeout.

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

ZFS on Linux — config kernel-generic_io_acct.m4 kernel-bio_set_dev.m4, include/linux blkdev_compat.h

Linux 3.14 compat: IO acct, global_page_state, etc

generic_start_io_acct/generic_end_io_acct in the master
branch of the linux kernel requires that the request_queue
be provided.

Move the logic from freemem in the spl to arc_free_memory
in arc.c. Do this so we can take advantage of global_page_state
interface checks in zfs.

Upstream kernel replaced struct block_device with
struct gendisk in struct bio. Determine if the
function bio_set_dev exists during configure
and have zfs use that if it exists.

bio_set_dev https://github.com/torvalds/linux/commit/74d4699
global_node_page_state https://github.com/torvalds/linux/commit/75ef718
io acct https://github.com/torvalds/linux/commit/d62e26b

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

ZFS on Linux — . Makefile.am, man/man8 zfs.8 zpool.8

Add mdoc style checker

Add a new make 'mancheck' target which uses mandoc -Tlint to verify
manpage files: currently only zfs(8), zpool(8) zdb(8) and zgenhostid(8)
are supported.

Additionally fix some outstanding manpage formatting issues.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu at gmail.com>
Closes #6646
Delta File
+13 -14 man/man8/zfs.8
+8 -8 man/man8/zpool.8
+8 -1 Makefile.am
+2 -3 man/man8/zgenhostid.8
+31 -26 4 files

ZFS on Linux — man/man8 zpool.8

OpenZFS 8435 - zpool.1m and zfs.1m: minor cleanup

3796 listsnapshots not documented in zpool man page

Authored by: George Melikov <mail at gmelikov.ru>
Reviewed by: Matt Ahrens <mahrens at delphix.com>
Reviewed by: Yuri Pankov <yuripv at gmx.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>
Ported-by: George Melikov mail at gmelikov.ru

OpenZFS-issue: https://www.illumos.org/issues/8435
OpenZFS-commit: openzfs/openzfs at a058d1c

Porting notes: OpenZFS review applied,
some ZoL changes were reverted.
See https://github.com/openzfs/openzfs/pull/415
Delta File
+6 -6 man/man8/zpool.8
+6 -6 1 file

ZFS on Linux — config zfs-build.m4

Make "-fno-inline" compile option more accessible

When functions are inlined, it can make the system much more difficult
to instrument using tools such as ftrace, BPF, crash, etc. Thus, to aid
development and increase the system's observability, when the
"--enable-debuginfo" flag is specified, the "-fno-inline" compilation
option will be used for both userspace and kernel modules.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Prakash Surya <prakash.surya at delphix.com>
Closes #6605
Delta File
+2 -1 config/zfs-build.m4
+2 -1 1 file

ZFS on Linux — . Makefile.am .gitignore, .github codecov.yml

Add configure option to enable gcov analysis

* Add configure option to enable gcov analysis.
* Includes a few minor ctime fixes.
* Add codecov.yml configuration.

Reviewed-by: Prakash Surya <prakash.surya at delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #6642
Delta File
+31 -0 config/zfs-build.m4
+9 -0 .github/codecov.yml
+2 -1 Makefile.am
+2 -0 .gitignore
+1 -1 tests/zfs-tests/tests/functional/ctime/.gitignore
+1 -0 configure.ac
+0 -0 tests/zfs-tests/tests/functional/ctime/ctime_001_pos.ksh
+46 -2 7 files

ZFS on Linux — module/zfs zvol.c, scripts zfs-tests.sh

Fix volume WR_INDIRECT log replay (#6620)

The portion of the zvol_replay_write() handler responsible for
replaying indirect log records for some reason never existed.
As a result indirect log records were not being correctly replayed.

This went largely unnoticed since the majority of zvol log records
were of the type WR_COPIED or WR_NEED_COPY prior to OpenZFS 7578.

This patch updates zvol_replay_write() to correctly handle these
log records and adds a new test case which verifies volume replay
to prevent any regression.  The existing test case which verified
replay on filesystem was renamed slog_replay_fs.ksh for clarity.

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

ZFS on Linux — cmd/zdb zdb.c, include/sys dnode.h

Improved dnode allocation and dmu_hold_impl() (#6611)

Refactor dmu_object_alloc_dnsize() and dnode_hold_impl() to simplify the
code, fix errors introduced by commit dbeb879 (PR #6117) interacting
badly with large dnodes, and improve performance.

* When allocating a new dnode in dmu_object_alloc_dnsize(), update the
percpu object ID for the core's metadnode chunk immediately.  This
eliminates most lock contention when taking the hold and creating the
dnode.

* Correct detection of the chunk boundary to work properly with large
dnodes.

* Separate the dmu_hold_impl() code for the FREE case from the code for
the ALLOCATED case to make it easier to read.

* Fully populate the dnode handle array immediately after reading a
block of the metadnode from disk.  Subsequently the dnode handle array
provides enough information to determine which dnode slots are in use
and which are free.

* Add several kstats to allow the behavior of the code to be examined.

* Verify dnode packing in large_dnode_008_pos.ksh.  Since the test is

    [37 lines not shown]

ZFS on Linux — module/zfs zfs_sa.c zpl_xattr.c, tests/zfs-tests/tests/functional/ctime ctime_001_pos.ksh Makefile.am

Modifying XATTRs doesnt change the ctime

Changing any metadata, should modify the ctime.

Reviewed-by: Chunwei Chen <tuxoko at gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: gaurkuma <gauravk.18 at gmail.com>
Closes #3644
Closes #6586

ZFS on Linux — module/zfs zfs_sa.c zpl_xattr.c, tests/zfs-tests/tests/functional/ctime ctime_001_pos.ksh Makefile.am

Modifying XATTRs doesnt change the ctime

Changing any metadata, should modify the ctime.

Reviewed-by: Chunwei Chen <tuxoko at gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: gaurkuma <gauravk.18 at gmail.com>
Closes #3644
Closes #6586

ZFS on Linux — cmd/ztest Makefile.am

ZTEST: Always enable asserts

The build for ztest always enabled debug information but does not enable
asserts unless --enable-debug is used. This will always enable asserts
in the ztest code.

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: David Quigley <david.quigley at intel.com>
Closes #6640
Delta File
+1 -1 cmd/ztest/Makefile.am
+1 -1 1 file

ZFS on Linux — tests/zfs-tests/include Makefile.am

Fix bug in distclean which removes needed files

Running distclean removes the following files because of an error
in Makefile.am

deleted:    tests/zfs-tests/include/commands.cfg
deleted:    tests/zfs-tests/include/libtest.shlib
deleted:    tests/zfs-tests/include/math.shlib
deleted:    tests/zfs-tests/include/properties.shlib
deleted:    tests/zfs-tests/include/zpool_script.shlib

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: David Quigley <david.quigley at intel.com>
Closes #6636

ZFS on Linux — lib/libzfs libzfs_dataset.c, tests/zfs-tests/tests/functional/refreserv refreserv_005_pos.ksh

Relax (ref)reservation constraints on ZVOLs

This change allow (ref)reservation to be set larger than the current
ZVOL size: this is safe as we normally set refreservation > volsize
at ZVOL creation time when we account for metadata.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed by: Richard Elling <Richard.Elling at RichardElling.com>
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Signed-off-by: loli10K <ezomori.nozomu at gmail.com>
Closes #2468
Closes #6610

ZFS on Linux — module/zfs spa_config.c

Fix false config_cache_write events

On pool import when the old cache file is removed
the ereport.fs.zfs.config_cache_write event is generated.
Because zpool export always removes cache file it happens
every export - import sequence.

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: loli10K <ezomori.nozomu at gmail.com>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: Arkadiusz Bubała <arkadiusz.bubala at open-e.com>
Closes #6617
Delta File
+5 -0 module/zfs/spa_config.c
+5 -0 1 file

ZFS on Linux — cmd/zfs zfs_main.c, include libzfs.h

Add -vnP support to 'zfs send' for bookmarks

This leverages the functionality introduced in cf7684b to expose
verbose, dry-run and parsable 'zfs send' options for bookmarks.

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

ZFS on Linux — man/man8 zfs.8

Recommend compression=on in zfs(8) dedup section

compression=lz4 depends on the lz4 feature being enabled, while
compression=on will let ZFS use either lzjb or lz4 where appropriate.
It also allows the documentation to not go out of date if/when ZFS
picks a new default in the future.

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Mike Swanson <mikeonthecomputer at gmail.com>
Closes #6614
Delta File
+1 -1 man/man8/zfs.8
+1 -1 1 file

ZFS on Linux — module/zfs zvol.c, scripts zfs-tests.sh

Fix volume WR_INDIRECT log replay

The portion of the zvol_replay_write() handler responsible for
replaying indirect log records for some reason never existed.
As a result indirect log records were not being correctly replayed.

This went largely unnoticed since the majority of zvol log records
were of the type WR_COPIED or WR_NEED_COPY prior to OpenZFS 7578.

This patch updates zvol_replay_write() to correctly handle these
log records and adds a new test case which verifies volume replay
to prevent any regression.  The existing test case which verified
replay on filesystem was renamed slog_replay_fs.ksh for clarity.

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

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

Revert "Handle new dnode size in incremental..."

This reverts commit 65dcb0f67a4d72ee4e1e534703db5caacf1ec85f until
a comprehensive fix is finalized.  The stricter interior dnode
detection in 4c5b89f59e4e5c8f5b4680040118ebde09598bbe and the new
test case added by this patch revealed a issue with resizing
dnodes when receiving an incremental backup stream.

Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Issue #6576

ZFS on Linux — cmd/zdb zdb.c, include/sys dnode.h

Revert "Improved dnode allocation and dmu_hold_impl()"

This reverts commit 4c5b89f59e4e5c8f5b4680040118ebde09598bbe.
∈ Olaf Faaland - 4c5b89f5 - 2017-09-05 23:15:04
Improved dnode allocation and dmu_hold_impl()

Refactor dmu_object_alloc_dnsize() and dnode_hold_impl() to simplify the
code, fix errors introduced by commit dbeb879 (PR #6117) interacting
badly with large dnodes, and improve performance.

* When allocating a new dnode in dmu_object_alloc_dnsize(), update the
percpu object ID for the core's metadnode chunk immediately.  This
eliminates most lock contention when taking the hold and creating the
dnode.

* Correct detection of the chunk boundary to work properly with large
dnodes.

* Separate the dmu_hold_impl() code for the FREE case from the code for
the ALLOCATED case to make it easier to read.

* Fully populate the dnode handle array immediately after reading a
block of the metadnode from disk.  Subsequently the dnode handle array
provides enough information to determine which dnode slots are in use
and which are free.

* Add several kstats to allow the behavior of the code to be examined.

* Verify dnode packing in large_dnode_008_pos.ksh.  Since the test is

    [41 lines not shown]

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

Revert "Handle new dnode size in incremental backup stream"

This reverts commit 65dcb0f67a4d72ee4e1e534703db5caacf1ec85f.

ZFS on Linux — cmd/zdb zdb.c, include/sys dnode.h

Improved dnode allocation and dmu_hold_impl()

Refactor dmu_object_alloc_dnsize() and dnode_hold_impl() to simplify the
code, fix errors introduced by commit dbeb879 (PR #6117) interacting
badly with large dnodes, and improve performance.

* When allocating a new dnode in dmu_object_alloc_dnsize(), update the
percpu object ID for the core's metadnode chunk immediately.  This
eliminates most lock contention when taking the hold and creating the
dnode.

* Correct detection of the chunk boundary to work properly with large
dnodes.

* Separate the dmu_hold_impl() code for the FREE case from the code for
the ALLOCATED case to make it easier to read.

* Fully populate the dnode handle array immediately after reading a
block of the metadnode from disk.  Subsequently the dnode handle array
provides enough information to determine which dnode slots are in use
and which are free.

* Add several kstats to allow the behavior of the code to be examined.

* Verify dnode packing in large_dnode_008_pos.ksh.  Since the test is

    [41 lines not shown]

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

Handle new dnode size in incremental backup stream

When receiving an incremental backup stream, call
dmu_object_reclaim_dnsize() if an object's dnode size differs between
the incremental source and target. Otherwise it may appear that a
dnode which has shrunk is still occupying slots which are in fact
free. This will cause a failure to receive new objects that should
occupy the now-free slots.

Add a test case to verify that an incremental stream containing
objects with changed dnode sizes can be received without error. This
test case fails without this change.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Ned Bass <bass6 at llnl.gov>
Closes #6366
Closes #6576

ZFS on Linux — etc/systemd/system zfs-import-cache.service.in zfs-import-scan.service.in

Add man page reference to systemd units

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

ZFS on Linux — man/man8 zfs.8

zfs(8) manpage corrections

Corrected indent of the note located at the bottom of the options for
zfs send as well as remove an extra whitespace

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: bunder2015 <omfgbunder at gmail.com>
Closes #6590
Delta File
+2 -2 man/man8/zfs.8
+2 -2 1 file

ZFS on Linux — module/zfs vdev_disk.c

Trim new line from zfs_vdev_scheduler

Add a helper function to trim the tailing new line.  While we're
here use this new hook to immediately apply the new scheduler.

Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #3356
Closes #6573
Delta File
+53 -18 module/zfs/vdev_disk.c
+53 -18 1 file

ZFS on Linux — lib/libzfs libzfs_sendrecv.c, lib/libzfs_core libzfs_core.c

Retire send space estimation via ZFS_IOC_SEND

Add a small wrapper around libzfs_core`lzc_send_space() to libzfs so
that every legacy ZFS_IOC_SEND consumer, along with their userland
counterpart estimate_ioctl(), can leverage ZFS_IOC_SEND_SPACE to
request send space estimation.

The legacy functionality in zfs_ioc_send() is left untouched for
compatibility purposes.

Reviewed by: Thomas Caputi <tcaputi at datto.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu at gmail.com>
Closes #6029

ZFS on Linux — module/zfs dmu_objset.c

dmu_objset: release bonus buffer in failure path

Reported by kmemleak during testing of a new patch:

```
unreferenced object 0xffff9f1c12e38800 (size 1024):
  comm "z_upgrade", pid 17842, jiffies 4296870904 (age 8746.268s)
  backtrace:
    kmemleak_alloc+0x7a/0x100
    __kmalloc_node+0x26c/0x510
    range_tree_create+0x39/0xa0 [zfs]
    dmu_zfetch_init+0x73/0xe0 [zfs]
    dnode_create+0x12c/0x3b0 [zfs]
    dnode_hold_impl+0x1096/0x1130 [zfs]
    dnode_hold+0x23/0x30 [zfs]
    dmu_bonus_hold_impl+0x6b/0x370 [zfs]
    dmu_bonus_hold+0x1e/0x30 [zfs]
    dmu_objset_space_upgrade+0x114/0x310 [zfs]
    dmu_objset_userobjspace_upgrade_cb+0xd8/0x150 [zfs]
    dmu_objset_upgrade_task_cb+0x136/0x1e0 [zfs]
    kthread+0x119/0x150
```

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>

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

ZFS on Linux — lib/libtpool thread_pool.c

libtpool: don't clone affinity if not supported

pthread_attr_(get/set)affinity_np() is glibc-only. This commit
disable the code path that use those functions in non-glibc
system. Fixes the following when building with musl:

libzfs.so: undefined reference to`pthread_attr_setaffinity_np'
libzfs.so: undefined reference to`pthread_attr_getaffinity_np'

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Leorize <alaviss at users.noreply.github.com>
Closes #6571
Delta File
+2 -0 lib/libtpool/thread_pool.c
+2 -0 1 file

ZFS on Linux — include/sys dnode.h, module/zfs dnode.c zfs_replay.c

Enhance comments for large dnode project

Fix a few nits in the comments from large dnodes. Also import
some of the commit message as a comment in the code, making
it more accessible.

Reviewed-by: @rottegift
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: George Wilson <george.wilson at delphix.com>
Signed-off-by: Matt Ahrens <mahrens at delphix.com>
Closes #6551

ZFS on Linux — config kernel-vm_node_stat.m4 kernel.m4, module/zfs arc.c

Linux 4.8+ compatibility fix for vm stats

vm_node_stat must be used instead of vm_zone_stat. Unfortunately the
old code still compiles potentially leading to silent failure of
arc_evictable_memory()

AKAMAI: CR 3816601: Regression in zfs dropcache test

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Chunwei Chen <tuxoko at gmail.com>
Signed-off-by: Debabrata Banerjee <dbanerje at akamai.com>
Closes #6528