Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zfs-2.1.1 patchset #12547

Merged
merged 93 commits into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
1826068
FreeBSD: Clean up ASSERT/VERIFY use in module
Apr 30, 2021
6fe6192
FreeBSD: Implement xattr=sa
Apr 29, 2021
f3969ea
Optimize small random numbers generation
amotin Jun 22, 2021
d6c2b89
ZED: Match added disk by pool/vdev GUID if found (#12217)
Jun 30, 2021
2334bc4
Upstream: dmu_zfetch_stream_fini leaks refcount
lundman Jul 1, 2021
035219e
Fix abd leak, kmem_free correct size of abd_t
lundman Jul 1, 2021
15177c1
Compact dbuf/buf hashes and lock arrays
amotin Jul 1, 2021
c20ba9b
Udev rules: use non-ancient comma syntax
jgottula Jun 30, 2021
0cb1229
Udev rules: replace deprecated $tempnode with $devnode
jgottula Jun 30, 2021
fd2e4d1
Udev rules: use match (==) rather than assign (=) for PROGRAM
jgottula Jun 30, 2021
7138fe7
Print zvol_id error messages to stderr rather than stdout
jgottula Jun 30, 2021
dab147d
Use substantially more robust program exit status logic in zvol_id
jgottula Jun 30, 2021
41b33dc
Move gethrtime() calls out of vdev queue lock
amotin Jul 6, 2021
49bb454
FreeBSD: Hardcode abd_chunk_size to PAGE_SIZE
amotin Jul 7, 2021
c846709
FreeBSD: Use unmapped I/O for scattered/gang ABD buffers
amotin Jul 7, 2021
a0b4da2
Replace strchrnul() with strrchr()
lundman Jul 8, 2021
04ebe29
dprintf_dnode: strcpy -> strlcpy
lundman Jul 8, 2021
8415c3c
file reference counts can get corrupted
grwilson Jul 11, 2021
a5e68f0
Update bug report template
behlendorf Jul 12, 2021
45305a0
Fix ARC ghost states eviction accounting
amotin Jul 13, 2021
960a5a5
Tinker with slop space accounting with dedup
rincebrain Jul 13, 2021
968dc13
config/libatomic: require -latomic iff atomic.c doesn't link w/o it
nabijaczleweli Jul 13, 2021
ba76bb3
Introduce dsl_dir_diduse_transfer_space()
amotin Jul 16, 2021
056c273
Correct zfs-send(8) on readonly sends
rincebrain Jul 16, 2021
f8c2e91
zpool_influxdb: fix -Werror=stringop-truncation
gmelikov Jul 16, 2021
c2c4d05
FreeBSD: Switch from MAXPHYS to maxphys on FreeBSD 13+
amotin Jul 19, 2021
0ca9558
Remove unused fields from zvol_task_t
Jul 19, 2021
4affa09
A few fixes of callback typecasting (for the upcoming ClangCFI)
solbjorn Jul 20, 2021
4dfb698
dmu_redact.c does not call bqueue_destroy
lundman Jul 20, 2021
6a49948
Minor ARC optimizations
amotin Jul 20, 2021
7c61e1e
CI: generate ABI files if changed
gmelikov Jul 20, 2021
32c0b64
Optimize allocation throttling
amotin Jul 21, 2021
eaa1025
Remove old orig_fd variable from zfs send
lundman Jul 22, 2021
93e11e2
FreeBSD: Ignore make_dev_s() errors
amotin Jul 22, 2021
729eb48
zloop: Add a max iterations option, use default run/pass times
Jul 22, 2021
2f073cc
Linux 5.14 compat: blk_alloc_disk()
behlendorf Jul 23, 2021
6385f4e
Fix unfortunate NULL in spa_update_dspace
rincebrain Jul 26, 2021
4434baa
Linux 5.14 compat: explicity assign set_page_dirty
ckane Jul 26, 2021
fceda40
Initialize "autoreplace" in spa_ld_get_props()
markjdb Jul 16, 2021
9cc9821
Initialize all fields in zfs_log_xvattr()
markjdb Jul 16, 2021
bd910fd
Zero pad bytes when allocating a ZIL record
markjdb Jul 16, 2021
99df200
Zero pad bytes following TX_WRITE log data
markjdb Jul 16, 2021
ac573e3
Initialize dn_next_type[] in the dnode constructor
markjdb Jul 16, 2021
406534f
Fixes in persistent L2ARC
gamanakis Jul 26, 2021
898b1e1
Add missing properties to zfs allow manpage
vaclavskala Jul 20, 2021
8a969f3
Read past end of argv array in zpool_do_import()
ahrens Jul 26, 2021
9429910
Assorted fixes for the performance tests
jwk404 Jul 26, 2021
e298ac5
Add comment on metaslab_class_throttle_reserve() locking
amotin Jul 26, 2021
451d6da
Allow disabling of unmapped I/O on FreeBSD
markjdb Aug 2, 2021
ddb732e
Modify checksum obtain method of QAT
Aug 3, 2021
c07ed69
Man zpool-scrub.8: describe sequential scrub
gmelikov Aug 5, 2021
32a971e
Enable /proc/diskstats for zvols
behlendorf Aug 5, 2021
23184b1
Make get_key_material_file fail more verbosely
rincebrain Aug 5, 2021
477edd6
Run arc_evict thread at higher priority
tonynguien Aug 10, 2021
cc55271
Fix usage of find in tests/Makefile.am
Aug 13, 2021
cacc487
Add zfs.sh -r flag to reload modules
Aug 13, 2021
744f300
zfs: add missed dependency of zfs module on zlib
Aug 13, 2021
24e51e3
Restore FreeBSD sysctl processing for arc.min and arc.max
allanjude Aug 16, 2021
c6c0d30
ZTS: Avoid unset $tmpdir in redacted_panic
Aug 16, 2021
5afc35b
Use more atomics in refcounts
amotin Aug 17, 2021
c600f06
Avoid vq_lock drop in vdev_queue_aggregate()
amotin Aug 17, 2021
40e02f4
Fix/improve dbuf hits accounting
amotin Aug 17, 2021
61773f4
Optimize arc_l2c_only lists assertions
amotin Aug 17, 2021
a486212
Remove b_pabd/b_rabd allocation from arc_hdr_alloc()
amotin Aug 17, 2021
5de6e4e
zfs.4: Fix typo s/compatiblity/compatibility/
gbergling Aug 17, 2021
1655ce5
Linux 4.11 compat: statx support
ryao Mar 17, 2019
584b7a2
ZTS: Add tests for creation time
Jul 26, 2021
2016d7f
Initialize parity blocks before RAID-Z reconstruction benchmarking
markjdb Aug 23, 2021
e78d06f
zpool-remove.8: describe top-level vdev sector size limitation
smammy Aug 23, 2021
bc371b2
vdev_id: Return an error if config file is not found
rugubara Aug 25, 2021
2904ec5
Make 'zpool labelclear -f' work on offlined disks
tonyhutter Aug 27, 2021
6c3c7dc
Correct checking bdev_check_media_change message
Aug 27, 2021
6bb6410
ZTS: Waiting for zvols to be available
behlendorf Aug 29, 2021
72a989c
Fix cross-endian interoperability of zstd
rincebrain Aug 30, 2021
8161168
FreeBSD: Don't remove SA xattr if not SA znode
Aug 30, 2021
aef8a72
ZTS: Remove exceptions for flaky zhack on FreeBSD
Sep 1, 2021
004e7d3
Check for libabigail version
gmelikov Aug 31, 2021
993d4b2
CI: use fresh libabigail via docker image
gmelikov Aug 31, 2021
d6dae00
Libabigail: make .abi files more consistent
gmelikov Aug 31, 2021
5331e2d
Update ABI files via new libabigail version
gmelikov Aug 31, 2021
e16e05c
CI: don't install abigail-tools
gmelikov Aug 31, 2021
6ca1f30
Detect iSCSI in the zpool cmd vdev media script
Sep 2, 2021
ad8dc99
Linux 5.15 compat: block device readahead
behlendorf Sep 8, 2021
7bf68e9
Linux 5.15 compat: standalone <linux/stdarg.h>
solbjorn Sep 8, 2021
fd92825
Compressed receive with different ashift can result in incorrect PSIZ…
pcd1193182 Sep 8, 2021
7d70f1e
arc: Drop an incorrect assert
rincebrain Sep 8, 2021
cea0752
Allow sending corrupt snapshots even if metadata is corrupted
allanjude Sep 9, 2021
32512ac
Linux 5.15 compat: get_acl()
behlendorf Sep 9, 2021
9183321
Verify embedded blkptr's in arc_read()
behlendorf Sep 10, 2021
7816a6b
ZTS: Waiting for zvols to be available
behlendorf Sep 13, 2021
bb80b46
Fixed data integrity issue when underlying disk returns error
arun-kv Sep 13, 2021
a3da79d
Linux 5.14 compat: META
behlendorf Sep 15, 2021
71c6098
Tag 2.1.1
behlendorf Sep 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Create a report to help us improve OpenZFS
title: ''
labels: 'Type: Defect, Status: Triage Needed'
labels: 'Type: Defect'
assignees: ''

---
Expand All @@ -25,14 +25,16 @@ Type | Version/Name
--- | ---
Distribution Name |
Distribution Version |
Linux Kernel |
Kernel Version |
Architecture |
ZFS Version |
SPL Version |
OpenZFS Version |
<!--
Commands to find ZFS/SPL versions:
modinfo zfs | grep -iw version
modinfo spl | grep -iw version
Command to find OpenZFS version:
zfs version

Commands to find kernel version:
uname -r # Linux
freebsd-version -r # FreeBSD
-->

### Describe the problem you're observing
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/checkstyle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
sudo apt-get install --yes -qq zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libssl-dev python-dev python-setuptools python-cffi python3 python3-dev python3-setuptools python3-cffi
# packages for tests
sudo apt-get install --yes -qq parted lsscsi ksh attr acl nfs-kernel-server fio
sudo apt-get install --yes -qq mandoc cppcheck pax-utils devscripts abigail-tools
sudo apt-get install --yes -qq mandoc cppcheck pax-utils devscripts
sudo -E pip --quiet install flake8
- name: Prepare
run: |
Expand All @@ -32,5 +32,19 @@ jobs:
run: |
make lint
- name: CheckABI
id: CheckABI
run: |
make checkabi
sudo docker run -v $(pwd):/source ghcr.io/openzfs/libabigail make checkabi
- name: StoreABI
if: failure() && steps.CheckABI.outcome == 'failure'
run: |
sudo docker run -v $(pwd):/source ghcr.io/openzfs/libabigail make storeabi
- name: Prepare artifacts
if: failure() && steps.CheckABI.outcome == 'failure'
run: |
find -name *.abi | tar -cf abi_files.tar -T -
- uses: actions/upload-artifact@v2
if: failure() && steps.CheckABI.outcome == 'failure'
with:
name: New ABI files (use only if you're sure about interface changes)
path: abi_files.tar
2 changes: 1 addition & 1 deletion .github/workflows/zloop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run: |
sudo mkdir -p $TEST_DIR
# run for 20 minutes to have a total runner time of 30 minutes
sudo /usr/share/zfs/zloop.sh -t 1200 -l -m1
sudo /usr/share/zfs/zloop.sh -t 1200 -l -m1 -- -T 120 -P 60
- name: Prepare artifacts
if: failure()
run: |
Expand Down
4 changes: 2 additions & 2 deletions META
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Meta: 1
Name: zfs
Branch: 1.0
Version: 2.1.0
Version: 2.1.1
Release: 1
Release-Tags: relext
License: CDDL
Author: OpenZFS
Linux-Maximum: 5.13
Linux-Maximum: 5.14
Linux-Minimum: 3.10
14 changes: 12 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,20 @@ SHELLCHECKDIRS = cmd contrib etc scripts tests
SHELLCHECKSCRIPTS = autogen.sh

PHONY += checkabi storeabi
checkabi: lib

checklibabiversion:
libabiversion=`abidw -v | $(SED) 's/[^0-9]//g'`; \
if test $$libabiversion -lt "180"; then \
/bin/echo -e "\n" \
"*** Please use libabigail 1.8.0 version or newer;\n" \
"*** otherwise results are not consistent!\n"; \
exit 1; \
fi;

checkabi: checklibabiversion lib
$(MAKE) -C lib checkabi

storeabi: lib
storeabi: checklibabiversion lib
$(MAKE) -C lib storeabi

PHONY += mancheck
Expand Down
5 changes: 3 additions & 2 deletions cmd/vdev_id/vdev_id
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ Usage: vdev_id [-h]
-p number of phy's per switch port [default=$PHYS_PER_PORT]
-h show this summary
EOF
exit 0
exit 1
# exit with error to avoid processing usage message by a udev rule
}

map_slot() {
Expand Down Expand Up @@ -728,7 +729,7 @@ done

if [ ! -r "$CONFIG" ] ; then
echo "Error: Config file \"$CONFIG\" not found"
exit 0
exit 1
fi

if [ -z "$DEV" ] && [ -z "$ENCLOSURE_MODE" ] ; then
Expand Down
6 changes: 4 additions & 2 deletions cmd/zdb/zdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2218,7 +2218,8 @@ snprintf_zstd_header(spa_t *spa, char *blkbuf, size_t buflen,
(void) snprintf(blkbuf + strlen(blkbuf),
buflen - strlen(blkbuf),
" ZSTD:size=%u:version=%u:level=%u:EMBEDDED",
zstd_hdr.c_len, zstd_hdr.version, zstd_hdr.level);
zstd_hdr.c_len, zfs_get_hdrversion(&zstd_hdr),
zfs_get_hdrlevel(&zstd_hdr));
return;
}

Expand All @@ -2242,7 +2243,8 @@ snprintf_zstd_header(spa_t *spa, char *blkbuf, size_t buflen,
(void) snprintf(blkbuf + strlen(blkbuf),
buflen - strlen(blkbuf),
" ZSTD:size=%u:version=%u:level=%u:NORMAL",
zstd_hdr.c_len, zstd_hdr.version, zstd_hdr.level);
zstd_hdr.c_len, zfs_get_hdrversion(&zstd_hdr),
zfs_get_hdrlevel(&zstd_hdr));

abd_return_buf_copy(pabd, buf, BP_GET_LSIZE(bp));
}
Expand Down
40 changes: 34 additions & 6 deletions cmd/zed/agents/zfs_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,27 @@ devid_iter(const char *devid, zfs_process_func_t func, boolean_t is_slice)
return (data.dd_found);
}

