Displaying 1 50 of 4,853 commits (0.008s)

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

Update for cppcheck v1.80

Resolve new warnings and errors from cppcheck v1.80.

* [lib/libshare/libshare.c:543]: (warning)
  Possible null pointer dereference: protocol
* [lib/libzfs/libzfs_dataset.c:2323]: (warning)
  Possible null pointer dereference: srctype
* [lib/libzfs/libzfs_import.c:318]: (error)
  Uninitialized variable: link
* [module/zfs/abd.c:353]: (error) Uninitialized variable: sg
* [module/zfs/abd.c:353]: (error) Uninitialized variable: i
* [module/zfs/abd.c:385]: (error) Uninitialized variable: sg
* [module/zfs/abd.c:385]: (error) Uninitialized variable: i
* [module/zfs/abd.c:553]: (error) Uninitialized variable: i
* [module/zfs/abd.c:553]: (error) Uninitialized variable: sg
* [module/zfs/abd.c:763]: (error) Uninitialized variable: i
* [module/zfs/abd.c:763]: (error) Uninitialized variable: sg
* [module/zfs/abd.c:305]: (error) Uninitialized variable: tmp_page
* [module/zfs/zpl_xattr.c:342]: (warning)
   Possible null pointer dereference: value
* [module/zfs/zvol.c:208]: (error) Uninitialized variable: p

Convert the following suppression to inline.

    [12 lines not shown]
Delta File
+4 -33 lib/libshare/libshare.c
+9 -9 module/zfs/abd.c
+3 -3 Makefile.am
+3 -1 lib/libzfs/libzfs_dataset.c
+1 -1 module/zfs/zvol.c
+1 -1 lib/libzfs/libzfs_import.c
+2 -2 3 files not shown
+23 -50 9 files

ZFS on Linux — cmd/arc_summary arc_summary.py

Fix data on evict_skips in arc_summary.py

Display correct data from kstat arcstats for evict_skips,
which is currently repeating the data from mutex_misses.
Fixes #6882

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: Scot W. Stevenson <scot.stevenson at gmail.com>
Closes #6882
Closes #6883
Delta File
+3 -2 cmd/arc_summary/arc_summary.py
+3 -2 1 file

ZFS on Linux — module/zfs arc.c

Fix ARC pointer overrun

Only access the `b_crypt_hdr` field of an ARC header if the content
is encrypted.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Tom Caputi <tcaputi at datto.com>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: DHE <git at dehacked.net>
Closes #6877
Delta File
+11 -9 module/zfs/arc.c
+11 -9 1 file

ZFS on Linux — cmd/zdb zdb.c, cmd/zpool zpool_main.c

Sequential scrub and resilvers

Currently, scrubs and resilvers can take an extremely
long time to complete. This is largely due to the fact
that zfs scans process pools in logical order, as
determined by each block's bookmark. This makes sense
from a simplicity perspective, but blocks in zfs are
often scattered randomly across disks, particularly
due to zfs's copy-on-write mechanisms.

This patch improves performance by splitting scrubs
and resilvers into a metadata scanning phase and an IO
issuing phase. The metadata scan reads through the
structure of the pool and gathers an in-memory queue
of I/Os, sorted by size and offset on disk. The issuing
phase will then issue the scrub I/Os as sequentially as
possible, greatly improving performance.

This patch also updates and cleans up some of the scan
code which has not been updated in several years.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Authored-by: Saso Kiselkov <saso.kiselkov at nexenta.com>
Authored-by: Alek Pinchuk <apinchuk at datto.com>
Authored-by: Tom Caputi <tcaputi at datto.com>

    [3 lines not shown]
Delta File
+2,224 -464 module/zfs/dsl_scan.c
+296 -28 module/zfs/range_tree.c
+124 -43 man/man5/zfs-module-parameters.5
+80 -57 cmd/zpool/zpool_main.c
+84 -39 module/zfs/arc.c
+2 -80 module/zfs/metaslab.c
+222 -101 31 files not shown
+3,032 -812 37 files

ZFS on Linux — cmd/arc_summary arc_summary.py

Minor code cleanups in arc_python.py

