Displaying 1 50 of 11,577 commits (0.008s)

OpenZFS on OS X — module/lua lapi.c ldo.c

Rename lua panic to avoid clash

OSX panic is a #define making for some fun times.

OpenZFS on OS X — . META

Tag zfs-1.8.1
Delta File
+1 -1 META
+1 -1 1 file

OpenZFS on OS X — . META

Tag spl-1.8.1
Delta File
+1 -1 META
+1 -1 1 file

OpenZFS on OS X — module/zfs zfs_osx.cpp

ZFS init in thread

Wait for SPL to have loaded first.
Delta File
+52 -33 module/zfs/zfs_osx.cpp
+52 -33 1 file

OpenZFS on OS X — module/zfs zfs_osx.cpp

ZFS init in thread

Wait for SPL to have loaded first.
Delta File
+47 -33 module/zfs/zfs_osx.cpp
+47 -33 1 file

OpenZFS on OS X — module/spl spl-osx.c

Delay SPL init in a thread

Mojave fast boot work around. Signal when initialised for ZFS.
Delta File
+17 -2 module/spl/spl-osx.c
+17 -2 1 file

OpenZFS on OS X — module/spl spl-osx.c

Delay SPL init in a thread

Mojave fast boot work around. Signal when initialised for ZFS.
Delta File
+27 -1 module/spl/spl-osx.c
+27 -1 1 file

OpenZFS on OS X — include/sys dkio.h vnode.h, module/spl spl-vnode.c spl-kstat.c

TRIM, VOP_SPACE and kstat fixes

Add ioctl from TRIM, and VOP_SPACE to punchholes for filebased pools.

kstat required VIRTUAL fixes to allocate space to hold data.

OpenZFS on OS X — cmd/zpool zpool_main.c, include libzfs.h

OS-7058 need zfs trim support

Requires SPL: 4692ce3f158ebf17707f4462b8a39e005be00a10

Porting notes:

VOP_SPACE's porting equivalent VNOP_IOCTL(F_PUNCHHOLE), was only added
at High Sierra - no hole support before then. But this is on pool file
vdevs, so it is mostly for debugging use.

Currently the unusual way to create kstats in spa_misc.c fails, and
is commented out.
Delta File
+573 -22 module/zfs/metaslab.c
+352 -1 module/zfs/spa.c
+212 -1 module/zfs/spa_misc.c
+211 -1 module/zfs/vdev.c
+201 -3 module/zfs/zio.c
+172 -29 module/zfs/vdev_raidz.c
+1,093 -164 43 files not shown
+2,814 -221 49 files

OpenZFS on OS X — cmd/zpool zpool_main.c, include libzfs.h

OS-7058 need zfs trim support

Porting notes:

VOP_SPACE's porting equivalent VNOP_IOCTL(F_PUNCHHOLE), was only added
at High Sierra - no hole support before then. But this is on pool file
vdevs, so it is mostly for debugging use.

Currently the unusual way to create kstats in spa_misc.c fails, and
is commented out.
Delta File
+573 -22 module/zfs/metaslab.c
+352 -1 module/zfs/spa.c
+216 -1 module/zfs/spa_misc.c
+211 -1 module/zfs/vdev.c
+201 -3 module/zfs/zio.c
+172 -29 module/zfs/vdev_raidz.c
+1,080 -164 43 files not shown
+2,805 -221 49 files

OpenZFS on OS X — cmd/zpool zpool_main.c, include libzfs.h

OS-7058 need zfs trim support

Porting notes:

VOP_SPACE's porting equivalent VNOP_IOCTL(F_PUNCHHOLE), was only added
at High Sierra - no hole support before then. But this is on pool file
vdevs, so it is mostly for debugging use.

Currently the unusual way to create kstats in spa_misc.c fails, and
is commented out.
Delta File
+573 -22 module/zfs/metaslab.c
+352 -1 module/zfs/spa.c
+216 -1 module/zfs/spa_misc.c
+211 -1 module/zfs/vdev.c
+201 -3 module/zfs/zio.c
+172 -29 module/zfs/vdev_raidz.c
+1,093 -164 43 files not shown
+2,818 -221 49 files

OpenZFS on OS X — include/sys kstat_osx.h, module/zfs zfs_kstat_osx.c

Add tunables for channel programs

This patch adds tunables for modifying the maximum memory limit and
maximum instruction limit that can be specified when running a channel
program.

OpenZFS on OS X — include/sys sunddi.h, module/spl spl-ddi.c

Add ddi_strtoll and strspn

as well as a bunch of ctype.h calls
Delta File
+29 -0 include/sys/sunddi.h
+15 -0 module/spl/spl-ddi.c
+44 -0 2 files

