Displaying 1 50 of 11,482 commits (0.009s)

OpenZFS on OS X — cmd/zinject zinject.c, include/sys zio_crypt.h dsl_crypt.h

Add support for decryption faults in zinject

This patch adds the ability for zinject to trigger decryption
and authentication faults in the ZIO and ARC layers. This
functionality is exposed via the new "decrypt" error type, which
may be provided for "data" object types.

This patch also refactors some of the core encryption / decryption
functions so that they have consistent prototypes, handle errors
consistently, and do not have unused arguments.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tom Caputi <tcaputi at datto.com>
Delta File
+47 -95 module/zfs/arc.c
+21 -12 module/zfs/dsl_crypt.c
+26 -6 cmd/zinject/zinject.c
+31 -1 module/zfs/zio_inject.c
+16 -5 module/zfs/zio.c
+8 -8 module/zfs/zio_crypt.c
+17 -11 7 files not shown
+166 -138 13 files

OpenZFS on OS X — lib/libspl zmount.c

Decrease noise of mount
Delta File
+3 -1 lib/libspl/zmount.c
+3 -1 1 file

OpenZFS on OS X — module/zfs arc.c

Correct minor differences in arc.c to upstream crypto changes
Delta File
+19 -11 module/zfs/arc.c
+19 -11 1 file

OpenZFS on OS X — module/zfs arc.c dmu_diff.c, tests/zfs-tests/runfiles osx.run.in

Fix issues found with zfs diff

Two deadlocks / ASSERT failures were introduced in a2c2ed1b which
would occur whenever arc_buf_fill() failed to decrypt a block of
data. This occurred because the call to arc_buf_destroy() which
was responsible for cleaning up the newly created buffer would
attempt to take out the hdr lock that it was already holding. This
was resolved by calling the underlying functions directly without
retaking the lock.

In addition, the dmu_diff() code did not properly ensure that keys
were loaded and mapped before begining dataset traversal. It turns
out that this code does not need to look at any encrypted values,
so the code was altered to perform raw IO only.

Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tom Caputi <tcaputi at datto.com>

OpenZFS on OS X — cmd/zstreamdump zstreamdump.c, module/zfs dmu_send.c

Fix issues with raw sends of spill blocks

This patch fixes 2 issues in how spill blocks are processed during
raw sends. The first problem is that compressed spill blocks were
using the logical length rather than the physical length to
determine how much data to dump into the send stream. The second
issue is a typo that caused the spill record's object number to be
used where the objset's ID number was required. Both issues have
been corrected, and the payload_size is now printed in zstreamdump
for future debugging.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tom Caputi <tcaputi at datto.com>

OpenZFS on OS X — include/sys dnode.h dmu_impl.h, module/zfs dmu_objset.c dnode.c

Fix race in dnode_check_slots_free()

Currently, dnode_check_slots_free() works by checking dn->dn_type
in the dnode to determine if the dnode is reclaimable. However,
there is a small window of time between dnode_free_sync() in the
first call to dsl_dataset_sync() and when the useraccounting code
is run when the type is set DMU_OT_NONE, but the dnode is not yet
evictable, leading to crashes. This patch adds the ability for
dnodes to track which txg they were last dirtied in and adds a
check for this before performing the reclaim.

This patch also corrects several instances when dn_dirty_link was
treated as a list_node_t when it is technically a multilist_node_t.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tom Caputi <tcaputi at datto.com>

OpenZFS on OS X — lib/libzfs libzfs_dataset.c

Correct swapped keylocation error messages

This patch corrects a small issue where two error messages
in the code that checks for invalid keylocations were
swapped.

Reviewed by: Matt Ahrens <mahrens at delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2 at llnl.gov>
Signed-off-by: Tom Caputi <tcaputi at datto.com>
Delta File
+4 -4 lib/libzfs/libzfs_dataset.c
+4 -4 1 file

OpenZFS on OS X — config always-arch.m4, lib/libicp Makefile.am

Use ASM sha / aes code on Mac OS X

- Re-add commented-out code in the build files.
- Remove ELF specific direcives .type and .size and change the name mangling
  to include a leading underscore.
  https://sourceware.org/binutils/docs-2.22/as/Type.html#Type
  https://sourceware.org/binutils/docs-2.22/as/Size.html#Size
