mirror of
https://github.com/openzfs/zfs.git
synced 2025-10-01 19:56:28 +00:00
Compare commits
90 Commits
zfs-2.4.0-
...
master
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8869caae5f | ||
![]() |
fa4d4b1f80 | ||
![]() |
32ce74ff32 | ||
![]() |
102ff2a640 | ||
![]() |
e4a407f29f | ||
![]() |
f0a95e8971 | ||
![]() |
75be5f2973 | ||
![]() |
8d4c3ee9e6 | ||
![]() |
4ff25e9013 | ||
![]() |
a44985315e | ||
![]() |
79be201806 | ||
![]() |
aecd6deeb3 | ||
![]() |
5c38029f4b | ||
![]() |
26b0f561be | ||
![]() |
c722bf8812 | ||
![]() |
0e1a53a8c0 | ||
![]() |
3e9347c9f7 | ||
![]() |
b2196fbedf | ||
![]() |
ea37c30fcb | ||
![]() |
876f705cc4 | ||
![]() |
11787965e0 | ||
![]() |
6ba51da93b | ||
![]() |
545d66204d | ||
![]() |
3387d34093 | ||
![]() |
ab8cc63c77 | ||
![]() |
ab93b4b70e | ||
![]() |
ffe93aee0a | ||
![]() |
1d2d812986 | ||
![]() |
d36684201f | ||
![]() |
45ac6045cc | ||
![]() |
faf2db3435 | ||
![]() |
d147ed7d26 | ||
![]() |
58b84289e8 | ||
![]() |
5c46baa1ce | ||
![]() |
f330b463de | ||
![]() |
4b764fb01a | ||
![]() |
f319ff3570 | ||
![]() |
3f4312a0a4 | ||
![]() |
9b772f328b | ||
![]() |
455c36156c | ||
![]() |
bc8bcfc71a | ||
![]() |
cb5f9aa582 | ||
![]() |
35f47cb4f4 | ||
![]() |
37cd30f714 | ||
![]() |
955fbc5ade | ||
![]() |
7b1cc9eb61 | ||
![]() |
654f2dcb42 | ||
![]() |
bc0b5318aa | ||
![]() |
d64711c202 | ||
![]() |
0620c979a5 | ||
![]() |
7f7c58389e | ||
![]() |
cd6db758f3 | ||
![]() |
bc4aac0395 | ||
![]() |
8f15d2e4d5 | ||
![]() |
92ca3ae56a | ||
![]() |
9ae20cf03d | ||
![]() |
a5571a0dd1 | ||
![]() |
d3429a75b0 | ||
![]() |
c6fe41cac5 | ||
![]() |
fe2f7cf6d7 | ||
![]() |
7939bad5e7 | ||
![]() |
9e5e95c24d | ||
![]() |
4b83891db0 | ||
![]() |
e29bfa5bd0 | ||
![]() |
a2424312c4 | ||
![]() |
59f8f5dfe1 | ||
![]() |
8266fa5858 | ||
![]() |
e3c3e86c04 | ||
![]() |
ced72fdd69 | ||
![]() |
b9c6b0e09b | ||
![]() |
c69b7ea6ca | ||
![]() |
ffba31c236 | ||
![]() |
dfc2c32590 | ||
![]() |
11b5c50238 | ||
![]() |
0e88a0e1ea | ||
![]() |
69b65dda8a | ||
![]() |
64d3143e82 | ||
![]() |
9acedbacee | ||
![]() |
5a8ba4520b | ||
![]() |
ccf5a8a6fc | ||
![]() |
1da2c30bed | ||
![]() |
976f765341 | ||
![]() |
ee7c362645 | ||
![]() |
14bad10f96 | ||
![]() |
e903177b56 | ||
![]() |
d247538e15 | ||
![]() |
0d54ae2880 | ||
![]() |
b6bd3228bb | ||
![]() |
e7485d04f1 | ||
![]() |
f1f74577cb |
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -14,7 +14,7 @@ Please check our issue tracker before opening a new feature request.
|
||||
Filling out the following template will help other contributors better understand your proposed feature.
|
||||
-->
|
||||
|
||||
### Describe the feature would like to see added to OpenZFS
|
||||
### Describe the feature you would like to see added to OpenZFS
|
||||
|
||||
<!--
|
||||
Provide a clear and concise description of the feature.
|
||||
|
10
.github/workflows/scripts/qemu-1-setup.sh
vendored
10
.github/workflows/scripts/qemu-1-setup.sh
vendored
@ -6,6 +6,13 @@
|
||||
|
||||
set -eu
|
||||
|
||||
# We've been seeing this script take over 15min to run. This may or
|
||||
# may not be normal. Just to get a little more insight, print out
|
||||
# a message to stdout with the top running process, and do this every
|
||||
# 30 seconds. We can delete this watchdog later once we get a better
|
||||
# handle on what the timeout value should be.
|
||||
(while [ 1 ] ; do sleep 30 && echo "[watchdog: $(ps -eo cmd --sort=-pcpu | head -n 2 | tail -n 1)}')]"; done) &
|
||||
|
||||
# install needed packages
|
||||
export DEBIAN_FRONTEND="noninteractive"
|
||||
sudo apt-get -y update
|
||||
@ -65,3 +72,6 @@ sudo zpool create -f -o ashift=12 zpool $SSD1 $SSD2 -O relatime=off \
|
||||
for i in /sys/block/s*/queue/scheduler; do
|
||||
echo "none" | sudo tee $i
|
||||
done
|
||||
|
||||
# Kill off our watchdog
|
||||
kill $(jobs -p)
|
||||
|
8
.github/workflows/zfs-qemu.yml
vendored
8
.github/workflows/zfs-qemu.yml
vendored
@ -77,8 +77,12 @@ jobs:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: Setup QEMU
|
||||
timeout-minutes: 10
|
||||
run: .github/workflows/scripts/qemu-1-setup.sh
|
||||
timeout-minutes: 20
|
||||
run: |
|
||||
# Add a timestamp to each line to debug timeouts
|
||||
while IFS=$'\n' read -r line; do
|
||||
echo "$(date +'%H:%M:%S') $line"
|
||||
done < <(.github/workflows/scripts/qemu-1-setup.sh)
|
||||
|
||||
- name: Start build machine
|
||||
timeout-minutes: 10
|
||||
|
4
META
4
META
@ -1,8 +1,8 @@
|
||||
Meta: 1
|
||||
Name: zfs
|
||||
Branch: 1.0
|
||||
Version: 2.4.0
|
||||
Release: rc2
|
||||
Version: 2.4.99
|
||||
Release: 1
|
||||
Release-Tags: relext
|
||||
License: CDDL
|
||||
Author: OpenZFS
|
||||
|
@ -107,6 +107,8 @@
|
||||
* zinject
|
||||
* zinject <-a | -u pool>
|
||||
* zinject -c <id|all>
|
||||
* zinject -E <delay> [-a] [-m] [-f freq] [-l level] [-r range]
|
||||
* [-T iotype] [-t type object | -b bookmark pool]
|
||||
* zinject [-q] <-t type> [-f freq] [-u] [-a] [-m] [-e errno] [-l level]
|
||||
* [-r range] <object>
|
||||
* zinject [-f freq] [-a] [-m] [-u] -b objset:object:level:start:end pool
|
||||
@ -132,14 +134,18 @@
|
||||
* The '-f' flag controls the frequency of errors injected, expressed as a
|
||||
* real number percentage between 0.0001 and 100. The default is 100.
|
||||
*
|
||||
* The this form is responsible for actually injecting the handler into the
|
||||
* The <object> form is responsible for actually injecting the handler into the
|
||||
* framework. It takes the arguments described above, translates them to the
|
||||
* internal tuple using libzpool, and then issues an ioctl() to register the
|
||||
* handler.
|
||||
*
|
||||
* The final form can target a specific bookmark, regardless of whether a
|
||||
* The '-b' option can target a specific bookmark, regardless of whether a
|
||||
* human-readable interface has been designed. It allows developers to specify
|
||||
* a particular block by number.
|
||||
*
|
||||
* The '-E' option injects pipeline ready stage delays for the given object or
|
||||
* bookmark. The delay is specified in milliseconds, and it supports I/O type
|
||||
* and range filters.
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
@ -346,6 +352,13 @@ usage(void)
|
||||
"\t\tsuch that the operation takes a minimum of supplied seconds\n"
|
||||
"\t\tto complete.\n"
|
||||
"\n"
|
||||
"\tzinject -E <delay> [-a] [-m] [-f freq] [-l level] [-r range]\n"
|
||||
"\t\t[-T iotype] [-t type object | -b bookmark pool]\n"
|
||||
"\n"
|
||||
"\t\tInject pipeline ready stage delays for the given object path\n"
|
||||
"\t\t(data or dnode) or raw bookmark. The delay is specified in\n"
|
||||
"\t\tmilliseconds.\n"
|
||||
"\n"
|
||||
"\tzinject -I [-s <seconds> | -g <txgs>] pool\n"
|
||||
"\t\tCause the pool to stop writing blocks yet not\n"
|
||||
"\t\treport errors for a duration. Simulates buggy hardware\n"
|
||||
@ -724,12 +737,15 @@ register_handler(const char *pool, int flags, zinject_record_t *record,
|
||||
if (quiet) {
|
||||
(void) printf("%llu\n", (u_longlong_t)zc.zc_guid);
|
||||
} else {
|
||||
boolean_t show_object = B_FALSE;
|
||||
boolean_t show_iotype = B_FALSE;
|
||||
(void) printf("Added handler %llu with the following "
|
||||
"properties:\n", (u_longlong_t)zc.zc_guid);
|
||||
(void) printf(" pool: %s\n", pool);
|
||||
if (record->zi_guid) {
|
||||
(void) printf(" vdev: %llx\n",
|
||||
(u_longlong_t)record->zi_guid);
|
||||
show_iotype = B_TRUE;
|
||||
} else if (record->zi_func[0] != '\0') {
|
||||
(void) printf(" panic function: %s\n",
|
||||
record->zi_func);
|
||||
@ -742,7 +758,18 @@ register_handler(const char *pool, int flags, zinject_record_t *record,
|
||||
} else if (record->zi_timer > 0) {
|
||||
(void) printf(" timer: %lld ms\n",
|
||||
(u_longlong_t)NSEC2MSEC(record->zi_timer));
|
||||
if (record->zi_cmd == ZINJECT_DELAY_READY) {
|
||||
show_object = B_TRUE;
|
||||
show_iotype = B_TRUE;
|
||||
}
|
||||
} else {
|
||||
show_object = B_TRUE;
|
||||
}
|
||||
if (show_iotype) {
|
||||
(void) printf("iotype: %s\n",
|
||||
iotype_to_str(record->zi_iotype));
|
||||
}
|
||||
if (show_object) {
|
||||
(void) printf("objset: %llu\n",
|
||||
(u_longlong_t)record->zi_objset);
|
||||
(void) printf("object: %llu\n",
|
||||
@ -910,6 +937,7 @@ main(int argc, char **argv)
|
||||
int ret;
|
||||
int flags = 0;
|
||||
uint32_t dvas = 0;
|
||||
hrtime_t ready_delay = -1;
|
||||
|
||||
if ((g_zfs = libzfs_init()) == NULL) {
|
||||
(void) fprintf(stderr, "%s\n", libzfs_error_init(errno));
|
||||
@ -940,7 +968,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
while ((c = getopt(argc, argv,
|
||||
":aA:b:C:d:D:f:Fg:qhIc:t:T:l:mr:s:e:uL:p:P:")) != -1) {
|
||||
":aA:b:C:d:D:E:f:Fg:qhIc:t:T:l:mr:s:e:uL:p:P:")) != -1) {
|
||||
switch (c) {
|
||||
case 'a':
|
||||
flags |= ZINJECT_FLUSH_ARC;
|
||||
@ -1113,6 +1141,18 @@ main(int argc, char **argv)
|
||||
case 'u':
|
||||
flags |= ZINJECT_UNLOAD_SPA;
|
||||
break;
|
||||
case 'E':
|
||||
ready_delay = MSEC2NSEC(strtol(optarg, &end, 10));
|
||||
if (ready_delay <= 0 || *end != '\0') {
|
||||
(void) fprintf(stderr, "invalid delay '%s': "
|
||||
"must be a positive duration\n", optarg);
|
||||
usage();
|
||||
libzfs_fini(g_zfs);
|
||||
return (1);
|
||||
}
|
||||
record.zi_cmd = ZINJECT_DELAY_READY;
|
||||
record.zi_timer = ready_delay;
|
||||
break;
|
||||
case 'L':
|
||||
if ((label = name_to_type(optarg)) == TYPE_INVAL &&
|
||||
!LABEL_TYPE(type)) {
|
||||
@ -1150,7 +1190,7 @@ main(int argc, char **argv)
|
||||
*/
|
||||
if (raw != NULL || range != NULL || type != TYPE_INVAL ||
|
||||
level != 0 || record.zi_cmd != ZINJECT_UNINITIALIZED ||
|
||||
record.zi_freq > 0 || dvas != 0) {
|
||||
record.zi_freq > 0 || dvas != 0 || ready_delay >= 0) {
|
||||
(void) fprintf(stderr, "cancel (-c) incompatible with "
|
||||
"any other options\n");
|
||||
usage();
|
||||
@ -1186,7 +1226,7 @@ main(int argc, char **argv)
|
||||
*/
|
||||
if (raw != NULL || range != NULL || type != TYPE_INVAL ||
|
||||
level != 0 || record.zi_cmd != ZINJECT_UNINITIALIZED ||
|
||||
dvas != 0) {
|
||||
dvas != 0 || ready_delay >= 0) {
|
||||
(void) fprintf(stderr, "device (-d) incompatible with "
|
||||
"data error injection\n");
|
||||
usage();
|
||||
@ -1276,13 +1316,23 @@ main(int argc, char **argv)
|
||||
return (1);
|
||||
}
|
||||
|
||||
record.zi_cmd = ZINJECT_DATA_FAULT;
|
||||
if (record.zi_cmd == ZINJECT_UNINITIALIZED) {
|
||||
record.zi_cmd = ZINJECT_DATA_FAULT;
|
||||
if (!error)
|
||||
error = EIO;
|
||||
} else if (error != 0) {
|
||||
(void) fprintf(stderr, "error type -e incompatible "
|
||||
"with delay injection\n");
|
||||
libzfs_fini(g_zfs);
|
||||
return (1);
|
||||
} else {
|
||||
record.zi_iotype = io_type;
|
||||
}
|
||||
|
||||
if (translate_raw(raw, &record) != 0) {
|
||||
libzfs_fini(g_zfs);
|
||||
return (1);
|
||||
}
|
||||
if (!error)
|
||||
error = EIO;
|
||||
} else if (record.zi_cmd == ZINJECT_PANIC) {
|
||||
if (raw != NULL || range != NULL || type != TYPE_INVAL ||
|
||||
level != 0 || device != NULL || record.zi_freq > 0 ||
|
||||
@ -1410,6 +1460,13 @@ main(int argc, char **argv)
|
||||
record.zi_dvas = dvas;
|
||||
}
|
||||
|
||||
if (record.zi_cmd != ZINJECT_UNINITIALIZED && error != 0) {
|
||||
(void) fprintf(stderr, "error type -e incompatible "
|
||||
"with delay injection\n");
|
||||
libzfs_fini(g_zfs);
|
||||
return (1);
|
||||
}
|
||||
|
||||
if (error == EACCES) {
|
||||
if (type != TYPE_DATA) {
|
||||
(void) fprintf(stderr, "decryption errors "
|
||||
@ -1425,8 +1482,12 @@ main(int argc, char **argv)
|
||||
* not found.
|
||||
*/
|
||||
error = ECKSUM;
|
||||
} else {
|
||||
} else if (record.zi_cmd == ZINJECT_UNINITIALIZED) {
|
||||
record.zi_cmd = ZINJECT_DATA_FAULT;
|
||||
if (!error)
|
||||
error = EIO;
|
||||
} else {
|
||||
record.zi_iotype = io_type;
|
||||
}
|
||||
|
||||
if (translate_record(type, argv[0], range, level, &record, pool,
|
||||
@ -1434,8 +1495,6 @@ main(int argc, char **argv)
|
||||
libzfs_fini(g_zfs);
|
||||
return (1);
|
||||
}
|
||||
if (!error)
|
||||
error = EIO;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -8,7 +8,7 @@ This contrib contains community compatibility patches to get Intel QAT working o
|
||||
These patches are based on the following Intel QAT version:
|
||||
[1.7.l.4.10.0-00014](https://01.org/sites/default/files/downloads/qat1.7.l.4.10.0-00014.tar.gz)
|
||||
|
||||
When using QAT with above kernels versions, the following patches needs to be applied using:
|
||||
When using QAT with the above kernel versions, the following patches need to be applied using:
|
||||
patch -p1 < _$PATCH_
|
||||
_Where $PATCH refers to the path of the patch in question_
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
DESCRIPTION
|
||||
These script were written with the primary intention of being portable and
|
||||
These scripts were written with the primary intention of being portable and
|
||||
usable on as many systems as possible.
|
||||
|
||||
This is, in practice, usually not possible. But the intention is there.
|
||||
|
@ -455,6 +455,7 @@ typedef enum zinject_type {
|
||||
ZINJECT_DECRYPT_FAULT,
|
||||
ZINJECT_DELAY_IMPORT,
|
||||
ZINJECT_DELAY_EXPORT,
|
||||
ZINJECT_DELAY_READY,
|
||||
} zinject_type_t;
|
||||
|
||||
typedef enum zinject_iotype {
|
||||
|
@ -718,6 +718,7 @@ extern void zio_handle_ignored_writes(zio_t *zio);
|
||||
extern hrtime_t zio_handle_io_delay(zio_t *zio);
|
||||
extern void zio_handle_import_delay(spa_t *spa, hrtime_t elapsed);
|
||||
extern void zio_handle_export_delay(spa_t *spa, hrtime_t elapsed);
|
||||
extern hrtime_t zio_handle_ready_delay(zio_t *zio);
|
||||
|
||||
/*
|
||||
* Checksum ereport functions
|
||||
|
@ -138,6 +138,20 @@ This injector is automatically cleared after the import is finished.
|
||||
.
|
||||
.It Xo
|
||||
.Nm zinject
|
||||
.Fl E Ar delay
|
||||
.Op Fl a
|
||||
.Op Fl m
|
||||
.Op Fl f Ar freq
|
||||
.Op Fl l Ar level
|
||||
.Op Fl r Ar range
|
||||
.Op Fl T Ar iotype
|
||||
.Op Fl t Ar type Ns | Ns Fl b Ar bookmark
|
||||
.Xc
|
||||
Inject pipeline ready stage delays for the given object or bookmark.
|
||||
The delay is specified in milliseconds.
|
||||
.
|
||||
.It Xo
|
||||
.Nm zinject
|
||||
.Fl I
|
||||
.Op Fl s Ar seconds Ns | Ns Fl g Ar txgs
|
||||
.Ar pool
|
||||
|
@ -188,11 +188,6 @@ param_set_arc_max(SYSCTL_HANDLER_ARGS)
|
||||
return (0);
|
||||
}
|
||||
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_max,
|
||||
CTLTYPE_ULONG | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
||||
NULL, 0, param_set_arc_max, "LU",
|
||||
"Maximum ARC size in bytes (LEGACY)");
|
||||
|
||||
int
|
||||
param_set_arc_min(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
@ -217,11 +212,6 @@ param_set_arc_min(SYSCTL_HANDLER_ARGS)
|
||||
return (0);
|
||||
}
|
||||
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_min,
|
||||
CTLTYPE_ULONG | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
||||
NULL, 0, param_set_arc_min, "LU",
|
||||
"Minimum ARC size in bytes (LEGACY)");
|
||||
|
||||
extern uint_t zfs_arc_free_target;
|
||||
|
||||
int
|
||||
@ -245,16 +235,6 @@ param_set_arc_free_target(SYSCTL_HANDLER_ARGS)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* NOTE: This sysctl is CTLFLAG_RW not CTLFLAG_RWTUN due to its dependency on
|
||||
* pagedaemon initialization.
|
||||
*/
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_free_target,
|
||||
CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE,
|
||||
NULL, 0, param_set_arc_free_target, "IU",
|
||||
"Desired number of free pages below which ARC triggers reclaim"
|
||||
" (LEGACY)");
|
||||
|
||||
int
|
||||
param_set_arc_no_grow_shift(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
@ -273,187 +253,6 @@ param_set_arc_no_grow_shift(SYSCTL_HANDLER_ARGS)
|
||||
return (0);
|
||||
}
|
||||
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_no_grow_shift,
|
||||
CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
||||
NULL, 0, param_set_arc_no_grow_shift, "I",
|
||||
"log2(fraction of ARC which must be free to allow growing) (LEGACY)");
|
||||
|
||||
extern uint64_t l2arc_write_max;
|
||||
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_max,
|
||||
CTLFLAG_RWTUN, &l2arc_write_max, 0,
|
||||
"Max write bytes per interval (LEGACY)");
|
||||
|
||||
extern uint64_t l2arc_write_boost;
|
||||
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_write_boost,
|
||||
CTLFLAG_RWTUN, &l2arc_write_boost, 0,
|
||||
"Extra write bytes during device warmup (LEGACY)");
|
||||
|
||||
extern uint64_t l2arc_headroom;
|
||||
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_headroom,
|
||||
CTLFLAG_RWTUN, &l2arc_headroom, 0,
|
||||
"Number of max device writes to precache (LEGACY)");
|
||||
|
||||
extern uint64_t l2arc_headroom_boost;
|
||||
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_headroom_boost,
|
||||
CTLFLAG_RWTUN, &l2arc_headroom_boost, 0,
|
||||
"Compressed l2arc_headroom multiplier (LEGACY)");
|
||||
|
||||
extern uint64_t l2arc_feed_secs;
|
||||
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_secs,
|
||||
CTLFLAG_RWTUN, &l2arc_feed_secs, 0,
|
||||
"Seconds between L2ARC writing (LEGACY)");
|
||||
|
||||
extern uint64_t l2arc_feed_min_ms;
|
||||
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2arc_feed_min_ms,
|
||||
CTLFLAG_RWTUN, &l2arc_feed_min_ms, 0,
|
||||
"Min feed interval in milliseconds (LEGACY)");
|
||||
|
||||
extern int l2arc_noprefetch;
|
||||
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_noprefetch,
|
||||
CTLFLAG_RWTUN, &l2arc_noprefetch, 0,
|
||||
"Skip caching prefetched buffers (LEGACY)");
|
||||
|
||||
extern int l2arc_feed_again;
|
||||
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_feed_again,
|
||||
CTLFLAG_RWTUN, &l2arc_feed_again, 0,
|
||||
"Turbo L2ARC warmup (LEGACY)");
|
||||
|
||||
extern int l2arc_norw;
|
||||
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, l2arc_norw,
|
||||
CTLFLAG_RWTUN, &l2arc_norw, 0,
|
||||
"No reads during writes (LEGACY)");
|
||||
|
||||
static int
|
||||
param_get_arc_state_size(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
arc_state_t *state = (arc_state_t *)arg1;
|
||||
int64_t val;
|
||||
|
||||
val = zfs_refcount_count(&state->arcs_size[ARC_BUFC_DATA]) +
|
||||
zfs_refcount_count(&state->arcs_size[ARC_BUFC_METADATA]);
|
||||
return (sysctl_handle_64(oidp, &val, 0, req));
|
||||
}
|
||||
|
||||
extern arc_state_t ARC_anon;
|
||||
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, anon_size,
|
||||
CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||
&ARC_anon, 0, param_get_arc_state_size, "Q",
|
||||
"size of anonymous state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_metadata_esize, CTLFLAG_RD,
|
||||
&ARC_anon.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
||||
"size of evictable metadata in anonymous state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, anon_data_esize, CTLFLAG_RD,
|
||||
&ARC_anon.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
||||
"size of evictable data in anonymous state");
|
||||
|
||||
extern arc_state_t ARC_mru;
|
||||
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, mru_size,
|
||||
CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||
&ARC_mru, 0, param_get_arc_state_size, "Q",
|
||||
"size of mru state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_metadata_esize, CTLFLAG_RD,
|
||||
&ARC_mru.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
||||
"size of evictable metadata in mru state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_data_esize, CTLFLAG_RD,
|
||||
&ARC_mru.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
||||
"size of evictable data in mru state");
|
||||
|
||||
extern arc_state_t ARC_mru_ghost;
|
||||
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, mru_ghost_size,
|
||||
CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||
&ARC_mru_ghost, 0, param_get_arc_state_size, "Q",
|
||||
"size of mru ghost state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_ghost_metadata_esize, CTLFLAG_RD,
|
||||
&ARC_mru_ghost.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
||||
"size of evictable metadata in mru ghost state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mru_ghost_data_esize, CTLFLAG_RD,
|
||||
&ARC_mru_ghost.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
||||
"size of evictable data in mru ghost state");
|
||||
|
||||
extern arc_state_t ARC_mfu;
|
||||
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, mfu_size,
|
||||
CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||
&ARC_mfu, 0, param_get_arc_state_size, "Q",
|
||||
"size of mfu state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_metadata_esize, CTLFLAG_RD,
|
||||
&ARC_mfu.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
||||
"size of evictable metadata in mfu state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_data_esize, CTLFLAG_RD,
|
||||
&ARC_mfu.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
||||
"size of evictable data in mfu state");
|
||||
|
||||
extern arc_state_t ARC_mfu_ghost;
|
||||
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, mfu_ghost_size,
|
||||
CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||
&ARC_mfu_ghost, 0, param_get_arc_state_size, "Q",
|
||||
"size of mfu ghost state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_ghost_metadata_esize, CTLFLAG_RD,
|
||||
&ARC_mfu_ghost.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
||||
"size of evictable metadata in mfu ghost state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_ghost_data_esize, CTLFLAG_RD,
|
||||
&ARC_mfu_ghost.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
||||
"size of evictable data in mfu ghost state");
|
||||
|
||||
extern arc_state_t ARC_uncached;
|
||||
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, uncached_size,
|
||||
CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||
&ARC_uncached, 0, param_get_arc_state_size, "Q",
|
||||
"size of uncached state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, uncached_metadata_esize, CTLFLAG_RD,
|
||||
&ARC_uncached.arcs_esize[ARC_BUFC_METADATA].rc_count, 0,
|
||||
"size of evictable metadata in uncached state");
|
||||
SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, uncached_data_esize, CTLFLAG_RD,
|
||||
&ARC_uncached.arcs_esize[ARC_BUFC_DATA].rc_count, 0,
|
||||
"size of evictable data in uncached state");
|
||||
|
||||
extern arc_state_t ARC_l2c_only;
|
||||
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, l2c_only_size,
|
||||
CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||
&ARC_l2c_only, 0, param_get_arc_state_size, "Q",
|
||||
"size of l2c_only state");
|
||||
|
||||
/* dbuf.c */
|
||||
|
||||
/* dmu.c */
|
||||
|
||||
/* dmu_zfetch.c */
|
||||
|
||||
SYSCTL_NODE(_vfs_zfs, OID_AUTO, zfetch, CTLFLAG_RW, 0, "ZFS ZFETCH (LEGACY)");
|
||||
|
||||
extern uint32_t zfetch_max_distance;
|
||||
|
||||
SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, max_distance,
|
||||
CTLFLAG_RWTUN, &zfetch_max_distance, 0,
|
||||
"Max bytes to prefetch per stream (LEGACY)");
|
||||
|
||||
extern uint32_t zfetch_max_idistance;
|
||||
|
||||
SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, max_idistance,
|
||||
CTLFLAG_RWTUN, &zfetch_max_idistance, 0,
|
||||
"Max bytes to prefetch indirects for per stream (LEGACY)");
|
||||
|
||||
/* dsl_pool.c */
|
||||
|
||||
/* dnode.c */
|
||||
|
||||
/* dsl_scan.c */
|
||||
|
||||
/* metaslab.c */
|
||||
|
||||
int
|
||||
@ -514,19 +313,6 @@ SYSCTL_UINT(_vfs_zfs, OID_AUTO, condense_pct,
|
||||
"Condense on-disk spacemap when it is more than this many percents"
|
||||
" of in-memory counterpart");
|
||||
|
||||
extern uint_t zfs_remove_max_segment;
|
||||
|
||||
SYSCTL_UINT(_vfs_zfs, OID_AUTO, remove_max_segment,
|
||||
CTLFLAG_RWTUN, &zfs_remove_max_segment, 0,
|
||||
"Largest contiguous segment ZFS will attempt to allocate when removing"
|
||||
" a device");
|
||||
|
||||
extern int zfs_removal_suspend_progress;
|
||||
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, removal_suspend_progress,
|
||||
CTLFLAG_RWTUN, &zfs_removal_suspend_progress, 0,
|
||||
"Ensures certain actions can happen while in the middle of a removal");
|
||||
|
||||
/*
|
||||
* Minimum size which forces the dynamic allocator to change
|
||||
* it's allocation strategy. Once the space map cannot satisfy
|
||||
@ -749,12 +535,6 @@ param_set_min_auto_ashift(SYSCTL_HANDLER_ARGS)
|
||||
return (0);
|
||||
}
|
||||
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, min_auto_ashift,
|
||||
CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
||||
&zfs_vdev_min_auto_ashift, sizeof (zfs_vdev_min_auto_ashift),
|
||||
param_set_min_auto_ashift, "IU",
|
||||
"Min ashift used when creating new top-level vdev. (LEGACY)");
|
||||
|
||||
int
|
||||
param_set_max_auto_ashift(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
@ -774,13 +554,6 @@ param_set_max_auto_ashift(SYSCTL_HANDLER_ARGS)
|
||||
return (0);
|
||||
}
|
||||
|
||||
SYSCTL_PROC(_vfs_zfs, OID_AUTO, max_auto_ashift,
|
||||
CTLTYPE_UINT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE,
|
||||
&zfs_vdev_max_auto_ashift, sizeof (zfs_vdev_max_auto_ashift),
|
||||
param_set_max_auto_ashift, "IU",
|
||||
"Max ashift used when optimizing for logical -> physical sector size on"
|
||||
" new top-level vdevs. (LEGACY)");
|
||||
|
||||
/*
|
||||
* Since the DTL space map of a vdev is not expected to have a lot of
|
||||
* entries, we default its block size to 4K.
|
||||
@ -802,23 +575,6 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, standard_sm_blksz,
|
||||
CTLFLAG_RDTUN, &zfs_vdev_standard_sm_blksz, 0,
|
||||
"Block size for standard space map. Power of 2 greater than 4096.");
|
||||
|
||||
extern int vdev_validate_skip;
|
||||
|
||||
SYSCTL_INT(_vfs_zfs, OID_AUTO, validate_skip,
|
||||
CTLFLAG_RDTUN, &vdev_validate_skip, 0,
|
||||
"Enable to bypass vdev_validate().");
|
||||
|
||||
/* vdev_mirror.c */
|
||||
|
||||
/* vdev_queue.c */
|
||||
|
||||
extern uint_t zfs_vdev_max_active;
|
||||
|
||||
SYSCTL_UINT(_vfs_zfs, OID_AUTO, top_maxinflight,
|
||||
CTLFLAG_RWTUN, &zfs_vdev_max_active, 0,
|
||||
"The maximum number of I/Os of all types active for each device."
|
||||
" (LEGACY)");
|
||||
|
||||
/* zio.c */
|
||||
|
||||
SYSCTL_INT(_vfs_zfs_zio, OID_AUTO, exclude_metadata,
|
||||
|
@ -364,8 +364,8 @@ zfs_prop_init(void)
|
||||
|
||||
static const zprop_index_t xattr_table[] = {
|
||||
{ "off", ZFS_XATTR_OFF },
|
||||
{ "on", ZFS_XATTR_SA },
|
||||
{ "sa", ZFS_XATTR_SA },
|
||||
{ "on", ZFS_XATTR_SA },
|
||||
{ "dir", ZFS_XATTR_DIR },
|
||||
{ NULL }
|
||||
};
|
||||
|
@ -486,13 +486,13 @@ static taskq_t *arc_flush_taskq;
|
||||
static uint_t zfs_arc_evict_threads = 0;
|
||||
|
||||
/* The 7 states: */
|
||||
arc_state_t ARC_anon;
|
||||
arc_state_t ARC_mru;
|
||||
arc_state_t ARC_mru_ghost;
|
||||
arc_state_t ARC_mfu;
|
||||
arc_state_t ARC_mfu_ghost;
|
||||
arc_state_t ARC_l2c_only;
|
||||
arc_state_t ARC_uncached;
|
||||
static arc_state_t ARC_anon;
|
||||
/* */ arc_state_t ARC_mru;
|
||||
static arc_state_t ARC_mru_ghost;
|
||||
/* */ arc_state_t ARC_mfu;
|
||||
static arc_state_t ARC_mfu_ghost;
|
||||
static arc_state_t ARC_l2c_only;
|
||||
static arc_state_t ARC_uncached;
|
||||
|
||||
arc_stats_t arc_stats = {
|
||||
{ "hits", KSTAT_DATA_UINT64 },
|
||||
@ -832,15 +832,15 @@ typedef struct arc_async_flush {
|
||||
#define L2ARC_FEED_TYPES 4
|
||||
|
||||
/* L2ARC Performance Tunables */
|
||||
uint64_t l2arc_write_max = L2ARC_WRITE_SIZE; /* def max write size */
|
||||
uint64_t l2arc_write_boost = L2ARC_WRITE_SIZE; /* extra warmup write */
|
||||
uint64_t l2arc_headroom = L2ARC_HEADROOM; /* # of dev writes */
|
||||
uint64_t l2arc_headroom_boost = L2ARC_HEADROOM_BOOST;
|
||||
uint64_t l2arc_feed_secs = L2ARC_FEED_SECS; /* interval seconds */
|
||||
uint64_t l2arc_feed_min_ms = L2ARC_FEED_MIN_MS; /* min interval msecs */
|
||||
int l2arc_noprefetch = B_TRUE; /* don't cache prefetch bufs */
|
||||
int l2arc_feed_again = B_TRUE; /* turbo warmup */
|
||||
int l2arc_norw = B_FALSE; /* no reads during writes */
|
||||
static uint64_t l2arc_write_max = L2ARC_WRITE_SIZE; /* def max write size */
|
||||
static uint64_t l2arc_write_boost = L2ARC_WRITE_SIZE; /* extra warmup write */
|
||||
static uint64_t l2arc_headroom = L2ARC_HEADROOM; /* # of dev writes */
|
||||
static uint64_t l2arc_headroom_boost = L2ARC_HEADROOM_BOOST;
|
||||
static uint64_t l2arc_feed_secs = L2ARC_FEED_SECS; /* interval seconds */
|
||||
static uint64_t l2arc_feed_min_ms = L2ARC_FEED_MIN_MS; /* min interval msecs */
|
||||
static int l2arc_noprefetch = B_TRUE; /* don't cache prefetch bufs */
|
||||
static int l2arc_feed_again = B_TRUE; /* turbo warmup */
|
||||
static int l2arc_norw = B_FALSE; /* no reads during writes */
|
||||
static uint_t l2arc_meta_percent = 33; /* limit on headers size */
|
||||
|
||||
/*
|
||||
|
@ -57,19 +57,19 @@ static unsigned int zfetch_max_sec_reap = 2;
|
||||
/* min bytes to prefetch per stream (default 2MB) */
|
||||
static unsigned int zfetch_min_distance = 2 * 1024 * 1024;
|
||||
/* max bytes to prefetch per stream (default 8MB) */
|
||||
unsigned int zfetch_max_distance = 8 * 1024 * 1024;
|
||||
static unsigned int zfetch_max_distance = 8 * 1024 * 1024;
|
||||
#else
|
||||
/* min bytes to prefetch per stream (default 4MB) */
|
||||
static unsigned int zfetch_min_distance = 4 * 1024 * 1024;
|
||||
/* max bytes to prefetch per stream (default 64MB) */
|
||||
unsigned int zfetch_max_distance = 64 * 1024 * 1024;
|
||||
static unsigned int zfetch_max_distance = 64 * 1024 * 1024;
|
||||
#endif
|
||||
/* max bytes to prefetch indirects for per stream (default 128MB) */
|
||||
unsigned int zfetch_max_idistance = 128 * 1024 * 1024;
|
||||
static unsigned int zfetch_max_idistance = 128 * 1024 * 1024;
|
||||
/* max request reorder distance within a stream (default 16MB) */
|
||||
unsigned int zfetch_max_reorder = 16 * 1024 * 1024;
|
||||
static unsigned int zfetch_max_reorder = 16 * 1024 * 1024;
|
||||
/* Max log2 fraction of holes in a stream */
|
||||
unsigned int zfetch_hole_shift = 2;
|
||||
static unsigned int zfetch_hole_shift = 2;
|
||||
|
||||
typedef struct zfetch_stats {
|
||||
kstat_named_t zfetchstat_hits;
|
||||
|
@ -100,7 +100,7 @@ static uint_t zfs_vdev_default_ms_shift = 29;
|
||||
/* upper limit for metaslab size (16G) */
|
||||
static uint_t zfs_vdev_max_ms_shift = 34;
|
||||
|
||||
int vdev_validate_skip = B_FALSE;
|
||||
static int vdev_validate_skip = B_FALSE;
|
||||
|
||||
/*
|
||||
* Since the DTL space map of a vdev is not expected to have a lot of
|
||||
|
@ -122,7 +122,7 @@
|
||||
* The maximum number of i/os active to each device. Ideally, this will be >=
|
||||
* the sum of each queue's max_active.
|
||||
*/
|
||||
uint_t zfs_vdev_max_active = 1000;
|
||||
static uint_t zfs_vdev_max_active = 1000;
|
||||
|
||||
/*
|
||||
* Per-queue limits on the number of i/os active to each device. If the
|
||||
|
@ -105,7 +105,7 @@ static const uint_t zfs_remove_max_copy_bytes = 64 * 1024 * 1024;
|
||||
*
|
||||
* See also the accessor function spa_remove_max_segment().
|
||||
*/
|
||||
uint_t zfs_remove_max_segment = SPA_MAXBLOCKSIZE;
|
||||
static uint_t zfs_remove_max_segment = SPA_MAXBLOCKSIZE;
|
||||
|
||||
/*
|
||||
* Ignore hard IO errors during device removal. When set if a device
|
||||
@ -137,7 +137,7 @@ uint_t vdev_removal_max_span = 32 * 1024;
|
||||
* This is used by the test suite so that it can ensure that certain
|
||||
* actions happen while in the middle of a removal.
|
||||
*/
|
||||
int zfs_removal_suspend_progress = 0;
|
||||
static int zfs_removal_suspend_progress = 0;
|
||||
|
||||
#define VDEV_REMOVAL_ZAP_OBJS "lzap"
|
||||
|
||||
|
@ -5305,6 +5305,16 @@ zio_ready(zio_t *zio)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if (zio_injection_enabled) {
|
||||
hrtime_t target = zio_handle_ready_delay(zio);
|
||||
if (target != 0 && zio->io_target_timestamp == 0) {
|
||||
zio->io_stage >>= 1;
|
||||
zio->io_target_timestamp = target;
|
||||
zio_delay_interrupt(zio);
|
||||
return (NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (zio->io_ready) {
|
||||
ASSERT(IO_IS_ALLOCATING(zio));
|
||||
ASSERT(BP_GET_BIRTH(bp) == zio->io_txg ||
|
||||
|
@ -827,6 +827,44 @@ zio_handle_export_delay(spa_t *spa, hrtime_t elapsed)
|
||||
zio_handle_pool_delay(spa, elapsed, ZINJECT_DELAY_EXPORT);
|
||||
}
|
||||
|
||||
/*
|
||||
* For testing, inject a delay before ready state.
|
||||
*/
|
||||
hrtime_t
|
||||
zio_handle_ready_delay(zio_t *zio)
|
||||
{
|
||||
inject_handler_t *handler;
|
||||
hrtime_t now = gethrtime();
|
||||
hrtime_t target = 0;
|
||||
|
||||
/*
|
||||
* Ignore I/O not associated with any logical data.
|
||||
*/
|
||||
if (zio->io_logical == NULL)
|
||||
return (0);
|
||||
|
||||
rw_enter(&inject_lock, RW_READER);
|
||||
|
||||
for (handler = list_head(&inject_handlers); handler != NULL;
|
||||
handler = list_next(&inject_handlers, handler)) {
|
||||
if (zio->io_spa != handler->zi_spa ||
|
||||
handler->zi_record.zi_cmd != ZINJECT_DELAY_READY)
|
||||
continue;
|
||||
|
||||
/* If this handler matches, inject the delay */
|
||||
if (zio_match_iotype(zio, handler->zi_record.zi_iotype) &&
|
||||
zio_match_handler(&zio->io_logical->io_bookmark,
|
||||
zio->io_bp ? BP_GET_TYPE(zio->io_bp) : DMU_OT_NONE,
|
||||
zio_match_dva(zio), &handler->zi_record, zio->io_error)) {
|
||||
target = now + (hrtime_t)handler->zi_record.zi_timer;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
rw_exit(&inject_lock);
|
||||
return (target);
|
||||
}
|
||||
|
||||
static int
|
||||
zio_calculate_range(const char *pool, zinject_record_t *record)
|
||||
{
|
||||
|
@ -1090,7 +1090,8 @@ tags = ['functional', 'write_dirs']
|
||||
[tests/functional/xattr]
|
||||
tests = ['xattr_001_pos', 'xattr_002_neg', 'xattr_003_neg', 'xattr_004_pos',
|
||||
'xattr_005_pos', 'xattr_006_pos', 'xattr_007_neg',
|
||||
'xattr_011_pos', 'xattr_012_pos', 'xattr_013_pos', 'xattr_compat']
|
||||
'xattr_011_pos', 'xattr_012_pos', 'xattr_013_pos', 'xattr_014_pos',
|
||||
'xattr_compat']
|
||||
tags = ['functional', 'xattr']
|
||||
|
||||
[tests/functional/zvol/zvol_ENOSPC]
|
||||
|
@ -622,7 +622,7 @@ tags = ['functional', 'vdev_zaps']
|
||||
[tests/functional/xattr]
|
||||
tests = ['xattr_001_pos', 'xattr_002_neg', 'xattr_003_neg', 'xattr_004_pos',
|
||||
'xattr_005_pos', 'xattr_006_pos', 'xattr_007_neg',
|
||||
'xattr_011_pos', 'xattr_013_pos', 'xattr_compat']
|
||||
'xattr_011_pos', 'xattr_013_pos', 'xattr_014_pos', 'xattr_compat']
|
||||
tags = ['functional', 'xattr']
|
||||
|
||||
[tests/functional/zvol/zvol_ENOSPC]
|
||||
|
@ -76,8 +76,8 @@ READ_SIT_OUT_SECS vdev.read_sit_out_secs vdev_read_sit_out_secs
|
||||
SIT_OUT_CHECK_INTERVAL vdev.raidz_outlier_check_interval_ms vdev_raidz_outlier_check_interval_ms
|
||||
SIT_OUT_INSENSITIVITY vdev.raidz_outlier_insensitivity vdev_raidz_outlier_insensitivity
|
||||
REBUILD_SCRUB_ENABLED rebuild_scrub_enabled zfs_rebuild_scrub_enabled
|
||||
REMOVAL_SUSPEND_PROGRESS removal_suspend_progress zfs_removal_suspend_progress
|
||||
REMOVE_MAX_SEGMENT remove_max_segment zfs_remove_max_segment
|
||||
REMOVAL_SUSPEND_PROGRESS vdev.removal_suspend_progress zfs_removal_suspend_progress
|
||||
REMOVE_MAX_SEGMENT vdev.remove_max_segment zfs_remove_max_segment
|
||||
RESILVER_MIN_TIME_MS resilver_min_time_ms zfs_resilver_min_time_ms
|
||||
RESILVER_DEFER_PERCENT resilver_defer_percent zfs_resilver_defer_percent
|
||||
SCAN_LEGACY scan_legacy zfs_scan_legacy
|
||||
|
@ -2234,6 +2234,7 @@ nobase_dist_datadir_zfs_tests_tests_SCRIPTS += \
|
||||
functional/xattr/xattr_011_pos.ksh \
|
||||
functional/xattr/xattr_012_pos.ksh \
|
||||
functional/xattr/xattr_013_pos.ksh \
|
||||
functional/xattr/xattr_014_pos.ksh \
|
||||
functional/xattr/xattr_compat.ksh \
|
||||
functional/zap_shrink/cleanup.ksh \
|
||||
functional/zap_shrink/zap_shrink_001_pos.ksh \
|
||||
|
@ -1234,10 +1234,10 @@ function verify_fs_aedsx
|
||||
typeset oldval
|
||||
set -A modes "on" "off"
|
||||
oldval=$(get_prop $perm $fs)
|
||||
if [[ $oldval == "on" ]]; then
|
||||
n=1
|
||||
elif [[ $oldval == "off" ]]; then
|
||||
if [[ $oldval == "off" ]]; then
|
||||
n=0
|
||||
else
|
||||
n=1
|
||||
fi
|
||||
log_note "$user zfs set $perm=${modes[$n]} $fs"
|
||||
user_run $user zfs set $perm=${modes[$n]} $fs
|
||||
|
53
tests/zfs-tests/tests/functional/xattr/xattr_014_pos.ksh
Executable file
53
tests/zfs-tests/tests/functional/xattr/xattr_014_pos.ksh
Executable file
@ -0,0 +1,53 @@
|
||||
#!/bin/ksh -p
|
||||
# SPDX-License-Identifier: CDDL-1.0
|
||||
#
|
||||
# CDDL HEADER START
|
||||
#
|
||||
# The contents of this file are subject to the terms of the
|
||||
# Common Development and Distribution License (the "License").
|
||||
# You may not use this file except in compliance with the License.
|
||||
#
|
||||
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
# or https://opensource.org/licenses/CDDL-1.0.
|
||||
# See the License for the specific language governing permissions
|
||||
# and limitations under the License.
|
||||
#
|
||||
# When distributing Covered Code, include this CDDL HEADER in each
|
||||
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
# If applicable, add the following below this CDDL HEADER, with the
|
||||
# fields enclosed by brackets "[]" replaced with your own identifying
|
||||
# information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
#
|
||||
# CDDL HEADER END
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright (c) 2025 by Klara, Inc.
|
||||
#
|
||||
|
||||
. $STF_SUITE/include/libtest.shlib
|
||||
. $STF_SUITE/tests/functional/xattr/xattr_common.kshlib
|
||||
|
||||
#
|
||||
# DESCRIPTION:
|
||||
# The default xattr should be shown as 'sa', not 'on', for clarity.
|
||||
#
|
||||
# STRATEGY:
|
||||
# 1. Create a filesystem.
|
||||
# 2. Verify that the xattra is shown as 'sa'.
|
||||
# 3. Manually set the value to 'dir', 'sa', 'on', and 'off'.
|
||||
# 4. Verify that it is shown as 'dir', 'sa', 'sa', and 'off.
|
||||
#
|
||||
|
||||
log_assert "The default and specific xattr values are displayed correctly."
|
||||
|
||||
set -A args "dir" "sa" "on" "off"
|
||||
set -A display "dir" "sa" "sa" "off"
|
||||
|
||||
log_must eval "[[ 'sa' == '$(zfs get -Hpo value xattr $TESTPOOL)' ]]"
|
||||
|
||||
for i in `seq 0 3`; do
|
||||
log_must zfs set xattr="${args[$i]}" $TESTPOOL
|
||||
log_must eval "[[ '${display[$i]}' == '$(zfs get -Hpo value xattr $TESTPOOL)' ]]"
|
||||
done
|
||||
log_pass "The default and specific xattr values are displayed correctly."
|
Loading…
Reference in New Issue
Block a user