OpenZFS on OS X — include/sys sunddi.h, module/spl spl-ddi.c

Add ddi_strtoll and strspn

as well as a bunch of ctype.h calls
Delta File
+28 -0 include/sys/sunddi.h
+15 -0 module/spl/spl-ddi.c
+43 -0 2 files

OpenZFS on OS X — module/zfs arc.c

Fix arc_release() refcount

Update arc_release to use arc_buf_size().  This hunk was accidentally
dropped when porting compressed send/recv, ZOL 2aa34383b.

Reviewed-by: Matthew Ahrens <mahrens at delphix.com>
Signed-off-by: Tom Caputi <tcaputi at datto.com>
Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Delta File
+1 -1 module/zfs/arc.c
+1 -1 1 file

OpenZFS on OS X — include/sys refcount.h, module/zfs refcount.c arc.c

Add zfs_refcount_transfer_ownership_many()

When debugging is enabled and a zfs_refcount_t contains multiple holders
using the same key, but different ref_counts, the wrong reference_t may
be transferred.  Add a zfs_refcount_transfer_ownership_many() function,
like the existing zfs_refcount_*_many() functions, to match and transfer
the correct refcount_t;

This issue may occur when using encryption with refcount debugging
enabled.  An arc_buf_hdr_t can have references for both the
hdr->b_l1hdr.b_pabd and hdr->b_crypt_hdr.b_rabd both of which use
the hdr as the reference holder.  When unsharing the buffer the
p_abd should be transferred.

This issue does not impact production builds because refcount holders
are not tracked.

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

OpenZFS on OS X — cmd/ztest ztest.c, include/sys dsl_crypt.h dsl_dataset.h

Refcounted DSL Crypto Key Mappings

Since native ZFS encryption was merged, we have been fighting
against a series of bugs that come down to the same problem: Key
mappings (which must be present during all I/O operations) are
created and destroyed based on dataset ownership, but I/Os can
have traditionally been allowed to "leak" into the next txg after
the dataset is disowned.

In the past we have attempted to solve this problem by trying to
ensure that datasets are disowned ater all I/O is finished by
calling txg_wait_synced(), but we have repeatedly found edge cases
that need to be squashed and code paths that might incur a high
number of txg syncs. This patch attempts to resolve this issue
differently, by adding a reference to the key mapping for each txg
it is dirtied in. By doing so, we can remove many of the
unnecessary calls to txg_wait_synced() we have added in the past
and ensure we don't need to deal with this problem in the future.

Reviewed-by: Jorgen Lundman <lundman at lundman.net>
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>
Delta File
+78 -33 module/zfs/dsl_crypt.c
+64 -30 module/zfs/dsl_dataset.c
+25 -2 module/zfs/dsl_pool.c
+8 -18 module/zfs/zil.c
+13 -7 module/zfs/dmu_objset.c
+1 -17 module/zfs/spa.c
+9 -7 3 files not shown
+198 -114 9 files

OpenZFS on OS X — cmd/zed/zed.d config.rename.sh, module/zfs arc.c dbuf.c

Return errorcode in arc_read
Delta File
+1 -1 module/zfs/arc.c
+1 -1 module/zfs/dbuf.c
+0 -0 cmd/zed/zed.d/config.rename.sh
+2 -2 3 files

OpenZFS on OS X — . META

Tag zfs-1.8.0
Delta File
+1 -1 META
+1 -1 1 file

OpenZFS on OS X — . META

Tag spl-1.8.0
Delta File
+1 -1 META
+1 -1 1 file

OpenZFS on OS X — lib/libspl getmntany.c

Always attempt to expand /dev/disk names

Normally, getmntany() is called without a search argument, so will skip
all the "if()" statements, call statfs2mnttab() which in turn calls
expand_disk_to_zfs() to expand /dev/disk* names back into dataset name.

However, when searching for a specific mount, by passing in a search argument,
it would not expand the /dev/disk name, but compare dataset name to that
of /dev/disk name.

Now we always call statfs2mnttab() to attempt to expand names, and
compare against the (possibly) expanded name.

This should fix callers of zfs_is_mounted() when devdisk is involved.
Delta File
+7 -7 lib/libspl/getmntany.c
+7 -7 1 file

OpenZFS on OS X — include/sys types.h

Add workaround for kcdata.h compile error

/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/
  Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/
  Kernel.framework/Headers/kern/kcdata.h:1194:6:
    error:        use of undeclared identifier 'strnlen'

Most likely we have some odd situation with the include_next magic
we perform which possibly would be a better fix.
Delta File
+8 -0 include/sys/types.h
+8 -0 1 file

OpenZFS on OS X — lib/libspl/include devid.h

Remove abort() from devid() wrappers

