- 12 Mar, 2021 7 commits
-
-
Mateusz Guzik authored
They are expected to fail only in corner cases. Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Matt Macy <mmacy@FreeBSD.org> Signed-off-by:
Mateusz Guzik <mjguzik@gmail.com> Closes #11153
-
George Wilson authored
Importing a pool using the cachefile is ideal to reduce the time required to import a pool. However, if the devices associated with a pool in the cachefile have changed, then the import would fail. This can easily be corrected by doing a normal import which would then read the pool configuration from the labels. The goal of this change is make importing using a cachefile more resilient and auto-correcting. This is accomplished by having the cachefile import logic automatically fallback to reading the labels of the devices similar to a normal import. The main difference between the fallback logic and a normal import is that the cachefile import logic will only look at the device directories that were originally used when the cachefile was populated. Additionally, the fallback logic will always import by guid to ensure that only the pools in the cachefile would be imported. External-issue: DLPX-71980 Reviewed-by:
Matthew Ahrens <mahrens@delphix.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
George Wilson <gwilson@delphix.com> Closes #11716
-
Martin Matuška authored
The manual page change in ecc277cf has introduced whitespace on line ends. Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Reviewed-by:
George Melikov <mail@gmelikov.ru> Signed-off-by:
Martin Matuska <mm@FreeBSD.org> Closes #11722
-
Ryan Moeller authored
A few deadman tunables ended up in the wrong sysctl node. Move them to vfs.zfs.deadman.* Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Alexander Motin <mav@FreeBSD.org> Signed-off-by:
Ryan Moeller <ryan@iXsystems.com> Closes #11715
-
Adam D. Moss authored
Add branch hints and constify the intermediate evaluations of left/right params in VERIFY3*(). Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Adam Moss <c@yotes.com> Closes #11708
-
Allan Jude authored
Some .h files that were added were missed in this Makefile. Since they are .h files, their being missing only resulted in them disappeared from the dist archive. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Signed-off-by:
Allan Jude <allan@klarasystems.com> Closes #11705
-
George Melikov authored
Our checkstyle doesn't work well on Ubuntu 20.04, temporary pin it to 18.04. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
George Melikov <mail@gmelikov.ru> Closes #11713
-
- 08 Mar, 2021 3 commits
-
-
Don Brady authored
Added errno mappings to unmount_one() in libzfs. Changed do_unmount() implementation to return errno errors directly like is done for do_mount() and others. Reviewed-by:
Mark Maybee <mark.maybee@delphix.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Don Brady <don.brady@delphix.com> Closes #11681
-
Tony Hutter authored
vdev_id uses the /dev/mapper/ symlinks to resolve a UUID to a dm name (like dm-1). However on some multipath setups, there is no /dev/mapper/ entry for the UUID at the time vdev_id is called by udev. However, this isn't necessarily needed, as we may be able to resolve the dm name from the $DEVNAME that udev passes us (like DEVNAME="/dev/dm-1"). This patch tries to resolve the dm name from $DEVNAME first, before falling back to looking in /dev/mapper/. This fixed an issue where the by-vdev names weren't reliably showing up on one of our nodes. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Tony Hutter <hutter2@llnl.gov> Closes #11698
-
Antonio Russo authored
events_002 exercises the ZED, ensuring that it neither misses events, nor reporting events twice. On slow test hardware, some of the timeouts are insufficient to allow the ZED to properly settle. Conversely, on fast hardware these same timeouts are too long, unnecessarily slowing the test run. Instead of using a fixed timeout, wait for the expected final event before returning. Additionally, wait with a timeout for unexpected events to avoid missing them if they show up late. Reviewed-by:
George Melikov <mail@gmelikov.ru> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Antonio Russo <aerusso@aerusso.net> Closes #11703
-
- 07 Mar, 2021 4 commits
-
-
Christian Schwarz authored
zil_replaying(zil, tx) has the side-effect of informing the ZIL that an entry has been replayed in the (still open) tx. The ZIL uses that information to record the replay progress in the ZIL header when that tx's txg syncs. ZPL log entries are not idempotent and logically dependent and thus calling zil_replaying() is necessary for correctness. For ZVOLs the question of correctness is more nuanced: ZVOL logs only TX_WRITE and TX_TRUNCATE, both of which are idempotent. Logical dependencies between two records exist only if the write or discard request had sync semantics or if the ranges affected by the records overlap. Thus, at a first glance, it would be correct to restart replay from the beginning if we crash before replay completes. But this does not address the following scenario: Assume one log record per LWB. The chain on disk is HDR -> 1:W(1, "A") -> 2:W(1, "B") -> 3:W(2, "X") -> 4:W(3, "Z") where N:W(O, C) represents log entry number N which is a TX_WRITE of C to offset A. We replay 1, 2 and 3 in one txg, sync that txg, then crash. Bit flips corrupt 2, 3, and 4. We come up again and restart replay from the beginning because we did not call zil_replaying() during replay. We replay 1 again, then interpret 2's invalid checksum as the end of the ZIL chain and call replay done. The replayed zvol content is "AX". If we had called zil_replaying() the HDR would have pointed to 3 and our resumed replay would not have replayed anything because 3 was corrupted, resulting in zvol content "BX". If 3 logically depends on 2 then the replay corrupted the ZVOL_OBJ's contents. This patch adds the zil_replaying() calls to the replay functions. Since the callbacks in the replay function need the zilog_t* pointer so that they can call zil_replaying() we open the ZIL while replaying in zvol_create_minor(). We also verify that replay has been done when on-demand-opening the ZIL on the first modifying bio. Reviewed-by:
Matthew Ahrens <mahrens@delphix.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Christian Schwarz <me@cschwarz.com> Closes #11667
-
Ryan Moeller authored
* Restore original kern.corefile value after the test. * Don't leave behind a frozen pool. * Clean up leftover vdev files. * Make zpool_002_pos and zpool_003_pos consistent in their handling of core files while here. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ryan Moeller <ryan@iXsystems.com> Closes #11694
-
manfromafar authored
Docs for send and receive do not explain behavior when sending a compressed stream then receiving on a host that overrides compression with -o compress=value. The data from the send stream is written as it was from the send is the compressed form but the compression algorithm set on the receiver is the overridden version which causes some confusion as to what algorithm was actually used. Updated man docs to clarify behavior Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed By: Allan Jude <allanjude@freebsd.org> Signed-off-by:
manfromafar <manfromafar@outlook.com> Closes #11690
-
Ryan Moeller authored
ZFS_READONLY represents the "DOS R/O" attribute. When that flag is set, we should behave as if write access were not granted by anything in the ACL. In particular: We _must_ allow writes after opening the file r/w, then setting the DOS R/O attribute, and writing some more. (Similar to how you can write after fchmod(fd, 0444).) Restore these semantics which were lost on FreeBSD when refactoring zfs_write. To my knowledge Linux does not actually expose this flag, but we'll need it to eventually so I've added the supporting checks. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ryan Moeller <ryan@iXsystems.com> Closes #11693
-
- 06 Mar, 2021 1 commit
-
-
Brian Behlendorf authored
For some reason cppcheck 1.90 is generating an invalidSyntax warning when the BF64_SET macro is used in the zstream source. The same warning is not reported by cppcheck 2.3, nor is their any evident problem with the expanded macro. This appears to be an issue with this version of cppcheck. This commit annotates the source to suppress the warning. Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #11700
-
- 05 Mar, 2021 4 commits
-
-
Brian Behlendorf authored
When populating a ZIL destination buffer ensure it is always zeroed before its contents are constructed. Reviewed-by:
Matthew Ahrens <mahrens@delphix.com> Reviewed-by:
Tom Caputi <caputit1@tcnj.edu> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #11687
-
Jorgen Lundman authored
Even when supplied with an abd to abd_get_offset_struct(), the call to abd_get_offset_impl() can allocate a different abd. Ensure to call abd_fini_struct() on the abd that is not used. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Jorgen Lundman <lundman@lundman.net> Closes #11683
-
Ryan Moeller authored
Wire up the --enable-debug flag for configure to the FreeBSD module build. Add --enable-invariants. The running FreeBSD kernel config is used to detect whether to enable INVARIANTS if not explicitly specified with --enable-invariants or --disable-invariants. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ryan Moeller <ryan@iXsystems.com> Closes #11678
-
Thomas Lamprecht authored
Bring the output of the removal status in line with the other "fields" that zpool status outputs, and thus allows an parser to easier detect this as continuation of the 'remove:' output. Before: remove: Removal of vdev 0 copied 282G in 0h9m, completed on [...] 776K memory used for removed device mappings Now: remove: Removal of vdev 0 copied 282G in 0h9m, completed on [...] 776K memory used for removed device mappings Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Thomas Lamprecht <t.lamprecht@proxmox.com> Closes #11674
-
- 03 Mar, 2021 3 commits
-
-
James Wah authored
Avoid following the error path when the operation in fact succeeded. Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
James Wah <james@laird-wah.net> Closes #11651
-
Christian Schwarz authored
The spl_kmem_alloc showed up in some flamegraphs in a single-threaded 4k sync write workload at 85k IOPS on an Intel(R) Xeon(R) Silver 4215 CPU @ 2.50GHz. Certainly not a huge win but I believe the change is clean and easy to maintain down the road. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Matthew Ahrens <mahrens@delphix.com> Signed-off-by:
Christian Schwarz <me@cschwarz.com> Closes #11666
-
Jake Howard authored
This value does work as expected, and is documented in the manpage. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Jake Howard <git@theorangeone.net> Closes #11670
-
- 02 Mar, 2021 1 commit
-
-
nssrikanth authored
When a device which is actively trimming or initializing becomes FAULTED, and therefore no longer writable, cancel the active TRIM or initialization. When the device is merely taken offline with `zpool offline` then stop the operation but do not cancel it. When the device is brought back online the operation will be resumed if possible. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Co-authored-by:
Brian Behlendorf <behlendorf1@llnl.gov> Co-authored-by:
Vipin Kumar Verma <vipin.verma@hpe.com> Signed-off-by:
Srikanth N S <srikanth.nagasubbaraoseetharaman@hpe.com> Closes #11588
-
- 28 Feb, 2021 3 commits
-
-
Andriy Gapon authored
The function has three similar pieces of code: for read-behind pages, requested pages and read-ahead pages. All three pieces had an assert to ensure that the page is not mapped. Later the assert was relaxed to require that the page is not mapped for writing. But that was done in two places out of three. This change fixes the third piece, read-ahead. Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Andriy Gapon <avg@FreeBSD.org> Closes #11654
-
Brian Behlendorf authored
Several of the TRIM tests were based of the initialize tests and then adapted for TRIM. The zpool_trim_start_and_cancel_pos.ksh test was intended to be one such test but it was overlooked and actually never adapted. Update it accordingly. Reviewed-by:
George Melikov <mail@gmelikov.ru> Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #11649
-
Martin Matuška authored
After 35ec5179 it has become possible to import ZFS pools witn an active org.illumos:edonr feature on FreeBSD, leading to a panic. In addition, "zpool status" reported all pools without edonr as upgradable and "zpool upgrade -v" reported edonr in the list of upgradable features. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by:
Ryan Moeller <ryan@iXsystems.com> Signed-off-by:
Martin Matuska <mm@FreeBSD.org> Closes #11653
-
- 24 Feb, 2021 10 commits
-
-
Coleman Kane authored
The bio_*_acct functions became GPL exports, which causes the kernel modules to refuse to compile. This replaces code with alternate function calls to the disk_*_io_acct interfaces, which are not GPL exports. This change was added in kernel commit 99dfc43ecbf67f12a06512918aaba61d55863efc. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Coleman Kane <ckane@colemankane.org> Closes #11639
-
Coleman Kane authored
The struct bio member bi_disk was moved underneath a new member named bi_bdev. So all attempts to reference bio->bi_disk need to now become bio->bi_bdev->bd_disk. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Coleman Kane <ckane@colemankane.org> Closes #11639
-
Brian Behlendorf authored
The metaslab_disable() call may block waiting for a txg sync. Therefore it's important that vdev_rebuild_thread release the SCL_CONFIG read lock it is holding before this call. Failure to do so can result in the txg_sync thread getting blocked waiting for this lock which results in a deadlock. Reviewed-by:
Mark Maybee <mark.maybee@delphix.com> Reviewd-by:
Srikanth N S <srikanth.nagasubbaraoseetharaman@hpe.com> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #11647
-
Brian Behlendorf authored
Calling vdev_free() only requires the we acquire the spa config SCL_STATE_ALL locks, not the SCL_ALL locks. In particular, we need need to avoid taking the SCL_CONFIG lock (included in SCL_ALL) as a writer since this can lead to a deadlock. The txg_sync_thread() may block in spa_txg_history_init_io() when taking the SCL_CONFIG lock as a reading when it detects there's a pending writer. Reviewed-by:
Igor Kozhukhov <igor@dilos.org> Reviewed-by:
Mark Maybee <mark.maybee@delphix.com> Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #11585
-
Tony Hutter authored
Given a DM device name, the old vdev_id script would extract any text after a 'p' as the partition number. It then appends "-part" + the partition number to the name, giving a by-vdev name like "L0-part5". This works fine if the DM name is like 'dm-2p5', but doesn't work if the DM name is a multipath name like "mpatha". In those cases it incorrectly matches the 'p' in "mpatha", giving by-vdev names like "L0-partatha". This patch fixes the issue by making the partition regex match stricter. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Tony Hutter <hutter2@llnl.gov> Closes #11637
-
Brian Behlendorf authored
On Linux increase the maximum allowed size of the src nvlist which can be passed to the /dev/zfs ioctl. Originally, this was set to a maximum of KMALLOC_MAX_SIZE (4M) because it was kmalloc'd. Since that time it's been converted to a vmalloc so that's no longer a hard limit, and it's desirable for `zfs send/recv` to allow larger nvlists so more snapshots can be sent at once. Signed-off-by:
Brian Behlendorf <behlendorf1@llnl.gov> Closes #6572 Closes #11638
-
Prakash Surya authored
This change modifies the behavior of how we determine how much slop space to use in the pool, such that now it has an upper limit. The default upper limit is 128G, but is configurable via a tunable. Reviewed-by:
Matthew Ahrens <mahrens@delphix.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Prakash Surya <prakash.surya@delphix.com> Closes #11023
-
Ryan Moeller authored
Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ryan Moeller <ryan@iXsystems.com> Closes #11636
-
Ryan Moeller authored
gmake install fails when zpool.d compat links already exist. Force the symlinks to be recreated if already present. Reviewed-by:
Matthew Ahrens <mahrens@delphix.com> Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Ryan Moeller <ryan@iXsystems.com> Closes #11633
-
Cedric Maunoury authored
The behavior of a NULL fromsnap was inadvertently changed for a doall send when the send/recv logic in libzfs was updated. Restore the previous behavior by correcting send_iterate_snap() to include all the snapshots in the nvlist for this case. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Cedric Maunoury <cedric.maunoury@gmail.com> Closes #11608
-
- 21 Feb, 2021 4 commits
-
-
Adam D. Moss authored
Using zfs-sh -u on linux will fail with inaccurate message when the zfs modules are already unloaded. Deal with the case where a module is already unloaded; its USE_COUNT will be the empty string Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Adam Moss <c@yotes.com> Closes #11627
-
fbynite authored
This prevents a panic after a SLOG add/removal on the root pool followed by a zpool scrub. When a SLOG is removed, a hole takes its place - the vdev_ops for a hole is vdev_hole_ops, which defines the handler functions of vdev_op_hold and vdev_op_rele as NULL. This bug has been reported in illumos and FreeBSD, a different trigger in the FreeBSD report though. Credit for this patch goes to Patrick Mooney <pmooney@pfmooney.com> Obtained from: illumos-gate commit: c65bd18728f34725 External-issue: https://www.illumos.org/issues/12981 External-issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252396 Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Rob Wing <rob.fx907@gmail.com> Closes #11623
-
Tony Hutter authored
A multpathed disk will have several 'underlying' paths to the disk. For example, multipath disk 'dm-0' may be made up of paths: /dev/{sda,sdb,sdc,sdd}. On many enclosures those underlying sysfs paths will have a symlink back to their enclosure device entry (like 'enclosure_device0/slot1'). This is used by the statechange-led.sh script to set/clear the fault LED for a disk, and by 'zpool status -c'. However, on some enclosures, those underlying paths may not all have symlinks back to the enclosure device. Maybe only two out of four of them might. This patch updates zfs_get_enclosure_sysfs_path() to favor returning paths that have symlinks back to their enclosure devices, rather than just returning the first path. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Tony Hutter <hutter2@llnl.gov> Closes #11617
-
Brian Atkinson authored
Making uio_impl.h the common header interface between Linux and FreeBSD so both OS's can share a common header file. This also helps reduce code duplication for zfs_uio_t for each OS. Reviewed-by:
Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by:
Brian Atkinson <batkinson@lanl.gov> Closes #11622
-