/*
* Given a device guid, find any vdevs with a matching guid.
*/
static boolean_t
guid_iter(uint64_t pool_guid, uint64_t vdev_guid, const char *devid,
zfs_process_func_t func, boolean_t is_slice)
{
dev_data_t data = { 0 };

data.dd_func = func;
data.dd_found = B_FALSE;
data.dd_pool_guid = pool_guid;
data.dd_vdev_guid = vdev_guid;
data.dd_islabeled = is_slice;
data.dd_new_devid = devid;

(void) zpool_iter(g_zfshdl, zfs_iter_pool, &data);

return (data.dd_found);
}

/*
* Handle a EC_DEV_ADD.ESC_DISK event.
*
Expand All @@ -663,15 +684,18 @@ static int
zfs_deliver_add(nvlist_t *nvl, boolean_t is_lofi)
{
char *devpath = NULL, *devid;
uint64_t pool_guid = 0, vdev_guid = 0;
boolean_t is_slice;

/*
* Expecting a devid string and an optional physical location
* Expecting a devid string and an optional physical location and guid
*/
if (nvlist_lookup_string(nvl, DEV_IDENTIFIER, &devid) != 0)
return (-1);

(void) nvlist_lookup_string(nvl, DEV_PHYS_PATH, &devpath);
(void) nvlist_lookup_uint64(nvl, ZFS_EV_POOL_GUID, &pool_guid);
(void) nvlist_lookup_uint64(nvl, ZFS_EV_VDEV_GUID, &vdev_guid);