zpool abort()ing is ugly to users, it is better we return failure and
let the callers handle that.
Delta File
+7 -8 lib/libspl/include/devid.h
+7 -8 1 file

OpenZFS on OS X — module/zfs spa_config.c

Send rename event for /etc/zfs/zpool.cache

Recent commit 99661cd801440a8fc276f4ab19f9f09afbf17f7b accidentally broke the
OsX specific "/etc/zfs/zpool.cache" commit, which passes to zed the event to
rename the file as well as its name.

A feature added in 6300b27f7fa3b4c3f41394ee7ca68a4861746705
Delta File
+10 -2 module/zfs/spa_config.c
+10 -2 1 file

OpenZFS on OS X — module/zfs arc.c

Check both psize and lsize
Delta File
+1 -1 module/zfs/arc.c
+1 -1 1 file

OpenZFS on OS X — module/zfs dmu_traverse.c dsl_scan.c

Additional hardening against damaged blkptrs

In the "Gracefully handle" part of arc_read(), also check psize against
the maximum block size and look for bogus embedded blkptrs.

Handle arc_read() errors in dsl_scan_prefetch() and
traverse_prefetch_metadata().

Add an attempt to stop the scrubbing in dsl_scan_visitbp() if the new
module param zfs_dsl_scan_visitbp_stop_scrub_on_error is set.
Delta File
+26 -15 module/zfs/dmu_traverse.c
+22 -11 module/zfs/dsl_scan.c
+8 -0 module/zfs/arc.c
+56 -26 3 files

OpenZFS on OS X — . META

Tag zfs-1.7.4

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

OpenZFS on OS X — . META

Tag spl-1.7.4

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

OpenZFS on OS X — module/zfs dsl_crypt.c

refcount_destroy() missed in remove_mappings
Delta File
+1 -0 module/zfs/dsl_crypt.c
+1 -0 1 file

OpenZFS on OS X — include/sys refcount.h, module/zfs refcount.c

Track refcount() looking for leaks
Delta File
+56 -5 module/zfs/refcount.c
+8 -3 include/sys/refcount.h
+64 -8 2 files

OpenZFS on OS X — module/zfs arc.c ZFSPool.cpp

Fix leaked_memory and mutex_destroy calls

OpenZFS on OS X — module/icp/core kcf_sched.c kcf_mech_tabs.c

mutex_destroy() should be called

OpenZFS on OS X — include/osx mutex.h, module/spl spl-kmem.c

Refresh memory_leak check code

It gets tricky when wanting to check size 4096 and above.
Delta File
+63 -10 module/spl/spl-kmem.c
+1 -1 include/osx/mutex.h
+64 -11 2 files

OpenZFS on OS X — module/zfs arc.c aggsum.c

9688 aggsum_fini leaks memory

Reviewed by: Serapheim Dimitropoulos <serapheim.dimitro at delphix.com>
Reviewed by: Matt Ahrens <matt at delphix.com>
Reviewed by: Prashanth Sreenivasa <pks at delphix.com>

aggsum_fini() does not free as_buckets. It should do so.

Upstream bug: DLPX-58607
Delta File
+8 -0 module/zfs/arc.c
+2 -1 module/zfs/aggsum.c
+10 -1 2 files

OpenZFS on OS X — module/zfs vdev_initialize.c space_map.c

Remove warnings with ASSERTV()

OpenZFS on OS X — module/zfs zfs_vfsops.c

Remove printf that can cause panic
Delta File
+0 -10 module/zfs/zfs_vfsops.c
+0 -10 1 file

OpenZFS on OS X — module/spl spl-osx.c

Wait for current_proc() to be setup

On very early boots, current_proc() returns NULL, and we call
taskq_thread_create() which calls spl_cv_wait()->msleep().
_sleep() in kernel will use current_proc() to update stats and
we panic with page fault.
Delta File
+5 -0 module/spl/spl-osx.c
+5 -0 1 file

OpenZFS on OS X — module/spl spl-taskq.c

mojave debug

print if p or p->p_stats is NULL or not-NULL.

Skip the first cv_wait that we know we die in.
Delta File
+14 -0 module/spl/spl-taskq.c
+14 -0 1 file

OpenZFS on OS X — module/spl spl-osx.c

Wait for current_proc() to be setup

On very early boots, current_proc() returns NULL, and we call
taskq_thread_create() which calls spl_cv_wait()->msleep().
_sleep() in kernel will use current_proc() to update stats and
we panic with page fault.
Delta File
+5 -0 module/spl/spl-osx.c
+5 -0 1 file

OpenZFS on OS X — module/spl/KernelExports zfs.exports

test

fs.exports

OpenZFS on OS X — module/zfs arc.c

Refactor arc_hdr_realloc_crypt()

