aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* zfs_arc_num_sublists_per_state should be common to all multilistsMatthew Ahrens2017-02-156-37/+58
| | | | | | | | | | | | | 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
* OpenZFS 6404 - zvol_swap_006_pos can occasionally fail due to swaplen being < 16Matthew Ahrens2017-02-159-16/+34
| | | | | | | | | | | | | | | | | | | Authored by: Matthew Ahrens <[email protected]> 6405 zvol test setup is non deterministic Reviewed by: George Wilson <[email protected]> Reviewed by: John Kennedy <[email protected]> Reviewed by: Will Andrews <[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/6404 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/24e268f Closes #5792 Porting notes: - Converted zfs to $ZFS until OpenZFS 7290 is ported. openzfs/openzfs@1d32ba6
* Fix broken URLChristopher Voltz2017-02-151-1/+1
| | | | | | | | | | Google moved their style guides to GitHub. Update the shell style guide URL to the new location. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Christopher Voltz <[email protected]> Closes #5797
* OpenZFS 7260 - disable libdiskmgmt in zfstest unless it's requiredJohn Wren Kennedy2017-02-1512-16/+27
| | | | | | | | | | | | | | | | | | | | Authored by: John Wren Kennedy <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Igor Kozhukhov <[email protected]> Reviewed by: Yuri Pankov <[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/7260 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/447b1e1 Closes #5794 Porting notes: - The library libdiskmgmt is specific to illumos so these changes currently have no impact under Linux. This mechanism could be potentially leveraged in the future.
* Use file-based pools for zpool_expand test 002 and enable itOlaf Faaland2017-02-136-35/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use -pH flags in get_pool_prop so that numeric properties such as size can be compared. The zpool_expand test suite is currently the only one which uses get_pool_prop for a numeric property. Add TEMPFILE and TEMPFILE{0,1,2} to default.cfg for tests that must build pools on top of files, such as this one where expansion is necessary but the entries in DISKS may not point to entities that can be expanded. Base the pool used for testing on file-type VDEVs instead of using zvols within an underlying pool, to avoid issues that come up when pools are backed by other pools. Remove shell variables EX_1GB and EX_2GB used to recognize correct expansion, and instead calculate the appropriate values based on the variables used to control file or volume size, org_size and exp_size. This change is also made in test 001 although that test is not enabled because it depends on FMA. Finally, enable zpool_expand_002_pos. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Don Brady <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Olaf Faaland <[email protected]> Closes #5757
* OpenZFS 7027 - zfs_written_property_001_pos makes unreasonable assumptions ↵Akash Ayare2017-02-131-5/+5
| | | | | | | | | | | | | | | | | about metadata space usage Reviewed by: Prakash Surya <[email protected]> Reviewed by: John Kennedy <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Igor Kozhukhov <[email protected]> Approved by: Gordon Ross <[email protected]> Reviewed-by: George Melikov <[email protected]> Ported-by: Brian Behlendorf <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7027 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/48cb8b9 Issue #2441 Closes #5778
* OpenZFS 6754 - zfs-tests: get_substr() function is redundantYuri Pankov2017-02-131-18/+1
| | | | | | | | | | | | | | | | | | | | | Authored by: Yuri Pankov <[email protected]> Reviewed by: John Kennedy <[email protected]> Approved by: Matthew Ahrens <[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/6754 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/01ff411 Closes #5787 Porting notes: - Only the ACL test cases used this function and they have been dropped from ZoL since Linux used POSIX style ACLs. - functional/acl/nontrivial/zfs_acl_chmod_aclmode_001_pos.ksh - functional/acl/nontrivial/zfs_acl_chmod_inherit_003_pos.ksh - functional/acl/nontrivial/zfs_acl_chmod_rwx_002_pos.ksh
* Disable racy snapshot_008_posGeorge Melikov2017-02-131-1/+2
| | | | | | | | | | | | Sometimes zfstests check freed space just after `zfs destroy snapshot` and get wrong output, because the space being freed asynchronously in the background. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: George Melikov <[email protected]> Issue #5740 Issue #5784 Closes #5785
* OpenZFS 7036 - zvol_swap_004_pos test failedIgor Kozhukhov2017-02-131-20/+12
| | | | | | | | | | | | Authored by: Igor Kozhukhov <[email protected]> Reviewed by: - John Kennedy <[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/7036 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/3f85b2a Closes #5783
* OpenZFS 7398 - zfs test zfs_get_005_neg does not work as expectedMarcel Telka2017-02-131-5/+4
| | | | | | | | | | | | | Authored by: Marcel Telka <[email protected]> Reviewed by: Yuri Pankov <[email protected]> Reviewed by: John Kennedy <[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/7398 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/4220fdc Closes #5782
* OpenZFS 7103 - failed test cli_root/zfs_snapshot/zfs_snapshot_009_posMarcel Telka2017-02-131-4/+15
| | | | | | | | | | | | | | Authored by: Marcel Telka <[email protected]> Reviewed by: - Igor Kozhukhov <[email protected]> Reviewed by: - Yuri Pankov <[email protected]> Reviewed by: - John Kennedy <[email protected]> Approved by: - Matthew Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7103 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/3bfdbb4 Closes #5780
* OpenZFS 7162 - Intermittent failures from ro_props_001_posMatthew Ahrens2017-02-132-5/+7
| | | | | | | | | | | | | | Reviewed by: John Kennedy <[email protected]> Reviewed by: Dan Kimmel <[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/7162 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/9ec0cbeb Closes #5511 Closes #5779
* 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
* OpenZFS 6580 - zfs-tests use undefined variable WRAPPERYuri Pankov2017-02-139-74/+8
| | | | | | | | | | | | | | | Authored by: Yuri Pankov <[email protected]> Reviewed by: John Kennedy <[email protected]> Approved by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/6580 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/9498083 Closes #5789 Porting notes: - deleted in ZoL: functional/utils_test/utils_test_007_pos.ksh
* OpenZFS 7496 - cmp_ds_cont has never workedJohn Wren Kennedy2017-02-133-7/+3
| | | | | | | | | | | | | | Authored by: John Wren Kennedy <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Paul Dagnelie <[email protected]> Approved by: Gordon Ross <[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/7496 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/5dc1fd7 Closes #5781
* OpenZFS 6642 - testrunner output can be displayed in the wrong orderJohn Wren Kennedy2017-02-111-4/+6
| | | | | | | | | | | | | | | | | | | | 6643 zfstest should enforce the required privileges before running. Reviewed by: George Wilson <[email protected]> Reviewed by: Jonathan Mackenzie <[email protected]> Reviewed by: Yuri Pankov <[email protected]> Approved by: Robert Mustacchi <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed by: John Kennedy <[email protected]> Ported-by: Brian Behlendorf <[email protected] OpenZFS-issue: https://www.illumos.org/issues/6642 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/412db4e Closes #5777 Porting notes: - The 6643 changes were dropped a different version of this script is used to configure the environment under Linux.
* 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
* Enclosure LED fixesTony Hutter2017-02-108-51/+204
| | | | | | | | | | | | | | | | | | | - Pass $VDEV_ENC_SYSFS_PATH to 'zpool [iostat|status] -c' to include enclosure LED sysfs path. - Set LEDs correctly after import. This includes clearing any erroniously set LEDs prior to the import, and setting the LED for any UNAVAIL drives. - Include symlink for vdev_attach-led.sh in Makefile.am. - Print the VDEV path in all-syslog.sh, and fix it so the pool GUID actually prints. Reviewed-by: Don Brady <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #5716 Closes #5751
* Clear enclosure sysfs path from VDEV label when sysfs path isn't presentTony Hutter2017-02-101-1/+3
| | | | | | | | | | | | | | | | This clears vdev_enc_sysfs_path from the label if the VDEV's /sys/class/block/<dev>/device/enclosure_device path isn't present. This is important in the case where a disk that is labeled with vdev_enc_sysfs_path is pulled out and put into another enclosure. In that case, it's possible that the old sysfs path would be used to turn on the fault LED for the disk's old slot postion, assuming the new slot didn't have a LED sysfs entry. Reviewed-by: Don Brady <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #5524 Closes #5773
* OpenZFS 5704 - libzfs can only handle 255 file descriptorsSimon Klinkert2017-02-108-0/+172
| | | | | | | | | | | | | | | Authored by: Simon Klinkert <[email protected]> Reviewed by: Josef 'Jeff' Sipek <[email protected]> Reviewed by: John Kennedy <[email protected]> Approved by: Richard Lowe <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed by: Ned Bass <[email protected]> Reviewed-by: Chunwei Chen <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/5704 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/bde3d61 Closes #5767
* OpenZFS 7104 - increase indirect block sizeMatthew Ahrens2017-02-0952-153/+214
| | | | | | | | | | | | | | 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
* Move ziltest.sh to the ZTS frameworkBrian Behlendorf2017-02-088-318/+207
| | | | | | | | | | | | | | | | The ziltest.sh script is a test case designed to verify the correct functioning of the ZIL. For historical reasons it was never added to the test suite and was always run independantly. This change rectifies that. The existing ziltest.sh has been translated in to `slog_015_pos.ksh` and added to the existing slog test cases. 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
* 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
* Add `wait_freeing` helper function to ZTSGeorge Melikov2017-02-083-0/+18
| | | | | | | | | | Sometimes the ZTS checks freed space just after `zfs destroy snapshot` and gets an unexpected value because of space being freed asynchronously. For cases like this add a `wait_freeing` function which blocks until the pools `freeing` property drops to zero. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: George Melikov <[email protected]> Closes #5740
* Fix zfs-mount.service failure on bootBrian Behlendorf2017-02-081-0/+1
| | | | | | | | | | | | | | | | | | | | The mount(8) command will helpfully try to resolve any device name which is passed in. It does this by applying some simple heuristics before passing it along to the registered mount helper. Normally this fine. However, one of these heuristics is to prepend the current working directory to the passed device name. If that resulting directory name exists mount(8) will perform the mount(2) system call and never invoke the helper utility. Since the cwd for systemd when running as the system instance is the root directory the default mount points created by zfs(8) can cause a mount failure. This change avoids the issue by explicitly setting the cwd to a different path when performing the mount. Signed-off-by: Brian Behlendorf <[email protected]> Closes #5719
* Fix coverity defects: CID 155964, 155965George Melikov2017-02-081-0/+3
| | | | | | | | CID 155964: Missing break in switch CID 155965: Missing break in switch Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: George Melikov <[email protected]> Closes #5759
* Allow c99 code to compileMatthew Ahrens2017-02-084-3/+6
| | | | | | | | | | | | 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
* OpenZFS 6931 - lib/libzfs: cleanup gcc warningsGeorge Melikov2017-02-078-16/+57
| | | | | | | | | | | Authored by: Igor Kozhukhov <[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/6931 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/88f61de Closes #5741
* Add missing module_param for zfs_per_txg_dirty_frees_percentDavid Quigley2017-02-072-1/+22
| | | | | | | | | | 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
* Fix coverity defects: CID 155928Don Brady2017-02-071-8/+11
| | | | | | | | | | | | | CID 155928: Integer handling issues (DIVIDE_BY_ZERO) In the current vdev label, the leaf count is always non-zero but it doesn't hurt to check the count for future proofing. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Don Brady <[email protected]> Closes #5749
* Fix ZFS Test Suite failures caused by ksh brace expansion featureLOLi2017-02-062-5/+3
| | | | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: loli10K <[email protected]> Closes #5669 Closes #5743
* 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-046-71/+147
| | | | | | | | | | | | | | | | | | | | 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.
* Disable sparse_001_pos / truncate_001_pos.ksh on 32-bit systemsBrian Behlendorf2017-02-032-0/+10
| | | | | | | | | | | | | | | | Commit 539d33c seems to have significantly increased the run time of the sparse_001_pos.ksh and truncate_001_pos.ksh test cases on 32-bit systems. This is likely due to dirty blocks from frees being deferred to later txgs. At the moment this is resulting in frequent failures on the 32-bit builders. Disable this test case until the issue can be analyzed and resolved. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #5727 Closes #5728
* OpenZFS 6866 - zdb -l non-zero status if no labelDon Brady2017-02-033-36/+44
| | | | | | | | | | | | | | | | Authored by: Yuri Pankov <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: John Kennedy <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Ported-by: Don Brady <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/6866 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/3e4fae5 Closes #5730 Porting Notes: - Omitted the illumos-specific `/dev/dsk` and `/dev/rdsk` path conversions since they don't apply on linux.
* Add tmpfile_003_pos to .gitignoreOlaf Faaland2017-02-031-0/+1
| | | | | | | | | | | | | | Earlier commit added a test that created tmpfile_003_pos, but did not add it to the appropriate .gitignore. ace1eae Add support for O_TMPFILE Fix the omission. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: Olaf Faaland <[email protected]> Closes #5735
* OpenZFS 4521 - zfstest is trying to execute evil "zfs unmount -a"Giuseppe Di Natale2017-02-036-14/+52
| | | | | | | | | | | | | | | | | | Authored by: Yuri Pankov <[email protected]> Reviewed by: Andriy Gapon <[email protected]> Reviewed by: Dan McDonald <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: John Kennedy <[email protected]> Approved by: Robert Mustacchi <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Ported-by: Giuseppe Di Natale <[email protected]> Porting Notes: - Correctly set __ZFS_POOL_RESTRICT in inherit_001_pos OpenZFS-issue: https://www.illumos.org/issues/4521 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/8808ac5 Closes #5674
* OpenZFS 1300 - filename normalization doesn't work for removesGeorge Melikov2017-02-029-117/+185
| | | | | | | | | | | | | | | 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`
* Add nvlist payload stats for zdb -ll dumpDon Brady2017-02-021-1/+133
| | | | | | | | | | When dumping the ZFS vdev label with 'zdb -ll', also dump some nvlist stats to help analyze the current footprint. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Don Brady <[email protected]> Closes #5724
* 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-012-9/+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
* Fix reservation test cases for large disksBrian Behlendorf2017-02-013-30/+30
| | | | | | | | | | | | | | Convert explicit `typeset -i` and `typeset -l` declarations to `typeset` in order to prevent 32-bit overflow from occurs with disks >2G. TEST_ZFSTESTS_DISKSIZE=4G Reviewed-by: George Melikov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #5715 Closes #5714
* 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.
* Fix atomic_sub_64() i386 assembly implementationBrian Behlendorf2017-02-011-1/+1
| | | | | | | | | | | | | The atomic_sub_64() should use sbbl instead of adcl. In user space these atomics are used for statistics tracking and aren't critical which explain how this was overlooked. The kernel space implementation of these atomics are layered on the architecture specific implementations provided by the kernel. Reviewed by: Stefan Ring <[email protected]> Reviewed-by: Gvozden Neskovic <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #5671 Closes #5717
* Use fletcher_4 routines natively with `abd_iterate_func()`David Quigley2017-02-014-8/+167
| | | | | | | | | | | | 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
* Match on word for excluding pools from testsTim Crawford2017-01-311-1/+1
| | | | | | | | | | | | Running tests locally were failing on cleanup scripts due to having a pool named "pool". Match on word so the cleanup logic will cleanup "testpool.*" while ignoring "pool". Reviewed-by: loli10K <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Tim Crawford <[email protected]> Closes #5703
* OpenZFS 6569 - large file delete can starve out write opsGeorge Melikov2017-01-314-5/+94
| | | | | | | | | | | | | 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 7742 - zfs send wrong error message with invalid long optsGeorge Melikov2017-01-311-4/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two cases: 1. if an invalid flag is passed, and 2. if a valid flag is not given a parameter. In the case of (1), the flag is either short or long. For short flags, optopt contains the character of the flag. For long, it contains zero, and we can access the long flag using argv and optind. In the case of (2), if the flag is short, optopt contains the character of the flag. If the flag is long, the value in the 4th column of the long_options table, for that flag, is returned. We could case over all those values, or we could simply use argv and optind again. Note that in the case of something like `--resume`, which is also `-t`, "t" will be returned if an argument is not provided; so the error message will say `'t': argument not provided` or similar. This could be fixed by making it so long and short options don't use the same character flag, and then combining them in the switch/case statement, but I didn't think the ugliness of the code would be worth the small usability enhancement. Authored by: Paul Dagnelie <[email protected]> Reviewed by: Dan Kimmel <[email protected]> Reviewed by: Steve Gonczi <[email protected]> Reviewed by: Robert Mustacchi <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/7742 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/6d69b40 Closes #5702