is_slice = (nvlist_lookup_boolean(nvl, DEV_IS_PART) == 0);

Expand All @@ -682,12 +706,16 @@ zfs_deliver_add(nvlist_t *nvl, boolean_t is_lofi)
* Iterate over all vdevs looking for a match in the following order:
* 1. ZPOOL_CONFIG_DEVID (identifies the unique disk)
* 2. ZPOOL_CONFIG_PHYS_PATH (identifies disk physical location).
*
* For disks, we only want to pay attention to vdevs marked as whole
* disks or are a multipath device.
* 3. ZPOOL_CONFIG_GUID (identifies unique vdev).
*/
if (!devid_iter(devid, zfs_process_add, is_slice) && devpath != NULL)
(void) devphys_iter(devpath, devid, zfs_process_add, is_slice);
if (devid_iter(devid, zfs_process_add, is_slice))
return (0);
if (devpath != NULL && devphys_iter(devpath, devid, zfs_process_add,
is_slice))
return (0);
if (vdev_guid != 0)
(void) guid_iter(pool_guid, vdev_guid, devid, zfs_process_add,
is_slice);

return (0);
}
Expand Down
2 changes: 2 additions & 0 deletions cmd/zed/zed_disk_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ zed_udev_event(const char *class, const char *subclass, nvlist_t *nvl)
zed_log_msg(LOG_INFO, "\t%s: %s", DEV_PATH, strval);
if (nvlist_lookup_string(nvl, DEV_IDENTIFIER, &strval) == 0)
zed_log_msg(LOG_INFO, "\t%s: %s", DEV_IDENTIFIER, strval);
if (nvlist_lookup_boolean(nvl, DEV_IS_PART) == B_TRUE)
zed_log_msg(LOG_INFO, "\t%s: B_TRUE", DEV_IS_PART);
if (nvlist_lookup_string(nvl, DEV_PHYS_PATH, &strval) == 0)
zed_log_msg(LOG_INFO, "\t%s: %s", DEV_PHYS_PATH, strval);
if (nvlist_lookup_uint64(nvl, DEV_SIZE, &numval) == 0)
Expand Down
2 changes: 1 addition & 1 deletion cmd/zfs/zfs_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ get_usage(zfs_help_t idx)
case HELP_SEND:
return (gettext("\tsend [-DnPpRvLecwhb] [-[i|I] snapshot] "
"<snapshot>\n"
"\tsend [-nvPLecw] [-i snapshot|bookmark] "
"\tsend [-DnvPLecw] [-i snapshot|bookmark] "
"<filesystem|volume|snapshot>\n"
"\tsend [-DnPpvLec] [-i bookmark|snapshot] "
"--redact <bookmark> <snapshot>\n"
Expand Down
9 changes: 8 additions & 1 deletion cmd/zpool/zpool.d/media
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#

if [ "$1" = "-h" ] ; then
echo "Show whether a vdev is a file, hdd, or ssd."
echo "Show whether a vdev is a file, hdd, ssd, or iscsi."
exit
fi

Expand All @@ -18,6 +18,13 @@ if [ -b "$VDEV_UPATH" ]; then
if [ "$val" = "1" ]; then
MEDIA="hdd"
fi

vpd_pg83="/sys/block/$device/device/vpd_pg83"
if [ -f "$vpd_pg83" ]; then
if grep -q --binary "iqn." "$vpd_pg83"; then
MEDIA="iscsi"
fi
fi
else
if [ -f "$VDEV_UPATH" ]; then
MEDIA="file"
Expand Down
50 changes: 43 additions & 7 deletions cmd/zpool/zpool_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1215,6 +1215,26 @@ zpool_do_remove(int argc, char **argv)
return (ret);
}

/*
* Return 1 if a vdev is active (being used in a pool)
* Return 0 if a vdev is inactive (offlined or faulted, or not in active pool)
*
* This is useful for checking if a disk in an active pool is offlined or
* faulted.
*/
static int
vdev_is_active(char *vdev_path)
{
int fd;
fd = open(vdev_path, O_EXCL);
if (fd < 0) {
return (1); /* cant open O_EXCL - disk is active */
}

close(fd);
return (0); /* disk is inactive in the pool */
}

/*
* zpool labelclear [-f] <vdev>
*
Expand Down Expand Up @@ -1324,9 +1344,23 @@ zpool_do_labelclear(int argc, char **argv)
case POOL_STATE_ACTIVE:
case POOL_STATE_SPARE:
case POOL_STATE_L2CACHE:
/*
* We allow the user to call 'zpool offline -f'
* on an offlined disk in an active pool. We can check if
* the disk is online by calling vdev_is_active().
*/
if (force && !vdev_is_active(vdev))
break;

(void) fprintf(stderr, gettext(
"%s is a member (%s) of pool \"%s\"\n"),
"%s is a member (%s) of pool \"%s\""),
vdev, zpool_pool_state_to_name(state), name);