Remove unused library re and associated variable kstat_pobj. Add note
to documentation at start of program about required support for old
versions of Python. Change variable "format" (which is a built-in
function) to "fmt".

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Scot W. Stevenson <scot.stevenson at gmail.com>
Closes #6869
Delta File
+7 -5 cmd/arc_summary/arc_summary.py
+7 -5 1 file

ZFS on Linux — module/zfs dmu.c

Fix dirty check in dmu_offset_next()

The correct way to determine if a dnode is dirty is to check
if any of the dn->dn_dirty_link's are active.  Relying solely
on the dn->dn_dirtyctx can result in the dnode being mistakenly
reported as clean.

Reviewed-by: Chunwei Chen <tuxoko at gmail.com>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #3125
Closes #6867
Delta File
+4 -6 module/zfs/dmu.c
+4 -6 1 file

ZFS on Linux — module/zfs dmu.c

Fix dirty check in dmu_offset_next()

The correct way to determine if a dnode is dirty is to check
if any of the dn->dn_dirty_link's are active.  Relying solely
on the dn->dn_dirtyctx can result in the dnode being mistakenly
reported as clean.

Reviewed-by: Chunwei Chen <tuxoko at gmail.com>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #3125
Closes #6867
Delta File
+4 -6 module/zfs/dmu.c
+4 -6 1 file

ZFS on Linux — rpm/generic zfs.spec.in

Disable automatic dependencies in zfs-test package

All of the ZTS test scripts specify /bin/ksh as the interpreter.
Unfortunately, as of Fedora 27 only /usr/bin/ksh is provided by
the package manager.  Rather than change all the scripts to
accommodate the latest Fedora disable automatic dependencies
for the zfs-test package.  Functionally this will not cause
any problems since /bin is a symlink to /usr/bin.

Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #6868
Delta File
+6 -5 rpm/generic/zfs.spec.in
+6 -5 1 file

ZFS on Linux — rpm/generic zfs.spec.in

Disable automatic dependencies in zfs-test package

All of the ZTS test scripts specify /bin/ksh as the interpreter.
Unfortunately, as of Fedora 27 only /usr/bin/ksh is provided by
the package manager.  Rather than change all the scripts to
accommodate the latest Fedora disable automatic dependencies
for the zfs-test package.  Functionally this will not cause
any problems since /bin is a symlink to /usr/bin.

Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #6868
Delta File
+6 -4 rpm/generic/zfs.spec.in
+6 -4 1 file

ZFS on Linux — tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC zvol_ENOSPC_001_pos.ksh

Disable zvol_ENOSPC_001_pos on 32-bit systems

Occasionally observed failure of zvol_ENOSPC_001_pos due to the
test case taking too long to complete.  Disable the test case until
it can be improved.

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

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

Fix truncate(2) mtime and ctime handling

On Linux, ftruncate(2) always changes the file timestamps, even if the
file size is not changed. However, in case of a successfull
truncate(2), the timestamps are updated only if the file size changes.
This translates to the VFS calling the ZFS Posix Layer "setattr"
function (zpl_setattr) with ATTR_MTIME and ATTR_CTIME unconditionally
set on the iattr mask only when doing a ftruncate(2), while the
truncate(2) is left to the filesystem implementation to be dealt with.

This behaviour is consistent with POSIX:2004/SUSv3 specifications
where there's no explicit requirement for file size changes to update
the timestamps only for ftruncate(2):

http://pubs.opengroup.org/onlinepubs/009695399/functions/truncate.html
http://pubs.opengroup.org/onlinepubs/009695399/functions/ftruncate.html

This has been later updated in POSIX:2008/SUSv4 where, for both
truncate(2)/ftruncate(2), there's no mention of this size change
requirement:

http://austingroupbugs.net/view.php?id=489
http://pubs.opengroup.org/onlinepubs/9699919799/functions/truncate.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html


    [9 lines not shown]

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

Fix truncate(2) mtime and ctime handling

