aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
Commit message (Collapse)AuthorAgeFilesLines
* Switch from _Noreturn to __attribute__((noreturn))Brian Behlendorf2022-03-236-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parts of the Linux kernel build system struggle with _Noreturn. This results in the following warnings when building on RHEL 8.5, and likely other environments. Switch to using the __attribute__((noreturn)). warning: objtool: dbuf_free_range()+0x2b8: return with modified stack frame warning: objtool: dbuf_free_range()+0x0: stack state mismatch: cfa1=7+40 cfa2=7+8 ... WARNING: EXPORT symbol "arc_buf_size" [zfs.ko] version generation failed, symbol will not be versioned. WARNING: EXPORT symbol "spa_open" [zfs.ko] version generation failed, symbol will not be versioned. ... Additionally, __thread_exit() has been renamed spl_thread_exit() and made a static inline function. This was needed because the kernel will generate a warning for symbols which are __attribute__((noreturn)) and then exported with EXPORT_SYMBOL. While we could continue to use _Noreturn in user space I've also switched it to __attribute__((noreturn)) purely for consistency throughout the code base. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Atkinson <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #13238
* Allow zfs send to exclude datasetsSean Eric Fagan2022-03-181-5/+92
| | | | | | | | | | | | | | | | | | Add support for a -exclude/-X option to `zfs send` to allow dataset hierarchies to be excluded. Snapshots can be excluded using a channel program; however, this can result in failures with 'zfs send -R'; this option allows them to be excluded. Fortunately, this required a change only to cmd/zfs/zfs_main.c, using the already-existing callback argument to zfs_send() that is currently unused. Reviewed-by: Paul Dagnelie <[email protected]> Reviewed-by: Christian Schwarz <[email protected]> Reviewed-by: Ahelenia Ziemiańska <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Sean Eric Fagan <[email protected]> Signed-off-by: Sean Eric Fagan <[email protected]> Closes #13158
* zfs: list: only accept whole type for -t, not tp[=whatever]наб2022-03-151-37/+26
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12996
* zfs: get: only accept whole type for -t, not tp[=whatever]наб2022-03-151-30/+22
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12996
* zfs: get: only accept whole source for -s, not src[=whatever]наб2022-03-151-31/+20
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12996
* zfs: get: only accept whole column for -o, not col[=whatever]наб2022-03-151-34/+26
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12996
* zpool: get: there's one fewer column than in zfs getнаб2022-03-151-2/+2
| | | | | | | | The current code allows -o name,property,value,source,name Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12996
* zfs: wait: only accept whole activity for -t, not act[=whatever]наб2022-03-151-15/+13
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12996
* zpool: get: only accept whole columns for -o, not col[=whatever]наб2022-03-151-31/+23
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12996
* zpool: wait: only accept whole columns for -t, not col[=whatever]наб2022-03-151-20/+15
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12996
* Replace FMD_B_{TRUE,FALSE} with B_{TRUE,FALSE}наб2022-03-153-12/+7
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12996
* Integrate carcass of libspl/i/s/vtoc.h into i/s/efi_partition.hнаб2022-03-151-1/+0
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12996
* Forbid b{copy,zero,cmp}(). Don't include <strings.h> for <string.h>наб2022-03-1514-14/+14
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12996
* Remove bcopy(), bzero(), bcmp()наб2022-03-1511-94/+76
| | | | | | | | | | bcopy() has a confusing argument order and is actually a move, not a copy; they're all deprecated since POSIX.1-2001 and removed in -2008, and we shim them out to mem*() on Linux anyway Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12996
* Add physical device size to SIZE column in 'zpool list -v'Akash B2022-03-081-2/+7
| | | | | | | | | | | | | Add physical device size/capacity only for physical devices in 'zpool list -v' instead of displaying "-" in the SIZE column. This would make it easier to see the individual device capacity and to determine which spares are large enough to replace which devices. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Dipak Ghosh <[email protected]> Signed-off-by: Akash B <[email protected]> Closes #12561 Closes #13106
* Revert "Added error for writing to /dev/ on Linux"наб2022-03-081-38/+2
| | | | | | | | | | This reverts commit 860051f1d1ef7ee995188b852d8da36bce85b1dc. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Paul Dagnelie <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13133
* Use _Noreturn (C11; GNU89) properlyAlejandro Colomar2022-03-044-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A function that returns with no value is a different thing from a function that doesn't return at all. Those are two orthogonal concepts, commonly confused. pthread_create(3) expects a pointer to a start routine that has a very precise prototype: void *(*start_routine)(void *); However, other thread functions, such as kernel ones, expect: void (*start_routine)(void *); Providing a different one is incorrect, and has only been working because the ABIs happen to produce a compatible function. We should use '_Noreturn void', since it's the natural type, and then provide a '_Noreturn void *' wrapper for pthread functions. For consistency, replace most cases of __NORETURN or __attribute__((noreturn)) by _Noreturn. _Noreturn is understood by -std=gnu89, so it should be safe to use everywhere. Ref: https://github.com/openzfs/zfs/pull/13110#discussion_r808450136 Ref: https://software.codidact.com/posts/285972 Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Ahelenia Ziemiańska <[email protected]> Signed-off-by: Alejandro Colomar <[email protected]> Closes #13120
* zpool: main: list: don't pay for printfнаб2022-03-041-9/+9
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13125
* zpool: main: list: -v: update dash spacing for special vdevsнаб2022-03-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: nabijaczleweli@tarta:~/store/code/zfs$ /sbin/zpool list -v file NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT file 118G 150K 118G - - 0% 0% 1.00x ONLINE - /mnt/filling/store/nabijaczleweli/code/zfs/file 39.5G 0 39.5G - - 0% 0.00% - ONLINE dedup - - - - - - - - - /mnt/filling/store/nabijaczleweli/code/zfs/adedup 39.5G 0 39.5G - - 0% 0.00% - ONLINE special - - - - - - - - - /mnt/filling/store/nabijaczleweli/code/zfs/aspecial 39.5G 150K 39.5G - - 0% 0.00% - ONLINE logs - - - - - - - - - /mnt/filling/store/nabijaczleweli/code/zfs/alog 39.5G 0 39.5G - - 0% 0.00% - ONLINE cache - - - - - - - - - /mnt/filling/store/nabijaczleweli/code/zfs/acache 40.0G 1.50K 40.0G - - 0% 0.00% - ONLINE spare - - - - - - - - - /mnt/filling/store/nabijaczleweli/code/zfs/aspare - - - - - - - - AVAIL After: nabijaczleweli@tarta:~/store/code/zfs$ cmd/zpool/zpool list -v file NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT file 118G 150K 118G - - 0% 0% 1.00x ONLINE - /mnt/filling/store/nabijaczleweli/code/zfs/file 39.5G 0 39.5G - - 0% 0.00% - ONLINE dedup - - - - - - - - - /mnt/filling/store/nabijaczleweli/code/zfs/adedup 39.5G 0 39.5G - - 0% 0.00% - ONLINE special - - - - - - - - - /mnt/filling/store/nabijaczleweli/code/zfs/aspecial 39.5G 150K 39.5G - - 0% 0.00% - ONLINE logs - - - - - - - - - /mnt/filling/store/nabijaczleweli/code/zfs/alog 39.5G 0 39.5G - - 0% 0.00% - ONLINE cache - - - - - - - - - /mnt/filling/store/nabijaczleweli/code/zfs/acache 40.0G 1.50K 40.0G - - 0% 0.00% - ONLINE spare - - - - - - - - - /mnt/filling/store/nabijaczleweli/code/zfs/aspare - - - - - - - - AVAIL Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13123 Closes #13125
* zpool: main: use ARRAY_SIZE(class_name) instead of 3наб2022-03-041-3/+3
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13125
* Fix erroneous zstreamdump warningPaul Dagnelie2022-02-261-1/+6
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Amanakis <[email protected]> Signed-off-by: Paul Dagnelie <[email protected]> Closes #13154
* ztest: Fix ASSERT in ztest_objset_destroy_cb()Brian Behlendorf2022-02-261-1/+9
| | | | | | | | | | | | The dsl_destroy_snapshot() call in ztest_objset_destroy_cb() may encounter a runtime error when the pool is out of space. This is similar to the error handling for the dsl_destroy_head() case, but since dsl_destroy_snapshot() is implemented as a channel program ECHRNG is returned instead of ENOSPC. ECHRNG may also be returned instead of EBUSY if there is a hold on the snapshot. Reviewed by: George Melikov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #13155
* zed: Misc multipath autoreplace fixesTony Hutter2022-02-242-16/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We recently had a case where our operators replaced a bad multipathed disk, only to see it fail to autoreplace. The zed logs showed that the multipath replacement disk did not pass the 'is_dm' test in zfs_process_add() even though it should have. is_dm is set if there exists a sysfs entry for to the underlying /dev/sd* paths for the multipath disk. It's possible this path didn't exist due to a race condition where the sysfs paths weren't created at the time the udev event came in to zed, but this was never verified. This patch updates the check to look for udev properties that indicate if the new autoreplace disk is an empty multipath disk, rather than looking for the underlying sysfs entries. It also adds in additional logging, and fixes a bug where zed allowed you to use an already zfs-formatted disk from another pool as a multipath auto-replacement disk. Furthermore, while testing this patch, I also ran across a case where a force-faulted disk did not have a ZPOOL_CONFIG_PHYS_PATH entry in its config. This prevented it from being autoreplaced. I added additional logic to derive the PHYS_PATH from the PATH if the PATH was a /dev/disk/by-vdev/ path. For example, if PATH was /dev/disk/by-vdev/L28, then PHYS_PATH would be L28. This is safe since by-vdev paths represent physical locations and do not change between boots. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #13023
* log xattr=sa create/remove/update to ZILJitendra Patidar2022-02-222-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As such, there are no specific synchronous semantics defined for the xattrs. But for xattr=on, it does log to ZIL and zil_commit() is done, if sync=always is set on dataset. This provides sync semantics for xattr=on with sync=always set on dataset. For the xattr=sa implementation, it doesn't log to ZIL, so, even with sync=always, xattrs are not guaranteed to be synced before xattr call returns to caller. So, xattr can be lost if system crash happens, before txg carrying xattr transaction is synced. This change adds xattr=sa logging to ZIL on xattr create/remove/update and xattrs are synced to ZIL (zil_commit() done) for sync=always. This makes xattr=sa behavior similar to xattr=on. Implementation notes: The actual logging is fairly straight-forward and does not warrant additional explanation. However, it has been 14 years since we last added new TX types to the ZIL [1], hence this is the first time we do it after the introduction of zpool features. Therefore, here is an overview of the feature activation and deactivation workflow: 1. The feature must be enabled. Otherwise, we don't log the new record type. This ensures compatibility with older software. 2. The feature is activated per-dataset, since the ZIL is per-dataset. 3. If the feature is enabled and dataset is not for zvol, any append to the ZIL chain will activate the feature for the dataset. Likewise for starting a new ZIL chain. 4. A dataset that doesn't have a ZIL chain has the feature deactivated. We ensure (3) by activating on the first zil_commit() after the feature was enabled. Since activating the features requires waiting for txg sync, the first zil_commit() after enabling the feature will be slower than usual. The downside is that this is really a conservative approximation: even if we never append a 'TX_SETSAXATTR' to the ZIL chain, we pay the penalty for feature activation. The upside is that the user is in control of when we pay the penalty, i.e., upon enabling the feature. We ensure (4) by hooking into zil_sync(), where ZIL destroy actually happens. One more piece on feature activation, since it's spread across multiple functions: zil_commit() zil_process_commit_list() if lwb == NULL // first zil_commit since zil_open zil_create() if no log block pointer in ZIL header: if feature enabled and not active: // CASE 1 enable, COALESCE txg wait with dmu_tx that allocated the log block else // log block was allocated earlier than this zil_open if feature enabled and not active: // CASE 2 enable, EXPLICIT txg wait else // already have an in-DRAM LWB if feature enabled and not active: // this happens when we enable the feature after zil_create // CASE 3 enable, EXPLICIT txg wait [1] https://github.com/illumos/illumos-gate/commit/da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0 Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Christian Schwarz <[email protected]> Reviewed-by: Ahelenia Ziemiańska <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Jitendra Patidar <[email protected]> Closes #8768 Closes #9078
* Correct compilation errors reported by GCC 10/11Damian Szuberski2022-02-202-6/+4
| | | | | | | | | New `zfs_type_t` value `ZFS_TYPE_INVALID` is introduced. Variable initialization is now possible to make GCC happy. Reviewed by: Brian Behlendorf <[email protected]> Signed-off-by: szubersk <[email protected]> Closes #12167 Closes #13103
* raidz_test: silence unsigned >=0 warningsнаб2022-02-182-11/+14
| | | | | | | Reviewed-by: Alejandro Colomar <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13110
* userspace: mark arguments usedнаб2022-02-181-0/+2
| | | | | | | Reviewed-by: Alejandro Colomar <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13110
* Rename fallthrough to zfs_fallthroughJorgen Lundman2022-02-153-3/+3
| | | | | | | | Unfortunately macOS has obj-C keyword "fallthrough" in the OS headers. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Damian Szuberski <[email protected]> Signed-off-by: Jorgen Lundman <[email protected]> Closes #13097
* `mount.zfs -o zfsutil` leverages `zfs_mount_at()`Damian Szuberski2022-02-081-13/+34
| | | | | | | | | | | | | | Using `zfs_mount_at()` gives opportunity to properly propagate mountopts from what's stored in a pool to the `mount(2)` syscall invocation. It fixes cases when mount options are set to incorrect values and rectification is impossible (e. g. Linux initrd boot sequence in #7947). Moved debug information printing after all variables are initialized - printed text reflects what is passed to `mount(2)`. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: szubersk <[email protected]> Issue #7947 Closes #13021
* Add `--enable=all` to ShellCheck by defaultDamian Szuberski2022-02-076-7/+1
| | | | | | | | | | | Change enforced shell type from `dash` to `sh` and excluded `SC2039` and `SC3043` by default. `local` keyword is accepted by all POSIX shells from practical point of view. There is no need anymore to enforce dash so `local` is accepted. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: szubersk <[email protected]> Closes #13020
* Add `--enable-asan` and `--enable-ubsan` switchesDamian Szuberski2022-02-035-7/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | `configure` now accepts `--enable-asan` and `--enable-ubsan` switches which results in passing `-fsanitize=address` and `-fsanitize=undefined`, respectively, to the compiler. Those flags are enabled in GitHub workflows for ZTS and zloop. Errors reported by both instrumentations are corrected, except for: - Memory leak reporting is (temporarily) suppressed. The cost of fixing them is relatively high compared to the gains. - Checksum computing functions in `module/zcommon/zfs_fletcher*` have UBSan errors suppressed. It is completely impractical to enforce 64-byte payload alignment there due to performance impact. - There's no ASan heap poisoning in `module/zstd/lib/zstd.c`. A custom memory allocator is used there rendering that measure unfeasible. - Memory leaks detection has to be suppressed for `cmd/zvol_id`. `zvol_id` is run by udev with the help of `ptrace(2)`. Tracing is incompatible with memory leaks detection. Reviewed-by: Ahelenia Ziemiańska <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: szubersk <[email protected]> Closes #12928
* zed-functions.sh: escape newline to produce valid jsonPhil Kauffman2022-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was discovered when using Discords Slack compatible webhook. Slack webhooks works without the escape, however Discord rightly refuses the POST as it contains invalid JSON. https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook Valid (while escaping the newline: ``` + msg_json='{"text": "*ZFS scrub_finish error for test on quartz*\nZFS has detected a data error:\n\n eid: 124\n class: scrub_finish\n host: quartz\n time: \n error: \n objid: :\n pool: test\n"}' ``` Invalid (no escape): ``` + msg_json='{"text": "*ZFS scrub_finish error for test on quartz* ZFS has detected a data error:\n\n eid: 124\n class: scrub_finish\n host: quartz\n time: \n error: \n objid: :\n pool: test\n"}' ``` The new line gets rendered and not sent inside the JSON as intended. ``` ++ curl -X POST https://discord.com/api/webhooks/{webhook.id}/{webhook.token}/slack --header 'Content-Type: application/json' --data-binary '{"text": "*ZFS scrub_finish error for test on quartz* ZFS has detected a data error:\n\n eid: 124\n class: scrub_finish\n host: quartz\n time: \n error: \n objid: :\n pool: test\n"}' + msg_out='{"message": "Cannot send an empty message", "code": 50006}' ``` Test method: `root@quartz:/etc/zfs/zed.d# export ZED_ZEDLET_DIR=/etc/zfs/zed.d; export ZEVENT_EID=124; export ZEVENT_SUBCLASS=scrub_finish; export ZEVENT_POOL=test; export ZED_NOTIFY_DATA=1; bash -x ./data-notify.sh` Reviewed-by: Damian Szuberski <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Philip Kauffman <[email protected]> Closes #13049
* Add enumerated vdev names to 'zpool iostat -v' and 'zpool list -v'Akash B2022-02-031-4/+4
| | | | | | | | | | | | This commit adds enumerated names to disambiguate between the different vdevs. Previously only 'zpool status' showed enumerated vdev names, now 'zpool list -v' and 'zpool iostat -v' also shows the enumerated vdev names. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Dipak Ghosh <[email protected]> Signed-off-by: Akash B <[email protected]> Closes #12510 Closes #13031
* Report dnodes with faulty bonuslenGeorge Amanakis2022-02-031-0/+8
| | | | | | | | | | | | | | | | | | | In files created/modified before 4254acb there may be a corruption of xattrs which is not reported during scrub and normal send/receive. It manifests only as an error when raw sending/receiving. This happens because currently only the raw receive path checks for discrepancies between the dnode bonus length and the spill pointer flag. In case we encounter a dnode whose bonus length is greater than the predicted one, we should report an error. Modify in this regard dnode_sync() with an assertion at the end, dump_dnode() to error out, dsl_scan_recurse() to report errors during a scrub, and zstream to report a warning when dumping. Also added a test to verify spill blocks are sent correctly in a raw send. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: George Amanakis <[email protected]> Closes #12720 Closes #13014
* Fix trivial calloc(3) arguments orderTomohiro Kusumi2022-02-021-1/+1
| | | | | | | Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Tomohiro Kusumi <[email protected]> Closes #13052
* zpool: misc. cleanupнаб2022-02-011-7/+4
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12968
* zpool: main: print hostids with PRIx64наб2022-02-011-8/+7
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12968
* zpool: main: const correctness, use time_t for timeнаб2022-02-011-6/+6
| | | | | | | | The cast will explode on 32-bit big-endian architectures Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12968
* Replace *CTASSERT() with _Static_assert()наб2022-01-261-31/+41
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12993
* Fix problem with zdb -dPaul Zuchowski2022-01-201-30/+84
| | | | | | | | | | | | | | | | | | zdb -d <pool>/<objset ID> does not work when other command line arguments are included i.e. zdb -U <cachefile> -d <pool>/<objset ID> This change fixes the command line parsing to handle this situation. Also fix issue where zdb -r <dataset> <file> does not handle the root <dataset> of the pool. Introduce -N option to force <objset ID> to be interpreted as a numeric objsetID. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Reviewed-by: Tony Nguyen <[email protected]> Signed-off-by: Paul Zuchowski <[email protected]> Closes #12845 Closes #12944
* module/*.ko: prune .data, global .rodataнаб2022-01-142-8/+7
| | | | | | | | | | | | Evaluated every variable that lives in .data (and globals in .rodata) in the kernel modules, and constified/eliminated/localised them appropriately. This means that all read-only data is now actually read-only data, and, if possible, at file scope. A lot of previously- global-symbols became inlinable (and inlined!) constants. Probably not in a big Wowee Performance Moment, but hey. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12899
* Removed Python 2 and Python 3.5- supportDamian Szuberski2022-01-135-1199/+6
| | | | | | | | | | | | Deprecation of Python versions below 3.6 gives opportunity to unify the build and install requirements for OpenZFS packages. The minimal supported Python version is 3.6 as this is the most recent Python package CentOS/RHEL 7 users can get. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Reviewed-by: John Kennedy <[email protected]> Signed-off-by: szubersk <[email protected]> Closes #12925
* Add ShellCheck's `--enable=all` inside `cmd/`Damian Szuberski2022-01-0625-27/+61
| | | | | | | | | The only exception is `cmd/vdev_id/vdev_id` which might be a subject of refactoring (see #12084) Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ahelenia Ziemiańska <[email protected]> Signed-off-by: szubersk <[email protected]> Closes #12912
* Revert "zfs list: Allow more fields in ZFS_ITER_SIMPLE mode"Paul Dagnelie2022-01-064-83/+38
| | | | | | | | | This reverts commit f6a0dac84af2fba9c306a3a307ea7aafcbe32d2b. Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Mark Maybee <[email protected]> Signed-off-by: Paul Dagnelie <[email protected]> Closes #12938
* Long opts for zdbManoj Joseph2022-01-061-58/+123
| | | | | | | | | This change introduces long options for zdb. It updates the usage message as well to include the long options. Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Manoj Joseph <[email protected]> Closes #12818
* zed: send notification email by defaultshodanshok2021-12-211-2/+2
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Gionatan Danti <[email protected]> Closes #12806
* zfs: iter: fix unused, remove argsusedнаб2021-12-211-3/+2
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12835
* ztest: fix unused, remove argsusedнаб2021-12-211-35/+39
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12835
* zdb: il: fix unused, remove argsusedнаб2021-12-211-12/+10
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12835
* zdb: main: fix unused, remove argsusedнаб2021-12-211-31/+29
| | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12835