summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* zfs-[un]jail(8): fix "zfs-jail [un]jail" leftoversнаб2021-04-141-2/+2
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11866
* Allow zfs to send replication streams with missing snapshotspablofsf2021-04-147-18/+126
| | | | | | | | | | | | A tentative implementation and discussion was done in #5285. According to it a send --skip-missing|-s flag has been added. In a replication stream, when there are snapshots missing in the hierarchy, if -s is provided print a warning and ignore dataset (and its children) instead of throwing an error Reviewed-by: Paul Dagnelie <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Pablo Correa Gómez <[email protected]> Closes #11710
* kmod-zfs should obsolete kmod-spl as well as spl-kmodOlaf Faaland2021-04-141-0/+1
| | | | | | | | | Without this Obsoletes, using packages built --with-spec=redhat, an upgrade from zfs-0.7 to zfs-2.x does not cause the kmod-spl-0.7 package to be removed. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Olaf Faaland <[email protected]> Closes #11865
* zvol_wait: properly handle zvol_volmode sysctl being 3/noneнаб2021-04-141-6/+6
| | | | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Pavel Zakharov <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11859
* zfs_ids_to_path: print correct wrong valuesнаб2021-04-141-3/+3
| | | | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Pavel Zakharov <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11859
* zfs_ids_to_path: the -v comes after the executable nameнаб2021-04-141-1/+1
| | | | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Pavel Zakharov <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11859
* contrib/bpftrace: exec bpftrace, remove useless catнаб2021-04-141-2/+2
| | | | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Pavel Zakharov <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11859
* arc_summary3: just read /s/m/{mod}/version instead of spawning catнаб2021-04-141-15/+5
| | | | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Pavel Zakharov <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11859
* zvol_wait: fix for zvols with spaces in name, optimiseнаб2021-04-141-16/+12
| | | | | | | | | | | | | | | list_zvols() would happily, for zvols with spaces in their names, assign the second half to volmode, &c., so use a normal read and set IFS to a tab instead of using 4 separate AWK processes(?) Similarly, in filter_out_deleted_zvols(), run zfs(8) once and use the output directly instead of spawning a zfs(8) process per zvol Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Pavel Zakharov <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11859
* zstreamdump: exec zstream dumpнаб2021-04-141-1/+1
| | | | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Pavel Zakharov <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11859
* zpl_inode.c: Fix SMACK interoperabilityTerraTech2021-04-141-12/+24
| | | | | | | | | | | | | | | | | | | | | | SMACK needs to have the ZFS dentry security field setup before SMACK's d_instantiate() hook is called as it requires functioning '__vfs_getxattr()' calls to properly set the labels. Fxes: 1) file instantiation properly setting the object label to the subject's label 2) proper file labeling in a transmutable directory Functions Updated: 1) zpl_create() 2) zpl_mknod() 3) zpl_mkdir() 4) zpl_symlink() External-issue: https://github.com/cschaufler/smack-next/issues/1 Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: TerraTech <[email protected]> Closes #11646 Closes #11839
* ZTS: Improve cleanup in removal_with_exportRyan Moeller2021-04-142-2/+1
| | | | | | | | | Kill the removal operation on every platform, not just Linux. The test has been fixed and is now stable on FreeBSD. Reviewed-by: John Kennedy <[email protected]> Reviewed-by: Igor Kozhukhov <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #11856
* Added check for broken alien versionRich Ercolani2021-04-142-1/+19
| | | | | | | | | | | Added a check for alien 8.95.{1,2,3}, which is known to fail to generate debs 100% of the time, and instead print out a message informing the developer that it's known to be broken and linking them to more information. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Rich Ercolani <[email protected]> Closes #11848 Closes #11850
* Use dsl_scan_setup_check() to setup a scrubBrian Behlendorf2021-04-143-3/+4
| | | | | | | | | | | | When a rebuild completes it will automatically schedule a follow up scrub to verify all of the block checksums. Before setting up the scrub execute the counterpart dsl_scan_setup_check() function to confirm the scrub can be started. Prior to this change we'd only check vdev_rebuild_active() which isn't as comprehensive, and using the check function keeps all of this logic in one place. Reviewed-by: Mark Maybee <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #11849
* Fix double sha1/sha1.o line in module/icp/Makefile.inTino Reichardt2021-04-141-1/+0
| | | | | | Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tino Reichardt <[email protected]> Closes #11852
* ZTS: Tests using zhack may fail on FreeBSDRyan Moeller2021-04-141-0/+7
| | | | | | | | | | | | As described in #11854, zhack is occasionally segfaulting on FreeBSD. Debugging this is proving to be tricky. To avoid false positives in the CI add entries for the tests that use zhack in zts-report to accept that they may occasionally fail on FreeBSD. Reviewed-by: John Kennedy <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Issue #11854 Closes #11855
* Ratelimit deadman zevents as with delay zeventsRyan Moeller2021-04-149-12/+102
| | | | | | | | | | | | | | | Just as delay zevents can flood the zevent pipe when a vdev becomes unresponsive, so do the deadman zevents. Ratelimit deadman zevents according to the same tunable as for delay zevents. Enable deadman tests on FreeBSD and add a test for deadman event ratelimiting. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Don Brady <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #11786
* Add kmodtool fix to detect different System.map locationMarcin Skarbek2021-04-141-2/+14
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Marcin Skarbek <[email protected]> Closes #7807 Closes #11836
* zed: untangle _zed_conf_parse_path()наб2021-04-141-7/+10
| | | | | | | | Dunno, maybe it's just me, but the previous style was /really/ confusing Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11860
* zed: don't malloc() global zed_conf instance, optimise zed_conf layoutнаб2021-04-143-63/+48
| | | | | | | | | | It's all of 40 bytes with 4-byte pointers and 64 with 8-byte ones (previously 44 and 88, respectively) ‒ there's no reason it can't live on the stack Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11860
* zed: remove zed_conf::{min,max}_events and ZED_{MIN,MAX}_EVENTSнаб2021-04-143-14/+0
| | | | | | | | No users, fields marked "reserved for future use", macros defined to 0 Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11860
* zed: remove zed_conf::syslog_facilityнаб2021-04-142-2/+0
| | | | | | | | | No users, nobody sets it, main() hard-codes LOG_DAEMON, which is the only correct value for this Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11860
* zed: _zed_conf_display_help(): be consistent about what got_err meansнаб2021-04-141-4/+4
| | | | | | | | Users passed in EXIT_SUCCESS and EXIT_FAILURE, despite it being a bool Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11860
* zed: untangle -h option listingнаб2021-04-141-32/+40
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11860
* zed: print out licence string as one big chunkнаб2021-04-141-13/+7
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11860
* zed: only go up to current limit in close_from() fallbackнаб2021-04-141-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Consider the following strace log: prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=1024, rlim_max=1024*1024}) = 0 dup2(0, 30) = 30 dup2(0, 300) = 300 dup2(0, 3000) = -1 EBADF (Bad file descriptor) dup2(0, 30000) = -1 EBADF (Bad file descriptor) dup2(0, 300000) = -1 EBADF (Bad file descriptor) prlimit64(0, RLIMIT_NOFILE, {rlim_cur=1024*1024, rlim_max=1024*1024}, NULL) = 0 dup2(0, 30) = 30 dup2(0, 300) = 300 dup2(0, 3000) = 3000 dup2(0, 30000) = 30000 dup2(0, 300000) = 300000 Even a privileged process needs to bump its rlimit before being able to use fds higher than rlim_cur. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11834
* zed.8: the Diagnosis Engine is implementedнаб2021-04-141-2/+0
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11834
* zed: replace zed_file_write_n() with write(2), purge itнаб2021-04-143-30/+1
| | | | | | | | | | | We set SA_RESTART early on, which will prevent EINTRs (indeed, to the point of needing to clear it in the reaper, since it interferes with pause(2)), which is the only error zed_file_write_n() actually handled (plus, the pid write is no bigger than 12 bytes anyway) Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11834
* zed: merge all _NOT_IMPLEMENTED_ eventsнаб2021-04-142-20/+5
| | | | | | | | | | | | | These events should currently never be generated. Also untag _zed_event_add_nvpair() from merge with zpool_do_events_nvprint() ‒ they serve different purposes (machine, usually script vs human consumption) and format the output differently as it stands Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11834
* zed: remove unused zed_file_read_n()наб2021-04-142-31/+0
| | | | | | | | Same deal as zed_file_close_on_exec() Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11834
* zed: bump zfs_zevent_len_max if we miss any eventsнаб2021-04-141-8/+41
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11834
* zed.8: don't pretend an unprivileged user could change the script ownerнаб2021-04-142-11/+4
| | | | | | | | | | | | | | | | And add a note on /why/ ZEDLETs need to be owned by root Quoth chown(2), Linux man-pages project: Only a privileged process (Linux: one with the CAP_CHOWN capability) may change the owner of a file. Quoth chown(2), FreeBSD: [EPERM] The operation would change the ownership, but the effective user ID is not the super-user. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11834
* zed: purge all mentions of a configuration fileнаб2021-04-145-45/+1
| | | | | | | | | | | | There simply isn't a need for one, since the flags the daemon takes are all short (mostly just toggles) and administrative in nature, and are therefore better served by the age-old tradition of sourcing an environment file and preparing the cmdline in the init-specific handler itself, if needed at all Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11834
* zed: implement close_from() in terms of /proc/self/fd, if availableнаб2021-04-141-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | /dev/fd on Darwin Consider the following strace output: prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=1024, rlim_max=1024*1024}) = 0 Yes, that is well over a million file descriptors! This reduces the ZED start-up time from "at least a second" to "instantaneous", and, under strace, from "don't even try" to "usable" by simple virtue of doing five syscalls instead of over a million; in most cases the main loop does nothing Recent Linuxes (5.8+) have close_range(2) for this, but that's an overoptimisation (and libcs don't have wrappers for it yet) This is also run by the ZEDLET pre-exec. Compare: Finished "all-syslog.sh" eid=13 pid=6717 time=1.027100s exit=0 Finished "history_event-zfs-list-cacher.sh" eid=13 pid=6718 time=1.046923s exit=0 to Finished "all-syslog.sh" eid=12 pid=4834 time=0.001836s exit=0 Finished "history_event-zfs-list-cacher.sh" eid=12 pid=4835 time=0.001346s exit=0 lol Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11834
* zed: print combined system/user time after ZEDLET deathнаб2021-04-141-6/+25
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11834
* zed: allow limiting concurrent jobsнаб2021-04-148-23/+59
| | | | | | | | | 200ms time-out is relatively long, but if we already hit the cap, then we'll likely be able to spawn multiple new jobs when we wake up Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11807
* zed: remove unused zed_file_close_on_exec()наб2021-04-142-30/+0
| | | | | | | | | The FIXME comment was there since the initial implementation in 2014, there are no users Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11807
* zed: use separate reaper thread and collect ZEDLETs asynchronouslyнаб2021-04-145-55/+157
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11807
* zed: set names for all threadsнаб2021-04-143-0/+3
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11807
* Tag 2.1.0-rc2zfs-2.1.0-rc2Brian Behlendorf2021-04-071-1/+1
| | | | Signed-off-by: Brian Behlendorf <[email protected]>
* fix misplaced quotes in kmod-preambleOlaf Faaland2021-04-071-2/+2
| | | | | | | | | | | | | | | | rpm/redhat/zfs-kmod.spec.in has a typo in the shell code that creates the kmod-preamble file. This typo results in the preamble file having the wrong name, ./SOURCES/kmod-preamblenObsoletes and missing the Obsoletes clause that has become part of the name. Because the filename is incorrect, the built package does not have "obsoletes" or "conflicts" set. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Olaf Faaland <[email protected]> Closes #11851
* Obsolete earlier packages due to version bumpBrian Behlendorf2021-04-071-0/+2
| | | | | | | | | | | In order for package managers such as dnf to upgrade cleanly after the package SONAME bump the obsolete package names must be known. Update the new packages to correctly obsolete the old ones. Reviewed-by: Olaf Faaland <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #11844 Closes #11847
* i-t: don't brokenly set the scheduler for root pool vdev's disksнаб2021-04-071-24/+0
| | | | | | | | | | | | | | | | | | | | This effectively reverts 4fc411f7a3ecee8a70fc8d6c687fae9a1cf20b31 (part of #6807) and f6fbe25664629d1ae6a3b186f14ec69dbe6c6232 (#9042) ‒ the code itself and latter PR cite symmetry with whole-disk-vdev behaviour (presumably because rootfs vdevs are rarely whole disks), but the code is broken for NVME devices (indeed, it'd strip the controller number instead of the (potential) partition number, turning "nvme0n1p1" into "nvmen1p1", which would then subsequently fail the sysfs existence check); it could be fixed to handle those (and any others) rather easily by dereferencing /sys/class/block/$devname, but this isn't the place for setting this ‒ as noted in the commit that removed setting the scheduler by default (9e17e6f2541c69a7a5e0ed814a7f5e71cbf8b90a) ‒ use an udev rule Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11838
* i-t: fix root=zfs:AUTOнаб2021-04-071-4/+9
| | | | | | | | | | | | | | | | IFS= would break loops in import_pool(), which would fault any automatic import Additionally $ZFS_BOOTFS from cmdline would interfere with find_rootfs() If many pools were present, same thing could happen across multiple find_rootfs() runs, so bail out early and clean up in error path Suggested-by: @nachtgeist Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11278 Closes #11838
* zfs get -p only outputs 3 columns if "clones" property is emptymatt-fidd2021-04-073-4/+21
| | | | | | | | | | get_clones_string currently returns an empty string for filesystem snapshots which have no clones. This breaks parsable `zfs get` output as only three columns are output, instead of 4. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Fiddaman <[email protected]> Co-authored-by: matt <[email protected]> Closes #11837
* zpool-features.5: remove "booting not possible with this feature"sнаб2021-04-071-4/+0
| | | | | | | | | | | | The exact limitations on what features are supported when booting vary considerably depending on the environment. In order to minimize confusion avoid categorical statements which assume GRUB2 is being used. The supported GRUB2 features are covered earlier in this man page for easy reference. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11842
* man: fix wrong .Xr macros usagesGeorge Melikov2021-04-077-10/+10
| | | | | | | | In addition, html doc will have working hyperlinks. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: George Melikov <[email protected]> Closes #11845
* libzutil: zfs_isnumber(): return false if input emptyнаб2021-04-072-4/+7
| | | | | | | | | | | | | | | | | | | | | | zpool list, which is the only user, would mistakenly try to parse the empty string as the interval in this case: $ zpool list "a" cannot open 'a': no such pool $ zpool list "" interval cannot be zero usage: <usage string follows> which is now symmetric with zpool get: $ zpool list "" cannot open '': name must begin with a letter Avoid breaking the "interval cannot be zero" string. There simply isn't a need for this, and it's user-facing. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11841 Closes #11843
* ZTS: pool_checkpoint improvementsBrian Behlendorf2021-04-074-7/+15
| | | | | | | | | | | | | | | | | | | The pool_checkpoint tests may incorrectly fail because several of them invoke zdb for an imported pool. In this scenario it's not unexpected for zdb to fail if the pool is modified. To resolve this these zdb checks are now done after the pool has been exported. Additionally, the default cleanup functions assumed the pool would be imported when they were run. If this was not the case they're exit early and fail to cleanup all of the test state causing subsequent tests to fail. Add a check to only destroy the pool when it is imported. Reviewed-by: John Kennedy <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Serapheim Dimitropoulos <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #11832
* Fix various typosAndrea Gelmini2021-04-0757-75/+75
| | | | | | | | | | Correct an assortment of typos throughout the code base. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Andrea Gelmini <[email protected]> Closes #11774