On Linux, ftruncate(2) always changes the file timestamps, even if the
file size is not changed. However, in case of a successfull
truncate(2), the timestamps are updated only if the file size changes.
This translates to the VFS calling the ZFS Posix Layer "setattr"
function (zpl_setattr) with ATTR_MTIME and ATTR_CTIME unconditionally
set on the iattr mask only when doing a ftruncate(2), while the
truncate(2) is left to the filesystem implementation to be dealt with.

This behaviour is consistent with POSIX:2004/SUSv3 specifications
where there's no explicit requirement for file size changes to update
the timestamps only for ftruncate(2):

http://pubs.opengroup.org/onlinepubs/009695399/functions/truncate.html
http://pubs.opengroup.org/onlinepubs/009695399/functions/ftruncate.html

This has been later updated in POSIX:2008/SUSv4 where, for both
truncate(2)/ftruncate(2), there's no mention of this size change
requirement:

http://austingroupbugs.net/view.php?id=489
http://pubs.opengroup.org/onlinepubs/9699919799/functions/truncate.html
http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html


    [9 lines not shown]

ZFS on Linux — . .travis.yml

Add .travis.yml

Travis builders have maximum work time ~49 minutes,
so we have to use 5 builders and spread the ZTS over
them using test group tags.

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 #6829
Delta File
+38 -0 .travis.yml
+38 -0 1 file

ZFS on Linux — cmd/arc_summary arc_summary.py

Fix arc_summary.py -d crash with Python3

Prevents arc_summary.py crashing when called with parameter -d or
long form --description with Python3.

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: Scot W. Stevenson <scot.stevenson at gmail.com>
Closes #6849
Closes #6850
Delta File
+16 -8 cmd/arc_summary/arc_summary.py
+16 -8 1 file

ZFS on Linux — module/zfs dmu_objset.c zfs_ioctl.c

Long hold the dataset during upgrade

If the receive or rollback is performed while filesystem is upgrading
the objset may be evicted in `dsl_dataset_clone_swap_sync_impl`. This
will lead to NULL pointer dereference when upgrade tries to access
evicted objset.

This commit adds long hold of dataset during whole upgrade process.
The receive and rollback will return an EBUSY error until the
upgrade is not finished.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Arkadiusz Bubała <arkadiusz.bubala at open-e.com>
Closes #5295
Closes #6837

ZFS on Linux — module/zfs dmu_objset.c zfs_ioctl.c

Long hold the dataset during upgrade

If the receive or rollback is performed while filesystem is upgrading
the objset may be evicted in `dsl_dataset_clone_swap_sync_impl`. This
will lead to NULL pointer dereference when upgrade tries to access
evicted objset.

This commit adds long hold of dataset during whole upgrade process.
The receive and rollback will return an EBUSY error until the
upgrade is not finished.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Arkadiusz Bubała <arkadiusz.bubala at open-e.com>
Closes #5295
Closes #6837

ZFS on Linux — module/zfs dsl_crypt.c

Fix encryption root hierarchy issue

After doing a recursive raw receive, zfs userspace performs
a final pass to adjust the encryption root hierarchy as
needed. Unfortunately, the FORCE_INHERIT ioctl had a bug
which caused the encryption root to always be assigned to
the direct parent instead of the inheriting parent. This
patch simply fixes this issue.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alek Pinchuk <apinchuk at datto.com>
Signed-off-by: Tom Caputi <tcaputi at datto.com>
Closes #6847
Closes #6848
Delta File
+2 -1 module/zfs/dsl_crypt.c
+2 -1 1 file

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

Handle compressed buffers in __dbuf_hold_impl()

In __dbuf_hold_impl(), if a buffer is currently syncing and is still
referenced from db_data, a copy is made in case it is dirtied again in
the txg.  Previously, the buffer for the copy was simply allocated with
arc_alloc_buf() which doesn't handle compressed or encrypted buffers
(which are a special case of a compressed buffer).  The result was
typically an invalid memory access because the newly-allocated buffer
was of the uncompressed size.

This commit fixes the problem by handling the 2 compressed cases,
encrypted and unencrypted, respectively, with arc_alloc_raw_buf() and
arc_alloc_compressed_buf().

