mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
Compare commits
87 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fb6d532066 | |||
| 3ad8826585 | |||
| 00a3821020 | |||
| 85c6fd4058 | |||
| 34c8d4d4fd | |||
| 07ce4ad6bf | |||
| 2f21b169af | |||
| e54eef24c6 | |||
| 4a0d86afc3 | |||
| 57da499afd | |||
| f392c4073a | |||
| d1ee3d611d | |||
| dfece78a42 | |||
| 0bc841fb59 | |||
| 6b33ae072c | |||
| 53a55390fb | |||
| bc42a2fb54 | |||
| dffe59c415 | |||
| 11574a7934 | |||
| 35252ae0fd | |||
| 38f6f3ada1 | |||
| 3271604242 | |||
| 0db66111d3 | |||
| 71d407cc39 | |||
| a9dc1166b6 | |||
| 5f465d1515 | |||
| 72bf91dfdb | |||
| e5f191d760 | |||
| da1cbd869b | |||
| 4b849db210 | |||
| e68922faaa | |||
| b8bf99cca9 | |||
| 73ab3bd088 | |||
| bb1dd98bcc | |||
| 94a830adf6 | |||
| 8e5298f0ad | |||
| b4481996bd | |||
| 478c5b4f3f | |||
| f8f3cac084 | |||
| 12a031a3f5 | |||
| 9e41d5d05c | |||
| ae75a78ba3 | |||
| e1bc32f710 | |||
| 74da5eb468 | |||
| d96360b7f2 | |||
| d99134be83 | |||
| a339bd791a | |||
| 1ca531971f | |||
| 77b0c6f040 | |||
| eb62221ff0 | |||
| a3169da877 | |||
| a93c30a2f2 | |||
| ae0d644269 | |||
| c8a3c74556 | |||
| a449d8bab0 | |||
| a4f82db53d | |||
| 92fc218205 | |||
| adf428cbef | |||
| cb28c0b770 | |||
| c74a17a498 | |||
| 9b7f7f02e9 | |||
| cb115edfc6 | |||
| 0ee7a08627 | |||
| 5ee79af41f | |||
| feb0fa6b38 | |||
| 7c0618bdb7 | |||
| 3ff9e4f8ac | |||
| 211868b5d0 | |||
| e45ca514e8 | |||
| f52d9b6f42 | |||
| 837e426c1f | |||
| 426d07d64c | |||
| 692f78045e | |||
| 245850b66c | |||
| 1abf68b7ae | |||
| 846a4cc089 | |||
| e01e3a4e12 | |||
| 6e79bcd356 | |||
| ef2156c66e | |||
| f28cd347c4 | |||
| c12b5829e1 | |||
| 425f7895dd | |||
| d91778e31f | |||
| cb549c7425 | |||
| f9a2d94c95 | |||
| 6af79c92dd | |||
| c5bbd80cb9 |
@@ -1,10 +1,10 @@
|
||||
Meta: 1
|
||||
Name: zfs
|
||||
Branch: 1.0
|
||||
Version: 2.1.12
|
||||
Version: 2.1.15
|
||||
Release: 1
|
||||
Release-Tags: relext
|
||||
License: CDDL
|
||||
Author: OpenZFS
|
||||
Linux-Maximum: 6.3
|
||||
Linux-Maximum: 6.7
|
||||
Linux-Minimum: 3.10
|
||||
|
||||
+1
-1
@@ -4815,7 +4815,7 @@ dump_label(const char *dev)
|
||||
if (nvlist_size(config, &size, NV_ENCODE_XDR) != 0)
|
||||
size = buflen;
|
||||
|
||||
/* If the device is a cache device clear the header. */
|
||||
/* If the device is a cache device read the header. */
|
||||
if (!read_l2arc_header) {
|
||||
if (nvlist_lookup_uint64(config,
|
||||
ZPOOL_CONFIG_POOL_STATE, &l2cache) == 0 &&
|
||||
|
||||
@@ -141,6 +141,17 @@ zfs_unavail_pool(zpool_handle_t *zhp, void *data)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Write an array of strings to the zed log
|
||||
*/
|
||||
static void lines_to_zed_log_msg(char **lines, int lines_cnt)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < lines_cnt; i++) {
|
||||
zed_log_msg(LOG_INFO, "%s", lines[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Two stage replace on Linux
|
||||
* since we get disk notifications
|
||||
@@ -195,6 +206,8 @@ zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled)
|
||||
boolean_t is_mpath_wholedisk = B_FALSE;
|
||||
uint_t c;
|
||||
vdev_stat_t *vs;
|
||||
char **lines = NULL;
|
||||
int lines_cnt = 0;
|
||||
|
||||
if (nvlist_lookup_string(vdev, ZPOOL_CONFIG_PATH, &path) != 0)
|
||||
return;
|
||||
@@ -209,8 +222,12 @@ zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled)
|
||||
}
|
||||
|
||||
(void) nvlist_lookup_string(vdev, ZPOOL_CONFIG_PHYS_PATH, &physpath);
|
||||
|
||||
update_vdev_config_dev_sysfs_path(vdev, path,
|
||||
ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH);
|
||||
(void) nvlist_lookup_string(vdev, ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH,
|
||||
&enc_sysfs_path);
|
||||
|
||||
(void) nvlist_lookup_uint64(vdev, ZPOOL_CONFIG_WHOLE_DISK, &wholedisk);
|
||||
(void) nvlist_lookup_uint64(vdev, ZPOOL_CONFIG_OFFLINE, &offline);
|
||||
(void) nvlist_lookup_uint64(vdev, ZPOOL_CONFIG_FAULTED, &faulted);
|
||||
@@ -377,6 +394,22 @@ zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled)
|
||||
|
||||
if (is_mpath_wholedisk) {
|
||||
/* Don't label device mapper or multipath disks. */
|
||||
zed_log_msg(LOG_INFO,
|
||||
" it's a multipath wholedisk, don't label");
|
||||
if (zpool_prepare_disk(zhp, vdev, "autoreplace", &lines,
|
||||
&lines_cnt) != 0) {
|
||||
zed_log_msg(LOG_INFO,
|
||||
" zpool_prepare_disk: could not "
|
||||
"prepare '%s' (%s)", fullpath,
|
||||
libzfs_error_description(g_zfshdl));
|
||||
if (lines_cnt > 0) {
|
||||
zed_log_msg(LOG_INFO,
|
||||
" zfs_prepare_disk output:");
|
||||
lines_to_zed_log_msg(lines, lines_cnt);
|
||||
}
|
||||
libzfs_free_str_array(lines, lines_cnt);
|
||||
return;
|
||||
}
|
||||
} else if (!labeled) {
|
||||
/*
|
||||
* we're auto-replacing a raw disk, so label it first
|
||||
@@ -399,10 +432,18 @@ zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled)
|
||||
* If this is a request to label a whole disk, then attempt to
|
||||
* write out the label.
|
||||
*/
|
||||
if (zpool_label_disk(g_zfshdl, zhp, leafname) != 0) {
|
||||
zed_log_msg(LOG_INFO, " zpool_label_disk: could not "
|
||||
if (zpool_prepare_and_label_disk(g_zfshdl, zhp, leafname,
|
||||
vdev, "autoreplace", &lines, &lines_cnt) != 0) {
|
||||
zed_log_msg(LOG_INFO,
|
||||
" zpool_prepare_and_label_disk: could not "
|
||||
"label '%s' (%s)", leafname,
|
||||
libzfs_error_description(g_zfshdl));
|
||||
if (lines_cnt > 0) {
|
||||
zed_log_msg(LOG_INFO,
|
||||
" zfs_prepare_disk output:");
|
||||
lines_to_zed_log_msg(lines, lines_cnt);
|
||||
}
|
||||
libzfs_free_str_array(lines, lines_cnt);
|
||||
|
||||
(void) zpool_vdev_online(zhp, fullpath,
|
||||
ZFS_ONLINE_FORCEFAULT, &newstate);
|
||||
@@ -457,6 +498,8 @@ zfs_process_add(zpool_handle_t *zhp, nvlist_t *vdev, boolean_t labeled)
|
||||
DEV_BYID_PATH, new_devid);
|
||||
}
|
||||
|
||||
libzfs_free_str_array(lines, lines_cnt);
|
||||
|
||||
/*
|
||||
* Construct the root vdev to pass to zpool_vdev_attach(). While adding
|
||||
* the entire vdev structure is harmless, we construct a reduced set of
|
||||
@@ -597,8 +640,6 @@ zfs_iter_vdev(zpool_handle_t *zhp, nvlist_t *nvl, void *data)
|
||||
*/
|
||||
if (nvlist_lookup_string(nvl, dp->dd_prop, &path) != 0 ||
|
||||
strcmp(dp->dd_compare, path) != 0) {
|
||||
zed_log_msg(LOG_INFO, " %s: no match (%s != vdev %s)",
|
||||
__func__, dp->dd_compare, path);
|
||||
return;
|
||||
}
|
||||
if (dp->dd_new_vdev_guid != 0 && dp->dd_new_vdev_guid != guid) {
|
||||
|
||||
@@ -415,6 +415,11 @@ zfs_retire_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
|
||||
FM_EREPORT_PAYLOAD_ZFS_VDEV_GUID, &vdev_guid) != 0)
|
||||
return;
|
||||
|
||||
if (vdev_guid == 0) {
|
||||
fmd_hdl_debug(hdl, "Got a zero GUID");
|
||||
return;
|
||||
}
|
||||
|
||||
if (spare) {
|
||||
int nspares = find_and_remove_spares(zhdl, vdev_guid);
|
||||
fmd_hdl_debug(hdl, "%d spares removed", nspares);
|
||||
|
||||
@@ -21,6 +21,7 @@ dist_zedexec_SCRIPTS = \
|
||||
scrub_finish-notify.sh \
|
||||
statechange-led.sh \
|
||||
statechange-notify.sh \
|
||||
statechange-slot_off.sh \
|
||||
vdev_clear-led.sh \
|
||||
vdev_attach-led.sh \
|
||||
pool_import-led.sh \
|
||||
@@ -39,6 +40,7 @@ zedconfdefaults = \
|
||||
scrub_finish-notify.sh \
|
||||
statechange-led.sh \
|
||||
statechange-notify.sh \
|
||||
statechange-slot_off.sh \
|
||||
vdev_clear-led.sh \
|
||||
vdev_attach-led.sh \
|
||||
pool_import-led.sh \
|
||||
|
||||
Executable
+64
@@ -0,0 +1,64 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC3014,SC2154,SC2086,SC2034
|
||||
#
|
||||
# Turn off disk's enclosure slot if it becomes FAULTED.
|
||||
#
|
||||
# Bad SCSI disks can often "disappear and reappear" causing all sorts of chaos
|
||||
# as they flip between FAULTED and ONLINE. If
|
||||
# ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT is set in zed.rc, and the disk gets
|
||||
# FAULTED, then power down the slot via sysfs:
|
||||
#
|
||||
# /sys/class/enclosure/<enclosure>/<slot>/power_status
|
||||
#
|
||||
# We assume the user will be responsible for turning the slot back on again.
|
||||
#
|
||||
# Note that this script requires that your enclosure be supported by the
|
||||
# Linux SCSI Enclosure services (SES) driver. The script will do nothing
|
||||
# if you have no enclosure, or if your enclosure isn't supported.
|
||||
#
|
||||
# Exit codes:
|
||||
# 0: slot successfully powered off
|
||||
# 1: enclosure not available
|
||||
# 2: ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT disabled
|
||||
# 3: vdev was not FAULTED
|
||||
# 4: The enclosure sysfs path passed from ZFS does not exist
|
||||
# 5: Enclosure slot didn't actually turn off after we told it to
|
||||
|
||||
[ -f "${ZED_ZEDLET_DIR}/zed.rc" ] && . "${ZED_ZEDLET_DIR}/zed.rc"
|
||||
. "${ZED_ZEDLET_DIR}/zed-functions.sh"
|
||||
|
||||
if [ ! -d /sys/class/enclosure ] ; then
|
||||
# No JBOD enclosure or NVMe slots
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "${ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT}" != "1" ] ; then
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ "$ZEVENT_VDEV_STATE_STR" != "FAULTED" ] ; then
|
||||
exit 3
|
||||
fi
|
||||
|
||||
if [ ! -f "$ZEVENT_VDEV_ENC_SYSFS_PATH/power_status" ] ; then
|
||||
exit 4
|
||||
fi
|
||||
|
||||
# Turn off the slot and wait for sysfs to report that the slot is off.
|
||||
# It can take ~400ms on some enclosures and multiple retries may be needed.
|
||||
for i in $(seq 1 20) ; do
|
||||
echo "off" | tee "$ZEVENT_VDEV_ENC_SYSFS_PATH/power_status"
|
||||
|
||||
for j in $(seq 1 5) ; do
|
||||
if [ "$(cat $ZEVENT_VDEV_ENC_SYSFS_PATH/power_status)" == "off" ] ; then
|
||||
break 2
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
done
|
||||
|
||||
if [ "$(cat $ZEVENT_VDEV_ENC_SYSFS_PATH/power_status)" != "off" ] ; then
|
||||
exit 5
|
||||
fi
|
||||
|
||||
zed_log_msg "powered down slot $ZEVENT_VDEV_ENC_SYSFS_PATH for $ZEVENT_VDEV_PATH"
|
||||
@@ -143,3 +143,8 @@ ZED_SYSLOG_SUBCLASS_EXCLUDE="history_event"
|
||||
# Disabled by default, 1 to enable and 0 to disable.
|
||||
#ZED_SYSLOG_DISPLAY_GUIDS=1
|
||||
|
||||
##
|
||||
# Power off the drive's slot in the enclosure if it becomes FAULTED. This can
|
||||
# help silence misbehaving drives. This assumes your drive enclosure fully
|
||||
# supports slot power control via sysfs.
|
||||
#ZED_POWER_OFF_ENCLOSURE_SLOT_ON_FAULT=1
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "zed_strings.h"
|
||||
|
||||
#include "agents/zfs_agents.h"
|
||||
#include <libzutil.h>
|
||||
|
||||
#define MAXBUF 4096
|
||||
|
||||
@@ -907,6 +908,25 @@ _zed_event_add_time_strings(uint64_t eid, zed_strings_t *zsp, int64_t etime[])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_zed_event_update_enc_sysfs_path(nvlist_t *nvl)
|
||||
{
|
||||
char *vdev_path;
|
||||
|
||||
if (nvlist_lookup_string(nvl, FM_EREPORT_PAYLOAD_ZFS_VDEV_PATH,
|
||||
&vdev_path) != 0) {
|
||||
return; /* some other kind of event, ignore it */
|
||||
}
|
||||
|
||||
if (vdev_path == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
update_vdev_config_dev_sysfs_path(nvl, vdev_path,
|
||||
FM_EREPORT_PAYLOAD_ZFS_VDEV_ENC_SYSFS_PATH);
|
||||
}
|
||||
|
||||
/*
|
||||
* Service the next zevent, blocking until one is available.
|
||||
*/
|
||||
@@ -954,6 +974,17 @@ zed_event_service(struct zed_conf *zcp)
|
||||
zed_log_msg(LOG_WARNING,
|
||||
"Failed to lookup zevent class (eid=%llu)", eid);
|
||||
} else {
|
||||
/*
|
||||
* Special case: If we can dynamically detect an enclosure sysfs
|
||||
* path, then use that value rather than the one stored in the
|
||||
* vd->vdev_enc_sysfs_path. There have been rare cases where
|
||||
* vd->vdev_enc_sysfs_path becomes outdated. However, there
|
||||
* will be other times when we can not dynamically detect the
|
||||
* sysfs path (like if a disk disappears) and have to rely on
|
||||
* the old value for things like turning on the fault LED.
|
||||
*/
|
||||
_zed_event_update_enc_sysfs_path(nvl);
|
||||
|
||||
/* let internal modules see this event first */
|
||||
zfs_agent_post_event(class, NULL, nvl);
|
||||
|
||||
|
||||
+1
-1
@@ -535,7 +535,7 @@ usage(boolean_t requested)
|
||||
show_properties = B_TRUE;
|
||||
|
||||
if (show_properties) {
|
||||
(void) fprintf(fp,
|
||||
(void) fprintf(fp, "%s",
|
||||
gettext("\nThe following properties are supported:\n"));
|
||||
|
||||
(void) fprintf(fp, "\n\t%-14s %s %s %s\n\n",
|
||||
|
||||
@@ -116,3 +116,24 @@ after_zpool_upgrade(zpool_handle_t *zhp)
|
||||
"details.\n"), zpool_get_name(zhp));
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
zpool_power_current_state(zpool_handle_t *zhp, char *vdev)
|
||||
{
|
||||
|
||||
(void) zhp;
|
||||
(void) vdev;
|
||||
/* Enclosure slot power not supported on FreeBSD yet */
|
||||
return (-1);
|
||||
}
|
||||
|
||||
int
|
||||
zpool_power(zpool_handle_t *zhp, char *vdev, boolean_t turn_on)
|
||||
{
|
||||
|
||||
(void) zhp;
|
||||
(void) vdev;
|
||||
(void) turn_on;
|
||||
/* Enclosure slot power not supported on FreeBSD yet */
|
||||
return (ENOTSUP);
|
||||
}
|
||||
|
||||
@@ -410,3 +410,258 @@ void
|
||||
after_zpool_upgrade(zpool_handle_t *zhp)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* Read from a sysfs file and return an allocated string. Removes
|
||||
* the newline from the end of the string if there is one.
|
||||
*
|
||||
* Returns a string on success (which must be freed), or NULL on error.
|
||||
*/
|
||||
static char *zpool_sysfs_gets(char *path)
|
||||
{
|
||||
int fd;
|
||||
struct stat statbuf;
|
||||
char *buf = NULL;
|
||||
ssize_t count = 0;
|
||||
fd = open(path, O_RDONLY);
|
||||
if (fd < 0)
|
||||
return (NULL);
|
||||
|
||||
if (fstat(fd, &statbuf) != 0) {
|
||||
close(fd);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
buf = calloc(sizeof (*buf), statbuf.st_size + 1);
|
||||
if (buf == NULL) {
|
||||
close(fd);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Note, we can read less bytes than st_size, and that's ok. Sysfs
|
||||
* files will report their size is 4k even if they only return a small
|
||||
* string.
|
||||
*/
|
||||
count = read(fd, buf, statbuf.st_size);
|
||||
if (count < 0) {
|
||||
/* Error doing read() or we overran the buffer */
|
||||
close(fd);
|
||||
free(buf);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/* Remove trailing newline */
|
||||
if (buf[count - 1] == '\n')
|
||||
buf[count - 1] = 0;
|
||||
|
||||
close(fd);
|
||||
|
||||
return (buf);
|
||||
}
|
||||
|
||||
/*
|
||||
* Write a string to a sysfs file.
|
||||
*
|
||||
* Returns 0 on success, non-zero otherwise.
|
||||
*/
|
||||
static int zpool_sysfs_puts(char *path, char *str)
|
||||
{
|
||||
FILE *file;
|
||||
|
||||
file = fopen(path, "w");
|
||||
if (!file) {
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (fputs(str, file) < 0) {
|
||||
fclose(file);
|
||||
return (-2);
|
||||
}
|
||||
fclose(file);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* Given a vdev nvlist_t, rescan its enclosure sysfs path */
|
||||
static void
|
||||
rescan_vdev_config_dev_sysfs_path(nvlist_t *vdev_nv)
|
||||
{
|
||||
update_vdev_config_dev_sysfs_path(vdev_nv,
|
||||
fnvlist_lookup_string(vdev_nv, ZPOOL_CONFIG_PATH),
|
||||
ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH);
|
||||
}
|
||||
|
||||
/*
|
||||
* Given a power string: "on", "off", "1", or "0", return 0 if it's an
|
||||
* off value, 1 if it's an on value, and -1 if the value is unrecognized.
|
||||
*/
|
||||
static int zpool_power_parse_value(char *str)
|
||||
{
|
||||
if ((strcmp(str, "off") == 0) || (strcmp(str, "0") == 0))
|
||||
return (0);
|
||||
|
||||
if ((strcmp(str, "on") == 0) || (strcmp(str, "1") == 0))
|
||||
return (1);
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Given a vdev string return an allocated string containing the sysfs path to
|
||||
* its power control file. Also do a check if the power control file really
|
||||
* exists and has correct permissions.
|
||||
*
|
||||
* Example returned strings:
|
||||
*
|
||||
* /sys/class/enclosure/0:0:122:0/10/power_status
|
||||
* /sys/bus/pci/slots/10/power
|
||||
*
|
||||
* Returns allocated string on success (which must be freed), NULL on failure.
|
||||
*/
|
||||
static char *
|
||||
zpool_power_sysfs_path(zpool_handle_t *zhp, char *vdev)
|
||||
{
|
||||
char *enc_sysfs_dir = NULL;
|
||||
char *path = NULL;
|
||||
nvlist_t *vdev_nv = zpool_find_vdev(zhp, vdev, NULL, NULL, NULL);
|
||||
|
||||
if (vdev_nv == NULL) {
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/* Make sure we're getting the updated enclosure sysfs path */
|
||||
rescan_vdev_config_dev_sysfs_path(vdev_nv);
|
||||
|
||||
if (nvlist_lookup_string(vdev_nv, ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH,
|
||||
&enc_sysfs_dir) != 0) {
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if (asprintf(&path, "%s/power_status", enc_sysfs_dir) == -1)
|
||||
return (NULL);
|
||||
|
||||
if (access(path, W_OK) != 0) {
|
||||
free(path);
|
||||
path = NULL;
|
||||
/* No HDD 'power_control' file, maybe it's NVMe? */
|
||||
if (asprintf(&path, "%s/power", enc_sysfs_dir) == -1) {
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if (access(path, R_OK | W_OK) != 0) {
|
||||
/* Not NVMe either */
|
||||
free(path);
|
||||
return (NULL);
|
||||
}
|
||||
}
|
||||
|
||||
return (path);
|
||||
}
|
||||
|
||||
/*
|
||||
* Given a path to a sysfs power control file, return B_TRUE if you should use
|
||||
* "on/off" words to control it, or B_FALSE otherwise ("0/1" to control).
|
||||
*/
|
||||
static boolean_t
|
||||
zpool_power_use_word(char *sysfs_path)
|
||||
{
|
||||
if (strcmp(&sysfs_path[strlen(sysfs_path) - strlen("power_status")],
|
||||
"power_status") == 0) {
|
||||
return (B_TRUE);
|
||||
}
|
||||
return (B_FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check the sysfs power control value for a vdev.
|
||||
*
|
||||
* Returns:
|
||||
* 0 - Power is off
|
||||
* 1 - Power is on
|
||||
* -1 - Error or unsupported
|
||||
*/
|
||||
int
|
||||
zpool_power_current_state(zpool_handle_t *zhp, char *vdev)
|
||||
{
|
||||
char *val;
|
||||
int rc;
|
||||
|
||||
char *path = zpool_power_sysfs_path(zhp, vdev);
|
||||
if (path == NULL)
|
||||
return (-1);
|
||||
|
||||
val = zpool_sysfs_gets(path);
|
||||
if (val == NULL) {
|
||||
free(path);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
rc = zpool_power_parse_value(val);
|
||||
free(val);
|
||||
free(path);
|
||||
return (rc);
|
||||
}
|
||||
|
||||
/*
|
||||
* Turn on or off the slot to a device
|
||||
*
|
||||
* Device path is the full path to the device (like /dev/sda or /dev/sda1).
|
||||
*
|
||||
* Return code:
|
||||
* 0: Success
|
||||
* ENOTSUP: Power control not supported for OS
|
||||
* EBADSLT: Couldn't read current power state
|
||||
* ENOENT: No sysfs path to power control
|
||||
* EIO: Couldn't write sysfs power value
|
||||
* EBADE: Sysfs power value didn't change
|
||||
*/
|
||||
int
|
||||
zpool_power(zpool_handle_t *zhp, char *vdev, boolean_t turn_on)
|
||||
{
|
||||
char *sysfs_path;
|
||||
const char *val;
|
||||
int rc;
|
||||
int timeout_ms;
|
||||
|
||||
rc = zpool_power_current_state(zhp, vdev);
|
||||
if (rc == -1) {
|
||||
return (EBADSLT);
|
||||
}
|
||||
|
||||
/* Already correct value? */
|
||||
if (rc == (int)turn_on)
|
||||
return (0);
|
||||
|
||||
sysfs_path = zpool_power_sysfs_path(zhp, vdev);
|
||||
if (sysfs_path == NULL)
|
||||
return (ENOENT);
|
||||
|
||||
if (zpool_power_use_word(sysfs_path)) {
|
||||
val = turn_on ? "on" : "off";
|
||||
} else {
|
||||
val = turn_on ? "1" : "0";
|
||||
}
|
||||
|
||||
rc = zpool_sysfs_puts(sysfs_path, (char *)val);
|
||||
|
||||
free(sysfs_path);
|
||||
if (rc != 0) {
|
||||
return (EIO);
|
||||
}
|
||||
|
||||
/*
|
||||
* Wait up to 30 seconds for sysfs power value to change after
|
||||
* writing it.
|
||||
*/
|
||||
timeout_ms = zpool_getenv_int("ZPOOL_POWER_ON_SLOT_TIMEOUT_MS", 30000);
|
||||
for (int i = 0; i < MAX(1, timeout_ms / 200); i++) {
|
||||
rc = zpool_power_current_state(zhp, vdev);
|
||||
if (rc == (int)turn_on)
|
||||
return (0); /* success */
|
||||
|
||||
fsleep(0.200); /* 200ms */
|
||||
}
|
||||
|
||||
/* sysfs value never changed */
|
||||
return (EBADE);
|
||||
}
|
||||
|
||||
+10
-2
@@ -32,10 +32,18 @@ for i in $scripts ; do
|
||||
val=""
|
||||
case $i in
|
||||
enc)
|
||||
val=$(ls "$VDEV_ENC_SYSFS_PATH/../../" 2>/dev/null)
|
||||
if echo "$VDEV_ENC_SYSFS_PATH" | grep -q '/sys/bus/pci/slots' ; then
|
||||
val="$VDEV_ENC_SYSFS_PATH"
|
||||
else
|
||||
val="$(ls """$VDEV_ENC_SYSFS_PATH/../../""" 2>/dev/null)"
|
||||
fi
|
||||
;;
|
||||
slot)
|
||||
val=$(cat "$VDEV_ENC_SYSFS_PATH/slot" 2>/dev/null)
|
||||
if echo "$VDEV_ENC_SYSFS_PATH" | grep -q '/sys/bus/pci/slots' ; then
|
||||
val="$(basename """$VDEV_ENC_SYSFS_PATH""")"
|
||||
else
|
||||
val="$(cat """$VDEV_ENC_SYSFS_PATH/slot""" 2>/dev/null)"
|
||||
fi
|
||||
;;
|
||||
encdev)
|
||||
val=$(ls "$VDEV_ENC_SYSFS_PATH/../device/scsi_generic" 2>/dev/null)
|
||||
|
||||
+12
-28
@@ -439,39 +439,23 @@ static void
|
||||
vdev_run_cmd(vdev_cmd_data_t *data, char *cmd)
|
||||
{
|
||||
int rc;
|
||||
char *argv[2] = {cmd, 0};
|
||||
char *env[5] = {"PATH=/bin:/sbin:/usr/bin:/usr/sbin", NULL, NULL, NULL,
|
||||
NULL};
|
||||
char *argv[2] = {cmd};
|
||||
char **env;
|
||||
char **lines = NULL;
|
||||
int lines_cnt = 0;
|
||||
int i;
|
||||
|
||||
/* Setup our custom environment variables */
|
||||
rc = asprintf(&env[1], "VDEV_PATH=%s",
|
||||
data->path ? data->path : "");
|
||||
if (rc == -1) {
|
||||
env[1] = NULL;
|
||||
env = zpool_vdev_script_alloc_env(data->pool, data->path, data->upath,
|
||||
data->vdev_enc_sysfs_path, NULL, NULL);
|
||||
if (env == NULL)
|
||||
goto out;
|
||||
}
|
||||
|
||||
rc = asprintf(&env[2], "VDEV_UPATH=%s",
|
||||
data->upath ? data->upath : "");
|
||||
if (rc == -1) {
|
||||
env[2] = NULL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
rc = asprintf(&env[3], "VDEV_ENC_SYSFS_PATH=%s",
|
||||
data->vdev_enc_sysfs_path ?
|
||||
data->vdev_enc_sysfs_path : "");
|
||||
if (rc == -1) {
|
||||
env[3] = NULL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Run the command */
|
||||
rc = libzfs_run_process_get_stdout_nopath(cmd, argv, env, &lines,
|
||||
&lines_cnt);
|
||||
|
||||
zpool_vdev_script_free_env(env);
|
||||
|
||||
if (rc != 0)
|
||||
goto out;
|
||||
|
||||
@@ -483,10 +467,6 @@ vdev_run_cmd(vdev_cmd_data_t *data, char *cmd)
|
||||
out:
|
||||
if (lines != NULL)
|
||||
libzfs_free_str_array(lines, lines_cnt);
|
||||
|
||||
/* Start with i = 1 since env[0] was statically allocated */
|
||||
for (i = 1; i < ARRAY_SIZE(env); i++)
|
||||
free(env[i]);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -571,6 +551,10 @@ for_each_vdev_run_cb(void *zhp_data, nvlist_t *nv, void *cb_vcdl)
|
||||
if (nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) != 0)
|
||||
return (1);
|
||||
|
||||
/* Make sure we're getting the updated enclosure sysfs path */
|
||||
update_vdev_config_dev_sysfs_path(nv, path,
|
||||
ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH);
|
||||
|
||||
nvlist_lookup_string(nv, ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH,
|
||||
&vdev_enc_sysfs_path);
|
||||
|
||||
|
||||
+266
-35
@@ -345,7 +345,7 @@ get_usage(zpool_help_t idx)
|
||||
return (gettext("\tattach [-fsw] [-o property=value] "
|
||||
"<pool> <device> <new-device>\n"));
|
||||
case HELP_CLEAR:
|
||||
return (gettext("\tclear [-nF] <pool> [device]\n"));
|
||||
return (gettext("\tclear [[--power]|[-nF]] <pool> [device]\n"));
|
||||
case HELP_CREATE:
|
||||
return (gettext("\tcreate [-fnd] [-o property=value] ... \n"
|
||||
"\t [-O file-system-property=value] ... \n"
|
||||
@@ -381,9 +381,11 @@ get_usage(zpool_help_t idx)
|
||||
"[-T d|u] [pool] ... \n"
|
||||
"\t [interval [count]]\n"));
|
||||
case HELP_OFFLINE:
|
||||
return (gettext("\toffline [-f] [-t] <pool> <device> ...\n"));
|
||||
return (gettext("\toffline [--power]|[[-f][-t]] <pool> "
|
||||
"<device> ...\n"));
|
||||
case HELP_ONLINE:
|
||||
return (gettext("\tonline [-e] <pool> <device> ...\n"));
|
||||
return (gettext("\tonline [--power][-e] <pool> <device> "
|
||||
"...\n"));
|
||||
case HELP_REPLACE:
|
||||
return (gettext("\treplace [-fsw] [-o property=value] "
|
||||
"<pool> <device> [new-device]\n"));
|
||||
@@ -402,7 +404,7 @@ get_usage(zpool_help_t idx)
|
||||
return (gettext("\ttrim [-dw] [-r <rate>] [-c | -s] <pool> "
|
||||
"[<device> ...]\n"));
|
||||
case HELP_STATUS:
|
||||
return (gettext("\tstatus [-c [script1,script2,...]] "
|
||||
return (gettext("\tstatus [--power] [-c [script1,script2,...]] "
|
||||
"[-igLpPstvxD] [-T d|u] [pool] ... \n"
|
||||
"\t [interval [count]]\n"));
|
||||
case HELP_UPGRADE:
|
||||
@@ -485,6 +487,77 @@ print_prop_cb(int prop, void *cb)
|
||||
return (ZPROP_CONT);
|
||||
}
|
||||
|
||||
/*
|
||||
* Given a leaf vdev name like 'L5' return its VDEV_CONFIG_PATH like
|
||||
* '/dev/disk/by-vdev/L5'.
|
||||
*/
|
||||
static const char *
|
||||
vdev_name_to_path(zpool_handle_t *zhp, char *vdev)
|
||||
{
|
||||
nvlist_t *vdev_nv = zpool_find_vdev(zhp, vdev, NULL, NULL, NULL);
|
||||
if (vdev_nv == NULL) {
|
||||
return (NULL);
|
||||
}
|
||||
return (fnvlist_lookup_string(vdev_nv, ZPOOL_CONFIG_PATH));
|
||||
}
|
||||
|
||||
static int
|
||||
zpool_power_on(zpool_handle_t *zhp, char *vdev)
|
||||
{
|
||||
return (zpool_power(zhp, vdev, B_TRUE));
|
||||
}
|
||||
|
||||
static int
|
||||
zpool_power_on_and_disk_wait(zpool_handle_t *zhp, char *vdev)
|
||||
{
|
||||
int rc;
|
||||
|
||||
rc = zpool_power_on(zhp, vdev);
|
||||
if (rc != 0)
|
||||
return (rc);
|
||||
|
||||
zpool_disk_wait(vdev_name_to_path(zhp, vdev));
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
zpool_power_on_pool_and_wait_for_devices(zpool_handle_t *zhp)
|
||||
{
|
||||
nvlist_t *nv;
|
||||
const char *path = NULL;
|
||||
int rc;
|
||||
|
||||
/* Power up all the devices first */
|
||||
FOR_EACH_REAL_LEAF_VDEV(zhp, nv) {
|
||||
path = fnvlist_lookup_string(nv, ZPOOL_CONFIG_PATH);
|
||||
if (path != NULL) {
|
||||
rc = zpool_power_on(zhp, (char *)path);
|
||||
if (rc != 0) {
|
||||
return (rc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Wait for their devices to show up. Since we powered them on
|
||||
* at roughly the same time, they should all come online around
|
||||
* the same time.
|
||||
*/
|
||||
FOR_EACH_REAL_LEAF_VDEV(zhp, nv) {
|
||||
path = fnvlist_lookup_string(nv, ZPOOL_CONFIG_PATH);
|
||||
zpool_disk_wait(path);
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
zpool_power_off(zpool_handle_t *zhp, char *vdev)
|
||||
{
|
||||
return (zpool_power(zhp, vdev, B_FALSE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Display usage message. If we're inside a command, display only the usage for
|
||||
* that command. Otherwise, iterate over the entire command table and display
|
||||
@@ -519,7 +592,7 @@ usage(boolean_t requested)
|
||||
(strcmp(current_command->name, "get") == 0) ||
|
||||
(strcmp(current_command->name, "list") == 0))) {
|
||||
|
||||
(void) fprintf(fp,
|
||||
(void) fprintf(fp, "%s",
|
||||
gettext("\nthe following properties are supported:\n"));
|
||||
|
||||
(void) fprintf(fp, "\n\t%-19s %s %s\n\n",
|
||||
@@ -2054,11 +2127,13 @@ typedef struct status_cbdata {
|
||||
boolean_t cb_explain;
|
||||
boolean_t cb_first;
|
||||
boolean_t cb_dedup_stats;
|
||||
boolean_t cb_print_unhealthy;
|
||||
boolean_t cb_print_status;
|
||||
boolean_t cb_print_slow_ios;
|
||||
boolean_t cb_print_vdev_init;
|
||||
boolean_t cb_print_vdev_trim;
|
||||
vdev_cmd_data_list_t *vcdl;
|
||||
boolean_t cb_print_power;
|
||||
} status_cbdata_t;
|
||||
|
||||
/* Return 1 if string is NULL, empty, or whitespace; return 0 otherwise. */
|
||||
@@ -2251,6 +2326,35 @@ health_str_to_color(const char *health)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Called for each leaf vdev. Returns 0 if the vdev is healthy.
|
||||
* A vdev is unhealthy if any of the following are true:
|
||||
* 1) there are read, write, or checksum errors,
|
||||
* 2) its state is not ONLINE, or
|
||||
* 3) slow IO reporting was requested (-s) and there are slow IOs.
|
||||
*/
|
||||
static int
|
||||
vdev_health_check_cb(void *hdl_data, nvlist_t *nv, void *data)
|
||||
{
|
||||
status_cbdata_t *cb = data;
|
||||
vdev_stat_t *vs;
|
||||
uint_t vsc;
|
||||
(void) hdl_data;
|
||||
|
||||
if (nvlist_lookup_uint64_array(nv, ZPOOL_CONFIG_VDEV_STATS,
|
||||
(uint64_t **)&vs, &vsc) != 0)
|
||||
return (1);
|
||||
|
||||
if (vs->vs_checksum_errors || vs->vs_read_errors ||
|
||||
vs->vs_write_errors || vs->vs_state != VDEV_STATE_HEALTHY)
|
||||
return (1);
|
||||
|
||||
if (cb->cb_print_slow_ios && vs->vs_slow_ios)
|
||||
return (1);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Print out configuration state as requested by status_callback.
|
||||
*/
|
||||
@@ -2269,7 +2373,8 @@ print_status_config(zpool_handle_t *zhp, status_cbdata_t *cb, const char *name,
|
||||
const char *state;
|
||||
char *type;
|
||||
char *path = NULL;
|
||||
char *rcolor = NULL, *wcolor = NULL, *ccolor = NULL;
|
||||
char *rcolor = NULL, *wcolor = NULL, *ccolor = NULL,
|
||||
*scolor = NULL;
|
||||
|
||||
if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN,
|
||||
&child, &children) != 0)
|
||||
@@ -2296,6 +2401,15 @@ print_status_config(zpool_handle_t *zhp, status_cbdata_t *cb, const char *name,
|
||||
state = gettext("AVAIL");
|
||||
}
|
||||
|
||||
/*
|
||||
* If '-e' is specified then top-level vdevs and their children
|
||||
* can be pruned if all of their leaves are healthy.
|
||||
*/
|
||||
if (cb->cb_print_unhealthy && depth > 0 &&
|
||||
for_each_vdev_in_nvlist(nv, vdev_health_check_cb, cb) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
printf_color(health_str_to_color(state),
|
||||
"\t%*s%-*s %-8s", depth, "", cb->cb_namewidth - depth,
|
||||
name, state);
|
||||
@@ -2310,6 +2424,9 @@ print_status_config(zpool_handle_t *zhp, status_cbdata_t *cb, const char *name,
|
||||
if (vs->vs_checksum_errors)
|
||||
ccolor = ANSI_RED;
|
||||
|
||||
if (vs->vs_slow_ios)
|
||||
scolor = ANSI_BLUE;
|
||||
|
||||
if (cb->cb_literal) {
|
||||
printf(" ");
|
||||
printf_color(rcolor, "%5llu",
|
||||
@@ -2342,9 +2459,30 @@ print_status_config(zpool_handle_t *zhp, status_cbdata_t *cb, const char *name,
|
||||
}
|
||||
|
||||
if (cb->cb_literal)
|
||||
printf(" %5llu", (u_longlong_t)vs->vs_slow_ios);
|
||||
printf_color(scolor, " %5llu",
|
||||
(u_longlong_t)vs->vs_slow_ios);
|
||||
else
|
||||
printf(" %5s", rbuf);
|
||||
printf_color(scolor, " %5s", rbuf);
|
||||
}
|
||||
if (cb->cb_print_power) {
|
||||
if (children == 0) {
|
||||
/* Only leaf vdevs have physical slots */
|
||||
switch (zpool_power_current_state(zhp, (char *)
|
||||
fnvlist_lookup_string(nv,
|
||||
ZPOOL_CONFIG_PATH))) {
|
||||
case 0:
|
||||
printf_color(ANSI_RED, " %5s",
|
||||
gettext("off"));
|
||||
break;
|
||||
case 1:
|
||||
printf(" %5s", gettext("on"));
|
||||
break;
|
||||
default:
|
||||
printf(" %5s", "-");
|
||||
}
|
||||
} else {
|
||||
printf(" %5s", "-");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5385,19 +5523,6 @@ get_interval_count_filter_guids(int *argc, char **argv, float *interval,
|
||||
interval, count);
|
||||
}
|
||||
|
||||
/*
|
||||
* Floating point sleep(). Allows you to pass in a floating point value for
|
||||
* seconds.
|
||||
*/
|
||||
static void
|
||||
fsleep(float sec)
|
||||
{
|
||||
struct timespec req;
|
||||
req.tv_sec = floor(sec);
|
||||
req.tv_nsec = (sec - (float)req.tv_sec) * NANOSEC;
|
||||
nanosleep(&req, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Terminal height, in rows. Returns -1 if stdout is not connected to a TTY or
|
||||
* if we were unable to determine its size.
|
||||
@@ -6886,10 +7011,12 @@ zpool_do_split(int argc, char **argv)
|
||||
return (ret);
|
||||
}
|
||||
|
||||
|
||||
#define POWER_OPT 1024
|
||||
|
||||
/*
|
||||
* zpool online <pool> <device> ...
|
||||
* zpool online [--power] <pool> <device> ...
|
||||
*
|
||||
* --power: Power on the enclosure slot to the drive (if possible)
|
||||
*/
|
||||
int
|
||||
zpool_do_online(int argc, char **argv)
|
||||
@@ -6900,13 +7027,21 @@ zpool_do_online(int argc, char **argv)
|
||||
int ret = 0;
|
||||
vdev_state_t newstate;
|
||||
int flags = 0;
|
||||
boolean_t is_power_on = B_FALSE;
|
||||
struct option long_options[] = {
|
||||
{"power", no_argument, NULL, POWER_OPT},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
/* check options */
|
||||
while ((c = getopt(argc, argv, "e")) != -1) {
|
||||
while ((c = getopt_long(argc, argv, "e", long_options, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'e':
|
||||
flags |= ZFS_ONLINE_EXPAND;
|
||||
break;
|
||||
case POWER_OPT:
|
||||
is_power_on = B_TRUE;
|
||||
break;
|
||||
case '?':
|
||||
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
|
||||
optopt);
|
||||
@@ -6914,6 +7049,9 @@ zpool_do_online(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (libzfs_envvar_is_set("ZPOOL_AUTO_POWER_ON_SLOT"))
|
||||
is_power_on = B_TRUE;
|
||||
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
@@ -6935,6 +7073,18 @@ zpool_do_online(int argc, char **argv)
|
||||
for (i = 1; i < argc; i++) {
|
||||
vdev_state_t oldstate;
|
||||
boolean_t avail_spare, l2cache;
|
||||
int rc;
|
||||
|
||||
if (is_power_on) {
|
||||
rc = zpool_power_on_and_disk_wait(zhp, argv[i]);
|
||||
if (rc == ENOTSUP) {
|
||||
(void) fprintf(stderr,
|
||||
gettext("Power control not supported\n"));
|
||||
}
|
||||
if (rc != 0)
|
||||
return (rc);
|
||||
}
|
||||
|
||||
nvlist_t *tgt = zpool_find_vdev(zhp, argv[i], &avail_spare,
|
||||
&l2cache, NULL);
|
||||
if (tgt == NULL) {
|
||||
@@ -6980,12 +7130,15 @@ zpool_do_online(int argc, char **argv)
|
||||
}
|
||||
|
||||
/*
|
||||
* zpool offline [-ft] <pool> <device> ...
|
||||
* zpool offline [-ft]|[--power] <pool> <device> ...
|
||||
*
|
||||
*
|
||||
* -f Force the device into a faulted state.
|
||||
*
|
||||
* -t Only take the device off-line temporarily. The offline/faulted
|
||||
* state will not be persistent across reboots.
|
||||
*
|
||||
* --power Power off the enclosure slot to the drive (if possible)
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
@@ -6997,9 +7150,15 @@ zpool_do_offline(int argc, char **argv)
|
||||
int ret = 0;
|
||||
boolean_t istmp = B_FALSE;
|
||||
boolean_t fault = B_FALSE;
|
||||
boolean_t is_power_off = B_FALSE;
|
||||
|
||||
struct option long_options[] = {
|
||||
{"power", no_argument, NULL, POWER_OPT},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
/* check options */
|
||||
while ((c = getopt(argc, argv, "ft")) != -1) {
|
||||
while ((c = getopt_long(argc, argv, "ft", long_options, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'f':
|
||||
fault = B_TRUE;
|
||||
@@ -7007,6 +7166,9 @@ zpool_do_offline(int argc, char **argv)
|
||||
case 't':
|
||||
istmp = B_TRUE;
|
||||
break;
|
||||
case POWER_OPT:
|
||||
is_power_off = B_TRUE;
|
||||
break;
|
||||
case '?':
|
||||
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
|
||||
optopt);
|
||||
@@ -7014,6 +7176,20 @@ zpool_do_offline(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (is_power_off && fault) {
|
||||
(void) fprintf(stderr,
|
||||
gettext("-0 and -f cannot be used together\n"));
|
||||
usage(B_FALSE);
|
||||
return (1);
|
||||
}
|
||||
|
||||
if (is_power_off && istmp) {
|
||||
(void) fprintf(stderr,
|
||||
gettext("-0 and -t cannot be used together\n"));
|
||||
usage(B_FALSE);
|
||||
return (1);
|
||||
}
|
||||
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
@@ -7033,8 +7209,22 @@ zpool_do_offline(int argc, char **argv)
|
||||
return (1);
|
||||
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (fault) {
|
||||
uint64_t guid = zpool_vdev_path_to_guid(zhp, argv[i]);
|
||||
uint64_t guid = zpool_vdev_path_to_guid(zhp, argv[i]);
|
||||
if (is_power_off) {
|
||||
/*
|
||||
* Note: we have to power off first, then set REMOVED,
|
||||
* or else zpool_vdev_set_removed_state() returns
|
||||
* EAGAIN.
|
||||
*/
|
||||
ret = zpool_power_off(zhp, argv[i]);
|
||||
if (ret != 0) {
|
||||
(void) fprintf(stderr, "%s %s %d\n",
|
||||
gettext("unable to power off slot for"),
|
||||
argv[i], ret);
|
||||
}
|
||||
zpool_vdev_set_removed_state(zhp, guid, VDEV_AUX_NONE);
|
||||
|
||||
} else if (fault) {
|
||||
vdev_aux_t aux;
|
||||
if (istmp == B_FALSE) {
|
||||
/* Force the fault to persist across imports */
|
||||
@@ -7057,7 +7247,7 @@ zpool_do_offline(int argc, char **argv)
|
||||
}
|
||||
|
||||
/*
|
||||
* zpool clear <pool> [device]
|
||||
* zpool clear [-nF]|[--power] <pool> [device]
|
||||
*
|
||||
* Clear all errors associated with a pool or a particular device.
|
||||
*/
|
||||
@@ -7069,13 +7259,20 @@ zpool_do_clear(int argc, char **argv)
|
||||
boolean_t dryrun = B_FALSE;
|
||||
boolean_t do_rewind = B_FALSE;
|
||||
boolean_t xtreme_rewind = B_FALSE;
|
||||
boolean_t is_power_on = B_FALSE;
|
||||
uint32_t rewind_policy = ZPOOL_NO_REWIND;
|
||||
nvlist_t *policy = NULL;
|
||||
zpool_handle_t *zhp;
|
||||
char *pool, *device;
|
||||
|
||||
struct option long_options[] = {
|
||||
{"power", no_argument, NULL, POWER_OPT},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
/* check options */
|
||||
while ((c = getopt(argc, argv, "FnX")) != -1) {
|
||||
while ((c = getopt_long(argc, argv, "FnX", long_options,
|
||||
NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'F':
|
||||
do_rewind = B_TRUE;
|
||||
@@ -7086,6 +7283,9 @@ zpool_do_clear(int argc, char **argv)
|
||||
case 'X':
|
||||
xtreme_rewind = B_TRUE;
|
||||
break;
|
||||
case POWER_OPT:
|
||||
is_power_on = B_TRUE;
|
||||
break;
|
||||
case '?':
|
||||
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
|
||||
optopt);
|
||||
@@ -7093,6 +7293,9 @@ zpool_do_clear(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (libzfs_envvar_is_set("ZPOOL_AUTO_POWER_ON_SLOT"))
|
||||
is_power_on = B_TRUE;
|
||||
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
@@ -7133,6 +7336,14 @@ zpool_do_clear(int argc, char **argv)
|
||||
return (1);
|
||||
}
|
||||
|
||||
if (is_power_on) {
|
||||
if (device == NULL) {
|
||||
zpool_power_on_pool_and_wait_for_devices(zhp);
|
||||
} else {
|
||||
zpool_power_on_and_disk_wait(zhp, device);
|
||||
}
|
||||
}
|
||||
|
||||
if (zpool_clear(zhp, device, policy) != 0)
|
||||
ret = 1;
|
||||
|
||||
@@ -8641,6 +8852,10 @@ status_callback(zpool_handle_t *zhp, void *data)
|
||||
printf_color(ANSI_BOLD, " %5s", gettext("SLOW"));
|
||||
}
|
||||
|
||||
if (cbp->cb_print_power) {
|
||||
printf_color(ANSI_BOLD, " %5s", gettext("POWER"));
|
||||
}
|
||||
|
||||
if (cbp->vcdl != NULL)
|
||||
print_cmd_columns(cbp->vcdl, 0);
|
||||
|
||||
@@ -8688,11 +8903,13 @@ status_callback(zpool_handle_t *zhp, void *data)
|
||||
if (nerr == 0)
|
||||
(void) printf(gettext("errors: No known data "
|
||||
"errors\n"));
|
||||
else if (!cbp->cb_verbose)
|
||||
else if (!cbp->cb_verbose) {
|
||||
color_start(ANSI_RED);
|
||||
(void) printf(gettext("errors: %llu data "
|
||||
"errors, use '-v' for a list\n"),
|
||||
(u_longlong_t)nerr);
|
||||
else
|
||||
color_end();
|
||||
} else
|
||||
print_error_log(zhp);
|
||||
}
|
||||
|
||||
@@ -8707,10 +8924,11 @@ status_callback(zpool_handle_t *zhp, void *data)
|
||||
}
|
||||
|
||||
/*
|
||||
* zpool status [-c [script1,script2,...]] [-igLpPstvx] [-T d|u] [pool] ...
|
||||
* [interval [count]]
|
||||
* zpool status [-c [script1,script2,...]] [-igLpPstvx] [--power] [-T d|u] ...
|
||||
* [pool] [interval [count]]
|
||||
*
|
||||
* -c CMD For each vdev, run command CMD
|
||||
* -e Display only unhealthy vdevs
|
||||
* -i Display vdev initialization status.
|
||||
* -g Display guid for individual vdev name.
|
||||
* -L Follow links when resolving vdev path name.
|
||||
@@ -8722,6 +8940,7 @@ status_callback(zpool_handle_t *zhp, void *data)
|
||||
* -D Display dedup status (undocumented)
|
||||
* -t Display vdev TRIM status.
|
||||
* -T Display a timestamp in date(1) or Unix format
|
||||
* --power Display vdev enclosure slot power status
|
||||
*
|
||||
* Describes the health status of all pools or some subset.
|
||||
*/
|
||||
@@ -8735,8 +8954,14 @@ zpool_do_status(int argc, char **argv)
|
||||
status_cbdata_t cb = { 0 };
|
||||
char *cmd = NULL;
|
||||
|
||||
struct option long_options[] = {
|
||||
{"power", no_argument, NULL, POWER_OPT},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
/* check options */
|
||||
while ((c = getopt(argc, argv, "c:igLpPsvxDtT:")) != -1) {
|
||||
while ((c = getopt_long(argc, argv, "c:eigLpPsvxDtT:", long_options,
|
||||
NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'c':
|
||||
if (cmd != NULL) {
|
||||
@@ -8762,6 +8987,9 @@ zpool_do_status(int argc, char **argv)
|
||||
}
|
||||
cmd = optarg;
|
||||
break;
|
||||
case 'e':
|
||||
cb.cb_print_unhealthy = B_TRUE;
|
||||
break;
|
||||
case 'i':
|
||||
cb.cb_print_vdev_init = B_TRUE;
|
||||
break;
|
||||
@@ -8795,6 +9023,9 @@ zpool_do_status(int argc, char **argv)
|
||||
case 'T':
|
||||
get_timestamp_arg(*optarg);
|
||||
break;
|
||||
case POWER_OPT:
|
||||
cb.cb_print_power = B_TRUE;
|
||||
break;
|
||||
case '?':
|
||||
if (optopt == 'c') {
|
||||
print_zpool_script_list("status");
|
||||
|
||||
@@ -124,6 +124,10 @@ vdev_cmd_data_list_t *all_pools_for_each_vdev_run(int argc, char **argv,
|
||||
|
||||
void free_vdev_cmd_data_list(vdev_cmd_data_list_t *vcdl);
|
||||
|
||||
void free_vdev_cmd_data(vdev_cmd_data_t *data);
|
||||
|
||||
int vdev_run_cmd_simple(char *path, char *cmd);
|
||||
|
||||
int check_device(const char *path, boolean_t force,
|
||||
boolean_t isspare, boolean_t iswholedisk);
|
||||
boolean_t check_sector_size_database(char *path, int *sector_size);
|
||||
@@ -131,6 +135,9 @@ void vdev_error(const char *fmt, ...);
|
||||
int check_file(const char *file, boolean_t force, boolean_t isspare);
|
||||
void after_zpool_upgrade(zpool_handle_t *zhp);
|
||||
|
||||
int zpool_power(zpool_handle_t *zhp, char *vdev, boolean_t turn_on);
|
||||
int zpool_power_current_state(zpool_handle_t *zhp, char *vdev);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
+40
-7
@@ -373,6 +373,10 @@ make_leaf_vdev(nvlist_t *props, const char *arg, boolean_t is_primary)
|
||||
verify(nvlist_add_string(vdev, ZPOOL_CONFIG_PATH, path) == 0);
|
||||
verify(nvlist_add_string(vdev, ZPOOL_CONFIG_TYPE, type) == 0);
|
||||
|
||||
/* Lookup and add the enclosure sysfs path (if exists) */
|
||||
update_vdev_config_dev_sysfs_path(vdev, path,
|
||||
ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH);
|
||||
|
||||
if (strcmp(type, VDEV_TYPE_DISK) == 0)
|
||||
verify(nvlist_add_uint64(vdev, ZPOOL_CONFIG_WHOLE_DISK,
|
||||
(uint64_t)wholedisk) == 0);
|
||||
@@ -921,6 +925,15 @@ zero_label(char *path)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static void
|
||||
lines_to_stderr(char *lines[], int lines_cnt)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < lines_cnt; i++) {
|
||||
fprintf(stderr, "%s\n", lines[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Go through and find any whole disks in the vdev specification, labelling them
|
||||
* as appropriate. When constructing the vdev spec, we were unable to open this
|
||||
@@ -932,7 +945,7 @@ zero_label(char *path)
|
||||
* need to get the devid after we label the disk.
|
||||
*/
|
||||
static int
|
||||
make_disks(zpool_handle_t *zhp, nvlist_t *nv)
|
||||
make_disks(zpool_handle_t *zhp, nvlist_t *nv, boolean_t replacing)
|
||||
{
|
||||
nvlist_t **child;
|
||||
uint_t c, children;
|
||||
@@ -1017,6 +1030,8 @@ make_disks(zpool_handle_t *zhp, nvlist_t *nv)
|
||||
*/
|
||||
if (!is_exclusive && !is_spare(NULL, udevpath)) {
|
||||
char *devnode = strrchr(devpath, '/') + 1;
|
||||
char **lines = NULL;
|
||||
int lines_cnt = 0;
|
||||
|
||||
ret = strncmp(udevpath, UDISK_ROOT, strlen(UDISK_ROOT));
|
||||
if (ret == 0) {
|
||||
@@ -1028,9 +1043,27 @@ make_disks(zpool_handle_t *zhp, nvlist_t *nv)
|
||||
/*
|
||||
* When labeling a pool the raw device node name
|
||||
* is provided as it appears under /dev/.
|
||||
*
|
||||
* Note that 'zhp' will be NULL when we're creating a
|
||||
* pool.
|
||||
*/
|
||||
if (zpool_label_disk(g_zfs, zhp, devnode) == -1)
|
||||
if (zpool_prepare_and_label_disk(g_zfs, zhp, devnode,
|
||||
nv, zhp == NULL ? "create" :
|
||||
replacing ? "replace" : "add", &lines,
|
||||
&lines_cnt) != 0) {
|
||||
(void) fprintf(stderr,
|
||||
gettext(
|
||||
"Error preparing/labeling disk.\n"));
|
||||
if (lines_cnt > 0) {
|
||||
(void) fprintf(stderr,
|
||||
gettext("zfs_prepare_disk output:\n"));
|
||||
lines_to_stderr(lines, lines_cnt);
|
||||
}
|
||||
|
||||
libzfs_free_str_array(lines, lines_cnt);
|
||||
return (-1);
|
||||
}
|
||||
libzfs_free_str_array(lines, lines_cnt);
|
||||
|
||||
/*
|
||||
* Wait for udev to signal the device is available
|
||||
@@ -1067,19 +1100,19 @@ make_disks(zpool_handle_t *zhp, nvlist_t *nv)
|
||||
}
|
||||
|
||||
for (c = 0; c < children; c++)
|
||||
if ((ret = make_disks(zhp, child[c])) != 0)
|
||||
if ((ret = make_disks(zhp, child[c], replacing)) != 0)
|
||||
return (ret);
|
||||
|
||||
if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_SPARES,
|
||||
&child, &children) == 0)
|
||||
for (c = 0; c < children; c++)
|
||||
if ((ret = make_disks(zhp, child[c])) != 0)
|
||||
if ((ret = make_disks(zhp, child[c], replacing)) != 0)
|
||||
return (ret);
|
||||
|
||||
if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_L2CACHE,
|
||||
&child, &children) == 0)
|
||||
for (c = 0; c < children; c++)
|
||||
if ((ret = make_disks(zhp, child[c])) != 0)
|
||||
if ((ret = make_disks(zhp, child[c], replacing)) != 0)
|
||||
return (ret);
|
||||
|
||||
return (0);
|
||||
@@ -1740,7 +1773,7 @@ split_mirror_vdev(zpool_handle_t *zhp, char *newname, nvlist_t *props,
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if (!flags.dryrun && make_disks(zhp, newroot) != 0) {
|
||||
if (!flags.dryrun && make_disks(zhp, newroot, B_FALSE) != 0) {
|
||||
nvlist_free(newroot);
|
||||
return (NULL);
|
||||
}
|
||||
@@ -1861,7 +1894,7 @@ make_root_vdev(zpool_handle_t *zhp, nvlist_t *props, int force, int check_rep,
|
||||
/*
|
||||
* Run through the vdev specification and label any whole disks found.
|
||||
*/
|
||||
if (!dryrun && make_disks(zhp, newroot) != 0) {
|
||||
if (!dryrun && make_disks(zhp, newroot, replacing) != 0) {
|
||||
nvlist_free(newroot);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ AM_CPPFLAGS += -D_REENTRANT
|
||||
AM_CPPFLAGS += -D_FILE_OFFSET_BITS=64
|
||||
AM_CPPFLAGS += -D_LARGEFILE64_SOURCE
|
||||
AM_CPPFLAGS += -DLIBEXECDIR=\"$(libexecdir)\"
|
||||
AM_CPPFLAGS += -DZFSEXECDIR=\"$(zfsexecdir)\"
|
||||
AM_CPPFLAGS += -DRUNSTATEDIR=\"$(runstatedir)\"
|
||||
AM_CPPFLAGS += -DSBINDIR=\"$(sbindir)\"
|
||||
AM_CPPFLAGS += -DSYSCONFDIR=\"$(sysconfdir)\"
|
||||
|
||||
@@ -180,6 +180,62 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_INFINITE_RECURSION], [
|
||||
AC_SUBST([INFINITE_RECURSION])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # Check if kernel cc supports -Winfinite-recursion option.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_INFINITE_RECURSION], [
|
||||
AC_MSG_CHECKING([whether $KERNEL_CC supports -Winfinite-recursion])
|
||||
|
||||
saved_cc="$CC"
|
||||
saved_flags="$CFLAGS"
|
||||
CC="gcc"
|
||||
CFLAGS="$CFLAGS -Werror -Winfinite-recursion"
|
||||
|
||||
AS_IF([ test -n "$KERNEL_CC" ], [
|
||||
CC="$KERNEL_CC"
|
||||
])
|
||||
AS_IF([ test -n "$KERNEL_LLVM" ], [
|
||||
CC="clang"
|
||||
])
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
|
||||
KERNEL_INFINITE_RECURSION=-Winfinite-recursion
|
||||
AC_DEFINE([HAVE_KERNEL_INFINITE_RECURSION], 1,
|
||||
[Define if compiler supports -Winfinite-recursion])
|
||||
AC_MSG_RESULT([yes])
|
||||
], [
|
||||
KERNEL_INFINITE_RECURSION=
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
|
||||
CC="$saved_cc"
|
||||
CFLAGS="$saved_flags"
|
||||
AC_SUBST([KERNEL_INFINITE_RECURSION])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # Check if cc supports -Wformat-overflow option.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_FORMAT_OVERFLOW], [
|
||||
AC_MSG_CHECKING([whether $CC supports -Wformat-overflow])
|
||||
|
||||
saved_flags="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror -Wformat-overflow"
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
|
||||
FORMAT_OVERFLOW=-Wformat-overflow
|
||||
AC_DEFINE([HAVE_FORMAT_OVERFLOW], 1,
|
||||
[Define if compiler supports -Wformat-overflow])
|
||||
AC_MSG_RESULT([yes])
|
||||
], [
|
||||
FORMAT_OVERFLOW=
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
|
||||
CFLAGS="$saved_flags"
|
||||
AC_SUBST([FORMAT_OVERFLOW])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # Check if gcc supports -fno-omit-frame-pointer option.
|
||||
dnl #
|
||||
|
||||
@@ -172,7 +172,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL], [
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_get_acl], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
struct posix_acl *get_acl_fn(struct inode *inode, int type)
|
||||
static struct posix_acl *get_acl_fn(struct inode *inode, int type)
|
||||
{ return NULL; }
|
||||
|
||||
static const struct inode_operations
|
||||
@@ -184,7 +184,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL], [
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_get_acl_rcu], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
struct posix_acl *get_acl_fn(struct inode *inode, int type,
|
||||
static struct posix_acl *get_acl_fn(struct inode *inode, int type,
|
||||
bool rcu) { return NULL; }
|
||||
|
||||
static const struct inode_operations
|
||||
@@ -196,7 +196,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL], [
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_get_inode_acl], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
struct posix_acl *get_inode_acl_fn(struct inode *inode, int type,
|
||||
static struct posix_acl *get_inode_acl_fn(struct inode *inode, int type,
|
||||
bool rcu) { return NULL; }
|
||||
|
||||
static const struct inode_operations
|
||||
@@ -243,7 +243,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_set_acl_mnt_idmap_dentry], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
int set_acl_fn(struct mnt_idmap *idmap,
|
||||
static int set_acl_fn(struct mnt_idmap *idmap,
|
||||
struct dentry *dent, struct posix_acl *acl,
|
||||
int type) { return 0; }
|
||||
|
||||
@@ -255,7 +255,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_set_acl_userns_dentry], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
int set_acl_fn(struct user_namespace *userns,
|
||||
static int set_acl_fn(struct user_namespace *userns,
|
||||
struct dentry *dent, struct posix_acl *acl,
|
||||
int type) { return 0; }
|
||||
|
||||
@@ -267,7 +267,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_set_acl_userns], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
int set_acl_fn(struct user_namespace *userns,
|
||||
static int set_acl_fn(struct user_namespace *userns,
|
||||
struct inode *inode, struct posix_acl *acl,
|
||||
int type) { return 0; }
|
||||
|
||||
@@ -279,7 +279,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_set_acl], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
int set_acl_fn(struct inode *inode, struct posix_acl *acl,
|
||||
static int set_acl_fn(struct inode *inode, struct posix_acl *acl,
|
||||
int type) { return 0; }
|
||||
|
||||
static const struct inode_operations
|
||||
|
||||
@@ -8,7 +8,7 @@ dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_AUTOMOUNT], [
|
||||
ZFS_LINUX_TEST_SRC([dentry_operations_d_automount], [
|
||||
#include <linux/dcache.h>
|
||||
struct vfsmount *d_automount(struct path *p) { return NULL; }
|
||||
static struct vfsmount *d_automount(struct path *p) { return NULL; }
|
||||
struct dentry_operations dops __attribute__ ((unused)) = {
|
||||
.d_automount = d_automount,
|
||||
};
|
||||
|
||||
@@ -247,7 +247,7 @@ dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_END_IO_T_ARGS], [
|
||||
ZFS_LINUX_TEST_SRC([bio_end_io_t_args], [
|
||||
#include <linux/bio.h>
|
||||
void wanted_end_io(struct bio *bio) { return; }
|
||||
static void wanted_end_io(struct bio *bio) { return; }
|
||||
bio_end_io_t *end_io __attribute__ ((unused)) = wanted_end_io;
|
||||
], [])
|
||||
])
|
||||
|
||||
+187
-3
@@ -16,12 +16,90 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH], [
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 6.5.x API change,
|
||||
dnl # blkdev_get_by_path() takes 4 args
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH_4ARG], [
|
||||
ZFS_LINUX_TEST_SRC([blkdev_get_by_path_4arg], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/blkdev.h>
|
||||
], [
|
||||
struct block_device *bdev __attribute__ ((unused)) = NULL;
|
||||
const char *path = "path";
|
||||
fmode_t mode = 0;
|
||||
void *holder = NULL;
|
||||
struct blk_holder_ops h;
|
||||
|
||||
bdev = blkdev_get_by_path(path, mode, holder, &h);
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 6.8.x API change
|
||||
dnl # bdev_open_by_path() replaces blkdev_get_by_path()
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_OPEN_BY_PATH], [
|
||||
ZFS_LINUX_TEST_SRC([bdev_open_by_path], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/blkdev.h>
|
||||
], [
|
||||
struct bdev_handle *bdh __attribute__ ((unused)) = NULL;
|
||||
const char *path = "path";
|
||||
fmode_t mode = 0;
|
||||
void *holder = NULL;
|
||||
struct blk_holder_ops h;
|
||||
|
||||
bdh = bdev_open_by_path(path, mode, holder, &h);
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_GET_BY_PATH], [
|
||||
AC_MSG_CHECKING([whether blkdev_get_by_path() exists])
|
||||
AC_MSG_CHECKING([whether blkdev_get_by_path() exists and takes 3 args])
|
||||
ZFS_LINUX_TEST_RESULT([blkdev_get_by_path], [
|
||||
AC_MSG_RESULT(yes)
|
||||
], [
|
||||
ZFS_LINUX_TEST_ERROR([blkdev_get_by_path()])
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING([whether blkdev_get_by_path() exists and takes 4 args])
|
||||
ZFS_LINUX_TEST_RESULT([blkdev_get_by_path_4arg], [
|
||||
AC_DEFINE(HAVE_BLKDEV_GET_BY_PATH_4ARG, 1,
|
||||
[blkdev_get_by_path() exists and takes 4 args])
|
||||
AC_MSG_RESULT(yes)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING([whether bdev_open_by_path() exists])
|
||||
ZFS_LINUX_TEST_RESULT([bdev_open_by_path], [
|
||||
AC_DEFINE(HAVE_BDEV_OPEN_BY_PATH, 1,
|
||||
[bdev_open_by_path() exists])
|
||||
AC_MSG_RESULT(yes)
|
||||
], [
|
||||
ZFS_LINUX_TEST_ERROR([blkdev_get_by_path()])
|
||||
])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 6.5.x API change
|
||||
dnl # blk_mode_t was added as a type to supercede some places where fmode_t
|
||||
dnl # is used
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BLK_MODE_T], [
|
||||
ZFS_LINUX_TEST_SRC([blk_mode_t], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/blkdev.h>
|
||||
], [
|
||||
blk_mode_t m __attribute((unused)) = (blk_mode_t)0;
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BLK_MODE_T], [
|
||||
AC_MSG_CHECKING([whether blk_mode_t is defined])
|
||||
ZFS_LINUX_TEST_RESULT([blk_mode_t], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_BLK_MODE_T, 1, [blk_mode_t is defined])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
@@ -41,12 +119,58 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_PUT], [
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 6.5.x API change.
|
||||
dnl # blkdev_put() takes (void* holder) as arg 2
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_PUT_HOLDER], [
|
||||
ZFS_LINUX_TEST_SRC([blkdev_put_holder], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/blkdev.h>
|
||||
], [
|
||||
struct block_device *bdev = NULL;
|
||||
void *holder = NULL;
|
||||
|
||||
blkdev_put(bdev, holder);
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 6.8.x API change
|
||||
dnl # bdev_release() replaces blkdev_put()
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_RELEASE], [
|
||||
ZFS_LINUX_TEST_SRC([bdev_release], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/blkdev.h>
|
||||
], [
|
||||
struct bdev_handle *bdh = NULL;
|
||||
bdev_release(bdh);
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_PUT], [
|
||||
AC_MSG_CHECKING([whether blkdev_put() exists])
|
||||
ZFS_LINUX_TEST_RESULT([blkdev_put], [
|
||||
AC_MSG_RESULT(yes)
|
||||
], [
|
||||
ZFS_LINUX_TEST_ERROR([blkdev_put()])
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING([whether blkdev_put() accepts void* as arg 2])
|
||||
ZFS_LINUX_TEST_RESULT([blkdev_put_holder], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_BLKDEV_PUT_HOLDER, 1,
|
||||
[blkdev_put() accepts void* as arg 2])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING([whether bdev_release() exists])
|
||||
ZFS_LINUX_TEST_RESULT([bdev_release], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_BDEV_RELEASE, 1,
|
||||
[bdev_release() exists])
|
||||
], [
|
||||
ZFS_LINUX_TEST_ERROR([blkdev_put()])
|
||||
])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
@@ -103,6 +227,33 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_CHECK_DISK_CHANGE], [
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 6.5.x API change
|
||||
dnl # disk_check_media_change() was added
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_DISK_CHECK_MEDIA_CHANGE], [
|
||||
ZFS_LINUX_TEST_SRC([disk_check_media_change], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/blkdev.h>
|
||||
], [
|
||||
struct block_device *bdev = NULL;
|
||||
bool error;
|
||||
|
||||
error = disk_check_media_change(bdev->bd_disk);
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_DISK_CHECK_MEDIA_CHANGE], [
|
||||
AC_MSG_CHECKING([whether disk_check_media_change() exists])
|
||||
ZFS_LINUX_TEST_RESULT([disk_check_media_change], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_DISK_CHECK_MEDIA_CHANGE, 1,
|
||||
[disk_check_media_change() exists])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # bdev_kobj() is introduced from 5.12
|
||||
dnl #
|
||||
@@ -443,9 +594,36 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_GET_ERESTARTSYS], [
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 6.5.x API change
|
||||
dnl # BLK_STS_NEXUS replaced with BLK_STS_RESV_CONFLICT
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV_BLK_STS_RESV_CONFLICT], [
|
||||
ZFS_LINUX_TEST_SRC([blk_sts_resv_conflict], [
|
||||
#include <linux/blkdev.h>
|
||||
],[
|
||||
blk_status_t s __attribute__ ((unused)) = BLK_STS_RESV_CONFLICT;
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV_BLK_STS_RESV_CONFLICT], [
|
||||
AC_MSG_CHECKING([whether BLK_STS_RESV_CONFLICT is defined])
|
||||
ZFS_LINUX_TEST_RESULT([blk_sts_resv_conflict], [
|
||||
AC_DEFINE(HAVE_BLK_STS_RESV_CONFLICT, 1, [BLK_STS_RESV_CONFLICT is defined])
|
||||
AC_MSG_RESULT(yes)
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV], [
|
||||
ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH
|
||||
ZFS_AC_KERNEL_SRC_BLKDEV_GET_BY_PATH_4ARG
|
||||
ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_OPEN_BY_PATH
|
||||
ZFS_AC_KERNEL_SRC_BLKDEV_PUT
|
||||
ZFS_AC_KERNEL_SRC_BLKDEV_PUT_HOLDER
|
||||
ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_RELEASE
|
||||
ZFS_AC_KERNEL_SRC_BLKDEV_REREAD_PART
|
||||
ZFS_AC_KERNEL_SRC_BLKDEV_INVALIDATE_BDEV
|
||||
ZFS_AC_KERNEL_SRC_BLKDEV_LOOKUP_BDEV
|
||||
@@ -458,6 +636,9 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLKDEV], [
|
||||
ZFS_AC_KERNEL_SRC_BLKDEV_ISSUE_SECURE_ERASE
|
||||
ZFS_AC_KERNEL_SRC_BLKDEV_BDEV_KOBJ
|
||||
ZFS_AC_KERNEL_SRC_BLKDEV_PART_TO_DEV
|
||||
ZFS_AC_KERNEL_SRC_BLKDEV_DISK_CHECK_MEDIA_CHANGE
|
||||
ZFS_AC_KERNEL_SRC_BLKDEV_BLK_STS_RESV_CONFLICT
|
||||
ZFS_AC_KERNEL_SRC_BLKDEV_BLK_MODE_T
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_BLKDEV], [
|
||||
@@ -476,4 +657,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLKDEV], [
|
||||
ZFS_AC_KERNEL_BLKDEV_ISSUE_SECURE_ERASE
|
||||
ZFS_AC_KERNEL_BLKDEV_BDEV_KOBJ
|
||||
ZFS_AC_KERNEL_BLKDEV_PART_TO_DEV
|
||||
ZFS_AC_KERNEL_BLKDEV_DISK_CHECK_MEDIA_CHANGE
|
||||
ZFS_AC_KERNEL_BLKDEV_BLK_STS_RESV_CONFLICT
|
||||
ZFS_AC_KERNEL_BLKDEV_BLK_MODE_T
|
||||
])
|
||||
|
||||
@@ -5,7 +5,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS], [
|
||||
ZFS_LINUX_TEST_SRC([block_device_operations_check_events], [
|
||||
#include <linux/blkdev.h>
|
||||
|
||||
unsigned int blk_check_events(struct gendisk *disk,
|
||||
static unsigned int blk_check_events(struct gendisk *disk,
|
||||
unsigned int clearing) {
|
||||
(void) disk, (void) clearing;
|
||||
return (0);
|
||||
@@ -34,7 +34,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID], [
|
||||
ZFS_LINUX_TEST_SRC([block_device_operations_release_void], [
|
||||
#include <linux/blkdev.h>
|
||||
|
||||
void blk_release(struct gendisk *g, fmode_t mode) {
|
||||
static void blk_release(struct gendisk *g, fmode_t mode) {
|
||||
(void) g, (void) mode;
|
||||
return;
|
||||
}
|
||||
@@ -49,12 +49,42 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID], [
|
||||
], [], [])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 5.9.x API change
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG], [
|
||||
ZFS_LINUX_TEST_SRC([block_device_operations_release_void_1arg], [
|
||||
#include <linux/blkdev.h>
|
||||
|
||||
static void blk_release(struct gendisk *g) {
|
||||
(void) g;
|
||||
return;
|
||||
}
|
||||
|
||||
static const struct block_device_operations
|
||||
bops __attribute__ ((unused)) = {
|
||||
.open = NULL,
|
||||
.release = blk_release,
|
||||
.ioctl = NULL,
|
||||
.compat_ioctl = NULL,
|
||||
};
|
||||
], [], [])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID], [
|
||||
AC_MSG_CHECKING([whether bops->release() is void])
|
||||
AC_MSG_CHECKING([whether bops->release() is void and takes 2 args])
|
||||
ZFS_LINUX_TEST_RESULT([block_device_operations_release_void], [
|
||||
AC_MSG_RESULT(yes)
|
||||
],[
|
||||
ZFS_LINUX_TEST_ERROR([bops->release()])
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING([whether bops->release() is void and takes 1 arg])
|
||||
ZFS_LINUX_TEST_RESULT([block_device_operations_release_void_1arg], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG], [1],
|
||||
[Define if release() in block_device_operations takes 1 arg])
|
||||
],[
|
||||
ZFS_LINUX_TEST_ERROR([bops->release()])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
@@ -66,7 +96,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK], [
|
||||
ZFS_LINUX_TEST_SRC([block_device_operations_revalidate_disk], [
|
||||
#include <linux/blkdev.h>
|
||||
|
||||
int blk_revalidate_disk(struct gendisk *disk) {
|
||||
static int blk_revalidate_disk(struct gendisk *disk) {
|
||||
(void) disk;
|
||||
return(0);
|
||||
}
|
||||
@@ -92,6 +122,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK], [
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS], [
|
||||
ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS
|
||||
ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID
|
||||
ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG
|
||||
ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK
|
||||
])
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_COMMIT_METADATA], [
|
||||
ZFS_LINUX_TEST_SRC([export_operations_commit_metadata], [
|
||||
#include <linux/exportfs.h>
|
||||
int commit_metadata(struct inode *inode) { return 0; }
|
||||
static int commit_metadata(struct inode *inode) { return 0; }
|
||||
static struct export_operations eops __attribute__ ((unused))={
|
||||
.commit_metadata = commit_metadata,
|
||||
};
|
||||
|
||||
@@ -2,12 +2,15 @@ dnl #
|
||||
dnl # 4.9, current_time() added
|
||||
dnl # 4.18, return type changed from timespec to timespec64
|
||||
dnl #
|
||||
dnl # Note that we don't care about the return type in this check. If we have
|
||||
dnl # to implement a fallback, we'll know we're <4.9, which was timespec.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_CURRENT_TIME], [
|
||||
ZFS_LINUX_TEST_SRC([current_time], [
|
||||
#include <linux/fs.h>
|
||||
], [
|
||||
struct inode ip __attribute__ ((unused));
|
||||
ip.i_atime = current_time(&ip);
|
||||
(void) current_time(&ip);
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_D_REVALIDATE_NAMEIDATA], [
|
||||
#include <linux/dcache.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
int revalidate (struct dentry *dentry,
|
||||
static int revalidate (struct dentry *dentry,
|
||||
struct nameidata *nidata) { return 0; }
|
||||
|
||||
static const struct dentry_operations
|
||||
|
||||
@@ -8,7 +8,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_DIRTY_INODE], [
|
||||
ZFS_LINUX_TEST_SRC([dirty_inode_with_flags], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
void dirty_inode(struct inode *a, int b) { return; }
|
||||
static void dirty_inode(struct inode *a, int b) { return; }
|
||||
|
||||
static const struct super_operations
|
||||
sops __attribute__ ((unused)) = {
|
||||
|
||||
@@ -7,7 +7,7 @@ dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_ENCODE_FH_WITH_INODE], [
|
||||
ZFS_LINUX_TEST_SRC([export_operations_encode_fh], [
|
||||
#include <linux/exportfs.h>
|
||||
int encode_fh(struct inode *inode, __u32 *fh, int *max_len,
|
||||
static int encode_fh(struct inode *inode, __u32 *fh, int *max_len,
|
||||
struct inode *parent) { return 0; }
|
||||
static struct export_operations eops __attribute__ ((unused))={
|
||||
.encode_fh = encode_fh,
|
||||
|
||||
@@ -6,7 +6,7 @@ dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_EVICT_INODE], [
|
||||
ZFS_LINUX_TEST_SRC([evict_inode], [
|
||||
#include <linux/fs.h>
|
||||
void evict_inode (struct inode * t) { return; }
|
||||
static void evict_inode (struct inode * t) { return; }
|
||||
static struct super_operations sops __attribute__ ((unused)) = {
|
||||
.evict_inode = evict_inode,
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_FALLOCATE], [
|
||||
ZFS_LINUX_TEST_SRC([file_fallocate], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
long test_fallocate(struct file *file, int mode,
|
||||
static long test_fallocate(struct file *file, int mode,
|
||||
loff_t offset, loff_t len) { return 0; }
|
||||
|
||||
static const struct file_operations
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_COPY_SPLICE_READ], [
|
||||
dnl #
|
||||
dnl # Kernel 6.5 - generic_file_splice_read was removed in favor
|
||||
dnl # of copy_splice_read for the .splice_read member of the
|
||||
dnl # file_operations struct.
|
||||
dnl #
|
||||
ZFS_LINUX_TEST_SRC([has_copy_splice_read], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
struct file_operations fops __attribute__((unused)) = {
|
||||
.splice_read = copy_splice_read,
|
||||
};
|
||||
],[])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_COPY_SPLICE_READ], [
|
||||
AC_MSG_CHECKING([whether copy_splice_read() exists])
|
||||
ZFS_LINUX_TEST_RESULT([has_copy_splice_read], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_COPY_SPLICE_READ, 1,
|
||||
[copy_splice_read exists])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
+28
-11
@@ -91,6 +91,13 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_FPU], [
|
||||
__kernel_fpu_end();
|
||||
], [], [ZFS_META_LICENSE])
|
||||
|
||||
ZFS_LINUX_TEST_SRC([kernel_neon], [
|
||||
#include <asm/neon.h>
|
||||
], [
|
||||
kernel_neon_begin();
|
||||
kernel_neon_end();
|
||||
], [], [ZFS_META_LICENSE])
|
||||
|
||||
ZFS_LINUX_TEST_SRC([fpu_internal], [
|
||||
#if defined(__x86_64) || defined(__x86_64__) || \
|
||||
defined(__i386) || defined(__i386__)
|
||||
@@ -186,18 +193,28 @@ AC_DEFUN([ZFS_AC_KERNEL_FPU], [
|
||||
AC_DEFINE(KERNEL_EXPORTS_X86_FPU, 1,
|
||||
[kernel exports FPU functions])
|
||||
],[
|
||||
ZFS_LINUX_TEST_RESULT([fpu_internal], [
|
||||
AC_MSG_RESULT(internal)
|
||||
AC_DEFINE(HAVE_KERNEL_FPU_INTERNAL, 1,
|
||||
[kernel fpu internal])
|
||||
dnl #
|
||||
dnl # ARM neon symbols (only on arm and arm64)
|
||||
dnl # could be GPL-only on arm64 after Linux 6.2
|
||||
dnl #
|
||||
ZFS_LINUX_TEST_RESULT([kernel_neon_license],[
|
||||
AC_MSG_RESULT(kernel_neon_*)
|
||||
AC_DEFINE(HAVE_KERNEL_NEON, 1,
|
||||
[kernel has kernel_neon_* functions])
|
||||
],[
|
||||
ZFS_LINUX_TEST_RESULT([fpu_xsave_internal], [
|
||||
AC_MSG_RESULT(internal with internal XSAVE)
|
||||
AC_DEFINE(HAVE_KERNEL_FPU_XSAVE_INTERNAL, 1,
|
||||
[kernel fpu and XSAVE internal])
|
||||
],[
|
||||
AC_MSG_RESULT(unavailable)
|
||||
])
|
||||
ZFS_LINUX_TEST_RESULT([fpu_internal], [
|
||||
AC_MSG_RESULT(internal)
|
||||
AC_DEFINE(HAVE_KERNEL_FPU_INTERNAL, 1,
|
||||
[kernel fpu internal])
|
||||
],[
|
||||
ZFS_LINUX_TEST_RESULT([fpu_xsave_internal], [
|
||||
AC_MSG_RESULT(internal with internal XSAVE)
|
||||
AC_DEFINE(HAVE_KERNEL_FPU_XSAVE_INTERNAL, 1,
|
||||
[kernel fpu and XSAVE internal])
|
||||
],[
|
||||
AC_MSG_RESULT(unavailable)
|
||||
])
|
||||
])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
dnl #
|
||||
dnl # 6.6 API change,
|
||||
dnl # fsync_bdev was removed in favor of sync_blockdev
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_SYNC_BDEV], [
|
||||
ZFS_LINUX_TEST_SRC([fsync_bdev], [
|
||||
#include <linux/blkdev.h>
|
||||
],[
|
||||
fsync_bdev(NULL);
|
||||
])
|
||||
|
||||
ZFS_LINUX_TEST_SRC([sync_blockdev], [
|
||||
#include <linux/blkdev.h>
|
||||
],[
|
||||
sync_blockdev(NULL);
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SYNC_BDEV], [
|
||||
AC_MSG_CHECKING([whether fsync_bdev() exists])
|
||||
ZFS_LINUX_TEST_RESULT([fsync_bdev], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_FSYNC_BDEV, 1,
|
||||
[fsync_bdev() is declared in include/blkdev.h])
|
||||
],[
|
||||
AC_MSG_CHECKING([whether sync_blockdev() exists])
|
||||
ZFS_LINUX_TEST_RESULT([sync_blockdev], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_SYNC_BLOCKDEV, 1,
|
||||
[sync_blockdev() is declared in include/blkdev.h])
|
||||
],[
|
||||
ZFS_LINUX_TEST_ERROR(
|
||||
[neither fsync_bdev() nor sync_blockdev() exist])
|
||||
])
|
||||
])
|
||||
])
|
||||
@@ -5,7 +5,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_FSYNC], [
|
||||
ZFS_LINUX_TEST_SRC([fsync_without_dentry], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
int test_fsync(struct file *f, int x) { return 0; }
|
||||
static int test_fsync(struct file *f, int x) { return 0; }
|
||||
|
||||
static const struct file_operations
|
||||
fops __attribute__ ((unused)) = {
|
||||
@@ -16,7 +16,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_FSYNC], [
|
||||
ZFS_LINUX_TEST_SRC([fsync_range], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
int test_fsync(struct file *f, loff_t a, loff_t b, int c)
|
||||
static int test_fsync(struct file *f, loff_t a, loff_t b, int c)
|
||||
{ return 0; }
|
||||
|
||||
static const struct file_operations
|
||||
|
||||
@@ -7,6 +7,10 @@ dnl #
|
||||
dnl # 6.3 API
|
||||
dnl # generic_fillattr() now takes struct mnt_idmap* as the first argument
|
||||
dnl #
|
||||
dnl # 6.6 API
|
||||
dnl # generic_fillattr() now takes u32 as second argument, representing a
|
||||
dnl # request_mask for statx
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_GENERIC_FILLATTR], [
|
||||
ZFS_LINUX_TEST_SRC([generic_fillattr_userns], [
|
||||
#include <linux/fs.h>
|
||||
@@ -25,22 +29,39 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_GENERIC_FILLATTR], [
|
||||
struct kstat *k = NULL;
|
||||
generic_fillattr(idmap, in, k);
|
||||
])
|
||||
|
||||
ZFS_LINUX_TEST_SRC([generic_fillattr_mnt_idmap_reqmask], [
|
||||
#include <linux/fs.h>
|
||||
],[
|
||||
struct mnt_idmap *idmap = NULL;
|
||||
struct inode *in = NULL;
|
||||
struct kstat *k = NULL;
|
||||
generic_fillattr(idmap, 0, in, k);
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_GENERIC_FILLATTR], [
|
||||
AC_MSG_CHECKING([whether generic_fillattr requires struct mnt_idmap*])
|
||||
ZFS_LINUX_TEST_RESULT([generic_fillattr_mnt_idmap], [
|
||||
AC_MSG_CHECKING(
|
||||
[whether generic_fillattr requires struct mnt_idmap* and request_mask])
|
||||
ZFS_LINUX_TEST_RESULT([generic_fillattr_mnt_idmap_reqmask], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_GENERIC_FILLATTR_IDMAP, 1,
|
||||
[generic_fillattr requires struct mnt_idmap*])
|
||||
AC_DEFINE(HAVE_GENERIC_FILLATTR_IDMAP_REQMASK, 1,
|
||||
[generic_fillattr requires struct mnt_idmap* and u32 request_mask])
|
||||
],[
|
||||
AC_MSG_CHECKING([whether generic_fillattr requires struct user_namespace*])
|
||||
ZFS_LINUX_TEST_RESULT([generic_fillattr_userns], [
|
||||
AC_MSG_CHECKING([whether generic_fillattr requires struct mnt_idmap*])
|
||||
ZFS_LINUX_TEST_RESULT([generic_fillattr_mnt_idmap], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_GENERIC_FILLATTR_USERNS, 1,
|
||||
[generic_fillattr requires struct user_namespace*])
|
||||
AC_DEFINE(HAVE_GENERIC_FILLATTR_IDMAP, 1,
|
||||
[generic_fillattr requires struct mnt_idmap*])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_CHECKING([whether generic_fillattr requires struct user_namespace*])
|
||||
ZFS_LINUX_TEST_RESULT([generic_fillattr_userns], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_GENERIC_FILLATTR_USERNS, 1,
|
||||
[generic_fillattr requires struct user_namespace*])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
@@ -5,7 +5,7 @@ dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_LINK], [
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_get_link], [
|
||||
#include <linux/fs.h>
|
||||
const char *get_link(struct dentry *de, struct inode *ip,
|
||||
static const char *get_link(struct dentry *de, struct inode *ip,
|
||||
struct delayed_call *done) { return "symlink"; }
|
||||
static struct inode_operations
|
||||
iops __attribute__ ((unused)) = {
|
||||
@@ -15,7 +15,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_LINK], [
|
||||
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_get_link_cookie], [
|
||||
#include <linux/fs.h>
|
||||
const char *get_link(struct dentry *de, struct
|
||||
static const char *get_link(struct dentry *de, struct
|
||||
inode *ip, void **cookie) { return "symlink"; }
|
||||
static struct inode_operations
|
||||
iops __attribute__ ((unused)) = {
|
||||
@@ -25,7 +25,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_LINK], [
|
||||
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_follow_link], [
|
||||
#include <linux/fs.h>
|
||||
const char *follow_link(struct dentry *de,
|
||||
static const char *follow_link(struct dentry *de,
|
||||
void **cookie) { return "symlink"; }
|
||||
static struct inode_operations
|
||||
iops __attribute__ ((unused)) = {
|
||||
@@ -35,7 +35,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_LINK], [
|
||||
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_follow_link_nameidata], [
|
||||
#include <linux/fs.h>
|
||||
void *follow_link(struct dentry *de, struct
|
||||
static void *follow_link(struct dentry *de, struct
|
||||
nameidata *nd) { return (void *)NULL; }
|
||||
static struct inode_operations
|
||||
iops __attribute__ ((unused)) = {
|
||||
|
||||
@@ -7,7 +7,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_CREATE], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
int inode_create(struct mnt_idmap *idmap,
|
||||
static int inode_create(struct mnt_idmap *idmap,
|
||||
struct inode *inode ,struct dentry *dentry,
|
||||
umode_t umode, bool flag) { return 0; }
|
||||
|
||||
@@ -25,7 +25,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_CREATE], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
int inode_create(struct user_namespace *userns,
|
||||
static int inode_create(struct user_namespace *userns,
|
||||
struct inode *inode ,struct dentry *dentry,
|
||||
umode_t umode, bool flag) { return 0; }
|
||||
|
||||
@@ -42,7 +42,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_CREATE], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
int inode_create(struct inode *inode ,struct dentry *dentry,
|
||||
static int inode_create(struct inode *inode ,struct dentry *dentry,
|
||||
umode_t umode, bool flag) { return 0; }
|
||||
|
||||
static const struct inode_operations
|
||||
|
||||
@@ -7,7 +7,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GETATTR], [
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_getattr_mnt_idmap], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
int test_getattr(
|
||||
static int test_getattr(
|
||||
struct mnt_idmap *idmap,
|
||||
const struct path *p, struct kstat *k,
|
||||
u32 request_mask, unsigned int query_flags)
|
||||
@@ -28,7 +28,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GETATTR], [
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_getattr_userns], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
int test_getattr(
|
||||
static int test_getattr(
|
||||
struct user_namespace *userns,
|
||||
const struct path *p, struct kstat *k,
|
||||
u32 request_mask, unsigned int query_flags)
|
||||
@@ -47,7 +47,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GETATTR], [
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_getattr_path], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
int test_getattr(
|
||||
static int test_getattr(
|
||||
const struct path *p, struct kstat *k,
|
||||
u32 request_mask, unsigned int query_flags)
|
||||
{ return 0; }
|
||||
@@ -61,7 +61,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GETATTR], [
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_getattr_vfsmount], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
int test_getattr(
|
||||
static int test_getattr(
|
||||
struct vfsmount *mnt, struct dentry *d,
|
||||
struct kstat *k)
|
||||
{ return 0; }
|
||||
|
||||
@@ -6,7 +6,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_LOOKUP_FLAGS], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
struct dentry *inode_lookup(struct inode *inode,
|
||||
static struct dentry *inode_lookup(struct inode *inode,
|
||||
struct dentry *dentry, unsigned int flags) { return NULL; }
|
||||
|
||||
static const struct inode_operations iops
|
||||
|
||||
@@ -7,7 +7,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_SETATTR], [
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_setattr_mnt_idmap], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
int test_setattr(
|
||||
static int test_setattr(
|
||||
struct mnt_idmap *idmap,
|
||||
struct dentry *de, struct iattr *ia)
|
||||
{ return 0; }
|
||||
@@ -27,7 +27,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_SETATTR], [
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_setattr_userns], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
int test_setattr(
|
||||
static int test_setattr(
|
||||
struct user_namespace *userns,
|
||||
struct dentry *de, struct iattr *ia)
|
||||
{ return 0; }
|
||||
@@ -41,7 +41,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_SETATTR], [
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_setattr], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
int test_setattr(
|
||||
static int test_setattr(
|
||||
struct dentry *de, struct iattr *ia)
|
||||
{ return 0; }
|
||||
|
||||
|
||||
@@ -27,6 +27,73 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_TIMES], [
|
||||
memset(&ip, 0, sizeof(ip));
|
||||
ts = ip.i_mtime;
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 6.6 API change
|
||||
dnl # i_ctime no longer directly accessible, must use
|
||||
dnl # inode_get_ctime(ip), inode_set_ctime*(ip) to
|
||||
dnl # read/write.
|
||||
dnl #
|
||||
ZFS_LINUX_TEST_SRC([inode_get_ctime], [
|
||||
#include <linux/fs.h>
|
||||
],[
|
||||
struct inode ip;
|
||||
|
||||
memset(&ip, 0, sizeof(ip));
|
||||
inode_get_ctime(&ip);
|
||||
])
|
||||
|
||||
ZFS_LINUX_TEST_SRC([inode_set_ctime_to_ts], [
|
||||
#include <linux/fs.h>
|
||||
],[
|
||||
struct inode ip;
|
||||
struct timespec64 ts = {0};
|
||||
|
||||
memset(&ip, 0, sizeof(ip));
|
||||
inode_set_ctime_to_ts(&ip, ts);
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 6.7 API change
|
||||
dnl # i_atime/i_mtime no longer directly accessible, must use
|
||||
dnl # inode_get_mtime(ip), inode_set_mtime*(ip) to
|
||||
dnl # read/write.
|
||||
dnl #
|
||||
ZFS_LINUX_TEST_SRC([inode_get_atime], [
|
||||
#include <linux/fs.h>
|
||||
],[
|
||||
struct inode ip;
|
||||
|
||||
memset(&ip, 0, sizeof(ip));
|
||||
inode_get_atime(&ip);
|
||||
])
|
||||
ZFS_LINUX_TEST_SRC([inode_get_mtime], [
|
||||
#include <linux/fs.h>
|
||||
],[
|
||||
struct inode ip;
|
||||
|
||||
memset(&ip, 0, sizeof(ip));
|
||||
inode_get_mtime(&ip);
|
||||
])
|
||||
|
||||
ZFS_LINUX_TEST_SRC([inode_set_atime_to_ts], [
|
||||
#include <linux/fs.h>
|
||||
],[
|
||||
struct inode ip;
|
||||
struct timespec64 ts = {0};
|
||||
|
||||
memset(&ip, 0, sizeof(ip));
|
||||
inode_set_atime_to_ts(&ip, ts);
|
||||
])
|
||||
ZFS_LINUX_TEST_SRC([inode_set_mtime_to_ts], [
|
||||
#include <linux/fs.h>
|
||||
],[
|
||||
struct inode ip;
|
||||
struct timespec64 ts = {0};
|
||||
|
||||
memset(&ip, 0, sizeof(ip));
|
||||
inode_set_mtime_to_ts(&ip, ts);
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_INODE_TIMES], [
|
||||
@@ -47,4 +114,58 @@ AC_DEFUN([ZFS_AC_KERNEL_INODE_TIMES], [
|
||||
AC_DEFINE(HAVE_INODE_TIMESPEC64_TIMES, 1,
|
||||
[inode->i_*time's are timespec64])
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([whether inode_get_ctime() exists])
|
||||
ZFS_LINUX_TEST_RESULT([inode_get_ctime], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_INODE_GET_CTIME, 1,
|
||||
[inode_get_ctime() exists in linux/fs.h])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([whether inode_set_ctime_to_ts() exists])
|
||||
ZFS_LINUX_TEST_RESULT([inode_set_ctime_to_ts], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_INODE_SET_CTIME_TO_TS, 1,
|
||||
[inode_set_ctime_to_ts() exists in linux/fs.h])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([whether inode_get_atime() exists])
|
||||
ZFS_LINUX_TEST_RESULT([inode_get_atime], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_INODE_GET_ATIME, 1,
|
||||
[inode_get_atime() exists in linux/fs.h])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([whether inode_set_atime_to_ts() exists])
|
||||
ZFS_LINUX_TEST_RESULT([inode_set_atime_to_ts], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_INODE_SET_ATIME_TO_TS, 1,
|
||||
[inode_set_atime_to_ts() exists in linux/fs.h])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([whether inode_get_mtime() exists])
|
||||
ZFS_LINUX_TEST_RESULT([inode_get_mtime], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_INODE_GET_MTIME, 1,
|
||||
[inode_get_mtime() exists in linux/fs.h])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
AC_MSG_CHECKING([whether inode_set_mtime_to_ts() exists])
|
||||
ZFS_LINUX_TEST_RESULT([inode_set_mtime_to_ts], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_INODE_SET_MTIME_TO_TS, 1,
|
||||
[inode_set_mtime_to_ts() exists in linux/fs.h])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
@@ -4,7 +4,7 @@ dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN], [
|
||||
ZFS_LINUX_TEST_SRC([make_request_fn_void], [
|
||||
#include <linux/blkdev.h>
|
||||
void make_request(struct request_queue *q,
|
||||
static void make_request(struct request_queue *q,
|
||||
struct bio *bio) { return; }
|
||||
],[
|
||||
blk_queue_make_request(NULL, &make_request);
|
||||
@@ -12,7 +12,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN], [
|
||||
|
||||
ZFS_LINUX_TEST_SRC([make_request_fn_blk_qc_t], [
|
||||
#include <linux/blkdev.h>
|
||||
blk_qc_t make_request(struct request_queue *q,
|
||||
static blk_qc_t make_request(struct request_queue *q,
|
||||
struct bio *bio) { return (BLK_QC_T_NONE); }
|
||||
],[
|
||||
blk_queue_make_request(NULL, &make_request);
|
||||
@@ -20,7 +20,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN], [
|
||||
|
||||
ZFS_LINUX_TEST_SRC([blk_alloc_queue_request_fn], [
|
||||
#include <linux/blkdev.h>
|
||||
blk_qc_t make_request(struct request_queue *q,
|
||||
static blk_qc_t make_request(struct request_queue *q,
|
||||
struct bio *bio) { return (BLK_QC_T_NONE); }
|
||||
],[
|
||||
struct request_queue *q __attribute__ ((unused));
|
||||
@@ -29,7 +29,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN], [
|
||||
|
||||
ZFS_LINUX_TEST_SRC([blk_alloc_queue_request_fn_rh], [
|
||||
#include <linux/blkdev.h>
|
||||
blk_qc_t make_request(struct request_queue *q,
|
||||
static blk_qc_t make_request(struct request_queue *q,
|
||||
struct bio *bio) { return (BLK_QC_T_NONE); }
|
||||
],[
|
||||
struct request_queue *q __attribute__ ((unused));
|
||||
|
||||
@@ -9,7 +9,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MKDIR], [
|
||||
ZFS_LINUX_TEST_SRC([mkdir_mnt_idmap], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
int mkdir(struct mnt_idmap *idmap,
|
||||
static int mkdir(struct mnt_idmap *idmap,
|
||||
struct inode *inode, struct dentry *dentry,
|
||||
umode_t umode) { return 0; }
|
||||
static const struct inode_operations
|
||||
@@ -26,7 +26,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MKDIR], [
|
||||
ZFS_LINUX_TEST_SRC([mkdir_user_namespace], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
int mkdir(struct user_namespace *userns,
|
||||
static int mkdir(struct user_namespace *userns,
|
||||
struct inode *inode, struct dentry *dentry,
|
||||
umode_t umode) { return 0; }
|
||||
|
||||
@@ -47,7 +47,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MKDIR], [
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_mkdir], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
int mkdir(struct inode *inode, struct dentry *dentry,
|
||||
static int mkdir(struct inode *inode, struct dentry *dentry,
|
||||
umode_t umode) { return 0; }
|
||||
|
||||
static const struct inode_operations
|
||||
|
||||
@@ -7,7 +7,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MKNOD], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
int tmp_mknod(struct mnt_idmap *idmap,
|
||||
static int tmp_mknod(struct mnt_idmap *idmap,
|
||||
struct inode *inode ,struct dentry *dentry,
|
||||
umode_t u, dev_t d) { return 0; }
|
||||
|
||||
@@ -25,7 +25,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MKNOD], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
int tmp_mknod(struct user_namespace *userns,
|
||||
static int tmp_mknod(struct user_namespace *userns,
|
||||
struct inode *inode ,struct dentry *dentry,
|
||||
umode_t u, dev_t d) { return 0; }
|
||||
|
||||
|
||||
@@ -7,14 +7,14 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_PROC_OPERATIONS], [
|
||||
ZFS_LINUX_TEST_SRC([proc_ops_struct], [
|
||||
#include <linux/proc_fs.h>
|
||||
|
||||
int test_open(struct inode *ip, struct file *fp) { return 0; }
|
||||
ssize_t test_read(struct file *fp, char __user *ptr,
|
||||
static int test_open(struct inode *ip, struct file *fp) { return 0; }
|
||||
static ssize_t test_read(struct file *fp, char __user *ptr,
|
||||
size_t size, loff_t *offp) { return 0; }
|
||||
ssize_t test_write(struct file *fp, const char __user *ptr,
|
||||
static ssize_t test_write(struct file *fp, const char __user *ptr,
|
||||
size_t size, loff_t *offp) { return 0; }
|
||||
loff_t test_lseek(struct file *fp, loff_t off, int flag)
|
||||
static loff_t test_lseek(struct file *fp, loff_t off, int flag)
|
||||
{ return 0; }
|
||||
int test_release(struct inode *ip, struct file *fp)
|
||||
static int test_release(struct inode *ip, struct file *fp)
|
||||
{ return 0; }
|
||||
|
||||
const struct proc_ops test_ops __attribute__ ((unused)) = {
|
||||
|
||||
@@ -4,7 +4,7 @@ dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_PUT_LINK], [
|
||||
ZFS_LINUX_TEST_SRC([put_link_cookie], [
|
||||
#include <linux/fs.h>
|
||||
void put_link(struct inode *ip, void *cookie)
|
||||
static void put_link(struct inode *ip, void *cookie)
|
||||
{ return; }
|
||||
static struct inode_operations
|
||||
iops __attribute__ ((unused)) = {
|
||||
@@ -14,7 +14,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_PUT_LINK], [
|
||||
|
||||
ZFS_LINUX_TEST_SRC([put_link_nameidata], [
|
||||
#include <linux/fs.h>
|
||||
void put_link(struct dentry *de, struct
|
||||
static void put_link(struct dentry *de, struct
|
||||
nameidata *nd, void *ptr) { return; }
|
||||
static struct inode_operations
|
||||
iops __attribute__ ((unused)) = {
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
dnl #
|
||||
dnl # Linux 6.5 removes register_sysctl_table
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_REGISTER_SYSCTL_TABLE], [
|
||||
ZFS_LINUX_TEST_SRC([has_register_sysctl_table], [
|
||||
#include <linux/sysctl.h>
|
||||
|
||||
static struct ctl_table dummy_table[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
],[
|
||||
struct ctl_table_header *h
|
||||
__attribute((unused)) = register_sysctl_table(dummy_table);
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_REGISTER_SYSCTL_TABLE], [
|
||||
AC_MSG_CHECKING([whether register_sysctl_table exists])
|
||||
ZFS_LINUX_TEST_RESULT([has_register_sysctl_table], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_REGISTER_SYSCTL_TABLE, 1,
|
||||
[register_sysctl_table exists])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
])
|
||||
@@ -6,7 +6,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME], [
|
||||
dnl #
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_rename_flags], [
|
||||
#include <linux/fs.h>
|
||||
int rename_fn(struct inode *sip, struct dentry *sdp,
|
||||
static int rename_fn(struct inode *sip, struct dentry *sdp,
|
||||
struct inode *tip, struct dentry *tdp,
|
||||
unsigned int flags) { return 0; }
|
||||
|
||||
@@ -24,7 +24,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME], [
|
||||
dnl #
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_rename_userns], [
|
||||
#include <linux/fs.h>
|
||||
int rename_fn(struct user_namespace *user_ns, struct inode *sip,
|
||||
static int rename_fn(struct user_namespace *user_ns, struct inode *sip,
|
||||
struct dentry *sdp, struct inode *tip, struct dentry *tdp,
|
||||
unsigned int flags) { return 0; }
|
||||
|
||||
@@ -39,7 +39,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME], [
|
||||
dnl #
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_rename_mnt_idmap], [
|
||||
#include <linux/fs.h>
|
||||
int rename_fn(struct mnt_idmap *idmap, struct inode *sip,
|
||||
static int rename_fn(struct mnt_idmap *idmap, struct inode *sip,
|
||||
struct dentry *sdp, struct inode *tip, struct dentry *tdp,
|
||||
unsigned int flags) { return 0; }
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SHOW_OPTIONS], [
|
||||
ZFS_LINUX_TEST_SRC([super_operations_show_options], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
int show_options(struct seq_file * x, struct dentry * y) {
|
||||
static int show_options(struct seq_file * x, struct dentry * y) {
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
||||
+84
-12
@@ -8,9 +8,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK], [
|
||||
ZFS_LINUX_TEST_SRC([super_block_s_shrink], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
int shrink(struct shrinker *s, struct shrink_control *sc)
|
||||
{ return 0; }
|
||||
|
||||
static const struct super_block
|
||||
sb __attribute__ ((unused)) = {
|
||||
.s_shrink.seeks = DEFAULT_SEEKS,
|
||||
@@ -19,12 +16,44 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK], [
|
||||
],[])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 6.7 API change
|
||||
dnl # s_shrink is now a pointer.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK_PTR], [
|
||||
ZFS_LINUX_TEST_SRC([super_block_s_shrink_ptr], [
|
||||
#include <linux/fs.h>
|
||||
static unsigned long shrinker_cb(struct shrinker *shrink,
|
||||
struct shrink_control *sc) { return 0; }
|
||||
static struct shrinker shrinker = {
|
||||
.count_objects = shrinker_cb,
|
||||
.scan_objects = shrinker_cb,
|
||||
.seeks = DEFAULT_SEEKS,
|
||||
};
|
||||
static const struct super_block
|
||||
sb __attribute__ ((unused)) = {
|
||||
.s_shrink = &shrinker,
|
||||
};
|
||||
],[])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SUPER_BLOCK_S_SHRINK], [
|
||||
AC_MSG_CHECKING([whether super_block has s_shrink])
|
||||
ZFS_LINUX_TEST_RESULT([super_block_s_shrink], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_SUPER_BLOCK_S_SHRINK, 1,
|
||||
[have super_block s_shrink])
|
||||
],[
|
||||
ZFS_LINUX_TEST_ERROR([sb->s_shrink()])
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING([whether super_block has s_shrink pointer])
|
||||
ZFS_LINUX_TEST_RESULT([super_block_s_shrink_ptr], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_SUPER_BLOCK_S_SHRINK_PTR, 1,
|
||||
[have super_block s_shrink pointer])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
ZFS_LINUX_TEST_ERROR([sb->s_shrink()])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
@@ -57,7 +86,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SHRINK_CONTROL_HAS_NID], [
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_REGISTER_SHRINKER_VARARG], [
|
||||
ZFS_LINUX_TEST_SRC([register_shrinker_vararg], [
|
||||
#include <linux/mm.h>
|
||||
unsigned long shrinker_cb(struct shrinker *shrink,
|
||||
static unsigned long shrinker_cb(struct shrinker *shrink,
|
||||
struct shrink_control *sc) { return 0; }
|
||||
],[
|
||||
struct shrinker cache_shrinker = {
|
||||
@@ -72,7 +101,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_REGISTER_SHRINKER_VARARG], [
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER_CALLBACK], [
|
||||
ZFS_LINUX_TEST_SRC([shrinker_cb_shrink_control], [
|
||||
#include <linux/mm.h>
|
||||
int shrinker_cb(struct shrinker *shrink,
|
||||
static int shrinker_cb(struct shrinker *shrink,
|
||||
struct shrink_control *sc) { return 0; }
|
||||
],[
|
||||
struct shrinker cache_shrinker = {
|
||||
@@ -84,7 +113,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER_CALLBACK], [
|
||||
|
||||
ZFS_LINUX_TEST_SRC([shrinker_cb_shrink_control_split], [
|
||||
#include <linux/mm.h>
|
||||
unsigned long shrinker_cb(struct shrinker *shrink,
|
||||
static unsigned long shrinker_cb(struct shrinker *shrink,
|
||||
struct shrink_control *sc) { return 0; }
|
||||
],[
|
||||
struct shrinker cache_shrinker = {
|
||||
@@ -96,6 +125,25 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER_CALLBACK], [
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 6.7 API change
|
||||
dnl # register_shrinker has been replaced by shrinker_register.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER_REGISTER], [
|
||||
ZFS_LINUX_TEST_SRC([shrinker_register], [
|
||||
#include <linux/shrinker.h>
|
||||
static unsigned long shrinker_cb(struct shrinker *shrink,
|
||||
struct shrink_control *sc) { return 0; }
|
||||
],[
|
||||
struct shrinker cache_shrinker = {
|
||||
.count_objects = shrinker_cb,
|
||||
.scan_objects = shrinker_cb,
|
||||
.seeks = DEFAULT_SEEKS,
|
||||
};
|
||||
shrinker_register(&cache_shrinker);
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SHRINKER_CALLBACK],[
|
||||
dnl #
|
||||
dnl # 6.0 API change
|
||||
@@ -133,14 +181,36 @@ AC_DEFUN([ZFS_AC_KERNEL_SHRINKER_CALLBACK],[
|
||||
dnl # cs->shrink() is logically split in to
|
||||
dnl # cs->count_objects() and cs->scan_objects()
|
||||
dnl #
|
||||
AC_MSG_CHECKING([if cs->count_objects callback exists])
|
||||
AC_MSG_CHECKING(
|
||||
[whether cs->count_objects callback exists])
|
||||
ZFS_LINUX_TEST_RESULT(
|
||||
[shrinker_cb_shrink_control_split],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_SPLIT_SHRINKER_CALLBACK, 1,
|
||||
[cs->count_objects exists])
|
||||
[shrinker_cb_shrink_control_split],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_SPLIT_SHRINKER_CALLBACK, 1,
|
||||
[cs->count_objects exists])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
|
||||
AC_MSG_CHECKING(
|
||||
[whether shrinker_register exists])
|
||||
ZFS_LINUX_TEST_RESULT([shrinker_register], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_SHRINKER_REGISTER, 1,
|
||||
[shrinker_register exists])
|
||||
|
||||
dnl # We assume that the split shrinker
|
||||
dnl # callback exists if
|
||||
dnl # shrinker_register() exists,
|
||||
dnl # because the latter is a much more
|
||||
dnl # recent addition, and the macro
|
||||
dnl # test for shrinker_register() only
|
||||
dnl # works if the callback is split
|
||||
AC_DEFINE(HAVE_SPLIT_SHRINKER_CALLBACK,
|
||||
1, [cs->count_objects exists])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
ZFS_LINUX_TEST_ERROR([shrinker])
|
||||
])
|
||||
])
|
||||
])
|
||||
])
|
||||
@@ -174,10 +244,12 @@ AC_DEFUN([ZFS_AC_KERNEL_SHRINK_CONTROL_STRUCT], [
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER], [
|
||||
ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK
|
||||
ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK_PTR
|
||||
ZFS_AC_KERNEL_SRC_SHRINK_CONTROL_HAS_NID
|
||||
ZFS_AC_KERNEL_SRC_SHRINKER_CALLBACK
|
||||
ZFS_AC_KERNEL_SRC_SHRINK_CONTROL_STRUCT
|
||||
ZFS_AC_KERNEL_SRC_REGISTER_SHRINKER_VARARG
|
||||
ZFS_AC_KERNEL_SRC_SHRINKER_REGISTER
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SHRINKER], [
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
dnl #
|
||||
dnl # 6.8.x replaced strlcpy with strscpy. Check for both so we can provide
|
||||
dnl # appropriate fallbacks.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_STRLCPY], [
|
||||
ZFS_LINUX_TEST_SRC([kernel_has_strlcpy], [
|
||||
#include <linux/string.h>
|
||||
], [
|
||||
const char *src = "goodbye";
|
||||
char dst[32];
|
||||
size_t len;
|
||||
len = strlcpy(dst, src, sizeof (dst));
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_STRSCPY], [
|
||||
ZFS_LINUX_TEST_SRC([kernel_has_strscpy], [
|
||||
#include <linux/string.h>
|
||||
], [
|
||||
const char *src = "goodbye";
|
||||
char dst[32];
|
||||
ssize_t len;
|
||||
len = strscpy(dst, src, sizeof (dst));
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_STRLCPY], [
|
||||
AC_MSG_CHECKING([whether strlcpy() exists])
|
||||
ZFS_LINUX_TEST_RESULT([kernel_has_strlcpy], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_KERNEL_STRLCPY, 1,
|
||||
[strlcpy() exists])
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_STRSCPY], [
|
||||
AC_MSG_CHECKING([whether strscpy() exists])
|
||||
ZFS_LINUX_TEST_RESULT([kernel_has_strscpy], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_KERNEL_STRSCPY, 1,
|
||||
[strscpy() exists])
|
||||
], [
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
])
|
||||
@@ -6,7 +6,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SYMLINK], [
|
||||
ZFS_LINUX_TEST_SRC([symlink_mnt_idmap], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/sched.h>
|
||||
int tmp_symlink(struct mnt_idmap *idmap,
|
||||
static int tmp_symlink(struct mnt_idmap *idmap,
|
||||
struct inode *inode ,struct dentry *dentry,
|
||||
const char *path) { return 0; }
|
||||
|
||||
@@ -23,7 +23,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SYMLINK], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
int tmp_symlink(struct user_namespace *userns,
|
||||
static int tmp_symlink(struct user_namespace *userns,
|
||||
struct inode *inode ,struct dentry *dentry,
|
||||
const char *path) { return 0; }
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TIMER_SETUP], [
|
||||
int data;
|
||||
};
|
||||
|
||||
void task_expire(struct timer_list *tl)
|
||||
static void task_expire(struct timer_list *tl)
|
||||
{
|
||||
struct my_task_timer *task_timer =
|
||||
from_timer(task_timer, tl, timer);
|
||||
@@ -31,7 +31,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TIMER_SETUP], [
|
||||
|
||||
ZFS_LINUX_TEST_SRC([timer_list_function], [
|
||||
#include <linux/timer.h>
|
||||
void task_expire(struct timer_list *tl) {}
|
||||
static void task_expire(struct timer_list *tl) {}
|
||||
],[
|
||||
struct timer_list tl;
|
||||
tl.function = task_expire;
|
||||
|
||||
@@ -9,7 +9,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [
|
||||
dnl #
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_mnt_idmap], [
|
||||
#include <linux/fs.h>
|
||||
int tmpfile(struct mnt_idmap *idmap,
|
||||
static int tmpfile(struct mnt_idmap *idmap,
|
||||
struct inode *inode, struct file *file,
|
||||
umode_t mode) { return 0; }
|
||||
static struct inode_operations
|
||||
@@ -22,7 +22,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [
|
||||
dnl #
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_tmpfile], [
|
||||
#include <linux/fs.h>
|
||||
int tmpfile(struct user_namespace *userns,
|
||||
static int tmpfile(struct user_namespace *userns,
|
||||
struct inode *inode, struct file *file,
|
||||
umode_t mode) { return 0; }
|
||||
static struct inode_operations
|
||||
@@ -36,7 +36,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [
|
||||
dnl #
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_dentry_userns], [
|
||||
#include <linux/fs.h>
|
||||
int tmpfile(struct user_namespace *userns,
|
||||
static int tmpfile(struct user_namespace *userns,
|
||||
struct inode *inode, struct dentry *dentry,
|
||||
umode_t mode) { return 0; }
|
||||
static struct inode_operations
|
||||
@@ -46,7 +46,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [
|
||||
],[])
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_dentry], [
|
||||
#include <linux/fs.h>
|
||||
int tmpfile(struct inode *inode, struct dentry *dentry,
|
||||
static int tmpfile(struct inode *inode, struct dentry *dentry,
|
||||
umode_t mode) { return 0; }
|
||||
static struct inode_operations
|
||||
iops __attribute__ ((unused)) = {
|
||||
|
||||
@@ -5,7 +5,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_DIRECT_IO], [
|
||||
ZFS_LINUX_TEST_SRC([direct_io_iter], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
ssize_t test_direct_IO(struct kiocb *kiocb,
|
||||
static ssize_t test_direct_IO(struct kiocb *kiocb,
|
||||
struct iov_iter *iter) { return 0; }
|
||||
|
||||
static const struct address_space_operations
|
||||
@@ -17,7 +17,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_DIRECT_IO], [
|
||||
ZFS_LINUX_TEST_SRC([direct_io_iter_offset], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
ssize_t test_direct_IO(struct kiocb *kiocb,
|
||||
static ssize_t test_direct_IO(struct kiocb *kiocb,
|
||||
struct iov_iter *iter, loff_t offset) { return 0; }
|
||||
|
||||
static const struct address_space_operations
|
||||
@@ -29,7 +29,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_DIRECT_IO], [
|
||||
ZFS_LINUX_TEST_SRC([direct_io_iter_rw_offset], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
ssize_t test_direct_IO(int rw, struct kiocb *kiocb,
|
||||
static ssize_t test_direct_IO(int rw, struct kiocb *kiocb,
|
||||
struct iov_iter *iter, loff_t offset) { return 0; }
|
||||
|
||||
static const struct address_space_operations
|
||||
@@ -41,7 +41,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_DIRECT_IO], [
|
||||
ZFS_LINUX_TEST_SRC([direct_io_iovec], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
ssize_t test_direct_IO(int rw, struct kiocb *kiocb,
|
||||
static ssize_t test_direct_IO(int rw, struct kiocb *kiocb,
|
||||
const struct iovec *iov, loff_t offset,
|
||||
unsigned long nr_segs) { return 0; }
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_IOV_ITER], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/uio.h>
|
||||
],[
|
||||
int type __attribute__ ((unused)) =
|
||||
ITER_IOVEC | ITER_KVEC | ITER_BVEC | ITER_PIPE;
|
||||
int type __attribute__ ((unused)) = ITER_KVEC;
|
||||
])
|
||||
|
||||
ZFS_LINUX_TEST_SRC([iov_iter_advance], [
|
||||
@@ -93,6 +92,14 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_IOV_ITER], [
|
||||
struct iov_iter iter = { 0 };
|
||||
__attribute__((unused)) enum iter_type i = iov_iter_type(&iter);
|
||||
])
|
||||
|
||||
ZFS_LINUX_TEST_SRC([iter_iov], [
|
||||
#include <linux/fs.h>
|
||||
#include <linux/uio.h>
|
||||
],[
|
||||
struct iov_iter iter = { 0 };
|
||||
__attribute__((unused)) const struct iovec *iov = iter_iov(&iter);
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_VFS_IOV_ITER], [
|
||||
@@ -201,4 +208,19 @@ AC_DEFUN([ZFS_AC_KERNEL_VFS_IOV_ITER], [
|
||||
AC_DEFINE(HAVE_VFS_IOV_ITER, 1,
|
||||
[All required iov_iter interfaces are available])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # Kernel 6.5 introduces the iter_iov() function that returns the
|
||||
dnl # __iov member of an iov_iter*. The iov member was renamed to this
|
||||
dnl # __iov member, and is intended to be accessed via the helper
|
||||
dnl # function now.
|
||||
dnl #
|
||||
AC_MSG_CHECKING([whether iter_iov() is available])
|
||||
ZFS_LINUX_TEST_RESULT([iter_iov], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_ITER_IOV, 1,
|
||||
[iter_iov() is available])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_ITERATE], [
|
||||
ZFS_LINUX_TEST_SRC([file_operations_iterate_shared], [
|
||||
#include <linux/fs.h>
|
||||
int iterate(struct file *filp, struct dir_context * context)
|
||||
static int iterate(struct file *filp, struct dir_context * context)
|
||||
{ return 0; }
|
||||
|
||||
static const struct file_operations fops
|
||||
@@ -12,7 +12,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_ITERATE], [
|
||||
|
||||
ZFS_LINUX_TEST_SRC([file_operations_iterate], [
|
||||
#include <linux/fs.h>
|
||||
int iterate(struct file *filp,
|
||||
static int iterate(struct file *filp,
|
||||
struct dir_context *context) { return 0; }
|
||||
|
||||
static const struct file_operations fops
|
||||
@@ -27,7 +27,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_ITERATE], [
|
||||
|
||||
ZFS_LINUX_TEST_SRC([file_operations_readdir], [
|
||||
#include <linux/fs.h>
|
||||
int readdir(struct file *filp, void *entry,
|
||||
static int readdir(struct file *filp, void *entry,
|
||||
filldir_t func) { return 0; }
|
||||
|
||||
static const struct file_operations fops
|
||||
|
||||
@@ -5,9 +5,9 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_RW_ITERATE], [
|
||||
ZFS_LINUX_TEST_SRC([file_operations_rw], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
ssize_t test_read(struct kiocb *kiocb, struct iov_iter *to)
|
||||
static ssize_t test_read(struct kiocb *kiocb, struct iov_iter *to)
|
||||
{ return 0; }
|
||||
ssize_t test_write(struct kiocb *kiocb, struct iov_iter *from)
|
||||
static ssize_t test_write(struct kiocb *kiocb, struct iov_iter *from)
|
||||
{ return 0; }
|
||||
|
||||
static const struct file_operations
|
||||
|
||||
@@ -6,7 +6,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_WRITEPAGE_T], [
|
||||
dnl #
|
||||
ZFS_LINUX_TEST_SRC([writepage_t_folio], [
|
||||
#include <linux/writeback.h>
|
||||
int putpage(struct folio *folio,
|
||||
static int putpage(struct folio *folio,
|
||||
struct writeback_control *wbc, void *data)
|
||||
{ return 0; }
|
||||
writepage_t func = putpage;
|
||||
|
||||
@@ -68,7 +68,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_GET], [
|
||||
ZFS_LINUX_TEST_SRC([xattr_handler_get_dentry_inode], [
|
||||
#include <linux/xattr.h>
|
||||
|
||||
int get(const struct xattr_handler *handler,
|
||||
static int get(const struct xattr_handler *handler,
|
||||
struct dentry *dentry, struct inode *inode,
|
||||
const char *name, void *buffer, size_t size) { return 0; }
|
||||
static const struct xattr_handler
|
||||
@@ -80,7 +80,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_GET], [
|
||||
ZFS_LINUX_TEST_SRC([xattr_handler_get_xattr_handler], [
|
||||
#include <linux/xattr.h>
|
||||
|
||||
int get(const struct xattr_handler *handler,
|
||||
static int get(const struct xattr_handler *handler,
|
||||
struct dentry *dentry, const char *name,
|
||||
void *buffer, size_t size) { return 0; }
|
||||
static const struct xattr_handler
|
||||
@@ -92,7 +92,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_GET], [
|
||||
ZFS_LINUX_TEST_SRC([xattr_handler_get_dentry], [
|
||||
#include <linux/xattr.h>
|
||||
|
||||
int get(struct dentry *dentry, const char *name,
|
||||
static int get(struct dentry *dentry, const char *name,
|
||||
void *buffer, size_t size, int handler_flags)
|
||||
{ return 0; }
|
||||
static const struct xattr_handler
|
||||
@@ -104,7 +104,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_GET], [
|
||||
ZFS_LINUX_TEST_SRC([xattr_handler_get_dentry_inode_flags], [
|
||||
#include <linux/xattr.h>
|
||||
|
||||
int get(const struct xattr_handler *handler,
|
||||
static int get(const struct xattr_handler *handler,
|
||||
struct dentry *dentry, struct inode *inode,
|
||||
const char *name, void *buffer,
|
||||
size_t size, int flags) { return 0; }
|
||||
@@ -182,7 +182,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_SET], [
|
||||
ZFS_LINUX_TEST_SRC([xattr_handler_set_mnt_idmap], [
|
||||
#include <linux/xattr.h>
|
||||
|
||||
int set(const struct xattr_handler *handler,
|
||||
static int set(const struct xattr_handler *handler,
|
||||
struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, struct inode *inode,
|
||||
const char *name, const void *buffer,
|
||||
@@ -197,7 +197,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_SET], [
|
||||
ZFS_LINUX_TEST_SRC([xattr_handler_set_userns], [
|
||||
#include <linux/xattr.h>
|
||||
|
||||
int set(const struct xattr_handler *handler,
|
||||
static int set(const struct xattr_handler *handler,
|
||||
struct user_namespace *mnt_userns,
|
||||
struct dentry *dentry, struct inode *inode,
|
||||
const char *name, const void *buffer,
|
||||
@@ -212,7 +212,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_SET], [
|
||||
ZFS_LINUX_TEST_SRC([xattr_handler_set_dentry_inode], [
|
||||
#include <linux/xattr.h>
|
||||
|
||||
int set(const struct xattr_handler *handler,
|
||||
static int set(const struct xattr_handler *handler,
|
||||
struct dentry *dentry, struct inode *inode,
|
||||
const char *name, const void *buffer,
|
||||
size_t size, int flags)
|
||||
@@ -226,7 +226,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_SET], [
|
||||
ZFS_LINUX_TEST_SRC([xattr_handler_set_xattr_handler], [
|
||||
#include <linux/xattr.h>
|
||||
|
||||
int set(const struct xattr_handler *handler,
|
||||
static int set(const struct xattr_handler *handler,
|
||||
struct dentry *dentry, const char *name,
|
||||
const void *buffer, size_t size, int flags)
|
||||
{ return 0; }
|
||||
@@ -239,7 +239,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_SET], [
|
||||
ZFS_LINUX_TEST_SRC([xattr_handler_set_dentry], [
|
||||
#include <linux/xattr.h>
|
||||
|
||||
int set(struct dentry *dentry, const char *name,
|
||||
static int set(struct dentry *dentry, const char *name,
|
||||
const void *buffer, size_t size, int flags,
|
||||
int handler_flags) { return 0; }
|
||||
static const struct xattr_handler
|
||||
@@ -325,7 +325,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_LIST], [
|
||||
ZFS_LINUX_TEST_SRC([xattr_handler_list_simple], [
|
||||
#include <linux/xattr.h>
|
||||
|
||||
bool list(struct dentry *dentry) { return 0; }
|
||||
static bool list(struct dentry *dentry) { return 0; }
|
||||
static const struct xattr_handler
|
||||
xops __attribute__ ((unused)) = {
|
||||
.list = list,
|
||||
@@ -335,7 +335,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_LIST], [
|
||||
ZFS_LINUX_TEST_SRC([xattr_handler_list_xattr_handler], [
|
||||
#include <linux/xattr.h>
|
||||
|
||||
size_t list(const struct xattr_handler *handler,
|
||||
static size_t list(const struct xattr_handler *handler,
|
||||
struct dentry *dentry, char *list, size_t list_size,
|
||||
const char *name, size_t name_len) { return 0; }
|
||||
static const struct xattr_handler
|
||||
@@ -347,7 +347,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_LIST], [
|
||||
ZFS_LINUX_TEST_SRC([xattr_handler_list_dentry], [
|
||||
#include <linux/xattr.h>
|
||||
|
||||
size_t list(struct dentry *dentry,
|
||||
static size_t list(struct dentry *dentry,
|
||||
char *list, size_t list_size,
|
||||
const char *name, size_t name_len,
|
||||
int handler_flags) { return 0; }
|
||||
|
||||
@@ -140,6 +140,8 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
||||
ZFS_AC_KERNEL_SRC_SYSFS
|
||||
ZFS_AC_KERNEL_SRC_SET_SPECIAL_STATE
|
||||
ZFS_AC_KERNEL_SRC_STANDALONE_LINUX_STDARG
|
||||
ZFS_AC_KERNEL_SRC_STRLCPY
|
||||
ZFS_AC_KERNEL_SRC_STRSCPY
|
||||
ZFS_AC_KERNEL_SRC_PAGEMAP_FOLIO_WAIT_BIT
|
||||
ZFS_AC_KERNEL_SRC_ADD_DISK
|
||||
ZFS_AC_KERNEL_SRC_KTHREAD
|
||||
@@ -148,6 +150,9 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [
|
||||
ZFS_AC_KERNEL_SRC_FILEMAP
|
||||
ZFS_AC_KERNEL_SRC_WRITEPAGE_T
|
||||
ZFS_AC_KERNEL_SRC_RECLAIMED
|
||||
ZFS_AC_KERNEL_SRC_REGISTER_SYSCTL_TABLE
|
||||
ZFS_AC_KERNEL_SRC_COPY_SPLICE_READ
|
||||
ZFS_AC_KERNEL_SRC_SYNC_BDEV
|
||||
case "$host_cpu" in
|
||||
powerpc*)
|
||||
ZFS_AC_KERNEL_SRC_CPU_HAS_FEATURE
|
||||
@@ -267,6 +272,8 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
||||
ZFS_AC_KERNEL_SYSFS
|
||||
ZFS_AC_KERNEL_SET_SPECIAL_STATE
|
||||
ZFS_AC_KERNEL_STANDALONE_LINUX_STDARG
|
||||
ZFS_AC_KERNEL_STRLCPY
|
||||
ZFS_AC_KERNEL_STRSCPY
|
||||
ZFS_AC_KERNEL_PAGEMAP_FOLIO_WAIT_BIT
|
||||
ZFS_AC_KERNEL_ADD_DISK
|
||||
ZFS_AC_KERNEL_KTHREAD
|
||||
@@ -275,6 +282,9 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [
|
||||
ZFS_AC_KERNEL_FILEMAP
|
||||
ZFS_AC_KERNEL_WRITEPAGE_T
|
||||
ZFS_AC_KERNEL_RECLAIMED
|
||||
ZFS_AC_KERNEL_REGISTER_SYSCTL_TABLE
|
||||
ZFS_AC_KERNEL_COPY_SPLICE_READ
|
||||
ZFS_AC_KERNEL_SYNC_BDEV
|
||||
case "$host_cpu" in
|
||||
powerpc*)
|
||||
ZFS_AC_KERNEL_CPU_HAS_FEATURE
|
||||
|
||||
@@ -211,10 +211,12 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
|
||||
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_CLOBBERED
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_INFINITE_RECURSION
|
||||
ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_INFINITE_RECURSION
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_IMPLICIT_FALLTHROUGH
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_FRAME_LARGER_THAN
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_TRUNCATION
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_ZERO_LENGTH
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_FORMAT_OVERFLOW
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_OMIT_FRAME_POINTER
|
||||
ZFS_AC_CONFIG_ALWAYS_CC_NO_IPA_SRA
|
||||
ZFS_AC_CONFIG_ALWAYS_KERNEL_CC_NO_IPA_SRA
|
||||
|
||||
@@ -69,7 +69,7 @@ __zfs_match_snapshot()
|
||||
else
|
||||
if [ "$cur" != "" ] && __zfs_list_datasets "$cur" &> /dev/null
|
||||
then
|
||||
$__ZFS_CMD list -H -o name -s name -t filesystem -r "$cur" | tail -n +2
|
||||
$__ZFS_CMD list -H -o name -s name -t filesystem,volume -r "$cur" | tail -n +2
|
||||
# We output the base dataset name even though we might be
|
||||
# completing a command that can only take a snapshot, because it
|
||||
# prevents bash from considering the completion finished when it
|
||||
|
||||
+2
-26
@@ -43,32 +43,8 @@ config ZFS
|
||||
If unsure, say N.
|
||||
EOF
|
||||
|
||||
add_after()
|
||||
{
|
||||
FILE="$1"
|
||||
MARKER="$2"
|
||||
NEW="$3"
|
||||
|
||||
while IFS='' read -r LINE
|
||||
do
|
||||
printf "%s\n" "$LINE"
|
||||
|
||||
if [ -n "$MARKER" ] && [ "$LINE" = "$MARKER" ]
|
||||
then
|
||||
printf "%s\n" "$NEW"
|
||||
MARKER=''
|
||||
if IFS='' read -r LINE
|
||||
then
|
||||
[ "$LINE" != "$NEW" ] && printf "%s\n" "$LINE"
|
||||
fi
|
||||
fi
|
||||
done < "$FILE" > "$FILE.new"
|
||||
|
||||
mv "$FILE.new" "$FILE"
|
||||
}
|
||||
|
||||
add_after "$KERNEL_DIR/fs/Kconfig" 'if BLOCK' 'source "fs/zfs/Kconfig"'
|
||||
add_after "$KERNEL_DIR/fs/Makefile" 'endif' 'obj-$(CONFIG_ZFS) += zfs/'
|
||||
sed -i '/source "fs\/ext2\/Kconfig\"/i\source "fs/zfs/Kconfig"' "$KERNEL_DIR/fs/Kconfig"
|
||||
echo 'obj-$(CONFIG_ZFS) += zfs/' >> "$KERNEL_DIR/fs/Makefile"
|
||||
|
||||
echo "$0: done. now you can build the kernel with ZFS support." >&2
|
||||
echo "$0: make sure you enable ZFS support (CONFIG_ZFS) before building." >&2
|
||||
|
||||
@@ -311,6 +311,8 @@ _LIBZFS_H int zpool_vdev_remove_wanted(zpool_handle_t *, const char *);
|
||||
|
||||
extern int zpool_vdev_fault(zpool_handle_t *, uint64_t, vdev_aux_t);
|
||||
extern int zpool_vdev_degrade(zpool_handle_t *, uint64_t, vdev_aux_t);
|
||||
extern int zpool_vdev_set_removed_state(zpool_handle_t *, uint64_t,
|
||||
vdev_aux_t);
|
||||
extern int zpool_vdev_clear(zpool_handle_t *, uint64_t);
|
||||
|
||||
extern nvlist_t *zpool_find_vdev(zpool_handle_t *, const char *, boolean_t *,
|
||||
@@ -318,6 +320,15 @@ extern nvlist_t *zpool_find_vdev(zpool_handle_t *, const char *, boolean_t *,
|
||||
extern nvlist_t *zpool_find_vdev_by_physpath(zpool_handle_t *, const char *,
|
||||
boolean_t *, boolean_t *, boolean_t *);
|
||||
extern int zpool_label_disk(libzfs_handle_t *, zpool_handle_t *, const char *);
|
||||
extern int zpool_prepare_disk(zpool_handle_t *zhp, nvlist_t *vdev_nv,
|
||||
const char *prepare_str, char **lines[], int *lines_cnt);
|
||||
extern int zpool_prepare_and_label_disk(libzfs_handle_t *hdl,
|
||||
zpool_handle_t *, const char *, nvlist_t *vdev_nv, const char *prepare_str,
|
||||
char **lines[], int *lines_cnt);
|
||||
extern char ** zpool_vdev_script_alloc_env(const char *pool_name,
|
||||
const char *vdev_path, const char *vdev_upath,
|
||||
const char *vdev_enc_sysfs_path, const char *opt_key, const char *opt_val);
|
||||
extern void zpool_vdev_script_free_env(char **env);
|
||||
extern uint64_t zpool_vdev_path_to_guid(zpool_handle_t *zhp, const char *path);
|
||||
|
||||
const char *zpool_get_state_str(zpool_handle_t *);
|
||||
|
||||
@@ -78,6 +78,7 @@ extern int zpool_find_config(void *, const char *, nvlist_t **, importargs_t *,
|
||||
extern const char * const * zpool_default_search_paths(size_t *count);
|
||||
extern int zpool_read_label(int, nvlist_t **, int *);
|
||||
extern int zpool_label_disk_wait(const char *, int);
|
||||
extern int zpool_disk_wait(const char *);
|
||||
|
||||
struct udev_device;
|
||||
|
||||
@@ -143,6 +144,8 @@ extern void zfs_niceraw(uint64_t, char *, size_t);
|
||||
extern void zpool_dump_ddt(const ddt_stat_t *, const ddt_histogram_t *);
|
||||
extern int zpool_history_unpack(char *, uint64_t, uint64_t *, nvlist_t ***,
|
||||
uint_t *);
|
||||
extern void fsleep(float sec);
|
||||
extern int zpool_getenv_int(const char *env, int default_val);
|
||||
|
||||
struct zfs_cmd;
|
||||
int zfs_ioctl_fd(int fd, unsigned long request, struct zfs_cmd *zc);
|
||||
@@ -184,9 +187,65 @@ _LIBZUTIL_H void zfs_setproctitle(const char *fmt, ...);
|
||||
typedef int (*pool_vdev_iter_f)(void *, nvlist_t *, void *);
|
||||
int for_each_vdev_cb(void *zhp, nvlist_t *nv, pool_vdev_iter_f func,
|
||||
void *data);
|
||||
int for_each_vdev_macro_helper_func(void *zhp_data, nvlist_t *nv, void *data);
|
||||
int for_each_real_leaf_vdev_macro_helper_func(void *zhp_data, nvlist_t *nv,
|
||||
void *data);
|
||||
/*
|
||||
* Often you'll want to iterate over all the vdevs in the pool, but don't want
|
||||
* to use for_each_vdev() since it requires a callback function.
|
||||
*
|
||||
* Instead you can use FOR_EACH_VDEV():
|
||||
*
|
||||
* zpool_handle_t *zhp // Assume this is initialized
|
||||
* nvlist_t *nv
|
||||
* ...
|
||||
* FOR_EACH_VDEV(zhp, nv) {
|
||||
* const char *path = NULL;
|
||||
* nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path);
|
||||
* printf("Looking at vdev %s\n", path);
|
||||
* }
|
||||
*
|
||||
* Note: FOR_EACH_VDEV runs in O(n^2) time where n = number of vdevs. However,
|
||||
* there's an upper limit of 256 vdevs per dRAID top-level vdevs (TLDs), 255 for
|
||||
* raidz2 TLDs, a real world limit of ~500 vdevs for mirrors, so this shouldn't
|
||||
* really be an issue.
|
||||
*
|
||||
* Here are some micro-benchmarks of a complete FOR_EACH_VDEV loop on a RAID0
|
||||
* pool:
|
||||
*
|
||||
* 100 vdevs = 0.7ms
|
||||
* 500 vdevs = 17ms
|
||||
* 750 vdevs = 40ms
|
||||
* 1000 vdevs = 82ms
|
||||
*
|
||||
* The '__nv += 0' at the end of the for() loop gets around a "comma or
|
||||
* semicolon followed by non-blank" checkstyle error. Note on most compliers
|
||||
* the '__nv += 0' can just be replaced with 'NULL', but gcc on Centos 7
|
||||
* will give a 'warning: statement with no effect' error if you do that.
|
||||
*/
|
||||
#define __FOR_EACH_VDEV(__zhp, __nv, __func) { \
|
||||
__nv = zpool_get_config(__zhp, NULL); \
|
||||
VERIFY0(nvlist_lookup_nvlist(__nv, ZPOOL_CONFIG_VDEV_TREE, &__nv)); \
|
||||
} \
|
||||
for (nvlist_t *__root_nv = __nv, *__state = (nvlist_t *)0; \
|
||||
for_each_vdev_cb(&__state, __root_nv, __func, &__nv) == 1; \
|
||||
__nv += 0)
|
||||
|
||||
#define FOR_EACH_VDEV(__zhp, __nv) \
|
||||
__FOR_EACH_VDEV(__zhp, __nv, for_each_vdev_macro_helper_func)
|
||||
|
||||
/*
|
||||
* "real leaf" vdevs are leaf vdevs that are real devices (disks or files).
|
||||
* This excludes leaf vdevs like like draid spares.
|
||||
*/
|
||||
#define FOR_EACH_REAL_LEAF_VDEV(__zhp, __nv) \
|
||||
__FOR_EACH_VDEV(__zhp, __nv, for_each_real_leaf_vdev_macro_helper_func)
|
||||
|
||||
int for_each_vdev_in_nvlist(nvlist_t *nvroot, pool_vdev_iter_f func,
|
||||
void *data);
|
||||
void update_vdevs_config_dev_sysfs_path(nvlist_t *config);
|
||||
_LIBZUTIL_H void update_vdev_config_dev_sysfs_path(nvlist_t *nv,
|
||||
const char *path, const char *key);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -92,6 +92,12 @@
|
||||
#define param_set_max_auto_ashift_args(var) \
|
||||
CTLTYPE_U64, &var, 0, param_set_max_auto_ashift, "QU"
|
||||
|
||||
#define spa_taskq_read_param_set_args(var) \
|
||||
CTLTYPE_STRING, NULL, 0, spa_taskq_read_param, "A"
|
||||
|
||||
#define spa_taskq_write_param_set_args(var) \
|
||||
CTLTYPE_STRING, NULL, 0, spa_taskq_write_param, "A"
|
||||
|
||||
#define fletcher_4_param_set_args(var) \
|
||||
CTLTYPE_STRING, NULL, 0, fletcher_4_param, "A"
|
||||
|
||||
|
||||
@@ -36,7 +36,11 @@ struct xucred;
|
||||
typedef struct flock flock64_t;
|
||||
typedef struct vnode vnode_t;
|
||||
typedef struct vattr vattr_t;
|
||||
#if __FreeBSD_version < 1400093
|
||||
typedef enum vtype vtype_t;
|
||||
#else
|
||||
#define vtype_t __enum_uint8(vtype)
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/queue.h>
|
||||
|
||||
@@ -170,7 +170,11 @@ bi_status_to_errno(blk_status_t status)
|
||||
return (ENOLINK);
|
||||
case BLK_STS_TARGET:
|
||||
return (EREMOTEIO);
|
||||
#ifdef HAVE_BLK_STS_RESV_CONFLICT
|
||||
case BLK_STS_RESV_CONFLICT:
|
||||
#else
|
||||
case BLK_STS_NEXUS:
|
||||
#endif
|
||||
return (EBADE);
|
||||
case BLK_STS_MEDIUM:
|
||||
return (ENODATA);
|
||||
@@ -204,7 +208,11 @@ errno_to_bi_status(int error)
|
||||
case EREMOTEIO:
|
||||
return (BLK_STS_TARGET);
|
||||
case EBADE:
|
||||
#ifdef HAVE_BLK_STS_RESV_CONFLICT
|
||||
return (BLK_STS_RESV_CONFLICT);
|
||||
#else
|
||||
return (BLK_STS_NEXUS);
|
||||
#endif
|
||||
case ENODATA:
|
||||
return (BLK_STS_MEDIUM);
|
||||
case EILSEQ:
|
||||
@@ -326,6 +334,9 @@ zfs_check_media_change(struct block_device *bdev)
|
||||
return (0);
|
||||
}
|
||||
#define vdev_bdev_reread_part(bdev) zfs_check_media_change(bdev)
|
||||
#elif defined(HAVE_DISK_CHECK_MEDIA_CHANGE)
|
||||
#define vdev_bdev_reread_part(bdev) disk_check_media_change(bdev->bd_disk)
|
||||
#define zfs_check_media_change(bdev) disk_check_media_change(bdev->bd_disk)
|
||||
#else
|
||||
/*
|
||||
* This is encountered if check_disk_change() and bdev_check_media_change()
|
||||
@@ -376,6 +387,12 @@ vdev_lookup_bdev(const char *path, dev_t *dev)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(HAVE_BLK_MODE_T)
|
||||
#define blk_mode_is_open_write(flag) ((flag) & BLK_OPEN_WRITE)
|
||||
#else
|
||||
#define blk_mode_is_open_write(flag) ((flag) & FMODE_WRITE)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Kernels without bio_set_op_attrs use bi_rw for the bio flags.
|
||||
*/
|
||||
|
||||
@@ -43,9 +43,15 @@
|
||||
#include <sys/types.h>
|
||||
#include <asm/neon.h>
|
||||
|
||||
#if (defined(HAVE_KERNEL_NEON) && defined(CONFIG_KERNEL_MODE_NEON))
|
||||
#define kfpu_allowed() 1
|
||||
#define kfpu_begin() kernel_neon_begin()
|
||||
#define kfpu_end() kernel_neon_end()
|
||||
#else
|
||||
#define kfpu_allowed() 0
|
||||
#define kfpu_begin() do {} while (0)
|
||||
#define kfpu_end() do {} while (0)
|
||||
#endif
|
||||
#define kfpu_init() 0
|
||||
#define kfpu_fini() ((void) 0)
|
||||
|
||||
|
||||
@@ -464,10 +464,16 @@ zpl_is_32bit_api(void)
|
||||
* 6.3 API change
|
||||
* generic_fillattr() first arg is changed to struct mnt_idmap *
|
||||
*
|
||||
* 6.6 API change
|
||||
* generic_fillattr() gets new second arg request_mask, a u32 type
|
||||
*
|
||||
*/
|
||||
#ifdef HAVE_GENERIC_FILLATTR_IDMAP
|
||||
#define zpl_generic_fillattr(idmap, ip, sp) \
|
||||
generic_fillattr(idmap, ip, sp)
|
||||
#elif defined(HAVE_GENERIC_FILLATTR_IDMAP_REQMASK)
|
||||
#define zpl_generic_fillattr(idmap, rqm, ip, sp) \
|
||||
generic_fillattr(idmap, rqm, ip, sp)
|
||||
#elif defined(HAVE_GENERIC_FILLATTR_USERNS)
|
||||
#define zpl_generic_fillattr(user_ns, ip, sp) \
|
||||
generic_fillattr(user_ns, ip, sp)
|
||||
|
||||
@@ -34,6 +34,7 @@ KERNEL_H = \
|
||||
signal.h \
|
||||
simd.h \
|
||||
stat.h \
|
||||
string.h \
|
||||
strings.h \
|
||||
sunddi.h \
|
||||
sysmacros.h \
|
||||
|
||||
@@ -111,7 +111,7 @@ typedef struct spl_kmem_magazine {
|
||||
uint32_t skm_refill; /* Batch refill size */
|
||||
struct spl_kmem_cache *skm_cache; /* Owned by cache */
|
||||
unsigned int skm_cpu; /* Owned by cpu */
|
||||
void *skm_objs[0]; /* Object pointers */
|
||||
void *skm_objs[]; /* Object pointers */
|
||||
} spl_kmem_magazine_t;
|
||||
|
||||
typedef struct spl_kmem_obj {
|
||||
|
||||
@@ -29,12 +29,13 @@
|
||||
|
||||
/*
|
||||
* Due to frequent changes in the shrinker API the following
|
||||
* compatibility wrappers should be used. They are as follows:
|
||||
* compatibility wrapper should be used.
|
||||
*
|
||||
* SPL_SHRINKER_DECLARE(varname, countfunc, scanfunc, seek_cost);
|
||||
* shrinker = spl_register_shrinker(name, countfunc, scanfunc, seek_cost);
|
||||
* spl_unregister_shrinker(shrinker);
|
||||
*
|
||||
* SPL_SHRINKER_DECLARE is used to declare a shrinker with the name varname,
|
||||
* which is passed to spl_register_shrinker()/spl_unregister_shrinker().
|
||||
* spl_register_shrinker is used to create and register a shrinker with the
|
||||
* given name.
|
||||
* The countfunc returns the number of free-able objects.
|
||||
* The scanfunc returns the number of objects that were freed.
|
||||
* The callbacks can return SHRINK_STOP if further calls can't make any more
|
||||
@@ -57,57 +58,28 @@
|
||||
* ...scan objects in the cache and reclaim them...
|
||||
* }
|
||||
*
|
||||
* SPL_SHRINKER_DECLARE(my_shrinker, my_count, my_scan, DEFAULT_SEEKS);
|
||||
* static struct shrinker *my_shrinker;
|
||||
*
|
||||
* void my_init_func(void) {
|
||||
* spl_register_shrinker(&my_shrinker);
|
||||
* my_shrinker = spl_register_shrinker("my-shrinker",
|
||||
* my_count, my_scan, DEFAULT_SEEKS);
|
||||
* }
|
||||
*
|
||||
* void my_fini_func(void) {
|
||||
* spl_unregister_shrinker(my_shrinker);
|
||||
* }
|
||||
*/
|
||||
|
||||
#ifdef HAVE_REGISTER_SHRINKER_VARARG
|
||||
#define spl_register_shrinker(x) register_shrinker(x, "zfs-arc-shrinker")
|
||||
#else
|
||||
#define spl_register_shrinker(x) register_shrinker(x)
|
||||
#endif
|
||||
#define spl_unregister_shrinker(x) unregister_shrinker(x)
|
||||
typedef unsigned long (*spl_shrinker_cb)
|
||||
(struct shrinker *, struct shrink_control *);
|
||||
|
||||
/*
|
||||
* Linux 3.0 to 3.11 Shrinker API Compatibility.
|
||||
*/
|
||||
#if defined(HAVE_SINGLE_SHRINKER_CALLBACK)
|
||||
#define SPL_SHRINKER_DECLARE(varname, countfunc, scanfunc, seek_cost) \
|
||||
static int \
|
||||
__ ## varname ## _wrapper(struct shrinker *shrink, struct shrink_control *sc)\
|
||||
{ \
|
||||
if (sc->nr_to_scan != 0) { \
|
||||
(void) scanfunc(shrink, sc); \
|
||||
} \
|
||||
return (countfunc(shrink, sc)); \
|
||||
} \
|
||||
\
|
||||
static struct shrinker varname = { \
|
||||
.shrink = __ ## varname ## _wrapper, \
|
||||
.seeks = seek_cost, \
|
||||
}
|
||||
struct shrinker *spl_register_shrinker(const char *name,
|
||||
spl_shrinker_cb countfunc, spl_shrinker_cb scanfunc, int seek_cost);
|
||||
void spl_unregister_shrinker(struct shrinker *);
|
||||
|
||||
#ifndef SHRINK_STOP
|
||||
/* 3.0-3.11 compatibility */
|
||||
#define SHRINK_STOP (-1)
|
||||
|
||||
/*
|
||||
* Linux 3.12 and later Shrinker API Compatibility.
|
||||
*/
|
||||
#elif defined(HAVE_SPLIT_SHRINKER_CALLBACK)
|
||||
#define SPL_SHRINKER_DECLARE(varname, countfunc, scanfunc, seek_cost) \
|
||||
static struct shrinker varname = { \
|
||||
.count_objects = countfunc, \
|
||||
.scan_objects = scanfunc, \
|
||||
.seeks = seek_cost, \
|
||||
}
|
||||
|
||||
#else
|
||||
/*
|
||||
* Linux 2.x to 2.6.22, or a newer shrinker API has been introduced.
|
||||
*/
|
||||
#error "Unknown shrinker callback"
|
||||
#endif
|
||||
|
||||
#endif /* SPL_SHRINKER_H */
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
|
||||
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
|
||||
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
|
||||
* UCRL-CODE-235197
|
||||
*
|
||||
* This file is part of the SPL, Solaris Porting Layer.
|
||||
*
|
||||
* The SPL is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* The SPL is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _SPL_STRING_H
|
||||
#define _SPL_STRING_H
|
||||
|
||||
#include <linux/string.h>
|
||||
|
||||
/* Fallbacks for kernel missing strlcpy */
|
||||
#ifndef HAVE_KERNEL_STRLCPY
|
||||
|
||||
#if defined(HAVE_KERNEL_STRSCPY)
|
||||
/*
|
||||
* strscpy is strlcpy, but returns an error on truncation. strlcpy is defined
|
||||
* to return strlen(src), so detect error and override it.
|
||||
*/
|
||||
static inline size_t
|
||||
strlcpy(char *dest, const char *src, size_t size)
|
||||
{
|
||||
ssize_t ret = strscpy(dest, src, size);
|
||||
if (likely(ret > 0))
|
||||
return ((size_t)ret);
|
||||
return (strlen(src));
|
||||
}
|
||||
#else
|
||||
#error "no strlcpy fallback available"
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_KERNEL_STRLCPY */
|
||||
|
||||
#endif /* _SPL_STRING_H */
|
||||
@@ -38,7 +38,7 @@ typedef unsigned long ulong_t;
|
||||
typedef unsigned long long u_longlong_t;
|
||||
typedef long long longlong_t;
|
||||
|
||||
typedef unsigned long intptr_t;
|
||||
typedef long intptr_t;
|
||||
typedef unsigned long long rlim64_t;
|
||||
|
||||
typedef struct task_struct kthread_t;
|
||||
|
||||
@@ -146,4 +146,16 @@ zfs_uio_iov_iter_init(zfs_uio_t *uio, struct iov_iter *iter, offset_t offset,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_ITER_IOV)
|
||||
#define zfs_uio_iter_iov(iter) iter_iov((iter))
|
||||
#else
|
||||
#define zfs_uio_iter_iov(iter) (iter)->iov
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_IOV_ITER_TYPE)
|
||||
#define zfs_uio_iov_iter_type(iter) iov_iter_type((iter))
|
||||
#else
|
||||
#define zfs_uio_iov_iter_type(iter) (iter)->type
|
||||
#endif
|
||||
|
||||
#endif /* SPL_UIO_H */
|
||||
|
||||
@@ -54,7 +54,12 @@ extern int zfs_mkdir(znode_t *dzp, char *dirname, vattr_t *vap,
|
||||
extern int zfs_rmdir(znode_t *dzp, char *name, znode_t *cwd,
|
||||
cred_t *cr, int flags);
|
||||
extern int zfs_readdir(struct inode *ip, zpl_dir_context_t *ctx, cred_t *cr);
|
||||
#ifdef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK
|
||||
extern int zfs_getattr_fast(zidmap_t *, u32 request_mask, struct inode *ip,
|
||||
struct kstat *sp);
|
||||
#else
|
||||
extern int zfs_getattr_fast(zidmap_t *, struct inode *ip, struct kstat *sp);
|
||||
#endif
|
||||
extern int zfs_setattr(znode_t *zp, vattr_t *vap, int flag, cred_t *cr);
|
||||
extern int zfs_rename(znode_t *sdzp, char *snm, znode_t *tdzp,
|
||||
char *tnm, cred_t *cr, int flags);
|
||||
|
||||
@@ -207,4 +207,35 @@ zpl_dir_emit_dots(struct file *file, zpl_dir_context_t *ctx)
|
||||
#define zpl_setattr_prepare(ns, dentry, ia) setattr_prepare(dentry, ia)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_INODE_GET_CTIME
|
||||
#define zpl_inode_get_ctime(ip) inode_get_ctime(ip)
|
||||
#else
|
||||
#define zpl_inode_get_ctime(ip) (ip->i_ctime)
|
||||
#endif
|
||||
#ifdef HAVE_INODE_SET_CTIME_TO_TS
|
||||
#define zpl_inode_set_ctime_to_ts(ip, ts) inode_set_ctime_to_ts(ip, ts)
|
||||
#else
|
||||
#define zpl_inode_set_ctime_to_ts(ip, ts) (ip->i_ctime = ts)
|
||||
#endif
|
||||
#ifdef HAVE_INODE_GET_ATIME
|
||||
#define zpl_inode_get_atime(ip) inode_get_atime(ip)
|
||||
#else
|
||||
#define zpl_inode_get_atime(ip) (ip->i_atime)
|
||||
#endif
|
||||
#ifdef HAVE_INODE_SET_ATIME_TO_TS
|
||||
#define zpl_inode_set_atime_to_ts(ip, ts) inode_set_atime_to_ts(ip, ts)
|
||||
#else
|
||||
#define zpl_inode_set_atime_to_ts(ip, ts) (ip->i_atime = ts)
|
||||
#endif
|
||||
#ifdef HAVE_INODE_GET_MTIME
|
||||
#define zpl_inode_get_mtime(ip) inode_get_mtime(ip)
|
||||
#else
|
||||
#define zpl_inode_get_mtime(ip) (ip->i_mtime)
|
||||
#endif
|
||||
#ifdef HAVE_INODE_SET_MTIME_TO_TS
|
||||
#define zpl_inode_set_mtime_to_ts(ip, ts) inode_set_mtime_to_ts(ip, ts)
|
||||
#else
|
||||
#define zpl_inode_set_mtime_to_ts(ip, ts) (ip->i_mtime = ts)
|
||||
#endif
|
||||
|
||||
#endif /* _SYS_ZPL_H */
|
||||
|
||||
@@ -130,7 +130,7 @@ typedef struct raidz_row {
|
||||
uint64_t rr_offset; /* Logical offset for *_io_verify() */
|
||||
uint64_t rr_size; /* Physical size for *_io_verify() */
|
||||
#endif
|
||||
raidz_col_t rr_col[0]; /* Flexible array of I/O columns */
|
||||
raidz_col_t rr_col[]; /* Flexible array of I/O columns */
|
||||
} raidz_row_t;
|
||||
|
||||
typedef struct raidz_map {
|
||||
@@ -139,7 +139,7 @@ typedef struct raidz_map {
|
||||
int rm_nskip; /* RAIDZ sectors skipped for padding */
|
||||
int rm_skipstart; /* Column index of padding start */
|
||||
const raidz_impl_ops_t *rm_ops; /* RAIDZ math operations */
|
||||
raidz_row_t *rm_row[0]; /* flexible array of rows */
|
||||
raidz_row_t *rm_row[]; /* flexible array of rows */
|
||||
} raidz_map_t;
|
||||
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ extern "C" {
|
||||
#include <sys/disp.h>
|
||||
#include <sys/debug.h>
|
||||
#include <sys/random.h>
|
||||
#include <sys/string.h>
|
||||
#include <sys/strings.h>
|
||||
#include <sys/byteorder.h>
|
||||
#include <sys/list.h>
|
||||
|
||||
+83
-80
@@ -589,14 +589,6 @@
|
||||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='../../module/nvpair/nvpair.c' language='LANG_C99'>
|
||||
<typedef-decl name='__u_short' type-id='8efea9e5' id='46c660f8'/>
|
||||
<typedef-decl name='__u_int' type-id='f0981eeb' id='8ae6822f'/>
|
||||
<typedef-decl name='__quad_t' type-id='bd54fe1a' id='2632227a'/>
|
||||
<typedef-decl name='__u_quad_t' type-id='7359adad' id='5f3d50a6'/>
|
||||
<typedef-decl name='u_short' type-id='46c660f8' id='32580e96'/>
|
||||
<typedef-decl name='u_int' type-id='8ae6822f' id='48f7c3f5'/>
|
||||
<typedef-decl name='quad_t' type-id='2632227a' id='f5ef0660'/>
|
||||
<typedef-decl name='u_quad_t' type-id='5f3d50a6' id='bd226ac0'/>
|
||||
<typedef-decl name='bool_t' type-id='3ff5601b' id='310a70df'/>
|
||||
<enum-decl name='xdr_op' id='6badf1b8'>
|
||||
<underlying-type type-id='9cac1fee'/>
|
||||
@@ -655,6 +647,14 @@
|
||||
</class-decl>
|
||||
<typedef-decl name='XDR' type-id='755707df' id='bc407f0e'/>
|
||||
<typedef-decl name='xdrproc_t' type-id='94d188f0' id='c28db3e9'/>
|
||||
<typedef-decl name='__u_short' type-id='8efea9e5' id='46c660f8'/>
|
||||
<typedef-decl name='__u_int' type-id='f0981eeb' id='8ae6822f'/>
|
||||
<typedef-decl name='__quad_t' type-id='bd54fe1a' id='2632227a'/>
|
||||
<typedef-decl name='__u_quad_t' type-id='7359adad' id='5f3d50a6'/>
|
||||
<typedef-decl name='u_short' type-id='46c660f8' id='32580e96'/>
|
||||
<typedef-decl name='u_int' type-id='8ae6822f' id='48f7c3f5'/>
|
||||
<typedef-decl name='quad_t' type-id='2632227a' id='f5ef0660'/>
|
||||
<typedef-decl name='u_quad_t' type-id='5f3d50a6' id='bd226ac0'/>
|
||||
<pointer-type-def type-id='bc407f0e' size-in-bits='64' id='17fd1621'/>
|
||||
<pointer-type-def type-id='755707df' size-in-bits='64' id='812c6697'/>
|
||||
<qualified-type-def type-id='26a90f95' const='yes' id='57de658a'/>
|
||||
@@ -1771,6 +1771,63 @@
|
||||
<var-decl name='nvprt_custops' type-id='7be54adb' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='__re_long_size_t' type-id='7359adad' id='ba516949'/>
|
||||
<typedef-decl name='reg_syntax_t' type-id='7359adad' id='1b72c3b3'/>
|
||||
<class-decl name='re_pattern_buffer' size-in-bits='512' is-struct='yes' visibility='default' id='19fc9a8c'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='buffer' type-id='33976309' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='allocated' type-id='ba516949' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='used' type-id='ba516949' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='192'>
|
||||
<var-decl name='syntax' type-id='1b72c3b3' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='256'>
|
||||
<var-decl name='fastmap' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='320'>
|
||||
<var-decl name='translate' type-id='cf536864' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='384'>
|
||||
<var-decl name='re_nsub' type-id='b59d7dce' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='448'>
|
||||
<var-decl name='can_be_null' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='449'>
|
||||
<var-decl name='regs_allocated' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='451'>
|
||||
<var-decl name='fastmap_accurate' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='452'>
|
||||
<var-decl name='no_sub' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='453'>
|
||||
<var-decl name='not_bol' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='454'>
|
||||
<var-decl name='not_eol' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='455'>
|
||||
<var-decl name='newline_anchor' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='regex_t' type-id='19fc9a8c' id='aca3bac8'/>
|
||||
<typedef-decl name='regoff_t' type-id='95e97e5e' id='54a2a2a8'/>
|
||||
<class-decl name='regmatch_t' size-in-bits='64' is-struct='yes' naming-typedef-id='1b941664' visibility='default' id='4f932615'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='rm_so' type-id='54a2a2a8' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='32'>
|
||||
<var-decl name='rm_eo' type-id='54a2a2a8' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='regmatch_t' type-id='4f932615' id='1b941664'/>
|
||||
<typedef-decl name='int8_t' type-id='2171a512' id='ee31ee44'/>
|
||||
<typedef-decl name='int16_t' type-id='03896e23' id='23bd8cb5'/>
|
||||
<typedef-decl name='int32_t' type-id='33f57a65' id='3ff5601b'/>
|
||||
@@ -1880,63 +1937,6 @@
|
||||
<var-decl name='_unused2' type-id='664ac0b7' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='__re_long_size_t' type-id='7359adad' id='ba516949'/>
|
||||
<typedef-decl name='reg_syntax_t' type-id='7359adad' id='1b72c3b3'/>
|
||||
<class-decl name='re_pattern_buffer' size-in-bits='512' is-struct='yes' visibility='default' id='19fc9a8c'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='buffer' type-id='33976309' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='allocated' type-id='ba516949' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='used' type-id='ba516949' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='192'>
|
||||
<var-decl name='syntax' type-id='1b72c3b3' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='256'>
|
||||
<var-decl name='fastmap' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='320'>
|
||||
<var-decl name='translate' type-id='cf536864' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='384'>
|
||||
<var-decl name='re_nsub' type-id='b59d7dce' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='448'>
|
||||
<var-decl name='can_be_null' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='449'>
|
||||
<var-decl name='regs_allocated' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='451'>
|
||||
<var-decl name='fastmap_accurate' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='452'>
|
||||
<var-decl name='no_sub' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='453'>
|
||||
<var-decl name='not_bol' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='454'>
|
||||
<var-decl name='not_eol' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='455'>
|
||||
<var-decl name='newline_anchor' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='regex_t' type-id='19fc9a8c' id='aca3bac8'/>
|
||||
<typedef-decl name='regoff_t' type-id='95e97e5e' id='54a2a2a8'/>
|
||||
<class-decl name='regmatch_t' size-in-bits='64' is-struct='yes' naming-typedef-id='1b941664' visibility='default' id='4f932615'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='rm_so' type-id='54a2a2a8' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='32'>
|
||||
<var-decl name='rm_eo' type-id='54a2a2a8' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='regmatch_t' type-id='4f932615' id='1b941664'/>
|
||||
<typedef-decl name='size_t' type-id='7359adad' id='b59d7dce'/>
|
||||
<pointer-type-def type-id='aa12d1ba' size-in-bits='64' id='822cd80b'/>
|
||||
<qualified-type-def type-id='822cd80b' restrict='yes' id='e75a27e9'/>
|
||||
@@ -2452,17 +2452,6 @@
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='fprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='printf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='malloc' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='eaa32e2f'/>
|
||||
@@ -2491,6 +2480,19 @@
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='b59d7dce'/>
|
||||
</function-decl>
|
||||
<function-decl name='__fprintf_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='__printf_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-type size-in-bits='64' id='9f88f76e'>
|
||||
<parameter type-id='196db161'/>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
@@ -3124,14 +3126,15 @@
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='assert.c' language='LANG_C99'>
|
||||
<var-decl name='aok' type-id='95e97e5e' mangled-name='aok' visibility='default' elf-symbol-id='aok'/>
|
||||
<function-decl name='vfprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<function-decl name='abort' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='__vfprintf_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='b7f2d5e6'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='abort' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
</abi-instr>
|
||||
</abi-corpus>
|
||||
|
||||
@@ -200,6 +200,17 @@ nvprint_##type_and_variant(nvlist_prtctl_t pctl, void *private, \
|
||||
return (1); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Workaround for GCC 12+ with UBSan enabled deficencies.
|
||||
*
|
||||
* GCC 12+ invoked with -fsanitize=undefined incorrectly reports the code
|
||||
* below as violating -Wformat-overflow.
|
||||
*/
|
||||
#if defined(__GNUC__) && !defined(__clang__) && \
|
||||
defined(ZFS_UBSAN_ENABLED) && defined(HAVE_FORMAT_OVERFLOW)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-overflow"
|
||||
#endif
|
||||
NVLIST_PRTFUNC(boolean, int, int, "%d")
|
||||
NVLIST_PRTFUNC(boolean_value, boolean_t, int, "%d")
|
||||
NVLIST_PRTFUNC(byte, uchar_t, uchar_t, "0x%2.2x")
|
||||
@@ -214,6 +225,10 @@ NVLIST_PRTFUNC(uint64, uint64_t, u_longlong_t, "0x%llx")
|
||||
NVLIST_PRTFUNC(double, double, double, "0x%f")
|
||||
NVLIST_PRTFUNC(string, char *, char *, "%s")
|
||||
NVLIST_PRTFUNC(hrtime, hrtime_t, hrtime_t, "0x%llx")
|
||||
#if defined(__GNUC__) && !defined(__clang__) && \
|
||||
defined(ZFS_UBSAN_ENABLED) && defined(HAVE_FORMAT_OVERFLOW)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Generate functions to print array-valued nvlist members.
|
||||
|
||||
@@ -180,8 +180,9 @@ foreach_nfs_host_cb(const char *opt, const char *value, void *pcookie)
|
||||
{
|
||||
int error;
|
||||
const char *access;
|
||||
char *host_dup, *host, *next;
|
||||
char *host_dup, *host, *next, *v6Literal;
|
||||
nfs_host_cookie_t *udata = (nfs_host_cookie_t *)pcookie;
|
||||
int cidr_len;
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "foreach_nfs_host_cb: key=%s, value=%s\n", opt, value);
|
||||
@@ -204,10 +205,46 @@ foreach_nfs_host_cb(const char *opt, const char *value, void *pcookie)
|
||||
host = host_dup;
|
||||
|
||||
do {
|
||||
next = strchr(host, ':');
|
||||
if (next != NULL) {
|
||||
*next = '\0';
|
||||
next++;
|
||||
if (*host == '[') {
|
||||
host++;
|
||||
v6Literal = strchr(host, ']');
|
||||
if (v6Literal == NULL) {
|
||||
free(host_dup);
|
||||
return (SA_SYNTAX_ERR);
|
||||
}
|
||||
if (v6Literal[1] == '\0') {
|
||||
*v6Literal = '\0';
|
||||
next = NULL;
|
||||
} else if (v6Literal[1] == '/') {
|
||||
next = strchr(v6Literal + 2, ':');
|
||||
if (next == NULL) {
|
||||
cidr_len =
|
||||
strlen(v6Literal + 1);
|
||||
memmove(v6Literal,
|
||||
v6Literal + 1,
|
||||
cidr_len);
|
||||
v6Literal[cidr_len] = '\0';
|
||||
} else {
|
||||
cidr_len = next - v6Literal - 1;
|
||||
memmove(v6Literal,
|
||||
v6Literal + 1,
|
||||
cidr_len);
|
||||
v6Literal[cidr_len] = '\0';
|
||||
next++;
|
||||
}
|
||||
} else if (v6Literal[1] == ':') {
|
||||
*v6Literal = '\0';
|
||||
next = v6Literal + 2;
|
||||
} else {
|
||||
free(host_dup);
|
||||
return (SA_SYNTAX_ERR);
|
||||
}
|
||||
} else {
|
||||
next = strchr(host, ':');
|
||||
if (next != NULL) {
|
||||
*next = '\0';
|
||||
next++;
|
||||
}
|
||||
}
|
||||
|
||||
error = udata->callback(udata->filename,
|
||||
|
||||
+71
-84
@@ -774,16 +774,23 @@
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='eaa32e2f'/>
|
||||
</function-decl>
|
||||
<function-decl name='mbstowcs' visibility='default' binding='global' size-in-bits='64'>
|
||||
<function-decl name='access' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='__mbstowcs_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='f1358bc3'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='b59d7dce'/>
|
||||
</function-decl>
|
||||
<function-decl name='wcstombs' visibility='default' binding='global' size-in-bits='64'>
|
||||
<function-decl name='__wcstombs_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='266fe297'/>
|
||||
<parameter type-id='598aab80'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='b59d7dce'/>
|
||||
</function-decl>
|
||||
<function-decl name='mkdir' visibility='default' binding='global' size-in-bits='64'>
|
||||
@@ -791,17 +798,13 @@
|
||||
<parameter type-id='e1c52942'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='access' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='os/linux/getexecname.c' language='LANG_C99'>
|
||||
<function-decl name='readlink' visibility='default' binding='global' size-in-bits='64'>
|
||||
<function-decl name='__readlink_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='266fe297'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='79a0948f'/>
|
||||
</function-decl>
|
||||
</abi-instr>
|
||||
@@ -827,10 +830,11 @@
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='read' visibility='default' binding='global' size-in-bits='64'>
|
||||
<function-decl name='__read_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='79a0948f'/>
|
||||
</function-decl>
|
||||
<function-decl name='get_system_hostid' mangled-name='get_system_hostid' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='get_system_hostid'>
|
||||
@@ -879,6 +883,26 @@
|
||||
<var-decl name='mnt_minor' type-id='3502e3ff' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<class-decl name='mntent' size-in-bits='320' is-struct='yes' visibility='default' id='56fe4a37'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='mnt_fsname' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='mnt_dir' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='mnt_type' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='192'>
|
||||
<var-decl name='mnt_opts' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='256'>
|
||||
<var-decl name='mnt_freq' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='288'>
|
||||
<var-decl name='mnt_passno' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<class-decl name='stat64' size-in-bits='1152' is-struct='yes' visibility='default' id='0bbec9cd'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='st_dev' type-id='35ed8932' visibility='default'/>
|
||||
@@ -933,26 +957,6 @@
|
||||
<typedef-decl name='__nlink_t' type-id='7359adad' id='80f0b9df'/>
|
||||
<typedef-decl name='__blksize_t' type-id='bd54fe1a' id='d3f10a7f'/>
|
||||
<typedef-decl name='__blkcnt64_t' type-id='bd54fe1a' id='4e711bf1'/>
|
||||
<class-decl name='mntent' size-in-bits='320' is-struct='yes' visibility='default' id='56fe4a37'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='mnt_fsname' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='mnt_dir' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='mnt_type' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='192'>
|
||||
<var-decl name='mnt_opts' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='256'>
|
||||
<var-decl name='mnt_freq' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='288'>
|
||||
<var-decl name='mnt_passno' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<pointer-type-def type-id='0c544dc0' size-in-bits='64' id='394fc496'/>
|
||||
<pointer-type-def type-id='56fe4a37' size-in-bits='64' id='b6b61d2f'/>
|
||||
<qualified-type-def type-id='b6b61d2f' restrict='yes' id='3cad23cd'/>
|
||||
@@ -1019,6 +1023,7 @@
|
||||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='timestamp.c' language='LANG_C99'>
|
||||
<typedef-decl name='nl_item' type-id='95e97e5e' id='03b79a94'/>
|
||||
<class-decl name='tm' size-in-bits='448' is-struct='yes' visibility='default' id='dddf6ca2'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='tm_sec' type-id='95e97e5e' visibility='default'/>
|
||||
@@ -1055,7 +1060,6 @@
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='time_t' type-id='65eda9c0' id='c9d12d66'/>
|
||||
<typedef-decl name='nl_item' type-id='95e97e5e' id='03b79a94'/>
|
||||
<qualified-type-def type-id='c9d12d66' const='yes' id='588b3216'/>
|
||||
<pointer-type-def type-id='588b3216' size-in-bits='64' id='9f201474'/>
|
||||
<qualified-type-def type-id='dddf6ca2' const='yes' id='e824a34f'/>
|
||||
@@ -1071,11 +1075,6 @@
|
||||
<parameter type-id='03b79a94'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
<function-decl name='printf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='time' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='b2eb2c3f'/>
|
||||
<return type-id='c9d12d66'/>
|
||||
@@ -1091,31 +1090,21 @@
|
||||
<parameter type-id='9f201474'/>
|
||||
<return type-id='d915a820'/>
|
||||
</function-decl>
|
||||
<function-decl name='__printf_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='uu_alloc.c' language='LANG_C99'>
|
||||
<type-decl name='char' size-in-bits='8' id='a84c031d'/>
|
||||
<class-decl name='__va_list_tag' size-in-bits='192' is-struct='yes' visibility='default' id='d5027220'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='gp_offset' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='32'>
|
||||
<var-decl name='fp_offset' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='overflow_arg_area' type-id='eaa32e2f' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='reg_save_area' type-id='eaa32e2f' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<type-decl name='int' size-in-bits='32' id='95e97e5e'/>
|
||||
<type-decl name='unsigned int' size-in-bits='32' id='f0981eeb'/>
|
||||
<type-decl name='unsigned long int' size-in-bits='64' id='7359adad'/>
|
||||
<type-decl name='variadic parameter type' id='2c1145c5'/>
|
||||
<type-decl name='void' id='48b5725f'/>
|
||||
<typedef-decl name='uint_t' type-id='f0981eeb' id='3502e3ff'/>
|
||||
<typedef-decl name='size_t' type-id='7359adad' id='b59d7dce'/>
|
||||
<pointer-type-def type-id='d5027220' size-in-bits='64' id='b7f2d5e6'/>
|
||||
<pointer-type-def type-id='a84c031d' size-in-bits='64' id='26a90f95'/>
|
||||
<qualified-type-def type-id='a84c031d' const='yes' id='9b45d938'/>
|
||||
<pointer-type-def type-id='9b45d938' size-in-bits='64' id='80f4b756'/>
|
||||
@@ -1151,13 +1140,6 @@
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
<function-decl name='vsnprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='26a90f95'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter type-id='b7f2d5e6'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='malloc' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='eaa32e2f'/>
|
||||
@@ -1166,18 +1148,6 @@
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='memcpy' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='eaa32e2f'/>
|
||||
</function-decl>
|
||||
<function-decl name='memset' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='eaa32e2f'/>
|
||||
</function-decl>
|
||||
<function-decl name='strlen' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='b59d7dce'/>
|
||||
@@ -1201,6 +1171,7 @@
|
||||
<array-type-def dimensions='1' type-id='a84c031d' size-in-bits='512' id='59daf3ef'>
|
||||
<subrange length='64' type-id='7359adad' id='b10be967'/>
|
||||
</array-type-def>
|
||||
<type-decl name='int' size-in-bits='32' id='95e97e5e'/>
|
||||
<type-decl name='long int' size-in-bits='64' id='bd54fe1a'/>
|
||||
<type-decl name='short int' size-in-bits='16' id='a2185560'/>
|
||||
<type-decl name='signed char' size-in-bits='8' id='28577a57'/>
|
||||
@@ -1326,6 +1297,7 @@
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='ulong_t' type-id='7359adad' id='ee1f298e'/>
|
||||
<typedef-decl name='uintptr_t' type-id='7359adad' id='e475ab95'/>
|
||||
<union-decl name='pthread_mutexattr_t' size-in-bits='32' naming-typedef-id='8afd6070' visibility='default' id='7300eb00'>
|
||||
<data-member access='public'>
|
||||
<var-decl name='__size' type-id='8e0573fd' visibility='default'/>
|
||||
@@ -1388,7 +1360,6 @@
|
||||
<typedef-decl name='__int8_t' type-id='28577a57' id='2171a512'/>
|
||||
<typedef-decl name='__uint8_t' type-id='002ac4a6' id='c51d6389'/>
|
||||
<typedef-decl name='__uint32_t' type-id='f0981eeb' id='62f1140c'/>
|
||||
<typedef-decl name='uintptr_t' type-id='7359adad' id='e475ab95'/>
|
||||
<pointer-type-def type-id='0e01899c' size-in-bits='64' id='4d98cd5a'/>
|
||||
<pointer-type-def type-id='fba6cb51' size-in-bits='64' id='32adbf30'/>
|
||||
<pointer-type-def type-id='428b67b3' size-in-bits='64' id='bf311473'/>
|
||||
@@ -1633,6 +1604,20 @@
|
||||
<class-decl name='_IO_codecvt' is-struct='yes' visibility='default' is-declaration-only='yes' id='a4036571'/>
|
||||
<class-decl name='_IO_marker' is-struct='yes' visibility='default' is-declaration-only='yes' id='010ae0b9'/>
|
||||
<class-decl name='_IO_wide_data' is-struct='yes' visibility='default' is-declaration-only='yes' id='79bd3751'/>
|
||||
<class-decl name='__va_list_tag' size-in-bits='192' is-struct='yes' visibility='default' id='d5027220'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='gp_offset' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='32'>
|
||||
<var-decl name='fp_offset' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='overflow_arg_area' type-id='eaa32e2f' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='reg_save_area' type-id='eaa32e2f' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<type-decl name='unnamed-enum-underlying-type-32' is-anonymous='yes' size-in-bits='32' alignment-in-bits='32' id='9cac1fee'/>
|
||||
<type-decl name='unsigned short int' size-in-bits='16' id='8efea9e5'/>
|
||||
<typedef-decl name='uu_dprintf_t' type-id='0538fe4f' id='2367d595'/>
|
||||
@@ -1757,6 +1742,7 @@
|
||||
<pointer-type-def type-id='bb4788fa' size-in-bits='64' id='cecf4ea7'/>
|
||||
<pointer-type-def type-id='010ae0b9' size-in-bits='64' id='e4c6fa61'/>
|
||||
<pointer-type-def type-id='79bd3751' size-in-bits='64' id='c65a1f29'/>
|
||||
<pointer-type-def type-id='d5027220' size-in-bits='64' id='b7f2d5e6'/>
|
||||
<qualified-type-def type-id='80f4b756' restrict='yes' id='9d26089a'/>
|
||||
<pointer-type-def type-id='2367d595' size-in-bits='64' id='ed73b5ca'/>
|
||||
<class-decl name='_IO_codecvt' is-struct='yes' visibility='default' is-declaration-only='yes' id='a4036571'/>
|
||||
@@ -1789,22 +1775,24 @@
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
<function-decl name='fprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<function-decl name='strdup' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
<function-decl name='__fprintf_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='vfprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<function-decl name='__vfprintf_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='b7f2d5e6'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='strdup' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='uu_ident.c' language='LANG_C99'>
|
||||
<function-decl name='strchr' visibility='default' binding='global' size-in-bits='64'>
|
||||
@@ -2144,13 +2132,6 @@
|
||||
<parameter type-id='3502e3ff' name='uflags'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='snprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='26a90f95'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='clock_gettime' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='a1c3b834'/>
|
||||
<parameter type-id='3d83ba87'/>
|
||||
@@ -2160,6 +2141,12 @@
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='__open_too_many_args' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='__open_missing_mode' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='uu_pname.c' language='LANG_C99'>
|
||||
<function-decl name='getexecname' mangled-name='getexecname' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='getexecname'>
|
||||
|
||||
+303
-284
@@ -1,14 +1,10 @@
|
||||
<abi-corpus version='2.0' architecture='elf-amd-x86_64' soname='libzfs.so.4'>
|
||||
<elf-needed>
|
||||
<dependency name='libzfs_core.so.3'/>
|
||||
<dependency name='libuuid.so.1'/>
|
||||
<dependency name='libblkid.so.1'/>
|
||||
<dependency name='libudev.so.1'/>
|
||||
<dependency name='libnvpair.so.3'/>
|
||||
<dependency name='libtirpc.so.3'/>
|
||||
<dependency name='libuutil.so.3'/>
|
||||
<dependency name='libm.so.6'/>
|
||||
<dependency name='libcrypto.so.1.1'/>
|
||||
<dependency name='libcrypto.so.3'/>
|
||||
<dependency name='libz.so.1'/>
|
||||
<dependency name='libc.so.6'/>
|
||||
</elf-needed>
|
||||
@@ -333,6 +329,8 @@
|
||||
<elf-symbol name='zpool_open_canfail' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_open_silent' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_pool_state_to_name' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_prepare_and_label_disk' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_prepare_disk' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_print_unsup_feat' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_prop_align_right' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_prop_column_name' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
@@ -380,6 +378,9 @@
|
||||
<elf-symbol name='zpool_vdev_remove' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_vdev_remove_cancel' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_vdev_remove_wanted' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_vdev_script_alloc_env' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_vdev_script_free_env' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_vdev_set_removed_state' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_vdev_split' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_wait' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_wait_status' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
@@ -538,11 +539,6 @@
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='fputs' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='flock' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
@@ -601,8 +597,9 @@
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='f09217ba'/>
|
||||
</function-decl>
|
||||
<function-decl name='fgets' visibility='default' binding='global' size-in-bits='64'>
|
||||
<function-decl name='__fgets_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='266fe297'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<return type-id='26a90f95'/>
|
||||
@@ -1762,6 +1759,54 @@
|
||||
<var-decl name='cl_haszonedchild' type-id='c19b74c3' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='__re_long_size_t' type-id='7359adad' id='ba516949'/>
|
||||
<typedef-decl name='reg_syntax_t' type-id='7359adad' id='1b72c3b3'/>
|
||||
<class-decl name='re_pattern_buffer' size-in-bits='512' is-struct='yes' visibility='default' id='19fc9a8c'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='buffer' type-id='33976309' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='allocated' type-id='ba516949' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='used' type-id='ba516949' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='192'>
|
||||
<var-decl name='syntax' type-id='1b72c3b3' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='256'>
|
||||
<var-decl name='fastmap' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='320'>
|
||||
<var-decl name='translate' type-id='cf536864' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='384'>
|
||||
<var-decl name='re_nsub' type-id='b59d7dce' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='448'>
|
||||
<var-decl name='can_be_null' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='449'>
|
||||
<var-decl name='regs_allocated' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='451'>
|
||||
<var-decl name='fastmap_accurate' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='452'>
|
||||
<var-decl name='no_sub' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='453'>
|
||||
<var-decl name='not_bol' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='454'>
|
||||
<var-decl name='not_eol' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='455'>
|
||||
<var-decl name='newline_anchor' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='regex_t' type-id='19fc9a8c' id='aca3bac8'/>
|
||||
<typedef-decl name='uintptr_t' type-id='7359adad' id='e475ab95'/>
|
||||
<union-decl name='pthread_mutex_t' size-in-bits='320' naming-typedef-id='7a6844eb' visibility='default' id='70681f9b'>
|
||||
<data-member access='public'>
|
||||
<var-decl name='__data' type-id='4c734837' visibility='default'/>
|
||||
@@ -1910,54 +1955,6 @@
|
||||
<var-decl name='_unused2' type-id='664ac0b7' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='__re_long_size_t' type-id='7359adad' id='ba516949'/>
|
||||
<typedef-decl name='reg_syntax_t' type-id='7359adad' id='1b72c3b3'/>
|
||||
<class-decl name='re_pattern_buffer' size-in-bits='512' is-struct='yes' visibility='default' id='19fc9a8c'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='buffer' type-id='33976309' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='allocated' type-id='ba516949' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='used' type-id='ba516949' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='192'>
|
||||
<var-decl name='syntax' type-id='1b72c3b3' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='256'>
|
||||
<var-decl name='fastmap' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='320'>
|
||||
<var-decl name='translate' type-id='cf536864' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='384'>
|
||||
<var-decl name='re_nsub' type-id='b59d7dce' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='448'>
|
||||
<var-decl name='can_be_null' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='449'>
|
||||
<var-decl name='regs_allocated' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='451'>
|
||||
<var-decl name='fastmap_accurate' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='452'>
|
||||
<var-decl name='no_sub' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='453'>
|
||||
<var-decl name='not_bol' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='454'>
|
||||
<var-decl name='not_eol' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='455'>
|
||||
<var-decl name='newline_anchor' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='regex_t' type-id='19fc9a8c' id='aca3bac8'/>
|
||||
<typedef-decl name='uintptr_t' type-id='7359adad' id='e475ab95'/>
|
||||
<typedef-decl name='size_t' type-id='7359adad' id='b59d7dce'/>
|
||||
<pointer-type-def type-id='aa12d1ba' size-in-bits='64' id='822cd80b'/>
|
||||
<pointer-type-def type-id='ec1ed955' size-in-bits='64' id='dca988a5'/>
|
||||
@@ -2736,11 +2733,6 @@
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
<function-decl name='strcpy' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='26a90f95'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
<function-decl name='strchr' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
@@ -2802,6 +2794,18 @@
|
||||
</enum-decl>
|
||||
<typedef-decl name='zpool_prop_t' type-id='af1ba157' id='5d0c23fb'/>
|
||||
<typedef-decl name='uint_t' type-id='f0981eeb' id='3502e3ff'/>
|
||||
<typedef-decl name='regoff_t' type-id='95e97e5e' id='54a2a2a8'/>
|
||||
<class-decl name='regmatch_t' size-in-bits='64' is-struct='yes' naming-typedef-id='1b941664' visibility='default' id='4f932615'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='rm_so' type-id='54a2a2a8' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='32'>
|
||||
<var-decl name='rm_eo' type-id='54a2a2a8' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='regmatch_t' type-id='4f932615' id='1b941664'/>
|
||||
<typedef-decl name='__sighandler_t' type-id='03347643' id='8cdd9566'/>
|
||||
<typedef-decl name='ssize_t' type-id='41060289' id='79a0948f'/>
|
||||
<class-decl name='sigaction' size-in-bits='1216' is-struct='yes' visibility='default' id='fe391c48'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='__sigaction_handler' type-id='ac5ab598' visibility='default'/>
|
||||
@@ -3010,18 +3014,6 @@
|
||||
</class-decl>
|
||||
<typedef-decl name='siginfo_t' type-id='d8149419' id='cb681f62'/>
|
||||
<typedef-decl name='sigset_t' type-id='b9c97942' id='daf33c64'/>
|
||||
<typedef-decl name='regoff_t' type-id='95e97e5e' id='54a2a2a8'/>
|
||||
<class-decl name='regmatch_t' size-in-bits='64' is-struct='yes' naming-typedef-id='1b941664' visibility='default' id='4f932615'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='rm_so' type-id='54a2a2a8' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='32'>
|
||||
<var-decl name='rm_eo' type-id='54a2a2a8' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='regmatch_t' type-id='4f932615' id='1b941664'/>
|
||||
<typedef-decl name='__sighandler_t' type-id='03347643' id='8cdd9566'/>
|
||||
<typedef-decl name='ssize_t' type-id='41060289' id='79a0948f'/>
|
||||
<qualified-type-def type-id='822cd80b' restrict='yes' id='e75a27e9'/>
|
||||
<qualified-type-def type-id='9b23c9ad' restrict='yes' id='8c85230f'/>
|
||||
<qualified-type-def type-id='80f4b756' restrict='yes' id='9d26089a'/>
|
||||
@@ -3253,24 +3245,6 @@
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='822cd80b'/>
|
||||
</function-decl>
|
||||
<function-decl name='printf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='snprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='26a90f95'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='asprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='8c85230f'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='fputc' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='822cd80b'/>
|
||||
@@ -3283,13 +3257,6 @@
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<return type-id='41060289'/>
|
||||
</function-decl>
|
||||
<function-decl name='fread' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='1b7446cd'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<return type-id='b59d7dce'/>
|
||||
</function-decl>
|
||||
<function-decl name='rewind' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='822cd80b'/>
|
||||
<return type-id='48b5725f'/>
|
||||
@@ -3311,12 +3278,6 @@
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='eaa32e2f'/>
|
||||
</function-decl>
|
||||
<function-decl name='memcpy' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='eaa32e2f'/>
|
||||
</function-decl>
|
||||
<function-decl name='strdup' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='26a90f95'/>
|
||||
@@ -3340,12 +3301,6 @@
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='read' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='79a0948f'/>
|
||||
</function-decl>
|
||||
<function-decl name='getpid' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='3629bad8'/>
|
||||
</function-decl>
|
||||
@@ -3357,6 +3312,40 @@
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='__open_too_many_args' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='__open_missing_mode' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='__printf_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='__asprintf_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='8c85230f'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='__fread_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='1b7446cd'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<return type-id='b59d7dce'/>
|
||||
</function-decl>
|
||||
<function-decl name='__read_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='79a0948f'/>
|
||||
</function-decl>
|
||||
<function-type size-in-bits='64' id='ee076206'>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-type>
|
||||
@@ -3401,13 +3390,13 @@
|
||||
<typedef-decl name='zprop_list_t' type-id='bd9b4291' id='bdb8ac4f'/>
|
||||
<class-decl name='renameflags' size-in-bits='32' is-struct='yes' visibility='default' id='7aee5792'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='recursive' type-id='95e97e5e' visibility='default'/>
|
||||
<var-decl name='recursive' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1'>
|
||||
<var-decl name='nounmount' type-id='95e97e5e' visibility='default'/>
|
||||
<var-decl name='nounmount' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='2'>
|
||||
<var-decl name='forceunmount' type-id='95e97e5e' visibility='default'/>
|
||||
<var-decl name='forceunmount' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='renameflags_t' type-id='7aee5792' id='067170c2'/>
|
||||
@@ -3479,55 +3468,6 @@
|
||||
<var-decl name='mnt_mntopts' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<union-decl name='pthread_mutexattr_t' size-in-bits='32' naming-typedef-id='8afd6070' visibility='default' id='7300eb00'>
|
||||
<data-member access='public'>
|
||||
<var-decl name='__size' type-id='8e0573fd' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public'>
|
||||
<var-decl name='__align' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
</union-decl>
|
||||
<typedef-decl name='pthread_mutexattr_t' type-id='7300eb00' id='8afd6070'/>
|
||||
<typedef-decl name='int64_t' type-id='0c9942d2' id='9da381c4'/>
|
||||
<typedef-decl name='__int64_t' type-id='bd54fe1a' id='0c9942d2'/>
|
||||
<typedef-decl name='__gid_t' type-id='f0981eeb' id='d94ec6d9'/>
|
||||
<typedef-decl name='__time_t' type-id='bd54fe1a' id='65eda9c0'/>
|
||||
<class-decl name='tm' size-in-bits='448' is-struct='yes' visibility='default' id='dddf6ca2'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='tm_sec' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='32'>
|
||||
<var-decl name='tm_min' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='tm_hour' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='96'>
|
||||
<var-decl name='tm_mday' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='tm_mon' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='160'>
|
||||
<var-decl name='tm_year' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='192'>
|
||||
<var-decl name='tm_wday' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='224'>
|
||||
<var-decl name='tm_yday' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='256'>
|
||||
<var-decl name='tm_isdst' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='320'>
|
||||
<var-decl name='tm_gmtoff' type-id='bd54fe1a' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='384'>
|
||||
<var-decl name='tm_zone' type-id='80f4b756' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='time_t' type-id='65eda9c0' id='c9d12d66'/>
|
||||
<class-decl name='group' size-in-bits='256' is-struct='yes' visibility='default' id='01a1b934'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='gr_name' type-id='26a90f95' visibility='default'/>
|
||||
@@ -3585,6 +3525,55 @@
|
||||
<var-decl name='pw_shell' type-id='26a90f95' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<union-decl name='pthread_mutexattr_t' size-in-bits='32' naming-typedef-id='8afd6070' visibility='default' id='7300eb00'>
|
||||
<data-member access='public'>
|
||||
<var-decl name='__size' type-id='8e0573fd' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public'>
|
||||
<var-decl name='__align' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
</union-decl>
|
||||
<typedef-decl name='pthread_mutexattr_t' type-id='7300eb00' id='8afd6070'/>
|
||||
<typedef-decl name='int64_t' type-id='0c9942d2' id='9da381c4'/>
|
||||
<typedef-decl name='__int64_t' type-id='bd54fe1a' id='0c9942d2'/>
|
||||
<typedef-decl name='__gid_t' type-id='f0981eeb' id='d94ec6d9'/>
|
||||
<typedef-decl name='__time_t' type-id='bd54fe1a' id='65eda9c0'/>
|
||||
<class-decl name='tm' size-in-bits='448' is-struct='yes' visibility='default' id='dddf6ca2'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='tm_sec' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='32'>
|
||||
<var-decl name='tm_min' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='tm_hour' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='96'>
|
||||
<var-decl name='tm_mday' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='tm_mon' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='160'>
|
||||
<var-decl name='tm_year' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='192'>
|
||||
<var-decl name='tm_wday' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='224'>
|
||||
<var-decl name='tm_yday' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='256'>
|
||||
<var-decl name='tm_isdst' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='320'>
|
||||
<var-decl name='tm_gmtoff' type-id='bd54fe1a' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='384'>
|
||||
<var-decl name='tm_zone' type-id='80f4b756' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='time_t' type-id='65eda9c0' id='c9d12d66'/>
|
||||
<typedef-decl name='uid_t' type-id='cc5fcceb' id='354978ed'/>
|
||||
<pointer-type-def type-id='fba6cb51' size-in-bits='64' id='32adbf30'/>
|
||||
<pointer-type-def type-id='f20fbd51' size-in-bits='64' id='a3681dea'/>
|
||||
@@ -4459,12 +4448,6 @@
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='a195f4a3'/>
|
||||
</function-decl>
|
||||
<function-decl name='fprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='strtol' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='8c85230f'/>
|
||||
@@ -4480,12 +4463,6 @@
|
||||
<function-decl name='abort' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='strncpy' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='26a90f95'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
<function-decl name='strrchr' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
@@ -4506,12 +4483,6 @@
|
||||
<parameter type-id='9d26089a'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
<function-decl name='ioctl' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='7359adad'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='strftime' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='266fe297'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
@@ -4524,6 +4495,19 @@
|
||||
<parameter type-id='f099ad08'/>
|
||||
<return type-id='d915a820'/>
|
||||
</function-decl>
|
||||
<function-decl name='__fprintf_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='ioctl' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='7359adad'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-type size-in-bits='64' id='7e291ce6'>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
@@ -4536,7 +4520,7 @@
|
||||
<array-type-def dimensions='1' type-id='a84c031d' size-in-bits='448' id='6093ff7c'>
|
||||
<subrange length='56' type-id='7359adad' id='f8137894'/>
|
||||
</array-type-def>
|
||||
<class-decl name='differ_info' size-in-bits='9024' is-struct='yes' visibility='default' id='d41965ee'>
|
||||
<class-decl name='differ_info' size-in-bits='9088' is-struct='yes' visibility='default' id='d41965ee'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='zhp' type-id='9200a744' visibility='default'/>
|
||||
</data-member>
|
||||
@@ -4577,18 +4561,21 @@
|
||||
<var-decl name='timestamped' type-id='c19b74c3' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='8832'>
|
||||
<var-decl name='shares' type-id='9c313c2d' visibility='default'/>
|
||||
<var-decl name='no_mangle' type-id='c19b74c3' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='8896'>
|
||||
<var-decl name='zerr' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='8928'>
|
||||
<var-decl name='cleanupfd' type-id='95e97e5e' visibility='default'/>
|
||||
<var-decl name='shares' type-id='9c313c2d' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='8960'>
|
||||
<var-decl name='outputfd' type-id='95e97e5e' visibility='default'/>
|
||||
<var-decl name='zerr' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='8992'>
|
||||
<var-decl name='cleanupfd' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='9024'>
|
||||
<var-decl name='outputfd' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='9056'>
|
||||
<var-decl name='datafd' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
@@ -4626,6 +4613,13 @@
|
||||
<parameter type-id='ee78f675'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='color_start' mangled-name='color_start' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='color_start'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='color_end' mangled-name='color_end' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='color_end'>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='zfs_show_diffs' mangled-name='zfs_show_diffs' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_show_diffs'>
|
||||
<parameter type-id='9200a744' name='zhp'/>
|
||||
<parameter type-id='95e97e5e' name='outfd'/>
|
||||
@@ -4650,6 +4644,11 @@
|
||||
<parameter type-id='4051f5e7'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='fputs' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='pipe2' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='7292109c'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
@@ -4779,24 +4778,6 @@
|
||||
<parameter type-id='37e3bd22' name='inuse'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='memset' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='eaa32e2f'/>
|
||||
</function-decl>
|
||||
<function-decl name='fstat64' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='62f7a03d'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='pread64' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='724e4de6'/>
|
||||
<return type-id='79a0948f'/>
|
||||
</function-decl>
|
||||
<function-decl name='pwrite64' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
@@ -4804,6 +4785,19 @@
|
||||
<parameter type-id='724e4de6'/>
|
||||
<return type-id='79a0948f'/>
|
||||
</function-decl>
|
||||
<function-decl name='__pread64_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='724e4de6'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='79a0948f'/>
|
||||
</function-decl>
|
||||
<function-decl name='fstat64' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='62f7a03d'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-type size-in-bits='64' id='baa42fef'>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
@@ -4902,6 +4896,9 @@
|
||||
</class-decl>
|
||||
<typedef-decl name='proto_table_t' type-id='f4c8e1ed' id='f1bd64e2'/>
|
||||
<typedef-decl name='tpool_t' type-id='88d1b7f9' id='b1bbf10d'/>
|
||||
<typedef-decl name='DIR' type-id='20cd73f2' id='54a5d683'/>
|
||||
<typedef-decl name='mode_t' type-id='e1c52942' id='d50d396c'/>
|
||||
<typedef-decl name='__compar_fn_t' type-id='585e1de9' id='aba7edd8'/>
|
||||
<class-decl name='dirent64' size-in-bits='2240' is-struct='yes' visibility='default' id='5725d813'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='d_ino' type-id='71288a47' visibility='default'/>
|
||||
@@ -5015,9 +5012,6 @@
|
||||
<typedef-decl name='__fsblkcnt64_t' type-id='7359adad' id='95fe1a02'/>
|
||||
<typedef-decl name='__fsfilcnt64_t' type-id='7359adad' id='0c3a4dde'/>
|
||||
<typedef-decl name='__fsword_t' type-id='bd54fe1a' id='6028cbfe'/>
|
||||
<typedef-decl name='DIR' type-id='20cd73f2' id='54a5d683'/>
|
||||
<typedef-decl name='mode_t' type-id='e1c52942' id='d50d396c'/>
|
||||
<typedef-decl name='__compar_fn_t' type-id='585e1de9' id='aba7edd8'/>
|
||||
<pointer-type-def type-id='54a5d683' size-in-bits='64' id='f09217ba'/>
|
||||
<pointer-type-def type-id='5725d813' size-in-bits='64' id='07b96073'/>
|
||||
<pointer-type-def type-id='9b293607' size-in-bits='64' id='77bf1784'/>
|
||||
@@ -5071,9 +5065,6 @@
|
||||
<parameter type-id='9cf59a50'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='use_color' mangled-name='use_color' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='use_color'>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='mkdirp' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter type-id='d50d396c'/>
|
||||
@@ -5240,15 +5231,21 @@
|
||||
<parameter type-id='aba7edd8'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='rmdir' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='__openat_too_many_args' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='__openat_missing_mode' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='statfs64' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter type-id='7fd094c8'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='rmdir' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-type size-in-bits='64' id='c5c76c9c'>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<return type-id='48b5725f'/>
|
||||
@@ -5258,10 +5255,10 @@
|
||||
<type-decl name='long long unsigned int' size-in-bits='64' id='3a47d82b'/>
|
||||
<class-decl name='splitflags' size-in-bits='64' is-struct='yes' visibility='default' id='dc01bf52'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='dryrun' type-id='95e97e5e' visibility='default'/>
|
||||
<var-decl name='dryrun' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='1'>
|
||||
<var-decl name='import' type-id='95e97e5e' visibility='default'/>
|
||||
<var-decl name='import' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='32'>
|
||||
<var-decl name='name_flags' type-id='95e97e5e' visibility='default'/>
|
||||
@@ -5881,6 +5878,12 @@
|
||||
<parameter type-id='9d774e0b' name='aux'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='zpool_vdev_set_removed_state' mangled-name='zpool_vdev_set_removed_state' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_vdev_set_removed_state'>
|
||||
<parameter type-id='4c81de99' name='zhp'/>
|
||||
<parameter type-id='9c313c2d' name='guid'/>
|
||||
<parameter type-id='9d774e0b' name='aux'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='zpool_vdev_attach' mangled-name='zpool_vdev_attach' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_vdev_attach'>
|
||||
<parameter type-id='4c81de99' name='zhp'/>
|
||||
<parameter type-id='80f4b756' name='old_disk'/>
|
||||
@@ -6053,11 +6056,6 @@
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<return type-id='3a47d82b'/>
|
||||
</function-decl>
|
||||
<function-decl name='realpath' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='266fe297'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
<function-decl name='memcmp' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
@@ -6076,6 +6074,12 @@
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='__realpath_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='266fe297'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
<function-decl name='munmap' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
@@ -6865,21 +6869,10 @@
|
||||
<parameter type-id='a3681dea' name='stream_avl'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='sprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='26a90f95'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='perror' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='strcat' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='26a90f95'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
<function-decl name='strndup' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
@@ -7082,6 +7075,12 @@
|
||||
<qualified-type-def type-id='d33f11cb' restrict='yes' id='5c53ba29'/>
|
||||
<pointer-type-def type-id='ffa52b96' size-in-bits='64' id='76c8174b'/>
|
||||
<pointer-type-def type-id='f3d87113' size-in-bits='64' id='0d2a0670'/>
|
||||
<function-decl name='zpool_label_disk' mangled-name='zpool_label_disk' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_label_disk'>
|
||||
<parameter type-id='b0382bb3'/>
|
||||
<parameter type-id='4c81de99'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='zfs_version_kernel' mangled-name='zfs_version_kernel' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_version_kernel'>
|
||||
<parameter type-id='26a90f95'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
@@ -7096,6 +7095,10 @@
|
||||
<function-decl name='libzfs_load_module' mangled-name='libzfs_load_module' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='libzfs_load_module'>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='zfs_get_underlying_path' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
<function-decl name='zpool_prop_unsupported' mangled-name='zpool_prop_unsupported' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_prop_unsupported'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='c19b74c3'/>
|
||||
@@ -7262,23 +7265,45 @@
|
||||
<function-decl name='zfs_version_print' mangled-name='zfs_version_print' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_version_print'>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='color_start' mangled-name='color_start' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='color_start'>
|
||||
<parameter type-id='26a90f95' name='color'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='color_end' mangled-name='color_end' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='color_end'>
|
||||
<return type-id='48b5725f'/>
|
||||
<function-decl name='use_color' mangled-name='use_color' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='use_color'>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='printf_color' mangled-name='printf_color' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='printf_color'>
|
||||
<parameter type-id='26a90f95' name='color'/>
|
||||
<parameter type-id='80f4b756' name='color'/>
|
||||
<parameter type-id='26a90f95' name='format'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='pow' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='a0eb0f08'/>
|
||||
<parameter type-id='a0eb0f08'/>
|
||||
<return type-id='a0eb0f08'/>
|
||||
<function-decl name='zpool_vdev_script_alloc_env' mangled-name='zpool_vdev_script_alloc_env' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_vdev_script_alloc_env'>
|
||||
<parameter type-id='80f4b756' name='pool_name'/>
|
||||
<parameter type-id='80f4b756' name='vdev_path'/>
|
||||
<parameter type-id='80f4b756' name='vdev_upath'/>
|
||||
<parameter type-id='80f4b756' name='vdev_enc_sysfs_path'/>
|
||||
<parameter type-id='80f4b756' name='opt_key'/>
|
||||
<parameter type-id='80f4b756' name='opt_val'/>
|
||||
<return type-id='9b23c9ad'/>
|
||||
</function-decl>
|
||||
<function-decl name='zpool_vdev_script_free_env' mangled-name='zpool_vdev_script_free_env' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_vdev_script_free_env'>
|
||||
<parameter type-id='9b23c9ad' name='env'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='zpool_prepare_disk' mangled-name='zpool_prepare_disk' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_prepare_disk'>
|
||||
<parameter type-id='4c81de99' name='zhp'/>
|
||||
<parameter type-id='5ce45b60' name='vdev_nv'/>
|
||||
<parameter type-id='80f4b756' name='prepare_str'/>
|
||||
<parameter type-id='c0563f85' name='lines'/>
|
||||
<parameter type-id='7292109c' name='lines_cnt'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='zpool_prepare_and_label_disk' mangled-name='zpool_prepare_and_label_disk' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_prepare_and_label_disk'>
|
||||
<parameter type-id='b0382bb3' name='hdl'/>
|
||||
<parameter type-id='4c81de99' name='zhp'/>
|
||||
<parameter type-id='80f4b756' name='name'/>
|
||||
<parameter type-id='5ce45b60' name='vdev_nv'/>
|
||||
<parameter type-id='80f4b756' name='prepare_str'/>
|
||||
<parameter type-id='c0563f85' name='lines'/>
|
||||
<parameter type-id='7292109c' name='lines_cnt'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='__ctype_toupper_loc' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='24f95ba5'/>
|
||||
@@ -7297,25 +7322,6 @@
|
||||
<parameter type-id='d33f11cb'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='vfprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='b7f2d5e6'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='vsnprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='26a90f95'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter type-id='b7f2d5e6'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='vasprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='8c85230f'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='b7f2d5e6'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='strtod' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='8c85230f'/>
|
||||
@@ -7335,11 +7341,10 @@
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='b59d7dce'/>
|
||||
</function-decl>
|
||||
<function-decl name='waitpid' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='3629bad8'/>
|
||||
<parameter type-id='7292109c'/>
|
||||
<function-decl name='access' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<return type-id='3629bad8'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='dup2' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
@@ -7375,6 +7380,31 @@
|
||||
<function-decl name='vfork' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='3629bad8'/>
|
||||
</function-decl>
|
||||
<function-decl name='pow' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='a0eb0f08'/>
|
||||
<parameter type-id='a0eb0f08'/>
|
||||
<return type-id='a0eb0f08'/>
|
||||
</function-decl>
|
||||
<function-decl name='__vfprintf_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='b7f2d5e6'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='__vasprintf_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='8c85230f'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='b7f2d5e6'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='waitpid' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='3629bad8'/>
|
||||
<parameter type-id='7292109c'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<return type-id='3629bad8'/>
|
||||
</function-decl>
|
||||
<function-type size-in-bits='64' id='c70fa2e8'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
@@ -7383,6 +7413,9 @@
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='os/linux/libzfs_mount_os.c' language='LANG_C99'>
|
||||
<pointer-type-def type-id='7359adad' size-in-bits='64' id='1d2c2b85'/>
|
||||
<function-decl name='geteuid' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='cc5fcceb'/>
|
||||
</function-decl>
|
||||
<function-decl name='mount' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
@@ -7396,9 +7429,6 @@
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='geteuid' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='cc5fcceb'/>
|
||||
</function-decl>
|
||||
<function-decl name='zfs_parse_mount_options' mangled-name='zfs_parse_mount_options' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_parse_mount_options'>
|
||||
<parameter type-id='26a90f95' name='mntopts'/>
|
||||
<parameter type-id='1d2c2b85' name='mntflags'/>
|
||||
@@ -7569,12 +7599,6 @@
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='zpool_label_disk' mangled-name='zpool_label_disk' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_label_disk'>
|
||||
<parameter type-id='b0382bb3' name='hdl'/>
|
||||
<parameter type-id='4c81de99' name='zhp'/>
|
||||
<parameter type-id='80f4b756' name='name'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='os/linux/libzfs_util_os.c' language='LANG_C99'>
|
||||
<typedef-decl name='__useconds_t' type-id='f0981eeb' id='4e80d4b1'/>
|
||||
@@ -7589,11 +7613,6 @@
|
||||
<parameter type-id='3d83ba87'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='access' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='usleep' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='4e80d4b1'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
|
||||
@@ -1762,7 +1762,8 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvlist_t *props)
|
||||
nvlist_t *nvl;
|
||||
int nvl_len = 0;
|
||||
int added_resv = 0;
|
||||
zfs_prop_t prop = 0;
|
||||
zfs_prop_t prop;
|
||||
boolean_t nsprop = B_FALSE;
|
||||
nvpair_t *elem;
|
||||
|
||||
(void) snprintf(errbuf, sizeof (errbuf),
|
||||
@@ -1809,6 +1810,7 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvlist_t *props)
|
||||
elem = nvlist_next_nvpair(nvl, elem)) {
|
||||
|
||||
prop = zfs_name_to_prop(nvpair_name(elem));
|
||||
nsprop |= zfs_is_namespace_prop(prop);
|
||||
|
||||
assert(cl_idx < nvl_len);
|
||||
/*
|
||||
@@ -1909,8 +1911,7 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvlist_t *props)
|
||||
* if one of the options handled by the generic
|
||||
* Linux namespace layer has been modified.
|
||||
*/
|
||||
if (zfs_is_namespace_prop(prop) &&
|
||||
zfs_is_mounted(zhp, NULL))
|
||||
if (nsprop && zfs_is_mounted(zhp, NULL))
|
||||
ret = zfs_mount(zhp, MNTOPT_REMOUNT, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2808,6 +2808,9 @@ zpool_vdev_is_interior(const char *name)
|
||||
return (B_FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Lookup the nvlist for a given vdev.
|
||||
*/
|
||||
nvlist_t *
|
||||
zpool_find_vdev(zpool_handle_t *zhp, const char *path, boolean_t *avail_spare,
|
||||
boolean_t *l2cache, boolean_t *log)
|
||||
@@ -2815,6 +2818,7 @@ zpool_find_vdev(zpool_handle_t *zhp, const char *path, boolean_t *avail_spare,
|
||||
char *end;
|
||||
nvlist_t *nvroot, *search, *ret;
|
||||
uint64_t guid;
|
||||
boolean_t __avail_spare, __l2cache, __log;
|
||||
|
||||
verify(nvlist_alloc(&search, NV_UNIQUE_NAME, KM_SLEEP) == 0);
|
||||
|
||||
@@ -2830,6 +2834,18 @@ zpool_find_vdev(zpool_handle_t *zhp, const char *path, boolean_t *avail_spare,
|
||||
verify(nvlist_lookup_nvlist(zhp->zpool_config, ZPOOL_CONFIG_VDEV_TREE,
|
||||
&nvroot) == 0);
|
||||
|
||||
/*
|
||||
* User can pass NULL for avail_spare, l2cache, and log, but
|
||||
* we still need to provide variables to vdev_to_nvlist_iter(), so
|
||||
* just point them to junk variables here.
|
||||
*/
|
||||
if (!avail_spare)
|
||||
avail_spare = &__avail_spare;
|
||||
if (!l2cache)
|
||||
l2cache = &__l2cache;
|
||||
if (!log)
|
||||
log = &__log;
|
||||
|
||||
*avail_spare = B_FALSE;
|
||||
*l2cache = B_FALSE;
|
||||
if (log != NULL)
|
||||
@@ -3233,21 +3249,23 @@ zpool_vdev_fault(zpool_handle_t *zhp, uint64_t guid, vdev_aux_t aux)
|
||||
}
|
||||
|
||||
/*
|
||||
* Mark the given vdev degraded.
|
||||
* Generic set vdev state function
|
||||
*/
|
||||
int
|
||||
zpool_vdev_degrade(zpool_handle_t *zhp, uint64_t guid, vdev_aux_t aux)
|
||||
static int
|
||||
zpool_vdev_set_state(zpool_handle_t *zhp, uint64_t guid, vdev_aux_t aux,
|
||||
vdev_state_t state)
|
||||
{
|
||||
zfs_cmd_t zc = {"\0"};
|
||||
char msg[1024];
|
||||
libzfs_handle_t *hdl = zhp->zpool_hdl;
|
||||
|
||||
(void) snprintf(msg, sizeof (msg),
|
||||
dgettext(TEXT_DOMAIN, "cannot degrade %llu"), (u_longlong_t)guid);
|
||||
dgettext(TEXT_DOMAIN, "cannot set %s %llu"),
|
||||
zpool_state_to_name(state, aux), (u_longlong_t)guid);
|
||||
|
||||
(void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name));
|
||||
zc.zc_guid = guid;
|
||||
zc.zc_cookie = VDEV_STATE_DEGRADED;
|
||||
zc.zc_cookie = state;
|
||||
zc.zc_obj = aux;
|
||||
|
||||
if (zfs_ioctl(hdl, ZFS_IOC_VDEV_SET_STATE, &zc) == 0)
|
||||
@@ -3256,6 +3274,27 @@ zpool_vdev_degrade(zpool_handle_t *zhp, uint64_t guid, vdev_aux_t aux)
|
||||
return (zpool_standard_error(hdl, errno, msg));
|
||||
}
|
||||
|
||||
/*
|
||||
* Mark the given vdev degraded.
|
||||
*/
|
||||
int
|
||||
zpool_vdev_degrade(zpool_handle_t *zhp, uint64_t guid, vdev_aux_t aux)
|
||||
{
|
||||
return (zpool_vdev_set_state(zhp, guid, aux, VDEV_STATE_DEGRADED));
|
||||
}
|
||||
|
||||
/*
|
||||
* Mark the given vdev as in a removed state (as if the device does not exist).
|
||||
*
|
||||
* This is different than zpool_vdev_remove() which does a removal of a device
|
||||
* from the pool (but the device does exist).
|
||||
*/
|
||||
int
|
||||
zpool_vdev_set_removed_state(zpool_handle_t *zhp, uint64_t guid, vdev_aux_t aux)
|
||||
{
|
||||
return (zpool_vdev_set_state(zhp, guid, aux, VDEV_STATE_REMOVED));
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns TRUE if the given nvlist is a vdev that was originally swapped in as
|
||||
* a hot spare.
|
||||
|
||||
@@ -981,39 +981,63 @@ send_print_verbose(FILE *fout, const char *tosnap, const char *fromsnap,
|
||||
{
|
||||
if (parsable) {
|
||||
if (fromsnap != NULL) {
|
||||
(void) fprintf(fout, "incremental\t%s\t%s",
|
||||
fromsnap, tosnap);
|
||||
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||
"incremental\t%s\t%s"), fromsnap, tosnap);
|
||||
} else {
|
||||
(void) fprintf(fout, "full\t%s",
|
||||
tosnap);
|
||||
/*
|
||||
* Workaround for GCC 12+ with UBSan enabled deficencies.
|
||||
*
|
||||
* GCC 12+ invoked with -fsanitize=undefined incorrectly reports the code
|
||||
* below as violating -Wformat-overflow.
|
||||
*/
|
||||
#if defined(__GNUC__) && !defined(__clang__) && \
|
||||
defined(ZFS_UBSAN_ENABLED) && defined(HAVE_FORMAT_OVERFLOW)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-overflow"
|
||||
#endif
|
||||
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||
"full\t%s"), tosnap);
|
||||
#if defined(__GNUC__) && !defined(__clang__) && \
|
||||
defined(ZFS_UBSAN_ENABLED) && defined(HAVE_FORMAT_OVERFLOW)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
}
|
||||
(void) fprintf(fout, "\t%llu", (longlong_t)size);
|
||||
} else {
|
||||
if (fromsnap != NULL) {
|
||||
if (strchr(fromsnap, '@') == NULL &&
|
||||
strchr(fromsnap, '#') == NULL) {
|
||||
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||
"send from @%s to %s"),
|
||||
fromsnap, tosnap);
|
||||
"send from @%s to %s"), fromsnap, tosnap);
|
||||
} else {
|
||||
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||
"send from %s to %s"),
|
||||
fromsnap, tosnap);
|
||||
"send from %s to %s"), fromsnap, tosnap);
|
||||
}
|
||||
} else {
|
||||
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||
"full send of %s"),
|
||||
tosnap);
|
||||
"full send of %s"), tosnap);
|
||||
}
|
||||
if (size != 0) {
|
||||
char buf[16];
|
||||
zfs_nicebytes(size, buf, sizeof (buf));
|
||||
/*
|
||||
* Workaround for GCC 12+ with UBSan enabled deficencies.
|
||||
*
|
||||
* GCC 12+ invoked with -fsanitize=undefined incorrectly reports the code
|
||||
* below as violating -Wformat-overflow.
|
||||
*/
|
||||
#if defined(__GNUC__) && !defined(__clang__) && \
|
||||
defined(ZFS_UBSAN_ENABLED) && defined(HAVE_FORMAT_OVERFLOW)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-overflow"
|
||||
#endif
|
||||
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||
" estimated size is %s"), buf);
|
||||
#if defined(__GNUC__) && !defined(__clang__) && \
|
||||
defined(ZFS_UBSAN_ENABLED) && defined(HAVE_FORMAT_OVERFLOW)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if (parsable) {
|
||||
(void) fprintf(fout, "\t%llu",
|
||||
(longlong_t)size);
|
||||
} else if (size != 0) {
|
||||
char buf[16];
|
||||
zfs_nicebytes(size, buf, sizeof (buf));
|
||||
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||
" estimated size is %s"), buf);
|
||||
}
|
||||
(void) fprintf(fout, "\n");
|
||||
}
|
||||
|
||||
@@ -2121,3 +2121,196 @@ printf_color(const char *color, char *format, ...)
|
||||
|
||||
return (rc);
|
||||
}
|
||||
|
||||
/* PATH + 5 env vars + a NULL entry = 7 */
|
||||
#define ZPOOL_VDEV_SCRIPT_ENV_COUNT 7
|
||||
|
||||
/*
|
||||
* There's a few places where ZFS will call external scripts (like the script
|
||||
* in zpool.d/ and `zfs_prepare_disk`). These scripts are called with a
|
||||
* reduced $PATH, and some vdev specific environment vars set. This function
|
||||
* will allocate an populate the environment variable array that is passed to
|
||||
* these scripts. The user must free the arrays with zpool_vdev_free_env() when
|
||||
* they are done.
|
||||
*
|
||||
* The following env vars will be set (but value could be blank):
|
||||
*
|
||||
* POOL_NAME
|
||||
* VDEV_PATH
|
||||
* VDEV_UPATH
|
||||
* VDEV_ENC_SYSFS_PATH
|
||||
*
|
||||
* In addition, you can set an optional environment variable named 'opt_key'
|
||||
* to 'opt_val' if you want.
|
||||
*
|
||||
* Returns allocated env[] array on success, NULL otherwise.
|
||||
*/
|
||||
char **
|
||||
zpool_vdev_script_alloc_env(const char *pool_name,
|
||||
const char *vdev_path, const char *vdev_upath,
|
||||
const char *vdev_enc_sysfs_path, const char *opt_key, const char *opt_val)
|
||||
{
|
||||
char **env = NULL;
|
||||
int rc;
|
||||
|
||||
env = calloc(ZPOOL_VDEV_SCRIPT_ENV_COUNT, sizeof (*env));
|
||||
if (!env)
|
||||
return (NULL);
|
||||
|
||||
env[0] = strdup("PATH=/bin:/sbin:/usr/bin:/usr/sbin");
|
||||
if (!env[0])
|
||||
goto error;
|
||||
|
||||
/* Setup our custom environment variables */
|
||||
rc = asprintf(&env[1], "POOL_NAME=%s", pool_name ? pool_name : "");
|
||||
if (rc == -1) {
|
||||
env[1] = NULL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
rc = asprintf(&env[2], "VDEV_PATH=%s", vdev_path ? vdev_path : "");
|
||||
if (rc == -1) {
|
||||
env[2] = NULL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
rc = asprintf(&env[3], "VDEV_UPATH=%s", vdev_upath ? vdev_upath : "");
|
||||
if (rc == -1) {
|
||||
env[3] = NULL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
rc = asprintf(&env[4], "VDEV_ENC_SYSFS_PATH=%s",
|
||||
vdev_enc_sysfs_path ? vdev_enc_sysfs_path : "");
|
||||
if (rc == -1) {
|
||||
env[4] = NULL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (opt_key != NULL) {
|
||||
rc = asprintf(&env[5], "%s=%s", opt_key,
|
||||
opt_val ? opt_val : "");
|
||||
if (rc == -1) {
|
||||
env[5] = NULL;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
return (env);
|
||||
|
||||
error:
|
||||
for (int i = 0; i < ZPOOL_VDEV_SCRIPT_ENV_COUNT; i++)
|
||||
free(env[i]);
|
||||
|
||||
free(env);
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Free the env[] array that was allocated by zpool_vdev_script_alloc_env().
|
||||
*/
|
||||
void
|
||||
zpool_vdev_script_free_env(char **env)
|
||||
{
|
||||
for (int i = 0; i < ZPOOL_VDEV_SCRIPT_ENV_COUNT; i++)
|
||||
free(env[i]);
|
||||
|
||||
free(env);
|
||||
}
|
||||
|
||||
/*
|
||||
* Prepare a disk by (optionally) running a program before labeling the disk.
|
||||
* This can be useful for installing disk firmware or doing some pre-flight
|
||||
* checks on the disk before it becomes part of the pool. The program run is
|
||||
* located at ZFSEXECDIR/zfs_prepare_disk
|
||||
* (E.x: /usr/local/libexec/zfs/zfs_prepare_disk).
|
||||
*
|
||||
* Return 0 on success, non-zero on failure.
|
||||
*/
|
||||
int
|
||||
zpool_prepare_disk(zpool_handle_t *zhp, nvlist_t *vdev_nv,
|
||||
const char *prepare_str, char **lines[], int *lines_cnt)
|
||||
{
|
||||
const char *script_path = ZFSEXECDIR "/zfs_prepare_disk";
|
||||
const char *pool_name;
|
||||
int rc = 0;
|
||||
|
||||
/* Path to script and a NULL entry */
|
||||
char *argv[2] = {(char *)script_path};
|
||||
char **env = NULL;
|
||||
char *path = NULL, *enc_sysfs_path = NULL;
|
||||
char *upath;
|
||||
*lines_cnt = 0;
|
||||
|
||||
if (access(script_path, X_OK) != 0) {
|
||||
/* No script, nothing to do */
|
||||
return (0);
|
||||
}
|
||||
|
||||
(void) nvlist_lookup_string(vdev_nv, ZPOOL_CONFIG_PATH, &path);
|
||||
(void) nvlist_lookup_string(vdev_nv, ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH,
|
||||
&enc_sysfs_path);
|
||||
|
||||
upath = zfs_get_underlying_path(path);
|
||||
pool_name = zhp ? zpool_get_name(zhp) : NULL;
|
||||
|
||||
env = zpool_vdev_script_alloc_env(pool_name, path, upath,
|
||||
enc_sysfs_path, "VDEV_PREPARE", prepare_str);
|
||||
|
||||
free(upath);
|
||||
|
||||
if (env == NULL) {
|
||||
return (ENOMEM);
|
||||
}
|
||||
|
||||
rc = libzfs_run_process_get_stdout(script_path, argv, env, lines,
|
||||
lines_cnt);
|
||||
|
||||
zpool_vdev_script_free_env(env);
|
||||
|
||||
return (rc);
|
||||
}
|
||||
|
||||
/*
|
||||
* Optionally run a script and then label a disk. The script can be used to
|
||||
* prepare a disk for inclusion into the pool. For example, it might update
|
||||
* the disk's firmware or check its health.
|
||||
*
|
||||
* The 'name' provided is the short name, stripped of any leading
|
||||
* /dev path, and is passed to zpool_label_disk. vdev_nv is the nvlist for
|
||||
* the vdev. prepare_str is a string that gets passed as the VDEV_PREPARE
|
||||
* env variable to the script.
|
||||
*
|
||||
* The following env vars are passed to the script:
|
||||
*
|
||||
* POOL_NAME: The pool name (blank during zpool create)
|
||||
* VDEV_PREPARE: Reason why the disk is being prepared for inclusion:
|
||||
* "create", "add", "replace", or "autoreplace"
|
||||
* VDEV_PATH: Path to the disk
|
||||
* VDEV_UPATH: One of the 'underlying paths' to the disk. This is
|
||||
* useful for DM devices.
|
||||
* VDEV_ENC_SYSFS_PATH: Path to the disk's enclosure sysfs path, if available.
|
||||
*
|
||||
* Note, some of these values can be blank.
|
||||
*
|
||||
* Return 0 on success, non-zero otherwise.
|
||||
*/
|
||||
int
|
||||
zpool_prepare_and_label_disk(libzfs_handle_t *hdl, zpool_handle_t *zhp,
|
||||
const char *name, nvlist_t *vdev_nv, const char *prepare_str,
|
||||
char **lines[], int *lines_cnt)
|
||||
{
|
||||
int rc;
|
||||
char vdev_path[MAXPATHLEN];
|
||||
(void) snprintf(vdev_path, sizeof (vdev_path), "%s/%s", DISK_ROOT,
|
||||
name);
|
||||
|
||||
/* zhp will be NULL when creating a pool */
|
||||
rc = zpool_prepare_disk(zhp, vdev_nv, prepare_str, lines, lines_cnt);
|
||||
if (rc != 0)
|
||||
return (rc);
|
||||
|
||||
rc = zpool_label_disk(hdl, zhp, name);
|
||||
return (rc);
|
||||
}
|
||||
|
||||
+190
-172
@@ -6,7 +6,6 @@
|
||||
<dependency name='libblkid.so.1'/>
|
||||
<dependency name='libudev.so.1'/>
|
||||
<dependency name='libnvpair.so.3'/>
|
||||
<dependency name='libtirpc.so.3'/>
|
||||
<dependency name='libc.so.6'/>
|
||||
<dependency name='ld-linux-x86-64.so.2'/>
|
||||
</elf-needed>
|
||||
@@ -159,8 +158,11 @@
|
||||
<elf-symbol name='efi_type' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='efi_use_whole_disk' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='efi_write' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='for_each_real_leaf_vdev_macro_helper_func' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='for_each_vdev_cb' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='for_each_vdev_in_nvlist' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='for_each_vdev_macro_helper_func' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='fsleep' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='get_system_hostid' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='getexecname' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='getextmntent' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
@@ -255,6 +257,7 @@
|
||||
<elf-symbol name='tpool_suspended' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='tpool_wait' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='update_vdev_config_dev_strs' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='update_vdev_config_dev_sysfs_path' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='update_vdevs_config_dev_sysfs_path' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zfs_append_partition' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zfs_dev_flush' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
@@ -278,9 +281,11 @@
|
||||
<elf-symbol name='zfs_strip_partition' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zfs_strip_path' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_default_search_paths' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_disk_wait' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_dump_ddt' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_find_config' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_find_import_blkid' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_getenv_int' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_history_unpack' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_label_disk_wait' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
<elf-symbol name='zpool_open_func' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
|
||||
@@ -407,12 +412,6 @@
|
||||
<parameter type-id='c43b27a6' name='vtoc'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='sprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='26a90f95'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='write' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
@@ -440,16 +439,32 @@
|
||||
<type-decl name='unsigned long int' size-in-bits='64' id='7359adad'/>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='assert.c' language='LANG_C99'>
|
||||
<class-decl name='__va_list_tag' size-in-bits='192' is-struct='yes' visibility='default' id='d5027220'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='gp_offset' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='32'>
|
||||
<var-decl name='fp_offset' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='overflow_arg_area' type-id='eaa32e2f' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='reg_save_area' type-id='eaa32e2f' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<pointer-type-def type-id='d5027220' size-in-bits='64' id='b7f2d5e6'/>
|
||||
<var-decl name='aok' type-id='95e97e5e' mangled-name='aok' visibility='default' elf-symbol-id='aok'/>
|
||||
<function-decl name='vfprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<function-decl name='abort' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='__vfprintf_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='b7f2d5e6'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='abort' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='atomic.c' language='LANG_C99'>
|
||||
<typedef-decl name='int8_t' type-id='2171a512' id='ee31ee44'/>
|
||||
@@ -895,16 +910,18 @@
|
||||
<parameter type-id='d50d396c' name='mode'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='mbstowcs' visibility='default' binding='global' size-in-bits='64'>
|
||||
<function-decl name='__mbstowcs_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='f1358bc3'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='b59d7dce'/>
|
||||
</function-decl>
|
||||
<function-decl name='wcstombs' visibility='default' binding='global' size-in-bits='64'>
|
||||
<function-decl name='__wcstombs_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='266fe297'/>
|
||||
<parameter type-id='598aab80'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='b59d7dce'/>
|
||||
</function-decl>
|
||||
<function-decl name='mkdir' visibility='default' binding='global' size-in-bits='64'>
|
||||
@@ -1024,15 +1041,8 @@
|
||||
<abi-instr address-size='64' path='page.c' language='LANG_C99'>
|
||||
<var-decl name='pagesize' type-id='b59d7dce' mangled-name='pagesize' visibility='default' elf-symbol-id='pagesize'/>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='strlcat.c' language='LANG_C99'>
|
||||
<function-decl name='memcpy' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='eaa32e2f'/>
|
||||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='timestamp.c' language='LANG_C99'>
|
||||
<typedef-decl name='nl_item' type-id='95e97e5e' id='03b79a94'/>
|
||||
<class-decl name='tm' size-in-bits='448' is-struct='yes' visibility='default' id='dddf6ca2'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='tm_sec' type-id='95e97e5e' visibility='default'/>
|
||||
@@ -1069,7 +1079,6 @@
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='time_t' type-id='65eda9c0' id='c9d12d66'/>
|
||||
<typedef-decl name='nl_item' type-id='95e97e5e' id='03b79a94'/>
|
||||
<qualified-type-def type-id='c9d12d66' const='yes' id='588b3216'/>
|
||||
<pointer-type-def type-id='588b3216' size-in-bits='64' id='9f201474'/>
|
||||
<qualified-type-def type-id='dddf6ca2' const='yes' id='e824a34f'/>
|
||||
@@ -1144,6 +1153,40 @@
|
||||
<var-decl name='tpa_tid' type-id='4051f5e7' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<class-decl name='__cancel_jmp_buf_tag' size-in-bits='576' is-struct='yes' visibility='default' id='8901473c'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='__cancel_jmp_buf' type-id='379a1ab7' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='512'>
|
||||
<var-decl name='__mask_was_saved' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<class-decl name='__pthread_unwind_buf_t' size-in-bits='832' is-struct='yes' naming-typedef-id='4423cf7f' visibility='default' id='a0abc656'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='__cancel_jmp_buf' type-id='f5da478b' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='576'>
|
||||
<var-decl name='__pad' type-id='209ef23f' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='__pthread_unwind_buf_t' type-id='a0abc656' id='4423cf7f'/>
|
||||
<union-decl name='__atomic_wide_counter' size-in-bits='64' naming-typedef-id='f3b40860' visibility='default' id='613ce450'>
|
||||
<data-member access='public'>
|
||||
<var-decl name='__value64' type-id='3a47d82b' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public'>
|
||||
<var-decl name='__value32' type-id='e7f43f72' visibility='default'/>
|
||||
</data-member>
|
||||
</union-decl>
|
||||
<class-decl name='__anonymous_struct__' size-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' id='e7f43f72'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='__low' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='32'>
|
||||
<var-decl name='__high' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='__atomic_wide_counter' type-id='613ce450' id='f3b40860'/>
|
||||
<typedef-decl name='__cpu_mask' type-id='7359adad' id='49ef3ffd'/>
|
||||
<class-decl name='cpu_set_t' size-in-bits='1024' is-struct='yes' naming-typedef-id='8037c762' visibility='default' id='1f20d231'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
@@ -1176,10 +1219,10 @@
|
||||
<typedef-decl name='__jmp_buf' type-id='5d4efd44' id='379a1ab7'/>
|
||||
<class-decl name='__pthread_cond_s' size-in-bits='384' is-struct='yes' visibility='default' id='c987b47c'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='' type-id='ac5ab595' visibility='default'/>
|
||||
<var-decl name='__wseq' type-id='f3b40860' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='' type-id='ac5ab596' visibility='default'/>
|
||||
<var-decl name='__g1_start' type-id='f3b40860' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='__g_refs' type-id='0d532ec1' visibility='default'/>
|
||||
@@ -1197,30 +1240,6 @@
|
||||
<var-decl name='__g_signals' type-id='0d532ec1' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<union-decl name='__anonymous_union__1' size-in-bits='64' is-anonymous='yes' visibility='default' id='ac5ab595'>
|
||||
<data-member access='public'>
|
||||
<var-decl name='__wseq' type-id='3a47d82b' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public'>
|
||||
<var-decl name='__wseq32' type-id='e7f43f72' visibility='default'/>
|
||||
</data-member>
|
||||
</union-decl>
|
||||
<class-decl name='__anonymous_struct__' size-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' id='e7f43f72'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='__low' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='32'>
|
||||
<var-decl name='__high' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<union-decl name='__anonymous_union__2' size-in-bits='64' is-anonymous='yes' visibility='default' id='ac5ab596'>
|
||||
<data-member access='public'>
|
||||
<var-decl name='__g1_start' type-id='3a47d82b' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public'>
|
||||
<var-decl name='__g1_start32' type-id='e7f43f72' visibility='default'/>
|
||||
</data-member>
|
||||
</union-decl>
|
||||
<class-decl name='__sigset_t' size-in-bits='1024' is-struct='yes' naming-typedef-id='b9c97942' visibility='default' id='2616147f'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='__val' type-id='d2baa450' visibility='default'/>
|
||||
@@ -1232,23 +1251,6 @@
|
||||
<var-decl name='sched_priority' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<class-decl name='__cancel_jmp_buf_tag' size-in-bits='576' is-struct='yes' visibility='default' id='8901473c'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='__cancel_jmp_buf' type-id='379a1ab7' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='512'>
|
||||
<var-decl name='__mask_was_saved' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<class-decl name='__pthread_unwind_buf_t' size-in-bits='832' is-struct='yes' naming-typedef-id='4423cf7f' visibility='default' id='a0abc656'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='__cancel_jmp_buf' type-id='f5da478b' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='576'>
|
||||
<var-decl name='__pad' type-id='209ef23f' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='__pthread_unwind_buf_t' type-id='a0abc656' id='4423cf7f'/>
|
||||
<pointer-type-def type-id='8901473c' size-in-bits='64' id='eb91b7ea'/>
|
||||
<pointer-type-def type-id='4423cf7f' size-in-bits='64' id='ba7c727c'/>
|
||||
<pointer-type-def type-id='b9c97942' size-in-bits='64' id='bbf06c47'/>
|
||||
@@ -1267,8 +1269,6 @@
|
||||
<qualified-type-def type-id='0897719a' const='yes' id='c4a7b189'/>
|
||||
<pointer-type-def type-id='c4a7b189' size-in-bits='64' id='36fca399'/>
|
||||
<qualified-type-def type-id='36fca399' restrict='yes' id='37e4897b'/>
|
||||
<qualified-type-def type-id='a9c79a1f' const='yes' id='cd087e36'/>
|
||||
<pointer-type-def type-id='cd087e36' size-in-bits='64' id='e05e8614'/>
|
||||
<qualified-type-def type-id='e05e8614' restrict='yes' id='0be2e71c'/>
|
||||
<pointer-type-def type-id='8037c762' size-in-bits='64' id='d74a6869'/>
|
||||
<qualified-type-def type-id='7292109c' restrict='yes' id='6942f6a4'/>
|
||||
@@ -1306,16 +1306,6 @@
|
||||
<parameter type-id='9cf59a50' name='tpool'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='__sysconf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<return type-id='bd54fe1a'/>
|
||||
</function-decl>
|
||||
<function-decl name='pthread_sigmask' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='5a8729d0'/>
|
||||
<parameter type-id='65e6ec45'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='pthread_create' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='cc338b26'/>
|
||||
<parameter type-id='e1815e87'/>
|
||||
@@ -1468,6 +1458,16 @@
|
||||
<parameter type-id='0be2e71c'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='__sysconf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<return type-id='bd54fe1a'/>
|
||||
</function-decl>
|
||||
<function-decl name='pthread_sigmask' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='5a8729d0'/>
|
||||
<parameter type-id='65e6ec45'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-type size-in-bits='64' id='cd5d79f4'>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<return type-id='eaa32e2f'/>
|
||||
@@ -1866,7 +1866,7 @@
|
||||
<var-decl name='drr_payloadlen' type-id='8f92235e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='drr_u' type-id='ac5ab597' visibility='default'/>
|
||||
<var-decl name='drr_u' type-id='ac5ab595' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<enum-decl name='__anonymous_enum__' is-anonymous='yes' id='08f5ca17'>
|
||||
@@ -1884,7 +1884,7 @@
|
||||
<enumerator name='DRR_REDACT' value='10'/>
|
||||
<enumerator name='DRR_NUMTYPES' value='11'/>
|
||||
</enum-decl>
|
||||
<union-decl name='__anonymous_union__' size-in-bits='2432' is-anonymous='yes' visibility='default' id='ac5ab597'>
|
||||
<union-decl name='__anonymous_union__' size-in-bits='2432' is-anonymous='yes' visibility='default' id='ac5ab595'>
|
||||
<data-member access='public'>
|
||||
<var-decl name='drr_begin' type-id='09fcdc01' visibility='default'/>
|
||||
</data-member>
|
||||
@@ -2988,10 +2988,17 @@
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='read' visibility='default' binding='global' size-in-bits='64'>
|
||||
<function-decl name='__open_too_many_args' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='__open_missing_mode' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='__read_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='79a0948f'/>
|
||||
</function-decl>
|
||||
</abi-instr>
|
||||
@@ -3159,21 +3166,23 @@
|
||||
<parameter type-id='822cd80b'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='fgets' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='266fe297'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
<function-decl name='strstr' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
<function-decl name='readlink' visibility='default' binding='global' size-in-bits='64'>
|
||||
<function-decl name='__fgets_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='266fe297'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
<function-decl name='__readlink_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='266fe297'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='79a0948f'/>
|
||||
</function-decl>
|
||||
<function-decl name='zfs_strip_partition' mangled-name='zfs_strip_partition' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_strip_partition'>
|
||||
@@ -3211,19 +3220,18 @@
|
||||
<class-decl name='blkid_struct_dev' is-struct='yes' visibility='default' is-declaration-only='yes' id='86223623'/>
|
||||
<class-decl name='blkid_struct_dev_iterate' is-struct='yes' visibility='default' is-declaration-only='yes' id='d88420d6'/>
|
||||
<class-decl name='udev_list_entry' is-struct='yes' visibility='default' is-declaration-only='yes' id='e7dbdca3'/>
|
||||
<typedef-decl name='__useconds_t' type-id='f0981eeb' id='4e80d4b1'/>
|
||||
<typedef-decl name='__clockid_t' type-id='95e97e5e' id='08f9a87a'/>
|
||||
<typedef-decl name='clockid_t' type-id='08f9a87a' id='a1c3b834'/>
|
||||
<typedef-decl name='blkid_dev' type-id='8433f053' id='f47b023a'/>
|
||||
<typedef-decl name='blkid_cache' type-id='940e3afc' id='0882dfdf'/>
|
||||
<typedef-decl name='blkid_dev_iterate' type-id='b8fa2efc' id='f4760fa7'/>
|
||||
<typedef-decl name='__useconds_t' type-id='f0981eeb' id='4e80d4b1'/>
|
||||
<typedef-decl name='__clockid_t' type-id='95e97e5e' id='08f9a87a'/>
|
||||
<typedef-decl name='clockid_t' type-id='08f9a87a' id='a1c3b834'/>
|
||||
<pointer-type-def type-id='0882dfdf' size-in-bits='64' id='2e3e7caa'/>
|
||||
<pointer-type-def type-id='f47b023a' size-in-bits='64' id='d87f9b75'/>
|
||||
<pointer-type-def type-id='09286066' size-in-bits='64' id='940e3afc'/>
|
||||
<pointer-type-def type-id='86223623' size-in-bits='64' id='8433f053'/>
|
||||
<pointer-type-def type-id='d88420d6' size-in-bits='64' id='b8fa2efc'/>
|
||||
<qualified-type-def type-id='62f7a03d' restrict='yes' id='f1cadedf'/>
|
||||
<pointer-type-def type-id='a9c79a1f' size-in-bits='64' id='3d83ba87'/>
|
||||
<pointer-type-def type-id='e7dbdca3' size-in-bits='64' id='deabd0d3'/>
|
||||
<class-decl name='blkid_struct_cache' is-struct='yes' visibility='default' is-declaration-only='yes' id='09286066'/>
|
||||
<class-decl name='blkid_struct_dev' is-struct='yes' visibility='default' is-declaration-only='yes' id='86223623'/>
|
||||
@@ -3307,11 +3315,6 @@
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='stat64' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='f1cadedf'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='clock_gettime' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='a1c3b834'/>
|
||||
<parameter type-id='3d83ba87'/>
|
||||
@@ -3321,6 +3324,11 @@
|
||||
<parameter type-id='4e80d4b1'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='stat64' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='f1cadedf'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='zfs_dev_flush' mangled-name='zfs_dev_flush' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zfs_dev_flush'>
|
||||
<parameter type-id='95e97e5e' name='fd'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
@@ -3342,6 +3350,16 @@
|
||||
<parameter type-id='95e97e5e' name='timeout_ms'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='zpool_disk_wait' mangled-name='zpool_disk_wait' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_disk_wait'>
|
||||
<parameter type-id='80f4b756' name='path'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='update_vdev_config_dev_sysfs_path' mangled-name='update_vdev_config_dev_sysfs_path' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='update_vdev_config_dev_sysfs_path'>
|
||||
<parameter type-id='5ce45b60' name='nv'/>
|
||||
<parameter type-id='80f4b756' name='path'/>
|
||||
<parameter type-id='80f4b756' name='key'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='os/linux/zutil_setproctitle.c' language='LANG_C99'>
|
||||
<function-decl name='warnx' visibility='default' binding='global' size-in-bits='64'>
|
||||
@@ -3399,23 +3417,10 @@
|
||||
<parameter type-id='95e97e5e' name='wholedisk'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='snprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='26a90f95'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='getenv' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
<function-decl name='memset' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='eaa32e2f'/>
|
||||
</function-decl>
|
||||
<function-decl name='strcmp' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
@@ -3469,20 +3474,6 @@
|
||||
<class-decl name='_IO_marker' is-struct='yes' visibility='default' is-declaration-only='yes' id='010ae0b9'/>
|
||||
<class-decl name='_IO_wide_data' is-struct='yes' visibility='default' is-declaration-only='yes' id='79bd3751'/>
|
||||
<class-decl name='__dirstream' is-struct='yes' visibility='default' is-declaration-only='yes' id='20cd73f2'/>
|
||||
<class-decl name='__va_list_tag' size-in-bits='192' is-struct='yes' visibility='default' id='d5027220'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='gp_offset' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='32'>
|
||||
<var-decl name='fp_offset' type-id='f0981eeb' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='64'>
|
||||
<var-decl name='overflow_arg_area' type-id='eaa32e2f' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='reg_save_area' type-id='eaa32e2f' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<class-decl name='tpool' size-in-bits='2496' is-struct='yes' visibility='default' id='88d1b7f9'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='tp_forw' type-id='9cf59a50' visibility='default'/>
|
||||
@@ -3672,6 +3663,8 @@
|
||||
<var-decl name='__glibc_reserved' type-id='16dc656a' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='DIR' type-id='20cd73f2' id='54a5d683'/>
|
||||
<typedef-decl name='uintptr_t' type-id='7359adad' id='e475ab95'/>
|
||||
<class-decl name='dirent64' size-in-bits='2240' is-struct='yes' visibility='default' id='5725d813'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='d_ino' type-id='71288a47' visibility='default'/>
|
||||
@@ -3837,10 +3830,10 @@
|
||||
<var-decl name='sigev_notify' type-id='95e97e5e' visibility='default'/>
|
||||
</data-member>
|
||||
<data-member access='public' layout-offset-in-bits='128'>
|
||||
<var-decl name='_sigev_un' type-id='ac5ab598' visibility='default'/>
|
||||
<var-decl name='_sigev_un' type-id='ac5ab596' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<union-decl name='__anonymous_union__' size-in-bits='384' is-anonymous='yes' visibility='default' id='ac5ab598'>
|
||||
<union-decl name='__anonymous_union__' size-in-bits='384' is-anonymous='yes' visibility='default' id='ac5ab596'>
|
||||
<data-member access='public'>
|
||||
<var-decl name='_pad' type-id='73b82f0f' visibility='default'/>
|
||||
</data-member>
|
||||
@@ -3957,8 +3950,6 @@
|
||||
<var-decl name='tv_nsec' type-id='03085adc' visibility='default'/>
|
||||
</data-member>
|
||||
</class-decl>
|
||||
<typedef-decl name='DIR' type-id='20cd73f2' id='54a5d683'/>
|
||||
<typedef-decl name='uintptr_t' type-id='7359adad' id='e475ab95'/>
|
||||
<pointer-type-def type-id='54a5d683' size-in-bits='64' id='f09217ba'/>
|
||||
<pointer-type-def type-id='aa12d1ba' size-in-bits='64' id='822cd80b'/>
|
||||
<qualified-type-def type-id='822cd80b' restrict='yes' id='e75a27e9'/>
|
||||
@@ -3967,7 +3958,6 @@
|
||||
<pointer-type-def type-id='bb4788fa' size-in-bits='64' id='cecf4ea7'/>
|
||||
<pointer-type-def type-id='010ae0b9' size-in-bits='64' id='e4c6fa61'/>
|
||||
<pointer-type-def type-id='79bd3751' size-in-bits='64' id='c65a1f29'/>
|
||||
<pointer-type-def type-id='d5027220' size-in-bits='64' id='b7f2d5e6'/>
|
||||
<pointer-type-def type-id='e4957c49' size-in-bits='64' id='924bbc81'/>
|
||||
<qualified-type-def type-id='924bbc81' const='yes' id='5499dcde'/>
|
||||
<pointer-type-def type-id='5499dcde' size-in-bits='64' id='2236d41c'/>
|
||||
@@ -4211,6 +4201,18 @@
|
||||
<parameter type-id='f095e320' name='pco'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='for_each_vdev_macro_helper_func' mangled-name='for_each_vdev_macro_helper_func' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='for_each_vdev_macro_helper_func'>
|
||||
<parameter type-id='eaa32e2f' name='state'/>
|
||||
<parameter type-id='5ce45b60' name='nv'/>
|
||||
<parameter type-id='eaa32e2f' name='last_nv'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='for_each_real_leaf_vdev_macro_helper_func' mangled-name='for_each_real_leaf_vdev_macro_helper_func' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='for_each_real_leaf_vdev_macro_helper_func'>
|
||||
<parameter type-id='eaa32e2f' name='state'/>
|
||||
<parameter type-id='5ce45b60' name='nv'/>
|
||||
<parameter type-id='eaa32e2f' name='last_nv'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='for_each_vdev_cb' mangled-name='for_each_vdev_cb' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='for_each_vdev_cb'>
|
||||
<parameter type-id='eaa32e2f' name='zhp'/>
|
||||
<parameter type-id='5ce45b60' name='nv'/>
|
||||
@@ -4269,25 +4271,6 @@
|
||||
<parameter type-id='18c91f9e'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='fprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='vsnprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='26a90f95'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter type-id='b7f2d5e6'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='asprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='8c85230f'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='strtoull' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='8c85230f'/>
|
||||
@@ -4309,11 +4292,6 @@
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='realpath' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='266fe297'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
<function-decl name='strncmp' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
@@ -4329,6 +4307,41 @@
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
<function-decl name='sysconf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<return type-id='bd54fe1a'/>
|
||||
</function-decl>
|
||||
<function-decl name='geteuid' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='cc5fcceb'/>
|
||||
</function-decl>
|
||||
<function-decl name='__fprintf_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='__asprintf_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='8c85230f'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='__realpath_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter type-id='266fe297'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='26a90f95'/>
|
||||
</function-decl>
|
||||
<function-decl name='__pread64_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='724e4de6'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='79a0948f'/>
|
||||
</function-decl>
|
||||
<function-decl name='ioctl' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='7359adad'/>
|
||||
@@ -4340,20 +4353,6 @@
|
||||
<parameter type-id='62f7a03d'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='pread64' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<parameter type-id='724e4de6'/>
|
||||
<return type-id='79a0948f'/>
|
||||
</function-decl>
|
||||
<function-decl name='sysconf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<return type-id='bd54fe1a'/>
|
||||
</function-decl>
|
||||
<function-decl name='geteuid' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='cc5fcceb'/>
|
||||
</function-decl>
|
||||
<function-type size-in-bits='64' id='baa42fef'>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
@@ -4431,6 +4430,9 @@
|
||||
<parameter type-id='b59d7dce' name='buflen'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='__ctype_b_loc' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='c59e1ef0'/>
|
||||
</function-decl>
|
||||
<function-decl name='powl' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='e095c704'/>
|
||||
<parameter type-id='e095c704'/>
|
||||
@@ -4440,14 +4442,12 @@
|
||||
<parameter type-id='a0eb0f08'/>
|
||||
<return type-id='a0eb0f08'/>
|
||||
</function-decl>
|
||||
<function-decl name='__ctype_b_loc' visibility='default' binding='global' size-in-bits='64'>
|
||||
<return type-id='c59e1ef0'/>
|
||||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='zutil_pool.c' language='LANG_C99'>
|
||||
<array-type-def dimensions='1' type-id='853fd5dc' size-in-bits='32768' id='b505fc2f'>
|
||||
<subrange length='64' type-id='7359adad' id='b10be967'/>
|
||||
</array-type-def>
|
||||
<type-decl name='float' size-in-bits='32' id='a6c45d85'/>
|
||||
<class-decl name='ddt_stat' size-in-bits='512' is-struct='yes' visibility='default' id='65242dfe'>
|
||||
<data-member access='public' layout-offset-in-bits='0'>
|
||||
<var-decl name='dds_blocks' type-id='9c313c2d' visibility='default'/>
|
||||
@@ -4485,6 +4485,9 @@
|
||||
<pointer-type-def type-id='ec92d602' size-in-bits='64' id='932720f8'/>
|
||||
<qualified-type-def type-id='853fd5dc' const='yes' id='764c298c'/>
|
||||
<pointer-type-def type-id='764c298c' size-in-bits='64' id='dfe59052'/>
|
||||
<qualified-type-def type-id='a9c79a1f' const='yes' id='cd087e36'/>
|
||||
<pointer-type-def type-id='cd087e36' size-in-bits='64' id='e05e8614'/>
|
||||
<pointer-type-def type-id='a9c79a1f' size-in-bits='64' id='3d83ba87'/>
|
||||
<function-decl name='zpool_dump_ddt' mangled-name='zpool_dump_ddt' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_dump_ddt'>
|
||||
<parameter type-id='dfe59052' name='dds_total'/>
|
||||
<parameter type-id='932720f8' name='ddh'/>
|
||||
@@ -4498,9 +4501,13 @@
|
||||
<parameter type-id='4dd26a40' name='numrecords'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='printf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<function-decl name='fsleep' mangled-name='fsleep' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='fsleep'>
|
||||
<parameter type-id='a6c45d85' name='sec'/>
|
||||
<return type-id='48b5725f'/>
|
||||
</function-decl>
|
||||
<function-decl name='zpool_getenv_int' mangled-name='zpool_getenv_int' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='zpool_getenv_int'>
|
||||
<parameter type-id='80f4b756' name='env'/>
|
||||
<parameter type-id='95e97e5e' name='default_val'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='realloc' visibility='default' binding='global' size-in-bits='64'>
|
||||
@@ -4508,5 +4515,16 @@
|
||||
<parameter type-id='b59d7dce'/>
|
||||
<return type-id='eaa32e2f'/>
|
||||
</function-decl>
|
||||
<function-decl name='nanosleep' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='e05e8614'/>
|
||||
<parameter type-id='3d83ba87'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='__printf_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='80f4b756'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
</abi-instr>
|
||||
</abi-corpus>
|
||||
|
||||
@@ -1,16 +1,7 @@
|
||||
<abi-corpus version='2.0' architecture='elf-amd-x86_64' soname='libzfsbootenv.so.1'>
|
||||
<elf-needed>
|
||||
<dependency name='libzfs.so.4'/>
|
||||
<dependency name='libzfs_core.so.3'/>
|
||||
<dependency name='libuuid.so.1'/>
|
||||
<dependency name='libblkid.so.1'/>
|
||||
<dependency name='libudev.so.1'/>
|
||||
<dependency name='libuutil.so.3'/>
|
||||
<dependency name='libm.so.6'/>
|
||||
<dependency name='libcrypto.so.1.1'/>
|
||||
<dependency name='libz.so.1'/>
|
||||
<dependency name='libnvpair.so.3'/>
|
||||
<dependency name='libtirpc.so.3'/>
|
||||
<dependency name='libc.so.6'/>
|
||||
</elf-needed>
|
||||
<elf-function-symbols>
|
||||
@@ -289,18 +280,6 @@
|
||||
<parameter type-id='9b23c9ad' name='device'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='fprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='asprintf' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='8c85230f'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='free' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='eaa32e2f'/>
|
||||
<return type-id='48b5725f'/>
|
||||
@@ -319,6 +298,20 @@
|
||||
<parameter type-id='80f4b756'/>
|
||||
<return type-id='b59d7dce'/>
|
||||
</function-decl>
|
||||
<function-decl name='__fprintf_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='e75a27e9'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
<function-decl name='__asprintf_chk' visibility='default' binding='global' size-in-bits='64'>
|
||||
<parameter type-id='8c85230f'/>
|
||||
<parameter type-id='95e97e5e'/>
|
||||
<parameter type-id='9d26089a'/>
|
||||
<parameter is-variadic='yes'/>
|
||||
<return type-id='95e97e5e'/>
|
||||
</function-decl>
|
||||
</abi-instr>
|
||||
<abi-instr address-size='64' path='lzbe_pair.c' language='LANG_C99'>
|
||||
<type-decl name='short int' size-in-bits='16' id='a2185560'/>
|
||||
|
||||
@@ -248,7 +248,24 @@ zfs_dev_flush(int fd __unused)
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
update_vdev_config_dev_sysfs_path(nvlist_t *nv, const char *path,
|
||||
const char *key)
|
||||
{
|
||||
(void) nv;
|
||||
(void) path;
|
||||
(void) key;
|
||||
}
|
||||
|
||||
void
|
||||
update_vdevs_config_dev_sysfs_path(nvlist_t *config)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
zpool_disk_wait(const char *path)
|
||||
{
|
||||
|
||||
(void) path;
|
||||
return (ENOTSUP);
|
||||
}
|
||||
|
||||
@@ -188,25 +188,17 @@ zpool_open_func(void *arg)
|
||||
if (rn->rn_labelpaths) {
|
||||
char *path = NULL;
|
||||
char *devid = NULL;
|
||||
char *env = NULL;
|
||||
rdsk_node_t *slice;
|
||||
avl_index_t where;
|
||||
int timeout;
|
||||
int error;
|
||||
|
||||
if (label_paths(rn->rn_hdl, rn->rn_config, &path, &devid))
|
||||
return;
|
||||
|
||||
env = getenv("ZPOOL_IMPORT_UDEV_TIMEOUT_MS");
|
||||
if ((env == NULL) || sscanf(env, "%d", &timeout) != 1 ||
|
||||
timeout < 0) {
|
||||
timeout = DISK_LABEL_WAIT;
|
||||
}
|
||||
|
||||
/*
|
||||
* Allow devlinks to stabilize so all paths are available.
|
||||
*/
|
||||
zpool_label_disk_wait(rn->rn_name, timeout);
|
||||
zpool_disk_wait(rn->rn_name);
|
||||
|
||||
if (path != NULL) {
|
||||
slice = zutil_alloc(hdl, sizeof (rdsk_node_t));
|
||||
@@ -700,6 +692,20 @@ zpool_label_disk_wait(const char *path, int timeout_ms)
|
||||
#endif /* HAVE_LIBUDEV */
|
||||
}
|
||||
|
||||
/*
|
||||
* Simplified version of zpool_label_disk_wait() where we wait for a device
|
||||
* to appear using the default timeouts.
|
||||
*/
|
||||
int
|
||||
zpool_disk_wait(const char *path)
|
||||
{
|
||||
int timeout;
|
||||
timeout = zpool_getenv_int("ZPOOL_IMPORT_UDEV_TIMEOUT_MS",
|
||||
DISK_LABEL_WAIT);
|
||||
|
||||
return (zpool_label_disk_wait(path, timeout));
|
||||
}
|
||||
|
||||
/*
|
||||
* Encode the persistent devices strings
|
||||
* used for the vdev disk label
|
||||
@@ -781,20 +787,37 @@ no_dev:
|
||||
* Rescan the enclosure sysfs path for turning on enclosure LEDs and store it
|
||||
* in the nvlist * (if applicable). Like:
|
||||
* vdev_enc_sysfs_path: '/sys/class/enclosure/11:0:1:0/SLOT 4'
|
||||
*
|
||||
* If an old path was in the nvlist, and the rescan can not find a new path,
|
||||
* then keep the old path, since the disk may have been removed.
|
||||
*
|
||||
* path: The vdev path (value from ZPOOL_CONFIG_PATH)
|
||||
* key: The nvlist_t name (like ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH)
|
||||
*/
|
||||
static void
|
||||
update_vdev_config_dev_sysfs_path(nvlist_t *nv, char *path)
|
||||
void
|
||||
update_vdev_config_dev_sysfs_path(nvlist_t *nv, const char *path,
|
||||
const char *key)
|
||||
{
|
||||
char *upath, *spath;
|
||||
char *oldpath = NULL;
|
||||
|
||||
(void) nvlist_lookup_string(nv, key, &oldpath);
|
||||
|
||||
/* Add enclosure sysfs path (if disk is in an enclosure). */
|
||||
upath = zfs_get_underlying_path(path);
|
||||
spath = zfs_get_enclosure_sysfs_path(upath);
|
||||
|
||||
if (spath) {
|
||||
nvlist_add_string(nv, ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH, spath);
|
||||
(void) nvlist_add_string(nv, key, spath);
|
||||
} else {
|
||||
nvlist_remove_all(nv, ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH);
|
||||
/*
|
||||
* We couldn't dynamically scan the disk's enclosure sysfs path.
|
||||
* This could be because the disk went away. If there's an old
|
||||
* enclosure sysfs path in the nvlist, then keep using it.
|
||||
*/
|
||||
if (!oldpath) {
|
||||
(void) nvlist_remove_all(nv, key);
|
||||
}
|
||||
}
|
||||
|
||||
free(upath);
|
||||
@@ -812,7 +835,8 @@ sysfs_path_pool_vdev_iter_f(void *hdl_data, nvlist_t *nv, void *data)
|
||||
return (1);
|
||||
|
||||
/* Rescan our enclosure sysfs path for this vdev */
|
||||
update_vdev_config_dev_sysfs_path(nv, path);
|
||||
update_vdev_config_dev_sysfs_path(nv, path,
|
||||
ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH);
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -901,7 +925,8 @@ update_vdev_config_dev_strs(nvlist_t *nv)
|
||||
(void) nvlist_add_string(nv, ZPOOL_CONFIG_PHYS_PATH,
|
||||
vds.vds_devphys);
|
||||
}
|
||||
update_vdev_config_dev_sysfs_path(nv, path);
|
||||
update_vdev_config_dev_sysfs_path(nv, path,
|
||||
ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH);
|
||||
} else {
|
||||
/* Clear out any stale entries. */
|
||||
(void) nvlist_remove_all(nv, ZPOOL_CONFIG_DEVID);
|
||||
|
||||
@@ -1836,6 +1836,104 @@ zpool_find_config(void *hdl, const char *target, nvlist_t **configp,
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* Return if a vdev is a leaf vdev. Note: draid spares are leaf vdevs. */
|
||||
static boolean_t
|
||||
vdev_is_leaf(nvlist_t *nv)
|
||||
{
|
||||
uint_t children = 0;
|
||||
nvlist_t **child;
|
||||
|
||||
(void) nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN,
|
||||
&child, &children);
|
||||
|
||||
return (children == 0);
|
||||
}
|
||||
|
||||
/* Return if a vdev is a leaf vdev and a real device (disk or file) */
|
||||
static boolean_t
|
||||
vdev_is_real_leaf(nvlist_t *nv)
|
||||
{
|
||||
char *type = NULL;
|
||||
if (!vdev_is_leaf(nv))
|
||||
return (B_FALSE);
|
||||
|
||||
(void) nvlist_lookup_string(nv, ZPOOL_CONFIG_TYPE, &type);
|
||||
if ((strcmp(type, VDEV_TYPE_DISK) == 0) ||
|
||||
(strcmp(type, VDEV_TYPE_FILE) == 0)) {
|
||||
return (B_TRUE);
|
||||
}
|
||||
|
||||
return (B_FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is called by our FOR_EACH_VDEV() macros.
|
||||
*
|
||||
* state: State machine status (stored inside of a (nvlist_t *))
|
||||
* nv: The current vdev nvlist_t we are iterating over.
|
||||
* last_nv: The previous vdev nvlist_t we returned to the user in
|
||||
* the last iteration of FOR_EACH_VDEV(). We use it
|
||||
* to find the next vdev nvlist_t we should return.
|
||||
* real_leaves_only: Only return leaf vdevs.
|
||||
*
|
||||
* Returns 1 if we found the next vdev nvlist_t for this iteration. 0 if
|
||||
* we're still searching for it.
|
||||
*/
|
||||
static int
|
||||
__for_each_vdev_macro_helper_func(void *state, nvlist_t *nv, void *last_nv,
|
||||
boolean_t real_leaves_only)
|
||||
{
|
||||
enum {FIRST_NV = 0, NEXT_IS_MATCH = 1, STOP_LOOKING = 2};
|
||||
|
||||
/* The very first entry in the NV list is a special case */
|
||||
if (*((nvlist_t **)state) == (nvlist_t *)FIRST_NV) {
|
||||
if (real_leaves_only && !vdev_is_real_leaf(nv))
|
||||
return (0);
|
||||
|
||||
*((nvlist_t **)last_nv) = nv;
|
||||
*((nvlist_t **)state) = (nvlist_t *)STOP_LOOKING;
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* We came across our last_nv, meaning the next one is the one we
|
||||
* want
|
||||
*/
|
||||
if (nv == *((nvlist_t **)last_nv)) {
|
||||
/* Next iteration of this function will return the nvlist_t */
|
||||
*((nvlist_t **)state) = (nvlist_t *)NEXT_IS_MATCH;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* We marked NEXT_IS_MATCH on the previous iteration, so this is the one
|
||||
* we want.
|
||||
*/
|
||||
if (*(nvlist_t **)state == (nvlist_t *)NEXT_IS_MATCH) {
|
||||
if (real_leaves_only && !vdev_is_real_leaf(nv))
|
||||
return (0);
|
||||
|
||||
*((nvlist_t **)last_nv) = nv;
|
||||
*((nvlist_t **)state) = (nvlist_t *)STOP_LOOKING;
|
||||
return (1);
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
for_each_vdev_macro_helper_func(void *state, nvlist_t *nv, void *last_nv)
|
||||
{
|
||||
return (__for_each_vdev_macro_helper_func(state, nv, last_nv, B_FALSE));
|
||||
}
|
||||
|
||||
int
|
||||
for_each_real_leaf_vdev_macro_helper_func(void *state, nvlist_t *nv,
|
||||
void *last_nv)
|
||||
{
|
||||
return (__for_each_vdev_macro_helper_func(state, nv, last_nv, B_TRUE));
|
||||
}
|
||||
|
||||
/*
|
||||
* Internal function for iterating over the vdevs.
|
||||
*
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <string.h>
|
||||
#include <sys/nvpair.h>
|
||||
#include <sys/fs/zfs.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <libzutil.h>
|
||||
|
||||
@@ -143,3 +144,33 @@ zpool_history_unpack(char *buf, uint64_t bytes_read, uint64_t *leftover,
|
||||
*leftover = bytes_read;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Floating point sleep(). Allows you to pass in a floating point value for
|
||||
* seconds.
|
||||
*/
|
||||
void
|
||||
fsleep(float sec)
|
||||
{
|
||||
struct timespec req;
|
||||
req.tv_sec = floor(sec);
|
||||
req.tv_nsec = (sec - (float)req.tv_sec) * NANOSEC;
|
||||
nanosleep(&req, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get environment variable 'env' and return it as an integer.
|
||||
* If 'env' is not set, then return 'default_val' instead.
|
||||
*/
|
||||
int
|
||||
zpool_getenv_int(const char *env, int default_val)
|
||||
{
|
||||
char *str;
|
||||
int val;
|
||||
str = getenv(env);
|
||||
if ((str == NULL) || sscanf(str, "%d", &val) != 1 ||
|
||||
val < 0) {
|
||||
val = default_val;
|
||||
}
|
||||
return (val);
|
||||
}
|
||||
|
||||
+2
-1
@@ -104,7 +104,8 @@ dist_man_MANS = \
|
||||
|
||||
nodist_man_MANS = \
|
||||
man8/zed.8 \
|
||||
man8/zfs-mount-generator.8
|
||||
man8/zfs-mount-generator.8 \
|
||||
man8/zfs_prepare_disk.8
|
||||
|
||||
SUBSTFILES += $(nodist_man_MANS)
|
||||
|
||||
|
||||
@@ -2216,6 +2216,16 @@ If
|
||||
.Sy 0 ,
|
||||
generate a system-dependent value close to 6 threads per taskq.
|
||||
.
|
||||
.It Sy zio_taskq_read Ns = Ns Sy fixed,1,8 null scale null Pq charp
|
||||
Set the queue and thread configuration for the IO read queues.
|
||||
This is an advanced debugging parameter.
|
||||
Don't change this unless you understand what it does.
|
||||
.
|
||||
.It Sy zio_taskq_write Ns = Ns Sy batch fixed,1,5 scale fixed,1,5 Pq charp
|
||||
Set the queue and thread configuration for the IO write queues.
|
||||
This is an advanced debugging parameter.
|
||||
Don't change this unless you understand what it does.
|
||||
.
|
||||
.It Sy zvol_inhibit_dev Ns = Ns Sy 0 Ns | Ns 1 Pq uint
|
||||
Do not create zvol device nodes.
|
||||
This may slightly improve startup time on
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
/zed.8
|
||||
/zfs-mount-generator.8
|
||||
/zfs_prepare_disk.8
|
||||
|
||||
+1
-1
@@ -545,7 +545,7 @@ access for a set of IP addresses and to enable root access for system
|
||||
on the
|
||||
.Ar tank/home
|
||||
file system:
|
||||
.Dl # Nm zfs Cm set Sy sharenfs Ns = Ns ' Ns Ar rw Ns =@123.123.0.0/16,root= Ns Ar neo Ns ' tank/home
|
||||
.Dl # Nm zfs Cm set Sy sharenfs Ns = Ns ' Ns Ar rw Ns =@123.123.0.0/16:[::1],root= Ns Ar neo Ns ' tank/home
|
||||
.Pp
|
||||
If you are using DNS for host name resolution,
|
||||
specify the fully-qualified hostname.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user