- Following https://github.com/apple/darwin-xnu/blob/master/osfmk/i386/asm.h,
  change the .align values to be a bit shift instead of the actual alignment
  value. This seems to be different as in the assembler used on linux.
- Replace [] with () since "brackets expression not supported on this target".
- Enable compilation of the asm code in the kext. This mainly required removing
  specialized floating point support handling since this isn't apparently needed
  in the OS X kernel. (At least I couldn't find any documentation about it).
  If it is actually needed, this change can cause lots of trouble in userland
  code that gets the xmm registers clobbered.

OpenZFS on OS X — module/zfs ZFSDatasetProxy.cpp

Add missing methods
Delta File
+15 -0 module/zfs/ZFSDatasetProxy.cpp
+15 -0 1 file

OpenZFS on OS X — include/sys ZFSDataset.h ZFSDatasetScheme.h, module/zfs ZFSDatasetScheme.cpp ZFSDataset.cpp

Compile fixes for older OsX

The i116lite commit introduced some compatibility regression with
previous OsX versions.

OpenZFS on OS X — cmd/zfs zfs_main.c, tests/zfs-tests/tests/functional/cli_root/zfs_mount zfs_mount_encrypted.ksh

Make encrypted "zfs mount -a" failures consistent

Currently, "zfs mount -a" will print a warning and fail to mount
any encrypted datasets that do not have a key loaded. This patch
makes the behavior of this failure consistent with other failure
modes ("zfs mount -a" will silently continue, explict "zfs mount"
will print a message and return an error code.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tom Caputi <tcaputi at datto.com>

OpenZFS on OS X — include/sys kmem.h taskq.h, module/spl spl-kmem.c spl-taskq.c

9018 Replace kmem_cache_reap_now() with kmem_cache_reap_soon()

    Reviewed by: Bryan Cantrill <bryan at joyent.com>
    Reviewed by: Dan McDonald <danmcd at joyent.com>
    Reviewed by: Matthew Ahrens <mahrens at delphix.com>
    Reviewed by: Yuri Pankov <yuripv at yuripv.net>

OpenZFS on OS X — module/zfs vdev_removal.c

9434 Speculative prefetch is blocked by device removal code

Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed by: Prashanth Sreenivasa <pks at delphix.com>
Approved by: Matt Ahrens <mahrens at delphix.com>

Device removal code does not set spa_indirect_vdevs_loaded for pools
that never experienced device removal.  At least one visual consequence
of it is completely blocked speculative prefetcher.  This patch sets
the variable in such situations.
Delta File
+1 -0 module/zfs/vdev_removal.c
+1 -0 1 file

OpenZFS on OS X — . META

Tag zfs-1.7.3

META file updated.
Delta File
+1 -1 META
+1 -1 1 file

OpenZFS on OS X — . META

Tag spl-1.7.3

META file updated.
Delta File
+1 -1 META
+1 -1 1 file

OpenZFS on OS X — module/zfs arc.c

Remove ASSERT() in l2arc_apply_transforms()

The ASSERT was erroneously copied from the next section of code.
The buffer's size should be expanded from "psize" to "asize"
if necessary.

Reviewed-by: Tom Caputi <tcaputi at datto.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tim Chase <tim at chase2k.com>
Delta File
+4 -4 module/zfs/arc.c
+4 -4 1 file

OpenZFS on OS X — include/sys zio.h spa.h, module/zfs arc.c dbuf.c

Decryption error handling improvements

Currently, the decryption and block authentication code in
the ZIO / ARC layers is a bit inconsistent with regards to
the ereports that are produces and the error codes that are
passed to calling functions. This patch ensures that all of
these errors (which begin as ECKSUM) are converted to EIO
before they leave the ZIO or ARC layer and that ereports
are correctly generated on each decryption / authentication
failure.

In addition, this patch fixes a bug in zio_decrypt() where
ECKSUM never gets written to zio->io_error.

Reviewed by: Matt Ahrens <matt at delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tom Caputi <tcaputi at datto.com>
Delta File
+35 -4 module/zfs/arc.c
+14 -6 module/zfs/dbuf.c
+5 -4 include/sys/zio.h
+5 -4 module/zfs/zfs_fm.c
+5 -1 module/zfs/dmu_objset.c
+5 -1 module/zfs/dmu_send.c
+4 -3 3 files not shown
+73 -23 9 files

OpenZFS on OS X — module/zfs dbuf.c

Encrypted dnode blocks should be prefetched raw

Encrypted dnode blocks are always initially read as raw data and
converted to decrypted data when an encrypted bonus buffer is
needed. This allows the DMU to be used for things like fetching
the DMU master node without requiring keys to be loaded. However,
dbuf_issue_final_prefetch() does not currently read the data as
raw. The end result of this is that prefetched dnode blocks are
read twice from disk: once decrypted and then again as raw data.
This patch corrects the issue by adding the flag when appropriate.

Reviewed by: Matt Ahrens <matt at delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tom Caputi <tcaputi at datto.com>
Delta File
+7 -2 module/zfs/dbuf.c
+7 -2 1 file

OpenZFS on OS X — module/zfs zfs_vnops.c

Correct minor warning
Delta File
+2 -0 module/zfs/zfs_vnops.c
+2 -0 1 file

OpenZFS on OS X — tests/zfs-tests/include default.cfg.in, tests/zfs-tests/runfiles osx.run.in

Correct new zfstest files to run

These files require further fixes, in particular mdb use in functions like
set_condense_delay, should be call to sysctl instead. In addition those
new values may require to be added to kstat.

OpenZFS on OS X — tests/zfs-tests/include default.cfg.in, tests/zfs-tests/runfiles osx.run.in

Correct new zfstest files to run

These files require further fixes, in particular mdb use in functions like
set_condense_delay, should be call to sysctl instead. In addition those
new values may require to be added to kstat.

OpenZFS on OS X — tests/zfs-tests/include default.cfg.in, tests/zfs-tests/runfiles osx.run.in

Correct new zfstest files to run

These files require further fixes, in particular mdb use in functions like
set_condense_delay, should be call to sysctl instead. In addition those
new values may require to be added to kstat.

OpenZFS on OS X — module/zfs zvol.c zvolIO.cpp

Can't hold lock in zfs_ereport_zvol_post

zfs_ereport_zvol_post will grab spa_namespace_lock, so we can not be
holding zfsdev_state_lock.
Delta File
+5 -0 module/zfs/zvol.c
+1 -1 module/zfs/zvolIO.cpp
+6 -1 2 files

OpenZFS on OS X — module/zfs ZFSPool.cpp zio.c, tests/zfs-tests/tests/functional/cli_root/zpool_clear zpool_clear_001_pos.ksh

Revert "Do not use me, debug commit for pool_destroy"

This reverts commit 4135c6cee3264ae859142e59d437d8254b225ad0.

OpenZFS on OS X — module/zfs zfs_vnops_osx.c

vnop_pageoutv2 needs to check for RO filesystem
Delta File
+8 -11 module/zfs/zfs_vnops_osx.c
+8 -11 1 file

OpenZFS on OS X — module/zfs vdev_file.c

Change vdev_file.c to hold iocount lock instead

Apparently usecount is mostly ignored for non-directories, and can
be force closed anyway.
Delta File
+39 -74 module/zfs/vdev_file.c
+39 -74 1 file

OpenZFS on OS X — . META

Tag zfs-1.7.2

META file updated.
Delta File
+1 -1 META
+1 -1 1 file

OpenZFS on OS X — . META

Tag spl-1.7.2

META file updated.
Delta File
+1 -1 META
+1 -1 1 file

OpenZFS on OS X — module/zfs zfs_vnops.c

zfs_get_data can deadlock

Change use of zget() to the ZGET_FLAG_WITHOUT_VNODE_GET variant to avoid
calling into VFS again, causing possible deadlock.
Delta File
+6 -1 module/zfs/zfs_vnops.c
+6 -1 1 file

OpenZFS on OS X — module/zfs spa.c spa_misc.c

Port spa_deadman support

Uses bsd_timeout() to trigger a future call of spa_deadman.
Delta File
+10 -1 module/zfs/spa.c
+6 -0 module/zfs/spa_misc.c
+16 -1 2 files

OpenZFS on OS X — module/zfs spa.c spa_misc.c

Port spa_deadman support

Uses bsd_timeout() to trigger a future call of spa_deadman.
Delta File
+10 -1 module/zfs/spa.c
+6 -0 module/zfs/spa_misc.c
+16 -1 2 files

OpenZFS on OS X — module/zfs spa.c spa_misc.c

Port spa_deadman support

Uses bsd_timeout() to trigger a future call of spa_deadman.
Delta File
+10 -1 module/zfs/spa.c
+6 -0 module/zfs/spa_misc.c
+16 -1 2 files

OpenZFS on OS X — cmd/zfs zfs_main.c, include libzfs.h libzfs_core.h

Add SIGINFO feature to zfs send

Change the send_progress_thread() to always be started, both for one-second
progress, and to idle for SIGINFO signal when not. Uses pthread_sigmask() to
control which thread receives the signal, or the "main" thread sitting
in ioctl(IOC_SEND) will abort.

Currently both shell and zfs send status is printed.

load: 0.51  cmd: zfs 1523 waiting 0.04u 0.35s
16:29:07   26.5M   BOOM at send
load: 0.82  cmd: zfs 1523 waiting 0.04u 1.17s
16:29:18    206M   BOOM at send
load: 1.15  cmd: zfs 1523 waiting 0.04u 2.05s
16:29:30    948M   BOOM at send

Signed-off-by: Jorgen Lundman <lundman at lundman.net>

OpenZFS on OS X — lib/libzfs libzfs_sendrecv.c

Add SIGINFO feature to zfs send

Change the send_progress_thread() to always be started, both for one-second
progress, and to idle for SIGINFO signal when not. Uses pthread_sigmask() to
control which thread receives the signal, or the "main" thread sitting
in ioctl(IOC_SEND) will abort.

Currently both shell and zfs send status is printed.

load: 0.51  cmd: zfs 1523 waiting 0.04u 0.35s
16:29:07   26.5M   BOOM at send
load: 0.82  cmd: zfs 1523 waiting 0.04u 1.17s
16:29:18    206M   BOOM at send
load: 1.15  cmd: zfs 1523 waiting 0.04u 2.05s
16:29:30    948M   BOOM at send

Signed-off-by: Jorgen Lundman <lundman at lundman.net>
Delta File
+68 -32 lib/libzfs/libzfs_sendrecv.c
+68 -32 1 file

OpenZFS on OS X — module/zfs zfs_vnops_osx.c

Do not rely on ubc_upl_map leaving vaddr as NULL on failures
Delta File
+1 -0 module/zfs/zfs_vnops_osx.c
+1 -0 1 file

OpenZFS on OS X — include/sys debug.h

Fix multiple evaluations of VERIFY() and ASSERT() on failures

Signed-off-by: DHE <git at dehacked.net>
Delta File
+4 -2 include/sys/debug.h
+4 -2 1 file

OpenZFS on OS X — module/zfs zfs_vnops_osx.c

Revert "Implement VNOP_ALLOCATE"

This reverts commit 727b75735cd91c5c8201a3084243a234e1b868ec.

As discussed in Issue #631 this causes "corruption" with vmware disk
images stored on ZFS.

Old functionality of just returning success has been restored.
Delta File
+8 -5 module/zfs/zfs_vnops_osx.c
+8 -5 1 file

OpenZFS on OS X — module/zfs vdev_file.c

Clean up vdev_file to hold on to the files
Delta File
+11 -3 module/zfs/vdev_file.c
+11 -3 1 file

OpenZFS on OS X — module/zfs vdev_file.c

Clean up vdev_file to hold on to the files
Delta File
+11 -3 module/zfs/vdev_file.c
+11 -3 1 file

OpenZFS on OS X — module/zfs vdev_file.c

Must check return of vnode_getwithvid()

Or in the case of failure, we call VN_RELE() and v_iocount drops
below 0 causing panic.
Delta File
+8 -5 module/zfs/vdev_file.c
+8 -5 1 file

OpenZFS on OS X — module/zfs vdev_file.c

Must check return of vnode_getwithvid()

Or in the case of failure, we call VN_RELE() and v_iocount drops
below 0 causing panic.
Delta File
+8 -5 module/zfs/vdev_file.c
+8 -5 1 file

OpenZFS on OS X — lib/libnvpair Makefile.am, lib/libunicode Makefile.am

Correct make distclean

Use VPATH style to handle source files in other directories, rather than
"../" path which break.

Potentially old *.lo files may be required to be deleted by hand.

OpenZFS on OS X — cmd/zdb zdb.c, module/zfs vdev_indirect.c vdev_removal.c

Edification of ASSERTV for upstream

Remove all warnings in non-debug build from the upstream commits that
landed recently.

Although, I wonder if there is a better standard for:

       ASSERTV(int err = )
               zap_lookup(spa_meta_objset(vd->vdev_spa), vd->vdev_top_zap,

as that just looks weird.

OpenZFS on OS X — include/sys kmem_impl.h, module/spl spl-kmem.c

8493 kmem_move taskq appears to be inducing significant system latency

    Reviewed by: Robert Mustacchi <rm at joyent.com>
    Reviewed by: Dan McDonald <danmcd at joyent.com>
    Reviewed by: Paul Dagnelie <pcd at delphix.com>
    Approved by: Richard Lowe <richlowe at richlowe.net>
Delta File
+22 -223 module/spl/spl-kmem.c
+0 -1 include/sys/kmem_impl.h
+22 -224 2 files

OpenZFS on OS X — tests/test-runner/bin run, tests/test-runner/cmd run.py

Remove python2.6 specific path from zfs-tester

OpenZFS on OS X — include/sys debug.h, module/spl spl-condvar.c

Add ASSERT3B and VERIFY3B - correct ABSOLUTE_TIME
Delta File
+7 -4 module/spl/spl-condvar.c
+4 -0 include/sys/debug.h
+11 -4 2 files

OpenZFS on OS X — lib/libzfs libzfs_dataset.c libzfs_util.c, man/man8 zfs.8

9286 want refreservation=auto

Reviewed by: Allan Jude <allanjude at freebsd.org>
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed by: John Kennedy <john.kennedy at delphix.com>
Reviewed by: Andy Stormont <astormont at racktopsystems.com>
Approved by: Richard Lowe <richlowe at richlowe.net>

OpenZFS on OS X — lib/libzfs libzfs_dataset.c libzfs_util.c, man/man8 zfs.8

9286 want refreservation=auto

Reviewed by: Allan Jude <allanjude at freebsd.org>
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed by: John Kennedy <john.kennedy at delphix.com>
Reviewed by: Andy Stormont <astormont at racktopsystems.com>
Approved by: Richard Lowe <richlowe at richlowe.net>

OpenZFS on OS X — lib/libzfs libzfs_dataset.c libzfs_util.c, man/man8 zfs.8

9286 want refreservation=auto

Reviewed by: Allan Jude <allanjude at freebsd.org>
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed by: John Kennedy <john.kennedy at delphix.com>
Reviewed by: Andy Stormont <astormont at racktopsystems.com>
Approved by: Richard Lowe <richlowe at richlowe.net>

OpenZFS on OS X — lib/libzfs libzfs_sendrecv.c, module/zfs dmu_send.c

Prevent raw zfs recv -F if dataset is unencrypted

The current design of ZFS encryption only allows a dataset to
have one DSL Crypto Key at a time. As a result, it is important
that the zfs receive code ensures that only one key can be in use
at a time for a given DSL Directory. zfs receive -F complicates
this, since the new dataset is received as a clone of the existing
one so that an atomic switch can be done at the end. To prevent
confusion about which dataset is actually encrypted a check was
added to ensure that encrypted datasets cannot use zfs recv -F to
completely replace existing datasets. Unfortunately, the check did
not take into account unencrypted datasets being overriden by
encrypted ones as a case.

Along the same lines, the code also failed to ensure that raw
recieves could not be done on top of existing unencrypted
datasets, which causes amny problems since the new stream cannot
be decrypted.

 Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
 Signed-off-by: Tom Caputi <tcaputi at datto.com>