aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs
Commit message (Collapse)AuthorAgeFilesLines
* OpenZFS 7812 - Remove gender specific languageDaniel Hoffman2017-02-242-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Authored by: Daniel Hoffman <[email protected]> Reviewed by: Matt Ahrens <[email protected]> Reviewed by: Prakash Surya <[email protected]> Reviewed by: Steve Gonczi <[email protected]> Reviewed by: Chris Williamson <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Igor Kozhukhov <[email protected]> Reviewed by: Dan McDonald <[email protected]> Reviewed by: Robert Mustacchi <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Ported-by: George Melikov <[email protected]> This change removes all gendered language that did not refer specifically to an individual person or pet. The convention taken was to use variations on "they" when referring to users and/or human beings, while using "it" when referring to code, functions, and/or libraries. Additionally, we took the liberty to fix up any whitespace issues that were found in any files that were already being modified. OpenZFS-issue: https://www.illumos.org/issues/7812 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/ad626db Closes #5822
* OpenZFS 7199 - dsl_dataset_rollback_sync may try to free already free blocksAndriy Gapon2017-02-242-16/+58
| | | | | | | | | | | | | | 7200 no blocks must be born in a txg after a snaphot is created Authored by: Andriy Gapon <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Brad Lewis <[email protected]> Approved by: Gordon Ross <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7199 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/bfaed0b Closes #5817
* Fix incorrect spare vdev state after replacingIsaac Huang2017-02-231-0/+5
| | | | | | | | | | | | | | After a hot spare replaces an OFFLINE vdev, the new parent spare vdev state is set incorrectly to OFFLINE. The correct state should be DEGRADED. The incorrect OFFLINE state will prevent top-level vdev from reading the spare vdev, thus causing unnecessary reconstruction. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Don Brady <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Isaac Huang <[email protected]> Closes #5766 Closes #5770
* zfs_arc_num_sublists_per_state should be common to all multilistsMatthew Ahrens2017-02-153-30/+52
| | | | | | | | | | | | | The global tunable zfs_arc_num_sublists_per_state is used by the ARC and the dbuf cache, and other users are planned. We should change this tunable to be common to all multilists. This tuning may be overridden on a per-multilist basis. Reviewed-by: Pavel Zakharov <[email protected]> Reviewed-by: Dan Kimmel <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matthew Ahrens <[email protected]> Closes #5764
* Fix zfs_compressed_arc_enabled parameter descriptionTim Chase2017-02-131-1/+1
| | | | | | | | | A likely cut/paste error caused the description to be applied to zfs_arc_average_blocksize. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tim Chase <[email protected]> Closes #5788
* Fix off by one in zpl_lookupChunwei Chen2017-02-111-1/+1
| | | | | | | | | | | | | | Doing the following command would return success with zfs creating an orphan object. touch $(for i in $(seq 256); do printf "n"; done) The funny thing is that this will only work once for each directory, because after upgraded to fzap, zfs_lookup would fail properly since it has additional length check. Signed-off-by: Chunwei Chen <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Closes #5768
* OpenZFS 7104 - increase indirect block sizeMatthew Ahrens2017-02-092-5/+17
| | | | | | | | | | | | | | Authored by: Matthew Ahrens <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Paul Dagnelie <[email protected]> Reviewed by: Dan McDonald <[email protected]> Approved by: Robert Mustacchi <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7104 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/4b5c8e9 Closes #5679
* panic in bpobj_space(): null pointer dereferenceMatthew Ahrens2017-02-092-11/+25
| | | | | | | | | | | | | | | | | | | | | | | | | This is a race condition in the deadlist code. A thread executing an administrative command that uses dsl_deadlist_space_range() holds the lock of the whole deadlist_t to protect the access of all its entries that the deadlist contains in an avl tree. Sync threads trying to insert a new entry in the deadlist (through dsl_deadlist_insert() -> dle_enqueue()) do not hold the deadlist lock at that moment. If the dle_bpobj is the empty bpobj (our sentinel value), we close and reopen it. Between these two operations, it is possible for the dsl_deadlist_space_range() thread to dereference that bpobj which is NULL during that window. Threads should hold the a deadlist's dl_lock when they manipulate its internal data so scenarios like the one above are avoided. Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Dan Kimmel <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matthew Ahrens <[email protected]> Closes #5762
* Fix iput() calls within a txBrian Behlendorf2017-02-081-15/+23
| | | | | | | | | | | | | | | | | As explicitly stated in section 2 of the 'Programming rules' comments at the top of zfs_vnops.c. If you must call iput() within a tx then use zfs_iput_async(). Move iput() calls after dmu_tx_commit() / dmu_tx_abort when possible. When not possible convert the iput() calls to zfs_iput_async(). Reviewed-by: Don Brady <[email protected]> Reviewed-by: Chunwei Chen <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #5758
* Allow c99 code to compileMatthew Ahrens2017-02-082-3/+4
| | | | | | | | | | | | Add the appropriate compiler flags to accept c99 code. This will help to minimize differences with upstream, and aid porting changes. One change was necessary in zvol.c because the DEFINE_IDA() macro does not work with the new compiler flags. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Chunwei Chen <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Matthew Ahrens <[email protected]> Closes #5756
* Add missing module_param for zfs_per_txg_dirty_frees_percentDavid Quigley2017-02-071-1/+6
| | | | | | | | | | When the code was added this tunable was not exposed via module params. Also it was not documented. This patch changes the type from a uint32 to a ulong as done with other percentage tunables and also documents it in the zfs-module-parameters man page. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: David Quigley <[email protected]> Closes #5750
* OpenZFS 7448 - ZFS doesn't notice when disk vdevs have no write cacheGeorge Melikov2017-02-042-2/+10
| | | | | | | | | | | | | | | Authored by: Hans Rosenfeld <[email protected]> Reviewed by: Dan Fields <[email protected]> Reviewed by: Alek Pinchuk <[email protected]> Reviewed by: George Wilson <[email protected]> Approved by: Dan McDonald <[email protected]> Reviewed-by: Don Brady <[email protected]> Reviewed-by: Tim Chase <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7448 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/295438b Closes #5737
* OpenZFS 7504 - kmem_reap hangs spa_sync and administrative tasksGeorge Melikov2017-02-041-3/+8
| | | | | | | | | | | | | Authored by: Matthew Ahrens <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Prakash Surya <[email protected]> Approved by: Dan McDonald <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tim Chase <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7504 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/405a5a0 Closes #5736
* OpenZFS 7247 - zfs receive of deduplicated stream failsGeorge Melikov2017-02-041-23/+21
| | | | | | | | | | | | | | | | | | | | Authored by: Chris Williamson <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Dan Kimmel <[email protected]> Approved by: Robert Mustacchi <[email protected]> Reviewed-by: loli10K <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7247 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/2ad25b4 Closes #5689 Porting notes: - tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_013_pos.ksh renamed as zfs_receive_015_pos.ksh, zfs_receive_013_pos.ksh is now used for OpenZFS test. - libzfs_sendrecv.c: SMALLEST_POSSIBLE_MAX_DDT_MB is always used for all 32-bit builds.
* OpenZFS 1300 - filename normalization doesn't work for removesGeorge Melikov2017-02-027-89/+172
| | | | | | | | | | | | | | | Authored by: Kevin Crowe <[email protected]> Reviewed by: Yuri Pankov <[email protected]> Reviewed by: Pavel Zakharov <[email protected]> Reviewed by: Matt Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/1300 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/8f1750d Closes #5725 Porting notes: - zap_micro.c: all `MT_EXACT` are replaced by `0`
* Fix write(2) returns zero bug from 933ec99Chunwei Chen2017-02-021-2/+4
| | | | | | | | | | | For generic_write_checks with 2 args, we can exit when it returns zero because it means count is zero. However this is not the case for generic_write_checks with 4 args, where zero means no error. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Haakan T Johansson <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes #5720 Closes #5726
* Remove lint ifdef checks in zdb and dbufGiuseppe Di Natale2017-02-011-2/+0
| | | | | | | | | | This is effectively dead code for the Linux implementation which can be removed to improve readability. We want to linter to check the real production/debug build as much as possible. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Giuseppe Di Natale <[email protected]> Closes #5722
* OpenZFS 7072 - zfs fails to expand if lun added when os is in shutdown stateGeorge Melikov2017-02-012-1/+19
| | | | | | | | | | | | | | | | | | | Authored by: George Wilson <[email protected]> Reviewed by: Igor Kozhukhov <[email protected]> Reviewed by: Dan Kimmel <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Prakash Surya <[email protected]> Reviewed by: Alex Reece <[email protected]> Approved by: Dan McDonald <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7072 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/c39a2aa Closes #5694 Porting notes: - vdev.c: 'vdev_get_stats' changes are moved to 'vdev_get_stats_ex'. - vdev_disk.c: ignored, Linux specific code is different.
* Use fletcher_4 routines natively with `abd_iterate_func()`David Quigley2017-02-011-6/+27
| | | | | | | | | | | | This patch adds the necessary infrastructure for ABD to make use of the vectorized fletcher 4 routines. - export ABD compatible interface from fletcher_4 - add ABD fletcher_4 tests for data and metadata ABD types. Reviewed-by: Brian Behlendorf <[email protected]> Original-patch-by: Gvozden Neskovic <[email protected]> Signed-off-by: David Quigley <[email protected]> Closes #5589
* OpenZFS 6569 - large file delete can starve out write opsGeorge Melikov2017-01-312-5/+62
| | | | | | | | | | | | | Authored by: Alek Pinchuk <[email protected]> Reviewed by: Matt Ahrens <[email protected]> Reviewed by: Sanjay Nadkarni <[email protected]> Reviewed by: Pavel Zakharov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> Tested-by: kernelOfTruth <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/6569 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/1bf4b6f2 Closes #5706
* OpenZFS 7545 - zdb should disable reference trackingGiuseppe Di Natale2017-01-311-2/+1
| | | | | | | | | | | | | | | | Authored by: Matthew Ahrens <[email protected]> Reviewed by: Dan Kimmel <[email protected]> Reviewed by: Steve Gonczi <[email protected]> Reviewed by: George Wilson <[email protected]> Approved by: Robert Mustacchi <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: Giuseppe Di Natale <[email protected]> Porting Notes: Moved reference_tracking_enable and reference_history outside of ZFS_DEBUG. OpenZFS-issue: https://www.illumos.org/issues/7545 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/4dd77f9 Closes #5701
* Update deadman operation to better align with upstream OpenZFSTim Chase2017-01-311-1/+15
| | | | | | | | | | | | | | | | | | | | | | | The deadman in ZoL didn't behave quite as it did in upstream OpenZFS. In addition to the 2 purposes for which OpenZFS used the zfs_deadman_synctime_ms parameter, ZoL also used it to determine how frequently the deadman would fire once it has been triggered. This patch adds the zfs_deadman_checktime_ms parameter to control how frequently the subsequent checks are performed. The deadman is now disabled for suspended pools. As had been the case, unlike upstream OpenZFS, ZoL will not panic when a hung IO is detected. The module parameter documentation has been upated to include the new parameter and to better describe the operation of the deadmen. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Tim Chase <[email protected]> Closes #5695
* OpenZFS 7019 - zfsdev_ioctl skips secpolicy when FKIOCTL is setGeorge Melikov2017-01-311-2/+2
| | | | | | | | | | | | | Authored by: Alex Wilson <[email protected]> Reviewed by: Robert Mustacchi <[email protected]> Reviewed by: Richard Lowe <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Approved by: Dan McDonald <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7019 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/45b1747 Closes #5709
* OpenZFS 7136 - ESC_VDEV_REMOVE_AUX ought to always include vdev informationGeorge Melikov2017-01-311-3/+6
| | | | | | | | | | | | | | | | | | Authored by: Alan Somers <[email protected]> 7115 6922 generates ESC_ZFS_VDEV_REMOVE_AUX a bit too often Reviewed by: George Wilson <[email protected]> Reviewed by: Josef 'Jeff' Sipek <[email protected]> Approved by: Robert Mustacchi <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7136 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/b72b6bb Closes #5691 Porting notes: - Functionally this patch behaves the same as the OpenZFS version but it was adapted because because ZoL doesn't have the same illumos sysevent_t infrastructure and functionality.
* OpenZFS 7490 - real checksum errors are silenced when zinject is onGeorge Melikov2017-01-301-5/+6
| | | | | | | | | | | | | | Authored by: Pavel Zakharov <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Paul Dagnelie <[email protected]> Reviewed by: Dan Kimmel <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Approved by: Robert Mustacchi <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7490 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/6cedfc3 Closes #5693
* OpenZFS 6922 - Emit ESC_ZFS_VDEV_REMOVE_AUX after removing an aux deviceGeorge Melikov2017-01-301-1/+1
| | | | | | | | | | | | Authored by: Alan Somers <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Approved by: Dan McDonald <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/6922 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/63364b0 Closes #5690
* OpenZFS 7277 - zdb should be able to print zfs_dbgmsg'sGeorge Melikov2017-01-281-0/+15
| | | | | | | | | | | | | | | | | | Porting notes: - 'zfs_dbgmsg_print()' reintroduced to userspace. Authored by: Pavel Zakharov <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Igor Kozhukhov <[email protected]> Approved by: Dan McDonald <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7277 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/29bdd2f Closes #5684
* Fix suspend Godfather I/Os io_reexecute bitsBrian Behlendorf2017-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | After resuming a pool the godfather zio could have both the ZIO_REEXECUTE_NOW and ZIO_REEXECUTE_SUSPEND bits set. This can occur if some child zios set ZIO_REEXECUTE_NOW while other set ZIO_REEXECUTE_SUSPEND. The godfather zio can inherit both flags in zio_notify_parent(). The child zios which assigned the ZIO_REEXECUTE_SUSPEND flag will be removed from the godfather's child list and added to the spa->spa_suspend_zio_root child list. While child zios with the ZIO_REEXECUTE_NOW bit set remain being monitored by the godfather zio. When the godfather zio executes zio_done() the presence of the ZIO_REEXECUTE_SUSPEND bit results in all io_reexecute being cleared. These child zios will then not be re-executed and instead will be destroyed and lost. The most straight forward way to address this situation is to only clear the ZIO_REEXECUTE_SUSPEND bit and leave the ZIO_REEXECUTE_NOW bit set. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: yuxiang <[email protected]>
* OpenZFS 7580 - ztest failure in dbuf_read_implGeorge Melikov2017-01-282-8/+22
| | | | | | | | | | | | Authored by: George Wilson <[email protected]> Reviewed by: Pavel Zakharov <[email protected]> Reviewed by: Steve Gonczi <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7580 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/3105d95 Closes #5678
* OpenZFS 7301 - zpool export -f should be able to interrupt file freeingGeorge Melikov2017-01-273-5/+46
| | | | | | | | | | | | | | | Authored by: Alek Pinchuk <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Sanjay Nadkarni <[email protected]> Reviewed by: Saso Kiselkov <[email protected]> Reviewed by: John Kennedy <[email protected]> Approved by: Gordon Ross <[email protected]> Reviewed-by: Tim Chase <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7301 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/eb72182 Closes #5680
* OpenZFS 7254 - ztest failed assertion in ztest_dataset_dirobj_verify: ↵George Melikov2017-01-277-13/+80
| | | | | | | | | | | | | | | | dirobjs + 1 == usedobjs Authored by: Paul Dagnelie <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Prakash Surya <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Steve Gonczi <[email protected]> Approved by: Robert Mustacchi <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7254 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/c166b69 Closes #5670
* Retire .write/.read file operationsChunwei Chen2017-01-271-34/+50
| | | | | | | | | | | | | | | The .write/.read file operations callbacks can be retired since support for .read_iter/.write_iter and .aio_read/.aio_write has been added. The vfs_write()/vfs_read() entry functions will select the correct interface for the kernel. This is desirable because all VFS write/read operations now rely on common code. This change also add the generic write checks to make sure that ulimits are enforced correctly on write. Signed-off-by: Brian Behlendorf <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes #5587 Closes #5673
* OpenZFS 5561 - support root pools on EFI/GPT partitioned disksBrian Behlendorf2017-01-271-3/+1
| | | | | | | | | | | Reviewed by: Jean McCormack <[email protected]> Reviewed by: Josef 'Jeff' Sipek <[email protected]> Approved by: Dan McDonald <[email protected]> Reviewed-by: George Melikov <[email protected]> Ported-by: Brian Behlendorf <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/5561 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/1a902ef Closes #5672
* OpenZFS 7613 - ms_freetree[4] is only used in syncing contextTim Chase2017-01-261-43/+38
| | | | | | | | | | | | | | | | metaslab_t:ms_freetree[TXG_SIZE] is only used in syncing context. We should replace it with two trees: the freeing tree (ranges that we are freeing this syncing txg) and the freed tree (ranges which have been freed this txg). Authored by: Matthew Ahrens <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Alex Reece <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: Tim Chase <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7613 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/a8698da2 Closes #5598
* OpenZFS 7500 - Simplify dbuf_free_range by removing dn_unlisted_l0_blkidGeorge Melikov2017-01-262-41/+5
| | | | | | | | | | | | Authored by: Stephen Blinick <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Dan Kimmel <[email protected]> Approved by: Gordon Ross <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7500 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/653af1b Closes #5639
* OpenZFS 6676 - Race between unique_insert() and unique_remove() causes ZFS ↵George Melikov2017-01-267-27/+72
| | | | | | | | | | | | | | | | | | fsid change Authored by: Josef 'Jeff' Sipek <[email protected]> Reviewed by: Saso Kiselkov <[email protected]> Reviewed by: Sanjay Nadkarni <[email protected]> Reviewed by: Dan Vatca <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Sebastien Roy <[email protected]> Approved by: Robert Mustacchi <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/6676 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/40510e8 Closes #5667
* OpenZFS 7606 - dmu_objset_find_dp() takes a long time while importing poolGeorge Melikov2017-01-261-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When importing a pool with a large number of filesystems within the same parent filesystem, we see that dmu_objset_find_dp() takes a long time. It is called from 3 places: spa_check_logs(), spa_ld_claim_log_blocks(), and spa_load_verify(). There are several ways to improve performance here: 1. We don't really need to do spa_check_logs() or spa_ld_claim_log_blocks() if the pool was closed cleanly. 2. spa_load_verify() uses dmu_objset_find_dp() to check that no datasets have too long of names. 3. dmu_objset_find_dp() is slow because it's doing zap_value_search() (which is O(N sibling datasets)) to determine the name of each dsl_dir when it's opened. In this case we actually know the name when we are opening it, so we can provide it and avoid the lookup. This change implements fix #3 from the above list; i.e. make dmu_objset_find_dp() provide the name of the dataset so that we don't have to search for it. Authored by: Matthew Ahrens <[email protected]> Reviewed by: Steve Gonczi <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Prashanth Sreenivasa <[email protected]> Reviewed-by: David Quigley <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7606 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/cac6bab Closes #5662
* OpenZFS 7180 - potential race between zfs_suspend_fs+zfs_resume_fs and ↵George Melikov2017-01-232-10/+17
| | | | | | | | | | | | | | zfs_ioc_rename Authored by: Andriy Gapon <[email protected]> Reviewed by: Matt Ahrens <[email protected]> Reviewed by: Pavel Zakharov <[email protected]> Approved by: Richard Lowe <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7180 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/690041b Closes #5627
* OpenZFS 3746 - ZRLs are racyGeorge Melikov2017-01-231-27/+23
| | | | | | | | | | | | | | Authored by: Will Andrews <[email protected]> Reviewed by: Boris Protopopov <[email protected]> Reviewed by: Pavel Zakharov <[email protected]> Reviewed by: Yuri Pankov <[email protected]> Reviewed by: Justin T. Gibbs <[email protected]> Approved by: Matt Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/3746 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/260af64 Closes #5625
* OpenZFS 7054 - dmu_tx_hold_t should use refcount_t to track spaceGeorge Melikov2017-01-233-106/+184
| | | | | | | | | | | | | Authored by: Igor Kozhukhov [email protected] Reviewed by: George Wilson <[email protected]> Reviewed by: Paul Dagnelie <[email protected]> Reviewed by: Igor Kozhukhov <[email protected]> Approved by: Dan McDonald <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov [email protected] OpenZFS-issue: https://www.illumos.org/issues/7054 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/0c779ad Closes #5600
* codebase style improvements for OpenZFS 6459 portGeorge Melikov2017-01-2218-48/+56
|
* Suspend/resume zvol for recv and rollbackChunwei Chen2017-01-193-40/+163
| | | | | | | | | | | | | | | | When doing recv and rollback, dsl_dataset_clone_swap_sync_impl will be called to swap out the ds_objset and do dmu_objset_evict on the old one. However, currently zv->zv_objset will not be swapped out accordingly, so if anyone currently holds a fd on the zvol, we risk hitting a use-after-free. We fix this by introducing the suspend and resume mechanism of zsb to zv. Before recv or rollback, we use zvol_suspend to block all access to zv_objset and shut it down. After the recv or rollback, we use zvol_resume to swap in zv_objset with the new ds_objset and unblock the access. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes #4866 Closes #5609
* OpenZFS 6529 - Properly handle updates of variably-sized SA entriesGeorge Melikov2017-01-191-15/+33
| | | | | | | | | | | | | | | | | | | | | Porting notes: - This issue was first fixed in ZoL by commit d862cb0d. That fix was then modified and an equivalent version of the patch landed in the upstream code base. For additional details see the discussion in https://github.com/openzfs/openzfs/pull/24 . This commit aligns ZoL with OpenZFS codebase. Authored by: Andriy Gapon <[email protected]> Reviewed by: Brian Behlendorf <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Ned Bass <[email protected]> Reviewed by: Tim Chase <[email protected]> Approved by: Gordon Ross <[email protected]> Ported-by: George Melikov [email protected] OpenZFS-issue: https://www.illumos.org/issues/6529 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/e7e978b Closes #5606
* OpenZFS 7659 - Missing thread_exit() in dmu_send.cGeorge Melikov2017-01-181-0/+2
| | | | | | | | | | | | | | | | Two threads send_traverse_thread() and receive_writer_thread() should end with thread_exit(); Mostly a cosmetic issue under IllumOS. Authored by: Jorgen Lundman <[email protected]> Reviewed by: Paul Dagnelie <[email protected]> Reviewed by: Matt Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7659 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/a569268 Closes #5603
* OpenZFS 7235 - remove unused func dsl_dataset_set_blkptrGeorge Melikov2017-01-171-14/+0
| | | | | | | | | | | | | | Authored by: Matthew Ahrens <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Alex Reece <[email protected]> Reviewed by: Prakash Surya <[email protected]> Reviewed by: Igor Kozhukhov <[email protected]> Approved by: Robert Mustacchi <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7235 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/bd56f80 Closes #5604
* OpenZFS 7256 - low probability race in zfs_get_dataGeorge Melikov2017-01-171-1/+1
| | | | | | | | | | | Authored by: Andriy Gapon <[email protected]> Reviewed by: Matt Ahrens <[email protected]> Reviewed by: Pavel Zakharov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7256 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/6ed18a8 Closes #5601
* OpenZFS 7071 - lzc_snapshot does not fill in errlist on ENOENTGeorge Melikov2017-01-171-0/+8
| | | | | | | | | | | | | Authored by: Igor Kozhukhov [email protected] Reviewed by: Igor Kozhukhov <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Dan Kimmel <[email protected]> Approved by: Robert Mustacchi <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7071 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/25f7d99 Closes #5597
* OpenZFS 7082 - bptree_iterate() passes wrong args to zfs_dbgmsg()George Melikov2017-01-171-2/+3
| | | | | | | | | | | | | | Authored by: Igor Kozhukhov <[email protected]> Reviewed by: Dan Kimmel <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Igor Kozhukhov <[email protected]> Approved by: Dan McDonald <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7082 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/10e67aa Closes #5596
* OpenZFS 6586 - Whitespace inconsistencies in the spa feature dependency ↵Brian Behlendorf2017-01-171-2/+2
| | | | | | | | | | | | | | | | | | arrays in zfeature_common.c Porting Notes: - Preserved 'static const spa_feature_t hole_birth_deps[]'. Authored by: ilovezfs <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Richard Laager <[email protected]> Approved by: Robert Mustacchi <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Ported-by: Brian Behlendorf <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/6586 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/22b6687 Closes #5592
* Fix unallocated object detection for large_dnode datasetsLOLi2017-01-132-16/+28
| | | | | | | | | | | | | | | | | Fix dmu_object_next() to correctly handle unallocated objects on large_dnode datasets. We implement this by scanning the dnode block until we find the correct offset to be used in dnode_next_offset(). This is necessary because we can't assume *objectp is a hole even if dmu_object_info() returns ENOENT. This fixes a couple of issues with zfs receive on large_dnode datasets. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ned Bass <[email protected]> Signed-off-by: loli10K <[email protected]> Closes #5027 Closes #5532