The arc_hdr_realloc_crypt() function is responsible for converting
a "full" arc header to an extended "crypt" header and visa versa.
This code was originally written with a bcopy() so that any new
members added to arc headers would automatically be included
without requiring a code change. However, in practice this (along
with small differences in kmem_cache implementations between
various platforms) has caused a number of hard-to-find problems in
ports to other operating systems. This patch solves this problem
by making all member copies explicit and adding ASSERTs for fields
that cannot be set during the transfer. It also manually resets the
old header after the reallocation is finished so it can be properly
reallocated and reused.

Signed-off-by: Tom Caputi <tcaputi at datto.com>
Delta File
+61 -8 module/zfs/arc.c
+61 -8 1 file

OpenZFS on OS X — module/zfs arc.c

Revert "Temporary: fix arc_hdr_realloc_crypt() to zero released hdr"

This reverts commit d282603ac41fec0e1d47a21b0542f44c350390cb.

Replaced with proper fix:

Refactor arc_hdr_realloc_crypt()
Delta File
+0 -6 module/zfs/arc.c
+0 -6 1 file

OpenZFS on OS X — module/zfs dmu_send.c

Correct missing os_raw_receive

Causing ASSERT/VERIFY when receiving raw
Delta File
+1 -0 module/zfs/dmu_send.c
+1 -0 1 file

OpenZFS on OS X — module/zfs arc.c

Temporary: fix arc_hdr_realloc_crypt() to zero released hdr

This is a temporary commit until the proper fix will come from upstream
Delta File
+6 -0 module/zfs/arc.c
+6 -0 1 file

OpenZFS on OS X — lib/libzfs libzfs_crypto.c, module/zfs dsl_crypt.c

Separate the error code for already unloaded key

Connected to the future commit: Adopt pyzfs from ClusterHQ
from ZOL (85ce3f4fd1).

OpenZFS on OS X — include/sys zfs_znode.h, module/zfs zfs_znode.c

hack: test znode_move defrag performance

Shadow struct vnode to allow us to swap v_data fields over, and
test zfs_znode_move() feature of spl-kmem.

kstat.unix.kmem_cache.zfs_znode_cache.move_callbacks: 2804
kstat.unix.kmem_cache.zfs_znode_cache.move_yes: 2306
kstat.unix.kmem_cache.zfs_znode_cache.move_no: 0
kstat.unix.kmem_cache.zfs_znode_cache.move_later: 497
kstat.unix.kmem_cache.zfs_znode_cache.move_dont_need: 0
kstat.unix.kmem_cache.zfs_znode_cache.move_dont_know: 1
kstat.unix.kmem_cache.zfs_znode_cache.move_hunt_found: 0
kstat.unix.kmem_cache.zfs_znode_cache.move_slabs_freed: 694
kstat.unix.kmem_cache.zfs_znode_cache.move_reclaimable: 5
Delta File
+79 -11 module/zfs/zfs_znode.c
+3 -1 include/sys/zfs_znode.h
+82 -12 2 files

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

hack: test znode_move defrag performance

OpenZFS on OS X — module/zfs dbuf.c dmu_send.c

Fix coverity defects: CID 176037

CID 176037: Uninitialized scalar variable

This patch fixes an uninitialized variable defect caught by
coverity and introduced in 69830602

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tom Caputi <tcaputi at datto.com>
Delta File
+4 -3 module/zfs/dbuf.c
+1 -1 module/zfs/dmu_send.c
+5 -4 2 files

OpenZFS on OS X — include/sys dmu.h, module/zfs dbuf.c dsl_dataset.c

Add ASSERT to debug encryption key mapping issues

This patch simply adds an ASSERT that confirms that the last
decrypting reference on a dataset waits until the dataset is
no longer dirty. This should help to debug issues where the
ZIO layer cannot find encryption keys after a dataset has been
disowned.

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

OpenZFS on OS X — module/zfs dbuf.c arc.c

Raw receive fix and encrypted objset security fix

This patch fixes two problems with the encryption code. First, the
current code does not correctly prohibit the DMU from updating
dn_maxblkid during object truncation within a raw receive. This
usually only causes issues when the truncating DRR_FREE record is
aggregated with DRR_FREE records later in the receive, so it is
relatively hard to hit.

Second, this patch fixes a security issue where reading blocks
within an encrypted object did not guarantee that the dnode block
itself had ever been verified against its MAC. Usually the
verification happened anyway when the bonus buffer was read, but
some use cases (notably zvols) might never perform the check.

Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Signed-off-by: Tom Caputi <tcaputi at datto.com>
Delta File
+103 -33 module/zfs/dbuf.c
+7 -3 module/zfs/arc.c
+6 -1 module/zfs/dnode_sync.c
+116 -37 3 files