Although using the proper allocation functions fixes the invalid memory
access by allocating a buffer of the compressed size, another unrelated
issue made it impossible to properly detect compressed buffers in the
first place.  The header's compression flag was set to ZIO_COMPRESS_OFF
in arc_write() when it was possible that an attached buffer was actually
compressed.  This commit adds logic to only set ZIO_COMPRESS_OFF in
the non-ZIO_RAW case which wil handle both cases of compressed buffers
(encrypted or unencrypted).

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tim Chase <tim at chase2k.com>

    [2 lines not shown]
Delta File
+32 -12 module/zfs/dbuf.c
+4 -0 module/zfs/arc.c
+36 -12 2 files

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

Handle compressed buffers in __dbuf_hold_impl()

In __dbuf_hold_impl(), if a buffer is currently syncing and is still
referenced from db_data, a copy is made in case it is dirtied again in
the txg.  Previously, the buffer for the copy was simply allocated with
arc_alloc_buf() which doesn't handle compressed or encrypted buffers
(which are a special case of a compressed buffer).  The result was
typically an invalid memory access because the newly-allocated buffer
was of the uncompressed size.

This commit fixes the problem by handling the 2 compressed cases,
encrypted and unencrypted, respectively, with arc_alloc_raw_buf() and
arc_alloc_compressed_buf().

Although using the proper allocation functions fixes the invalid memory
access by allocating a buffer of the compressed size, another unrelated
issue made it impossible to properly detect compressed buffers in the
first place.  The header's compression flag was set to ZIO_COMPRESS_OFF
in arc_write() when it was possible that an attached buffer was actually
compressed.  This commit adds logic to only set ZIO_COMPRESS_OFF in
the non-ZIO_RAW case which wil handle both cases of compressed buffers
(encrypted or unencrypted).

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tim Chase <tim at chase2k.com>

    [2 lines not shown]
Delta File
+43 -12 module/zfs/dbuf.c
+2 -1 module/zfs/arc.c
+45 -13 2 files

ZFS on Linux — . TEST

Refresh TEST file to include new variables

Add any missing variables for CI control to TEST.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Closes #6846
Delta File
+8 -1 TEST
+8 -1 1 file

ZFS on Linux — etc/systemd/system zfs-zed.service.in zfs-import.target.in

Cleanup systemd dependencies

Some redundancy is present in the systemd dependencies, as
noticed in PR#6764. Existing setups might rely on these quirks,
so these cleanups have been moved to the development branch.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Antonio Russo <antonio.e.russo at gmail.com>
Closes #6822

ZFS on Linux — rpm/generic zfs.spec.in

Fix undefined %{systemd_svcs} in RPM scriptlets

This allows RPM-based systems to properly control package installation
and removal when using systemd.

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: loli10K <ezomori.nozomu at gmail.com>
Closes #6838
Closes #6841
Delta File
+1 -1 rpm/generic/zfs.spec.in
+1 -1 1 file

ZFS on Linux — rpm/generic zfs.spec.in

Fix undefined %{systemd_svcs} in RPM scriptlets

This allows RPM-based systems to properly control package installation
and removal when using systemd.

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: loli10K <ezomori.nozomu at gmail.com>
Closes #6838
Closes #6841
Delta File
+1 -1 rpm/generic/zfs.spec.in
+1 -1 1 file

ZFS on Linux — module/zfs dsl_pool.c zfs_ioctl.c

OpenZFS 8607 - variable set but not used

Reviewed by: Yuri Pankov <yuripv at gmx.com>
Reviewed by: Igor Kozhukhov <igor at dilos.org>
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Approved by: Robert Mustacchi <rm at joyent.com>
Authored by: Toomas Soome <tsoome at me.com>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Ported-by: Brian Behlendorf <behlendorf1 at llnl.gov>

OpenZFS-issue: https://www.illumos.org/issues/8607
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/b852c2f5
Closes #6842
Delta File
+8 -6 module/zfs/dsl_pool.c
+3 -7 module/zfs/zfs_ioctl.c
+11 -13 2 files

ZFS on Linux — tests/runfiles perf-regression.run

Provide tags in perf-regression.run

A prior commit changed test-runner to enable tagging
of testgroups within a test suite runfile. They must
be specified in each runfile. Update the runfile for
performance regressions so it is properly tagged.

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

