Commit 0be36012 authored by Matt Macy's avatar Matt Macy
Browse files

Update OpenZFS to 2.0.0-rc3-gbd565f

parent e2228bd9
The [OpenZFS Code of Conduct](http://www.open-zfs.org/wiki/Code_of_Conduct) The [OpenZFS Code of Conduct](http://www.open-zfs.org/wiki/Code_of_Conduct)
applies to spaces associated with the ZFS on Linux project, including GitHub. applies to spaces associated with the OpenZFS project, including GitHub.
...@@ -2,9 +2,9 @@ Meta: 1 ...@@ -2,9 +2,9 @@ Meta: 1
Name: zfs Name: zfs
Branch: 1.0 Branch: 1.0
Version: 2.0.0 Version: 2.0.0
Release: rc2 Release: rc3
Release-Tags: relext Release-Tags: relext
License: CDDL License: CDDL
Author: OpenZFS Author: OpenZFS
Linux-Maximum: 5.8 Linux-Maximum: 5.9
Linux-Minimum: 3.10 Linux-Minimum: 3.10
...@@ -16,8 +16,8 @@ This repository contains the code for running OpenZFS on Linux and FreeBSD. ...@@ -16,8 +16,8 @@ This repository contains the code for running OpenZFS on Linux and FreeBSD.
# Installation # Installation
Full documentation for installing OpenZFS on your favorite Linux distribution can Full documentation for installing OpenZFS on your favorite operating system can
be found at the [ZoL Site](https://zfsonlinux.org/). be found at the [Getting Started Page](https://openzfs.github.io/openzfs-docs/Getting%20Started/index.html).
# Contribute & Develop # Contribute & Develop
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
Provides basic information on the ARC, its efficiency, the L2ARC (if present), Provides basic information on the ARC, its efficiency, the L2ARC (if present),
the Data Management Unit (DMU), Virtual Devices (VDEVs), and tunables. See the the Data Management Unit (DMU), Virtual Devices (VDEVs), and tunables. See the
in-source documentation and code at in-source documentation and code at
https://github.com/zfsonlinux/zfs/blob/master/module/zfs/arc.c for details. https://github.com/openzfs/zfs/blob/master/module/zfs/arc.c for details.
""" """
import getopt import getopt
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
Provides basic information on the ARC, its efficiency, the L2ARC (if present), Provides basic information on the ARC, its efficiency, the L2ARC (if present),
the Data Management Unit (DMU), Virtual Devices (VDEVs), and tunables. See the Data Management Unit (DMU), Virtual Devices (VDEVs), and tunables. See
the in-source documentation and code at the in-source documentation and code at
https://github.com/zfsonlinux/zfs/blob/master/module/zfs/arc.c for details. https://github.com/openzfs/zfs/blob/master/module/zfs/arc.c for details.
The original introduction to arc_summary can be found at The original introduction to arc_summary can be found at
http://cuddletech.com/?p=454 http://cuddletech.com/?p=454
""" """
...@@ -43,7 +43,7 @@ import subprocess ...@@ -43,7 +43,7 @@ import subprocess
import sys import sys
import time import time
DESCRIPTION = 'Print ARC and other statistics for ZFS on Linux' DESCRIPTION = 'Print ARC and other statistics for OpenZFS'
INDENT = ' '*8 INDENT = ' '*8
LINE_LENGTH = 72 LINE_LENGTH = 72
DATE_FORMAT = '%a %b %d %H:%M:%S %Y' DATE_FORMAT = '%a %b %d %H:%M:%S %Y'
...@@ -831,7 +831,7 @@ def section_vdev(kstats_dict): ...@@ -831,7 +831,7 @@ def section_vdev(kstats_dict):
# Currently [Nov 2017] the VDEV cache is disabled, because it is actually # Currently [Nov 2017] the VDEV cache is disabled, because it is actually
# harmful. When this is the case, we just skip the whole entry. See # harmful. When this is the case, we just skip the whole entry. See
# https://github.com/zfsonlinux/zfs/blob/master/module/zfs/vdev_cache.c # https://github.com/openzfs/zfs/blob/master/module/zfs/vdev_cache.c
# for details # for details
tunables = get_vdev_params() tunables = get_vdev_params()
...@@ -857,7 +857,7 @@ def section_vdev(kstats_dict): ...@@ -857,7 +857,7 @@ def section_vdev(kstats_dict):
def section_zil(kstats_dict): def section_zil(kstats_dict):
"""Collect information on the ZFS Intent Log. Some of the information """Collect information on the ZFS Intent Log. Some of the information
taken from https://github.com/zfsonlinux/zfs/blob/master/include/sys/zil.h taken from https://github.com/openzfs/zfs/blob/master/include/sys/zil.h
""" """
zil_stats = isolate_section('zil', kstats_dict) zil_stats = isolate_section('zil', kstats_dict)
......
...@@ -113,6 +113,21 @@ cmd = ("Usage: dbufstat [-bdhnrtvx] [-i file] [-f fields] [-o file] " ...@@ -113,6 +113,21 @@ cmd = ("Usage: dbufstat [-bdhnrtvx] [-i file] [-f fields] [-o file] "
raw = 0 raw = 0
if sys.platform.startswith("freebsd"):
import io
# Requires py-sysctl on FreeBSD
import sysctl
def default_ifile():
dbufs = sysctl.filter("kstat.zfs.misc.dbufs")[0].value
sys.stdin = io.StringIO(dbufs)
return "-"
elif sys.platform.startswith("linux"):
def default_ifile():
return "/proc/spl/kstat/zfs/dbufs"
def print_incompat_helper(incompat): def print_incompat_helper(incompat):
cnt = 0 cnt = 0
for key in sorted(incompat): for key in sorted(incompat):
...@@ -645,7 +660,7 @@ def main(): ...@@ -645,7 +660,7 @@ def main():
sys.exit(1) sys.exit(1)
if not ifile: if not ifile:
ifile = '/proc/spl/kstat/zfs/dbufs' ifile = default_ifile()
if ifile is not "-": if ifile is not "-":
try: try:
......
...@@ -1120,7 +1120,21 @@ dump_zap(objset_t *os, uint64_t object, void *data, size_t size) ...@@ -1120,7 +1120,21 @@ dump_zap(objset_t *os, uint64_t object, void *data, size_t size)
(void) zap_lookup(os, object, attr.za_name, (void) zap_lookup(os, object, attr.za_name,
attr.za_integer_length, attr.za_num_integers, prop); attr.za_integer_length, attr.za_num_integers, prop);
if (attr.za_integer_length == 1) { if (attr.za_integer_length == 1) {
(void) printf("%s", (char *)prop); if (strcmp(attr.za_name,
DSL_CRYPTO_KEY_MASTER_KEY) == 0 ||
strcmp(attr.za_name,
DSL_CRYPTO_KEY_HMAC_KEY) == 0 ||
strcmp(attr.za_name, DSL_CRYPTO_KEY_IV) == 0 ||
strcmp(attr.za_name, DSL_CRYPTO_KEY_MAC) == 0 ||
strcmp(attr.za_name, DMU_POOL_CHECKSUM_SALT) == 0) {
uint8_t *u8 = prop;
for (i = 0; i < attr.za_num_integers; i++) {
(void) printf("%02x", u8[i]);
}
} else {
(void) printf("%s", (char *)prop);
}
} else { } else {
for (i = 0; i < attr.za_num_integers; i++) { for (i = 0; i < attr.za_num_integers; i++) {
switch (attr.za_integer_length) { switch (attr.za_integer_length) {
......
...@@ -62,9 +62,9 @@ print_log_bp(const blkptr_t *bp, const char *prefix) ...@@ -62,9 +62,9 @@ print_log_bp(const blkptr_t *bp, const char *prefix)
/* ARGSUSED */ /* ARGSUSED */
static void static void
zil_prt_rec_create(zilog_t *zilog, int txtype, void *arg) zil_prt_rec_create(zilog_t *zilog, int txtype, const void *arg)
{ {
lr_create_t *lr = arg; const lr_create_t *lr = arg;
time_t crtime = lr->lr_crtime[0]; time_t crtime = lr->lr_crtime[0];
char *name, *link; char *name, *link;
lr_attr_t *lrattr; lr_attr_t *lrattr;
...@@ -98,9 +98,9 @@ zil_prt_rec_create(zilog_t *zilog, int txtype, void *arg) ...@@ -98,9 +98,9 @@ zil_prt_rec_create(zilog_t *zilog, int txtype, void *arg)
/* ARGSUSED */ /* ARGSUSED */
static void static void
zil_prt_rec_remove(zilog_t *zilog, int txtype, void *arg) zil_prt_rec_remove(zilog_t *zilog, int txtype, const void *arg)
{ {
lr_remove_t *lr = arg; const lr_remove_t *lr = arg;
(void) printf("%sdoid %llu, name %s\n", tab_prefix, (void) printf("%sdoid %llu, name %s\n", tab_prefix,
(u_longlong_t)lr->lr_doid, (char *)(lr + 1)); (u_longlong_t)lr->lr_doid, (char *)(lr + 1));
...@@ -108,9 +108,9 @@ zil_prt_rec_remove(zilog_t *zilog, int txtype, void *arg) ...@@ -108,9 +108,9 @@ zil_prt_rec_remove(zilog_t *zilog, int txtype, void *arg)
/* ARGSUSED */ /* ARGSUSED */
static void static void
zil_prt_rec_link(zilog_t *zilog, int txtype, void *arg) zil_prt_rec_link(zilog_t *zilog, int txtype, const void *arg)
{ {
lr_link_t *lr = arg; const lr_link_t *lr = arg;
(void) printf("%sdoid %llu, link_obj %llu, name %s\n", tab_prefix, (void) printf("%sdoid %llu, link_obj %llu, name %s\n", tab_prefix,
(u_longlong_t)lr->lr_doid, (u_longlong_t)lr->lr_link_obj, (u_longlong_t)lr->lr_doid, (u_longlong_t)lr->lr_link_obj,
...@@ -119,9 +119,9 @@ zil_prt_rec_link(zilog_t *zilog, int txtype, void *arg) ...@@ -119,9 +119,9 @@ zil_prt_rec_link(zilog_t *zilog, int txtype, void *arg)
/* ARGSUSED */ /* ARGSUSED */
static void static void
zil_prt_rec_rename(zilog_t *zilog, int txtype, void *arg) zil_prt_rec_rename(zilog_t *zilog, int txtype, const void *arg)
{ {
lr_rename_t *lr = arg; const lr_rename_t *lr = arg;
char *snm = (char *)(lr + 1); char *snm = (char *)(lr + 1);
char *tnm = snm + strlen(snm) + 1; char *tnm = snm + strlen(snm) + 1;
...@@ -148,11 +148,11 @@ zil_prt_rec_write_cb(void *data, size_t len, void *unused) ...@@ -148,11 +148,11 @@ zil_prt_rec_write_cb(void *data, size_t len, void *unused)
/* ARGSUSED */ /* ARGSUSED */
static void static void
zil_prt_rec_write(zilog_t *zilog, int txtype, void *arg) zil_prt_rec_write(zilog_t *zilog, int txtype, const void *arg)
{ {
lr_write_t *lr = arg; const lr_write_t *lr = arg;
abd_t *data; abd_t *data;
blkptr_t *bp = &lr->lr_blkptr; const blkptr_t *bp = &lr->lr_blkptr;
zbookmark_phys_t zb; zbookmark_phys_t zb;
int verbose = MAX(dump_opt['d'], dump_opt['i']); int verbose = MAX(dump_opt['d'], dump_opt['i']);
int error; int error;
...@@ -211,9 +211,9 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, void *arg) ...@@ -211,9 +211,9 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, void *arg)
/* ARGSUSED */ /* ARGSUSED */
static void static void
zil_prt_rec_truncate(zilog_t *zilog, int txtype, void *arg) zil_prt_rec_truncate(zilog_t *zilog, int txtype, const void *arg)
{ {
lr_truncate_t *lr = arg; const lr_truncate_t *lr = arg;
(void) printf("%sfoid %llu, offset 0x%llx, length 0x%llx\n", tab_prefix, (void) printf("%sfoid %llu, offset 0x%llx, length 0x%llx\n", tab_prefix,
(u_longlong_t)lr->lr_foid, (longlong_t)lr->lr_offset, (u_longlong_t)lr->lr_foid, (longlong_t)lr->lr_offset,
...@@ -222,9 +222,9 @@ zil_prt_rec_truncate(zilog_t *zilog, int txtype, void *arg) ...@@ -222,9 +222,9 @@ zil_prt_rec_truncate(zilog_t *zilog, int txtype, void *arg)
/* ARGSUSED */ /* ARGSUSED */
static void static void
zil_prt_rec_setattr(zilog_t *zilog, int txtype, void *arg) zil_prt_rec_setattr(zilog_t *zilog, int txtype, const void *arg)
{ {
lr_setattr_t *lr = arg; const lr_setattr_t *lr = arg;
time_t atime = (time_t)lr->lr_atime[0]; time_t atime = (time_t)lr->lr_atime[0];
time_t mtime = (time_t)lr->lr_mtime[0]; time_t mtime = (time_t)lr->lr_mtime[0];
...@@ -268,15 +268,15 @@ zil_prt_rec_setattr(zilog_t *zilog, int txtype, void *arg) ...@@ -268,15 +268,15 @@ zil_prt_rec_setattr(zilog_t *zilog, int txtype, void *arg)
/* ARGSUSED */ /* ARGSUSED */
static void static void
zil_prt_rec_acl(zilog_t *zilog, int txtype, void *arg) zil_prt_rec_acl(zilog_t *zilog, int txtype, const void *arg)
{ {
lr_acl_t *lr = arg; const lr_acl_t *lr = arg;
(void) printf("%sfoid %llu, aclcnt %llu\n", tab_prefix, (void) printf("%sfoid %llu, aclcnt %llu\n", tab_prefix,
(u_longlong_t)lr->lr_foid, (u_longlong_t)lr->lr_aclcnt); (u_longlong_t)lr->lr_foid, (u_longlong_t)lr->lr_aclcnt);
} }
typedef void (*zil_prt_rec_func_t)(zilog_t *, int, void *); typedef void (*zil_prt_rec_func_t)(zilog_t *, int, const void *);
typedef struct zil_rec_info { typedef struct zil_rec_info {
zil_prt_rec_func_t zri_print; zil_prt_rec_func_t zri_print;
const char *zri_name; const char *zri_name;
...@@ -309,7 +309,7 @@ static zil_rec_info_t zil_rec_info[TX_MAX_TYPE] = { ...@@ -309,7 +309,7 @@ static zil_rec_info_t zil_rec_info[TX_MAX_TYPE] = {
/* ARGSUSED */ /* ARGSUSED */
static int static int
print_log_record(zilog_t *zilog, lr_t *lr, void *arg, uint64_t claim_txg) print_log_record(zilog_t *zilog, const lr_t *lr, void *arg, uint64_t claim_txg)
{ {
int txtype; int txtype;
int verbose = MAX(dump_opt['d'], dump_opt['i']); int verbose = MAX(dump_opt['d'], dump_opt['i']);
...@@ -343,7 +343,8 @@ print_log_record(zilog_t *zilog, lr_t *lr, void *arg, uint64_t claim_txg) ...@@ -343,7 +343,8 @@ print_log_record(zilog_t *zilog, lr_t *lr, void *arg, uint64_t claim_txg)
/* ARGSUSED */ /* ARGSUSED */
static int static int
print_log_block(zilog_t *zilog, blkptr_t *bp, void *arg, uint64_t claim_txg) print_log_block(zilog_t *zilog, const blkptr_t *bp, void *arg,
uint64_t claim_txg)
{ {
char blkbuf[BP_SPRINTF_LEN + 10]; char blkbuf[BP_SPRINTF_LEN + 10];
int verbose = MAX(dump_opt['d'], dump_opt['i']); int verbose = MAX(dump_opt['d'], dump_opt['i']);
......
...@@ -177,9 +177,9 @@ zfs_agent_post_event(const char *class, const char *subclass, nvlist_t *nvl) ...@@ -177,9 +177,9 @@ zfs_agent_post_event(const char *class, const char *subclass, nvlist_t *nvl)
} }
/* /*
* On ZFS on Linux, we don't get the expected FM_RESOURCE_REMOVED * On Linux, we don't get the expected FM_RESOURCE_REMOVED ereport
* ereport from vdev_disk layer after a hot unplug. Fortunately we * from the vdev_disk layer after a hot unplug. Fortunately we do
* get a EC_DEV_REMOVE from our disk monitor and it is a suitable * get an EC_DEV_REMOVE from our disk monitor and it is a suitable
* proxy so we remap it here for the benefit of the diagnosis engine. * proxy so we remap it here for the benefit of the diagnosis engine.
*/ */
if ((strcmp(class, EC_DEV_REMOVE) == 0) && if ((strcmp(class, EC_DEV_REMOVE) == 0) &&
......
...@@ -63,9 +63,7 @@ ...@@ -63,9 +63,7 @@
* If the device could not be replaced, then the second online attempt will * If the device could not be replaced, then the second online attempt will
* trigger the FMA fault that we skipped earlier. * trigger the FMA fault that we skipped earlier.
* *
* ZFS on Linux porting notes: * On Linux udev provides a disk insert for both the disk and the partition.
* Linux udev provides a disk insert for both the disk and the partition
*
*/ */
#include <ctype.h> #include <ctype.h>
......
...@@ -364,7 +364,7 @@ zfs_retire_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, ...@@ -364,7 +364,7 @@ zfs_retire_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl,
return; return;
/* /*
* Note: on zfsonlinux statechange events are more than just * Note: on Linux statechange events are more than just
* healthy ones so we need to confirm the actual state value. * healthy ones so we need to confirm the actual state value.
*/ */
if (strcmp(class, "resource.fs.zfs.statechange") == 0 && if (strcmp(class, "resource.fs.zfs.statechange") == 0 &&
......
/* /*
* This file is part of the ZFS Event Daemon (ZED) * This file is part of the ZFS Event Daemon (ZED).
* for ZFS on Linux (ZoL) <http://zfsonlinux.org/>. *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049). * Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC. * Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution. * Refer to the ZoL git commit log for authoritative copyright attribution.
......
/* /*
* This file is part of the ZFS Event Daemon (ZED) * This file is part of the ZFS Event Daemon (ZED).
* for ZFS on Linux (ZoL) <http://zfsonlinux.org/>. *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049). * Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC. * Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution. * Refer to the ZoL git commit log for authoritative copyright attribution.
......
/* /*
* This file is part of the ZFS Event Daemon (ZED) * This file is part of the ZFS Event Daemon (ZED).
* for ZFS on Linux (ZoL) <http://zfsonlinux.org/>. *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049). * Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC. * Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution. * Refer to the ZoL git commit log for authoritative copyright attribution.
......
/* /*
* This file is part of the ZFS Event Daemon (ZED) * This file is part of the ZFS Event Daemon (ZED).
* for ZFS on Linux (ZoL) <http://zfsonlinux.org/>. *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049). * Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC. * Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution. * Refer to the ZoL git commit log for authoritative copyright attribution.
......
/* /*
* This file is part of the ZFS Event Daemon (ZED) * This file is part of the ZFS Event Daemon (ZED).
* for ZFS on Linux (ZoL) <http://zfsonlinux.org/>. *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049). * Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC. * Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution. * Refer to the ZoL git commit log for authoritative copyright attribution.
......
/* /*
* This file is part of the ZFS Event Daemon (ZED) * This file is part of the ZFS Event Daemon (ZED).
* for ZFS on Linux (ZoL) <http://zfsonlinux.org/>. *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049). * Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC. * Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution. * Refer to the ZoL git commit log for authoritative copyright attribution.
......
/* /*
* This file is part of the ZFS Event Daemon (ZED) * This file is part of the ZFS Event Daemon (ZED).
* for ZFS on Linux (ZoL) <http://zfsonlinux.org/>. *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049). * Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC. * Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution. * Refer to the ZoL git commit log for authoritative copyright attribution.
......
/* /*
* This file is part of the ZFS Event Daemon (ZED) * This file is part of the ZFS Event Daemon (ZED).
* for ZFS on Linux (ZoL) <http://zfsonlinux.org/>. *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049). * Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC. * Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution. * Refer to the ZoL git commit log for authoritative copyright attribution.
......
/* /*
* This file is part of the ZFS Event Daemon (ZED) * This file is part of the ZFS Event Daemon (ZED).
* for ZFS on Linux (ZoL) <http://zfsonlinux.org/>. *
* Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049). * Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
* Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC. * Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
* Refer to the ZoL git commit log for authoritative copyright attribution. * Refer to the ZoL git commit log for authoritative copyright attribution.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment