summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in comment, handeling->handlingkpande2018-06-181-1/+1
| | | | | | | | Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: bunder2015 <[email protected]> Signed-off-by: Kash Pande <[email protected]> Closes #7641
* Add ASSERT to debug encryption key mapping issuesTom Caputi2018-06-183-0/+24
| | | | | | | | | | | 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 <[email protected]> Signed-off-by: Tom Caputi <[email protected]> Closes #7637
* copy-builtin: SPL must be in Kbuild firstRichard Yao2018-06-151-0/+2
| | | | | | | | | | | | | | | The recent SPL merge caused a regression in kernels with ZFS integrated into the sources where our modules would be initialized in alphabetical order, despite icp requiring the spl module be loaded first. This caused kernels with ZFS builtin to fail to boot. We resolve this by adding a special case for the spl that lists it first. It is somewhat ugly, but it works. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Matthew Thode <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes #7595 Closes #7606
* Add tunables for channel programsJohn Gallagher2018-06-155-26/+49
| | | | | | | | | | | | This patch adds tunables for modifying the maximum memory limit and maximum instruction limit that can be specified when running a channel program. Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected] Reviewed-by: Sara Hartse <[email protected]> Signed-off-by: John Gallagher <[email protected]> External-issue: LX-1085 Closes #7618
* Linux compat 4.18: check_disk_size_change()Brian Behlendorf2018-06-157-209/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added support for the bops->check_events() interface which was added in the 2.6.38 kernel to replace bops->media_changed(). Fully implementing this functionality allows the volume resize code to rely on revalidate_disk(), which is the preferred mechanism, and removes the need to use check_disk_size_change(). In order for bops->check_events() to lookup the zvol_state_t stored in the disk->private_data the zvol_state_lock needs to be held. Since the check events interface may poll the mutex has been converted to a rwlock for better concurrently. The rwlock need only be taken as a writer in the zvol_free() path when disk->private_data is set to NULL. The configure checks for the block_device_operations structure were consolidated in a single kernel-block-device-operations.m4 file. The ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS configure checks and assoicated dead code was removed. This interface was added to the 2.6.28 kernel which predates the oldest supported 2.6.32 kernel and will therefore always be available. Updated maximum Linux version in META file. The 4.17 kernel was released on 2018-06-03 and ZoL is compatible with the finalized kernel. Reviewed-by: Boris Protopopov <[email protected]> Reviewed-by: Sara Hartse <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #7611
* Reserve DMU_BACKUP_FEATURE for ZSTDAllan Jude2018-06-141-0/+1
| | | | | | | | | Reserve bit 25 for the ZSTD compression feature from FreeBSD. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Matthew Ahrens <[email protected]> Signed-off-by: Allan Jude <[email protected]> Closes #7626
* Remove libefi __linux__ wrappersBrian Behlendorf2018-06-141-17/+2
| | | | | | | | | The ZoL version of libefi has been modified for Linux in several places outside the existing __linux__ wrappers. Remove them to make the code easier to read and so as not to mislead anyone that these are the sole modifications for Linux. Signed-off-by: Brian Behlendorf <[email protected]> Closes #7625
* Fix ztest_vdev_add_remove() test caseBrian Behlendorf2018-06-141-1/+8
| | | | | | | | | | | | | Commit 2ffd89fc allowed two new errors to be reported by zil_reset() in order to provide a descriptive error message regarding why a log device could not be removed. However, the new return values were not handled in the ztest_vdev_add_remove() test case resulting in ztest failures during automated testing. Reviewed-by: Tim Chase <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Paul Zuchowski <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #7630
* OpenZFS 9577 - remove zfs_dbuf_evict_key tsdMatthew Ahrens2018-06-135-55/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The zfs_dbuf_evict_key TSD (thread-specific data) is not necessary - we can instead pass a flag down in a few places to prevent recursive dbuf eviction. Making this change has 3 benefits: 1. The code semantics are easier to understand. 2. On Linux, performance is improved, because creating/removing TSD values (by setting to NULL vs non-NULL) is expensive, and we do it very often. 3. According to Nexenta, the current semantics can cause a deadlock when concurrently calling dmu_objset_evict_dbufs() (which is rare today, but they are working on a "parallel unmount" change that triggers this more easily): Porting Notes: * Minor conflict with OpenZFS 9337 which has not yet been ported. Authored by: Matthew Ahrens <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed by: Serapheim Dimitropoulos <[email protected]> Reviewed by: Brad Lewis <[email protected]> Reviewed-by: George Melikov <[email protected]> Ported-by: Brian Behlendorf <[email protected]> OpenZFS-issue: https://illumos.org/issues/9577 OpenZFS-commit: https://github.com/openzfs/openzfs/pull/645 External-issue: DLPX-58547 Closes #7602
* Fix efi_get_info() zvol detectionBrian Behlendorf2018-06-131-2/+3
| | | | | | | | | | Partition detection for zvol devices was not working correctly resulting inconsistent partitioning behavior when layering pools on top of zvols. This isn't a supported configuration but we'd still like it to work properly. Reviewed-by: George Melikov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #7624
* ZTS: deletes home directories in /export/homeJohn Gallagher2018-06-121-0/+6
| | | | | | | | | | | | | | In the cleanup for the privilege tests, an empty variable, empty because the corresponding setup is skipped on Linux, results in /export/home being deleted. This patch adds an assertion that the variable is not empty, and causes the cleanup to be skipped on Linux as well. Reviewed by: John Wren Kennedy <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Paul Dagnelie <[email protected]> Signed-off-by: John Gallagher <[email protected]> External-issue: LX-1099 Closes #7615
* ZTS: cleanup user_runbunder20152018-06-121-1/+3
| | | | | | | | | | | user_run leaves two files in /tmp, moving them to $TEST_BASE_DIR and adding them to the default cleanup routine. Reviewed by: John Wren Kennedy <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: bunder2015 <[email protected]> Closes #7614
* Add pyzfs build directories to gitignoreTom Caputi2018-06-112-0/+3
| | | | | | | | | | | The recent addition of pyzfs does not include the generated 'build' and 'pyzfs.egg-info' directories in the pyzfs .gitignore or the 'make clean' target. This patch simply corrects this problem. Reviewed-by: George Melikov <[email protected]> Reviewed-by: loli10K <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tom Caputi <[email protected]> Closes #7612
* Wrong error message when removing log devicePaul Zuchowski2018-06-072-4/+23
| | | | | | | | | | | | | In the case where the pool is loaded without the crypto keys necessary to playback the intent log, and log device removal is attempted, a generic busy message is received. Change the message to inform the user that the datasets must be mounted. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tom Caputi <[email protected]> Signed-off-by: Paul Zuchowski <[email protected]> Closes #7518
* Fix preemptible warning in aggsum_add()Brian Behlendorf2018-06-071-2/+5
| | | | | | | | | | | | | | In the new aggsum counters the CPU_SEQID macro should be surrounded by kpreempt_disable)() and kpreempt_enable() calls to prevent a Linux kernel BUG warning. The addsum_add() function use the cpuid to minimize lock contention when selecting a bucket, after selection the bucket is protected by a mutex and it is safe to reschedule the process to a different processor at any time. Reviewed-by: Matthew Thode <[email protected]> Reviewed-by: Paul Dagnelie <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #7609 Closes #7610
* Tunable directory for zfs runtime scriptsAntonio Russo2018-06-0710-13/+27
| | | | | | | | | | | | | zpool and zed place scripts in subdirectories of libexecdir. Some distributions locate architecture independent scripts in other locations (e.g. Debian). To avoid these paths getting out of sync, centralize the definitions. Build zfs-test's default.cfg by Makefile. Use the new directory logic building tests/zfs-tests/include/default.cfg.in. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Antonio Russo <[email protected]> Closes #7597
* Don't panic on bad SA_MAGIC in sa_build_indexNathaniel Clark2018-06-071-1/+7
| | | | | | | | | | | If sa_build_index() encounters a corrupt buffer, don't panic. Add info to zfs ring buffer and return EIO. This allows for a cleaner error recovery path. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Signed-off-by: Nathaniel Clark <[email protected]> Issue #6500 Closes #7487
* Minor documentation, logging, and testing typosAntonio Russo2018-06-073-16/+15
| | | | | | | | | This patch collects some minor inconsistencies and typos in the documentation, logging and testing infrastructure. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Antonio Russo <[email protected]> Closes #7608
* Update the correct abd in l2arc_read_done()Tom Caputi2018-06-061-9/+12
| | | | | | | | | | | | This patch fixes an issue where l2arc_read_done() would always write data to b_pabd, even if raw encrypted data was requested. This only occured in cases where the L2ARC device had a different ashift than the main pool. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Signed-off-by: Tom Caputi <[email protected]> Closes #7586 Closes #7593
* Raw receive functions must not decrypt dataTom Caputi2018-06-065-6/+23
| | | | | | | | | | | | | | | | This patch fixes a small bug found where receive_spill() sometimes attempted to decrypt spill blocks when doing a raw receive. In addition, this patch fixes another small issue in arc_buf_fill()'s error handling where a decryption failure (which could be caused by the first bug) would attempt to set the arc header's IO_ERROR flag without holding the header's lock. Reviewed-by: Matthew Thode <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Signed-off-by: Tom Caputi <[email protected]> Closes #7564 Closes #7584 Closes #7592
* Always continue recursive destroy after errorAlek P2018-06-062-26/+17
| | | | | | | | | | | | | Currently, during a recursive zfs destroy the first error that is encountered will stop the destruction of the datasets. Errors may happen for a variety of reasons including competing deletions and busy datasets. This patch switches recursive destroy to always do a best-effort recursive dataset destroy. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Signed-off-by: Alek Pinchuk <[email protected]> Closes #7574
* ZTS: history path cleanupbunder20152018-06-062-6/+4
| | | | | | | | | | | History tests were hard coded to use /tmp and didn't clean up properly after testing. Reviewed by: John Wren Kennedy <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: bunder2015 <[email protected]> Issue #7507 Closes #7600
* OpenZFS 8484 - Implement aggregate sum and use for arc countersPaul Dagnelie2018-06-0612-85/+589
| | | | | | | | | | | | | | | | | | | In pursuit of improving performance on multi-core systems, we should implements fanned out counters and use them to improve the performance of some of the arc statistics. These stats are updated extremely frequently, and can consume a significant amount of CPU time. Authored by: Paul Dagnelie <[email protected]> Reviewed by: Pavel Zakharov <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Approved by: Dan McDonald <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: Paul Dagnelie <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/8484 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/7028a8b92b7 Issue #3752 Closes #7462
* Add pool state /proc entry, "SUSPENDED" poolsTony Hutter2018-06-0618-26/+383
| | | | | | | | | | | | | | | | | | | 1. Add a proc entry to display the pool's state: $ cat /proc/spl/kstat/zfs/tank/state ONLINE This is done without using the spa config locks, so it will never hang. 2. Fix 'zpool status' and 'zpool list -o health' output to print "SUSPENDED" instead of "ONLINE" for suspended pools. Reviewed-by: Olaf Faaland <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed by: Richard Elling <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #7331 Closes #7563
* Remove rwlock wrappersBrian Behlendorf2018-06-044-137/+54
| | | | | | | | | | | | | | | | | | | The only remaining consumer of the rwlock compatibility wrappers is ztest. Remove the wrappers and convert the few remaining calls to the underlying pthread functions. rwlock_init() -> pthread_rwlock_init() rwlock_destroy() -> pthread_rwlock_destroy() rw_rdlock() -> pthread_rwlock_rdlock() rw_wrlock() -> pthread_rwlock_wrlock() rw_unlock() -> pthread_rwlock_unlock() Note pthread_rwlock_init() defaults to PTHREAD_PROCESS_PRIVATE which is equivilant to the USYNC_THREAD behavior. There is no functional change. Reviewed-by: Olaf Faaland <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #7591
* OpenZFS 9464 - txg_kick() fails to see that we are quiescingSerapheim Dimitropoulos2018-06-043-8/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | txg_kick() fails to see that we are quiescing, forcing transactions to their next stages without leaving them accumulate changes Creating a fragmented pool in a DCenter VM and continuously writing to it with multiple instances of randwritecomp, we get the following output from txg.d: 0ms 311MB in 4114ms (95% p1) 75MB/s 544MB (76%) 336us 153ms 0ms 0ms 8MB in 51ms ( 0% p1) 163MB/s 474MB (66%) 129us 34ms 0ms 0ms 366MB in 4454ms (93% p1) 82MB/s 572MB (79%) 498us 20ms 0ms 0ms 406MB in 5212ms (95% p1) 77MB/s 591MB (82%) 661us 37ms 0ms 0ms 340MB in 5110ms (94% p1) 66MB/s 622MB (86%) 1048us 41ms 1ms 0ms 3MB in 61ms ( 0% p1) 51MB/s 419MB (58%) 33us 0ms 0ms 0ms 361MB in 3555ms (88% p1) 101MB/s 542MB (75%) 335us 40ms 0ms 0ms 356MB in 4592ms (92% p1) 77MB/s 561MB (78%) 430us 89ms 1ms 0ms 11MB in 129ms (13% p1) 90MB/s 507MB (70%) 222us 15ms 0ms 0ms 281MB in 2520ms (89% p1) 111MB/s 542MB (75%) 334us 42ms 0ms 0ms 383MB in 3666ms (91% p1) 104MB/s 557MB (77%) 411us 133ms 0ms 0ms 404MB in 5757ms (94% p1) 70MB/s 635MB (88%) 1274us 123ms 2ms 4ms 367MB in 4172ms (89% p1) 88MB/s 556MB (77%) 401us 51ms 0ms 0ms 42MB in 470ms (44% p1) 90MB/s 557MB (77%) 412us 43ms 0ms 0ms 261MB in 2273ms (88% p1) 114MB/s 556MB (77%) 407us 27ms 0ms 0ms 394MB in 3646ms (85% p1) 108MB/s 552MB (77%) 393us 304ms 0ms 0ms 275MB in 2416ms (89% p1) 113MB/s 510MB (71%) 200us 53ms 0ms 0ms 9MB in 53ms ( 0% p1) 169MB/s 483MB (67%) 140us 100ms 1ms The TXGs that are getting synced and don't have lots of changes are pushed by txg_kick() which basically forces the current open txg to get to the quiesced state: if (tx->tx_syncing_txg == 0 && tx->tx_quiesce_txg_waiting <= tx->tx_open_txg && tx->tx_sync_txg_waiting <= tx->tx_synced_txg && tx->tx_quiesced_txg <= tx->tx_synced_txg) { tx->tx_quiesce_txg_waiting = tx->tx_open_txg + 1; cv_broadcast(&tx->tx_quiesce_more_cv); } The problem is that the above code doesn't check if we are currently quiescing anything (only if a quiesce or a sync has been requested, ..etc) so the following scenario can happen: 1] We have an open txg A that had enough dirty data (more than zfs_dirty_data_sync) and it was pushed to the quiesced state, and opened a new txg B. No txg is currently being synced. 2] Immediately after the opening of B, txg_kick() was run by some other write (and because of A's dirty data) and saw that we are not currently syncing any txg and no one has requested quiescing so it requests one by bumping tx_quiesce_txg_waiting and broadcasts the quiesce thread. 3] The quiesce thread just passed txg A to be synced and sees that a quiescing request has been sent to it so it immediately grabs B without letting it gather enough data, putting it in a quiesced state and opening a new txg C. In this scenario txg B, is an example of how the entries of interest show up in the txg.d output. Ideally we would like txg_kick() to get triggered only when we are sure that we are not syncing AND not quiescing any txg. This way we can kick an open TXG to the quiescing state when we are sure that there is nothing going on and we would benefit from the different states running concurrently. Authored by: Serapheim Dimitropoulos <[email protected]> Reviewed by: Matt Ahrens <[email protected]> Reviewed by: Brad Lewis <[email protected]> Reviewed by: Andriy Gapon <[email protected]> Approved by: Dan McDonald <[email protected]> Ported-by: Brian Behlendorf <[email protected]> OpenZFS-issue: https://illumos.org/issues/9464 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/1cd7635b Closes #7587
* OpenZFS 9245 - zfs-test failures: slog_013_pos and slog_014_posJohn Wren Kennedy2018-06-044-38/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | Test 13 would fail because of attempts to zpool destroy -f a pool that was still busy. Changed those calls to destroy_pool which does a retry loop, and the problem is no longer reproducible. Also removed some non functional code in the test which is why it was originally commented out by placing it after the call to log_pass. Test 14 would fail because sometimes the check for a degraded pool would complete before the pool had changed state. Changed the logic to check in a loop with a timeout and the problem is no longer reproducible. Authored by: John Wren Kennedy <[email protected]> Reviewed by: Matt Ahrens <[email protected]> Reviewed by: Chris Williamson <[email protected]> Reviewed by: Yuri Pankov <[email protected]> Reviewed-by: George Melikov <[email protected]> Approved by: Dan McDonald <[email protected]> Ported-by: Brian Behlendorf <[email protected]> Porting Notes: * Re-enabled slog_013_pos.ksh OpenZFS-issue: https://illumos.org/issues/9245 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/8f323b5 Closes #7585
* OpenZFS 9235 - rename zpool_rewind_policy_t to zpool_load_policy_tPavel Zakharov2018-06-049-84/+85
| | | | | | | | | | | | | | | | | | | | | | | We want to be able to pass various settings during import/open of a pool, which are not only related to rewind. Instead of adding a new policy and duplicate a bunch of code, we should just rename rewind_policy to a more generic term like load_policy. For instance, we'd like to set spa->spa_import_flags from the nvlist, rather from a flags parameter passed to spa_import as in some cases we want those flags not only for the import case, but also for the open case. One such flag could be ZFS_IMPORT_MISSING_LOG (as used in zdb) which would allow zfs to open a pool when logs are missing. Authored by: Pavel Zakharov <[email protected]> Reviewed by: Matt Ahrens <[email protected]> Reviewed by: George Wilson <[email protected]> Approved by: Robert Mustacchi <[email protected]> Ported-by: Brian Behlendorf <[email protected]> OpenZFS-issue: https://illumos.org/issues/9235 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/d2b1e44 Closes #7532
* Fix typoes in zpool man pagebunder20152018-06-041-4/+9
| | | | | | | | | Fixed some highlighting in the zpool man page Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: bunder2015 <[email protected]> Closes #7596
* OpenZFS 9329 - panic in zap_leaf_lookup() due to concurrent zapificationMatthew Ahrens2018-05-312-14/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the null pointer issue shown below, the solution is to initialize the contents of the object before changing its type, so that concurrent accessors will see it as non-zapified until it is ready for access via the ZAP. BAD TRAP: type=e (#pf Page fault) rp=ffffff00ff520440 addr=20 occurred in module "zfs" due to a NULL pointer dereference ffffff00ff520320 unix:die+df () ffffff00ff520430 unix:trap+dc0 () ffffff00ff520440 unix:cmntrap+e6 () ffffff00ff520590 zfs:zap_leaf_lookup+46 () ffffff00ff520640 zfs:fzap_lookup+a9 () ffffff00ff5206e0 zfs:zap_lookup_norm+111 () ffffff00ff520730 zfs:zap_contains+42 () ffffff00ff520760 zfs:dsl_dataset_has_resume_receive_state+47 () ffffff00ff520900 zfs:get_receive_resume_stats+3e () ffffff00ff520a90 zfs:dsl_dataset_stats+262 () ffffff00ff520ac0 zfs:dmu_objset_stats+2b () ffffff00ff520b10 zfs:zfs_ioc_objset_stats_impl+64 () ffffff00ff520b60 zfs:zfs_ioc_objset_stats+33 () ffffff00ff520bd0 zfs:zfs_ioc_dataset_list_next+140 () ffffff00ff520c80 zfs:zfsdev_ioctl+4d7 () ffffff00ff520cc0 genunix:cdev_ioctl+39 () ffffff00ff520d10 specfs:spec_ioctl+60 () ffffff00ff520da0 genunix:fop_ioctl+55 () ffffff00ff520ec0 genunix:ioctl+9b () ffffff00ff520f10 unix:brand_sys_sysenter+1c9 () Porting Notes: * DMU_OT_BYTESWAP conditional in zap_lockdir_impl() kept. Authored by: Matthew Ahrens <[email protected]> Reviewed by: Pavel Zakharov <[email protected]> Reviewed by: Brad Lewis <[email protected]> Reviewed-by: George Melikov <[email protected]> Approved by: Dan McDonald <[email protected]> Ported-by: Brian Behlendorf <[email protected]> OpenZFS-issue: https://illumos.org/issues/9329 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/e8e0f97 Closes #7578
* OpenZFS 9328 - zap code can take advantage of c99Matthew Ahrens2018-05-313-328/+224
| | | | | | | | | | | | | | | | | | The ZAP code was written before we allowed c99 in the Solaris kernel. We should change it to take advantage of being able to declare variables where they are first used. This reduces variable scope and means less scrolling to find the type of variables. Authored by: Matthew Ahrens <[email protected]> Reviewed by: Steve Gonczi <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed-by: George Melikov <[email protected]> Approved by: Dan McDonald <[email protected]> Ported-by: Brian Behlendorf <[email protected]> OpenZFS-issue: https://illumos.org/issues/9328 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/76ead05 Closes #7578
* zpool reopen should detect expanded devicesSara Hartse2018-05-316-42/+107
| | | | | | | | | | | | | | | | | | | | Update bdev_capacity to have wholedisk vdevs query the size of the underlying block device (correcting for the size of the efi parition and partition alignment) and therefore detect expanded space. Correct vdev_get_stats_ex so that the expandsize is aligned to metaslab size and new space is only reported if it is large enough for a new metaslab. Reviewed by: Don Brady <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed by: George Wilson <[email protected]> Reviewed-by: Matthew Ahrens <[email protected]> Reviewed by: John Wren Kennedy <[email protected]> Signed-off-by: sara hartse <[email protected]> External-issue: LX-165 Closes #7546 Issue #7582
* make install only works onceMatthew Ahrens2018-05-311-2/+3
| | | | | | | | | | | | | `make install` shouldn't fail if a directory it created still exists. In this case we can blow away the spl src directory before recreating it. This also gracefully handles the migration from pre-spl-merge to post-spl-merge. Reviewed by: Richard Elling <[email protected]> Reviewed-by: Pavel Zakharov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Matthew Ahrens <[email protected]> Closes #7580
* Explicitly state supported Linux versionsAntonio Russo2018-05-303-10/+15
| | | | | | | | | | | | | | | | | | | Add META tags Linux-Maximum and Linux-Minimum. One pain point for package maintainers is ensuring the compatibility of the packaged version of ZFS with the Linux kernel. By providing an authoritative compatibility guide in the source tree, maintainers can automate compatibility checks. Additionally, increase META string extraction specificity. configure.ac finds Name and Version by a very simple `grep`, which might conceivably find other fields. Require the string be at the beginning of a line, and be followed by a colon to avoid such confusions. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Antonio Russo <[email protected]> Closes #7571
* OpenZFS 9082 - Add ZFS performance test targeting ZIL latencyJohn Wren Kennedy2018-05-3019-193/+532
| | | | | | | | | | | | | | | | | | | | | | This adds a new test to measure ZIL performance. - Adds the ability to induce IO delays with zinject - Adds a new variable (PERF_NTHREADS_PER_FS) to allow fio threads to be distributed to individual file systems as opposed to all IO going to one, as happens elsewhere. - Refactoring of do_fio_run Authored by: Prakash Surya <[email protected]> Reviewed by: Dan Kimmel <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: John Wren Kennedy <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/9082 OpenZFS-commit: https://github.com/openzfs/openzfs/pull/634 External-issue: DLPX-48625 Closes #7491
* Fix zio->io_priority failed (7 < 6) assertTony Hutter2018-05-291-0/+9
| | | | | | | | | | | | | This fixes an assert in vdev_queue_change_io_priority(): VERIFY3(zio->io_priority < ZIO_PRIORITY_NUM_QUEUEABLE) failed (7 < 6) PANIC at vdev_queue.c:832:vdev_queue_change_io_priority() Reviewed-by: Tom Caputi <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #7566 Closes #7542
* Install basename utility into dracut initramfsSteffen Müthing2018-05-291-0/+1
| | | | | | | | | | | | | vdev_id requires the program `basename` when handling short aliases defined in `vdev_id.conf` (those defined without a leading path), but `basename` is not always available in the dracut environment. This causes the pool device names to change when using `by-vdev/` devices or (in extreme cases) can make the pool import fail in dracut. This commit fixes the problem by explicitly installing `basename`. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Steffen Müthing <[email protected]> Closes #7562
* Update build system and packagingBrian Behlendorf2018-05-29209-1164/+1096
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Minimal changes required to integrate the SPL sources in to the ZFS repository build infrastructure and packaging. Build system and packaging: * Renamed SPL_* autoconf m4 macros to ZFS_*. * Removed redundant SPL_* autoconf m4 macros. * Updated the RPM spec files to remove SPL package dependency. * The zfs package obsoletes the spl package, and the zfs-kmod package obsoletes the spl-kmod package. * The zfs-kmod-devel* packages were updated to add compatibility symlinks under /usr/src/spl-x.y.z until all dependent packages can be updated. They will be removed in a future release. * Updated copy-builtin script for in-kernel builds. * Updated DKMS package to include the spl.ko. * Updated stale AUTHORS file to include all contributors. * Updated stale COPYRIGHT and included the SPL as an exception. * Renamed README.markdown to README.md * Renamed OPENSOLARIS.LICENSE to LICENSE. * Renamed DISCLAIMER to NOTICE. Required code changes: * Removed redundant HAVE_SPL macro. * Removed _BOOT from nvpairs since it doesn't apply for Linux. * Initial header cleanup (removal of empty headers, refactoring). * Remove SPL repository clone/build from zimport.sh. * Use of DEFINE_RATELIMIT_STATE and DEFINE_SPINLOCK removed due to build issues when forcing C99 compilation. * Replaced legacy ACCESS_ONCE with READ_ONCE. * Include needed headers for `current` and `EXPORT_SYMBOL`. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Olaf Faaland <[email protected]> Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Pavel Zakharov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> TEST_ZIMPORT_SKIP="yes" Closes #7556
* Merge branch 'zfsonlinux/merge-spl'Brian Behlendorf2018-05-2998-0/+16031
|\ | | | | | | | | | | | | | | | | | | Merge a minimal version of the zfsonlinux/spl repository in to the zfsonlinux/zfs repository. Care was taken to prevent file conflicts when merging and to preserve the spl repository history. The spl kernel module remains under the GPLv2 license as documented by the additional THIRDPARTYLICENSE.gplv2 file. Signed-off-by: Brian Behlendorf <[email protected]>
| * Prepare SPL repo to merge with ZFS repoBrian Behlendorf2018-05-29222-16870/+777
| | | | | | | | | | | | | | | | | | This commit removes everything from the repository except the core SPL implementation for Linux. Those files which remain have been moved to non-conflicting locations to facilitate the merge. The README.md and associated files have been updated accordingly. Signed-off-by: Brian Behlendorf <[email protected]>
| * Update README: run autogen firstMatthew Ahrens2018-05-071-0/+2
| | | | | | | | | | | | | | | | Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Matthew Ahrens <[email protected]> Closes #704
| * Fix undefined RPM macrosBrian Behlendorf2018-05-022-4/+6
| | | | | | | | | | | | | | | | | | | | Always invoke the SPL_AC_DEBUG* macro's when running configure so RPM_DEFINE_COMMON is correctly expanded. A similar change was already applied to ZFS. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #703
| * Exclude python scripts from RPM shebang checkTony Hutter2018-04-162-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newest Fedora packaging rules print warnings for scripts using the /usr/bin/python shebang: *** WARNING: mangling shebang in /usr/src/spl-0.7.0/cmd/splslab/splslab.py from #!/usr/bin/python to #!/usr/bin/python2. This will become an ERROR, fix it manually! Fedora wants all cross compatible scripts to pick python3. Since we don't want our users to have to pick a specific version of python, we exclude our scripts from the RPM build check. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes: #699 Closes: #700
| * Linux compat 4.16: SECTOR_SIZEGiuseppe Di Natale2018-04-091-0/+6
| | | | | | | | | | | | | | | | | | | | As of https://github.com/torvalds/linux/commit/233bde21, SECTOR_SIZE is defined in linux/blkdev.h. Define SECTOR_SIZE in sunldi.h only if it's not already defined. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Giuseppe Di Natale <[email protected]> Closes #697
| * Remove syseventsBrian Behlendorf2018-04-045-72/+1
| | | | | | | | | | | | | | | | These headers are provided in the ZFS repository and never used by the SPL. Remove them to ensure the right ones are included. Reviewed-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #696
| * Fix spl-kmod builds when using rpm >= 4.14LOLi2018-03-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | With rpm-software-management/rpm@5e94633 a package version containing invalid characters (most commonly a double '-') causes the kmod package generation to terminate with an error. This change takes advantage of the newly introduced rpm macro "_wrong_version_format_terminate_build" to allow kmod packages to be built. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: loli10K <[email protected]> Closes #691
| * Fix more cstyle warningsBrian Behlendorf2018-02-249-34/+51
| | | | | | | | | | | | | | | | | | | | This patch contains no functional changes. It is solely intended to resolve cstyle warnings in order to facilitate moving the spl source code in to the zfs repository. Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed by: George Melikov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #687
| * Fix function name typosTomohiro Kusumi2018-02-211-3/+3
| | | | | | | | | | | | | | | | vn_init() and vn_fini() had been renamed by 12ff95ff in 2011. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tomohiro Kusumi <[email protected]> Closes #686
| * Staticize kstat_default_update()Tomohiro Kusumi2018-02-211-1/+1
| | | | | | | | | | | | | | | | | | This is only used via ->ks_update of `kstat_t *`. This isn't exported nor do headers have its prototype. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tomohiro Kusumi <[email protected]> Closes #686
| * Fix multiple evaluations of VERIFY() and ASSERT() on failuresDeHackEd2018-02-211-6/+9
| | | | | | | | | | | | | | Reviewed-by: loli10K <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: DHE <[email protected]> Closes #684 Closes #685