ZFS on Linux — scripts zfs-tests.sh

Fix zfs-tests.sh single test functionality

Without any tag specified into the runtime-generated runfile the
test-runner will not execute the test provided from the command line:
fix this by adding tag information to the custom runfile.

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: loli10K <ezomori.nozomu at gmail.com>
Closes #6826
Delta File
+11 -2 scripts/zfs-tests.sh
+11 -2 1 file

ZFS on Linux — . configure.ac, contrib/initramfs Makefile.am

contrib/initramfs: switch to automake

Use automake to build initramfs scripts and hooks.

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

ZFS on Linux — module/zfs qat_compress.c

Bug fix in qat_compress.c when compressed size is < 4KB

When the 128KB block is compressed to less than 4KB, the pointer
to the Footer is not in the end of the compressed buffer, that's
because the Header offset was added twice for this case. So there
is a gap between the Footer and the compressed buffer.
1. Always compute the Footer pointer address from the start of the
last page.
2. Remove the un-used workaroud code which has been verified fixed
with the latest driver and this fix.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Weigang Li <weigang.li at intel.com>
Closes #6827
Delta File
+4 -4 module/zfs/qat_compress.c
+4 -4 1 file

ZFS on Linux — module/zfs qat_compress.c

Bug fix in qat_compress.c when compressed size is < 4KB

When the 128KB block is compressed to less than 4KB, the pointer
to the Footer is not in the end of the compressed buffer, that's
because the Header offset was added twice for this case. So there
is a gap between the Footer and the compressed buffer.
1. Always compute the Footer pointer address from the start of the
last page.
2. Remove the un-used workaroud code which has been verified fixed
with the latest driver and this fix.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Weigang Li <weigang.li at intel.com>
Closes #6827
Delta File
+4 -4 module/zfs/qat_compress.c
+4 -4 1 file

ZFS on Linux — cmd/arc_summary arc_summary.py

Sort output of tunables in arc_summary.py

Sort list of tunables printed by _tunable_summary()
alphabetically

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: Scot W. Stevenson <scot.stevenson at gmail.com>
Closes #6828
Delta File
+8 -4 cmd/arc_summary/arc_summary.py
+8 -4 1 file

ZFS on Linux — rpm/generic zfs-dkms.spec.in

Disable automatic dependencies in DKMS package

By default additional dependencies are generated automatically for
packages.  This is normally a good thing because it helps ensure
things just work.  It doesn't make sense for the DKMS package which
requires minimal dependencies that can be easily listed.

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 #6467
Closes #6835
Delta File
+1 -0 rpm/generic/zfs-dkms.spec.in
+1 -0 1 file

ZFS on Linux — rpm/generic zfs-dkms.spec.in

Disable automatic dependencies in DKMS package

By default additional dependencies are generated automatically for
packages.  This is normally a good thing because it helps ensure
things just work.  It doesn't make sense for the DKMS package which
requires minimal dependencies that can be easily listed.

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 #6467
Closes #6835
Delta File
+1 -0 rpm/generic/zfs-dkms.spec.in
+1 -0 1 file

ZFS on Linux — module/zfs arc.c

Build regression in c89 cleanups

Fixed build regression in non-debug builds from recent cleanups of
c89 workarounds.

Reviewed-by: Tim Chase <tim at chase2k.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Don Brady <don.brady at delphix.com>
Closes #6832
Delta File
+3 -2 module/zfs/arc.c
+3 -2 1 file

ZFS on Linux — tests/runfiles linux.run

Disable zpool_import_missing_003_pos

Rarely observed failure of zpool_import_missing_003_pos during
automated testing due to timeout.  Disable the test case until
it can be improved.

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>
Issue #6839
Closes #6840
Delta File
+2 -1 tests/runfiles/linux.run
+2 -1 1 file

ZFS on Linux — cmd/arc_summary arc_summary.py

Add documentation strings to arc_summary.py