if (force) {
(void) fprintf(stderr, gettext(
". Offline the disk first to clear its label."));
}
printf("\n");
ret = 1;
goto errout;

Expand Down Expand Up @@ -3764,9 +3798,10 @@ zpool_do_import(int argc, char **argv)
return (1);
}

err = import_pools(pools, props, mntopts, flags, argv[0],
argc == 1 ? NULL : argv[1], do_destroyed, pool_specified,
do_all, &idata);
err = import_pools(pools, props, mntopts, flags,
argc >= 1 ? argv[0] : NULL,
argc >= 2 ? argv[1] : NULL,
do_destroyed, pool_specified, do_all, &idata);

/*
* If we're using the cachefile and we failed to import, then
Expand All @@ -3786,9 +3821,10 @@ zpool_do_import(int argc, char **argv)
nvlist_free(pools);
pools = zpool_search_import(g_zfs, &idata, &libzfs_config_ops);

err = import_pools(pools, props, mntopts, flags, argv[0],
argc == 1 ? NULL : argv[1], do_destroyed, pool_specified,
do_all, &idata);
err = import_pools(pools, props, mntopts, flags,
argc >= 1 ? argv[0] : NULL,
argc >= 2 ? argv[1] : NULL,
do_destroyed, pool_specified, do_all, &idata);
}

error:
Expand Down
3 changes: 1 addition & 2 deletions cmd/zpool_influxdb/zpool_influxdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,9 +683,8 @@ print_recursive_stats(stat_printer_f func, nvlist_t *nvroot,

if (descend && nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN,
&child, &children) == 0) {
(void) strncpy(vdev_name, get_vdev_name(nvroot, parent_name),
(void) strlcpy(vdev_name, get_vdev_name(nvroot, parent_name),
sizeof (vdev_name));
vdev_name[sizeof (vdev_name) - 1] = '\0';

for (c = 0; c < children; c++) {
print_recursive_stats(func, child[c], pool_name,
Expand Down
Loading