Include docstrings (PEP8, PEP257) for module and all functions.
Separately, remove outdated section in comment at start of
module. Separately, remove unused global constant "usetunable".

Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: Scot W. Stevenson <scot.stevenson at gmail.com>
Closes #6818
Delta File
+42 -14 cmd/arc_summary/arc_summary.py
+42 -14 1 file

ZFS on Linux — cmd/zpool zpool_main.c, lib/libzfs libzfs_pool.c

Fix column alignment with long zpool names

`zpool status` normally aligns NAME/STATE/etc columns:

    NAME                       STATE     READ WRITE CKSUM
    dummy                      ONLINE       0     0     0
      mirror-0                 ONLINE       0     0     0
        /tmp/dummy-long-1.bin  ONLINE       0     0     0
        /tmp/dummy-long-2.bin  ONLINE       0     0     0
      mirror-1                 ONLINE       0     0     0
        /tmp/dummy-long-3.bin  ONLINE       0     0     0
        /tmp/dummy-long-4.bin  ONLINE       0     0     0

However, if the zpool name is longer than the zvol names, alignment
issues arise:

    NAME                  STATE     READ WRITE CKSUM
    dummy-very-very-long-zpool-name  ONLINE       0     0     0
      mirror-0            ONLINE       0     0     0
        /tmp/dummy-1.bin  ONLINE       0     0     0
        /tmp/dummy-2.bin  ONLINE       0     0     0
      mirror-1            ONLINE       0     0     0
        /tmp/dummy-3.bin  ONLINE       0     0     0
        /tmp/dummy-4.bin  ONLINE       0     0     0


    [22 lines not shown]

ZFS on Linux — cmd/arc_summary arc_summary.py

Rewrite fHits() in arc_summary.py with SI units

Complete rewrite of fHits(). Move units from non-standard English
abbreviations to SI units, thereby avoiding confusion because of
"long scale" and "short scale" numbers. Remove unused parameter
"Decimal". Add function string. Aim to confirm to PEP8.

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: Scot W. Stevenson <scot.stevenson at gmail.com>
Closes #6815
Delta File
+33 -29 cmd/arc_summary/arc_summary.py
+33 -29 1 file

ZFS on Linux — include/sys spa.h, module/zcommon zfeature_common.c zfs_namecheck.c

Undo c89 workarounds to match with upstream

With PR 5756 the zfs module now supports c99 and the
remaining past c89 workarounds can be undone.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Don Brady <don.brady at delphix.com>
Closes #6816
Delta File
+54 -93 module/zfs/spa.c
+46 -79 module/zfs/metaslab.c
+38 -76 module/zfs/vdev.c
+35 -75 module/zfs/ddt.c
+31 -53 module/zfs/zio.c
+21 -37 module/zfs/dsl_dataset.c
+199 -351 42 files not shown
+424 -764 48 files

ZFS on Linux — cmd/arc_summary arc_summary.py

Minor code cleanup in arc_summary.py

Simplify and inline single-use function div1(); inline twice-used
function div2(); add function comment to zfs_header(); replace
variable "unused" in get_Kstat() with "_" following convention.

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: Scot W. Stevenson <scot.stevenson at gmail.com>
Closes #6802
Delta File
+8 -17 cmd/arc_summary/arc_summary.py
+8 -17 1 file

ZFS on Linux — scripts zfs-tests.sh, tests/runfiles linux.run

 

Initramfs fixes

* initramfs: Fix inconsistent whitespace
* initramfs: Fix a spelling error
* initramfs: Set elevator=noop on the rpool's disks

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Richard Laager <rlaager at wiktel.com>
Closes #6807
∈ Giuseppe Di Natale - 9a810efb - 2017-11-03 16:53:32
Allow test-runner to filter test groups by tag

Enable test-runner to accept a list of tags to identify
which test groups the user wishes to run.

Also allow test-runner to perform multiple iterations
of a test run.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: John Wren Kennedy <john.kennedy at delphix.com>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Closes #6788

ZFS on Linux — contrib/initramfs/scripts zfs

Initramfs fixes

* initramfs: Fix inconsistent whitespace
* initramfs: Fix a spelling error
* initramfs: Set elevator=noop on the rpool's disks

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Richard Laager <rlaager at wiktel.com>
Closes #6807
Delta File
+20 -2 contrib/initramfs/scripts/zfs
+20 -2 1 file

ZFS on Linux — scripts zfs-tests.sh, tests/runfiles linux.run

Allow test-runner to filter test groups by tag

Enable test-runner to accept a list of tags to identify
which test groups the user wishes to run.

Also allow test-runner to perform multiple iterations
of a test run.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: John Wren Kennedy <john.kennedy at delphix.com>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Closes #6788

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

OpenZFS 7531 - Assign correct flags to prefetched buffers

Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed by: Prakash Surya <prakash.surya at delphix.com>
Authored by: abraunegg <alex.braunegg at gmail.com>
Approved by: Dan McDonald <danmcd at joyent.com>
Ported-by: Brian Behlendorf <behlendorf1 at llnl.gov>

OpenZFS-issue: https://www.illumos.org/issues/7531
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/468008cb
Delta File
+12 -0 module/zfs/dbuf.c
+6 -0 include/sys/dbuf.h
+18 -0 2 files

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

OpenZFS 7531 - Assign correct flags to prefetched buffers

Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed by: Prakash Surya <prakash.surya at delphix.com>
Authored by: abraunegg <alex.braunegg at gmail.com>
Approved by: Dan McDonald <danmcd at joyent.com>
Ported-by: Brian Behlendorf <behlendorf1 at llnl.gov>

OpenZFS-issue: https://www.illumos.org/issues/7531
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/468008cb
Delta File
+12 -0 module/zfs/dbuf.c
+6 -0 include/sys/dbuf.h
+18 -0 2 files

ZFS on Linux — contrib/initramfs/scripts zfs

initramfs: Set elevator=noop on the rpool's disks

ZFS already sets elevator=noop for wholedisk vdevs (for all pools), but
typical root-on-ZFS installations use partitions.  This sets
elevator=noop on the disks in the root pool.

Ubuntu 16.04 and 16.10 had this.  It was lost in 17.04 due to Debian
switching to this upstream initramfs script.

Signed-off-by: Richard Laager <rlaager at wiktel.com>
Delta File
+18 -0 contrib/initramfs/scripts/zfs
+18 -0 1 file

ZFS on Linux — contrib/initramfs/scripts zfs

initramfs: Fix a spelling error

This fixes a typo in a comment.

Signed-off-by: Richard Laager <rlaager at wiktel.com>
Delta File
+1 -1 contrib/initramfs/scripts/zfs
+1 -1 1 file

ZFS on Linux — contrib/initramfs/scripts zfs

initramfs: Fix inconsistent whitespace

This fixes one instance of inconsistent whitespace.

Signed-off-by: Richard Laager <rlaager at wiktel.com>
Delta File
+1 -1 contrib/initramfs/scripts/zfs
+1 -1 1 file

ZFS on Linux — . README.markdown

Add scan.coverity.com badge to README

Include the scan.coverity.com status badge in the top level README.

Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Closes #6801
Delta File
+1 -0 README.markdown
+1 -0 1 file

ZFS on Linux — etc/systemd/system zfs-import.target.in zfs-import-cache.service.in, man/man8 zfs.8

systemd zfs-import.target and documentation

zfs-import-{cache,scan}.service must complete before any mounting of
filesystems can occur. To simplify this dependency, create a target
that is reached After (in the systemd sense) the pool is imported.

Additionally, recommend that legacy zfs mounts use the option

x-systemd.requires=zfs-import.target

to codify this requirement.

Reviewed-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: Antonio Russo <antonio.e.russo at gmail.com>
Closes #6764

ZFS on Linux — etc/systemd/system zfs-import.target.in zfs-import-cache.service.in, man/man8 zfs.8

systemd zfs-import.target and documentation

zfs-import-{cache,scan}.service must complete before any mounting of
filesystems can occur. To simplify this dependency, create a target
that is reached After (in the systemd sense) the pool is imported.

Additionally, recommend that legacy zfs mounts use the option

x-systemd.requires=zfs-import.target

to codify this requirement.

Reviewed-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: Antonio Russo <antonio.e.russo at gmail.com>
Closes #6764