Skip to content

Commit

Permalink
Merge tag 'zfs-0.8.2' of https://github.com/zfsonlinux/zfs into spp-d…
Browse files Browse the repository at this point in the history
…evelop

ZFS Version 0.8.2

Conflicts:
	module/zfs/spa.c
	module/zfs/vdev_removal.c
  • Loading branch information
Bryant G. Ly committed Oct 14, 2019
2 parents 2d32c3c + 1222e92 commit 79416f1
Show file tree
Hide file tree
Showing 208 changed files with 2,813 additions and 1,471 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,14 @@ cscope.*
*.log
venv

#
# Module leftovers
#
/module/avl/zavl.mod
/module/icp/icp.mod
/module/lua/zlua.mod
/module/nvpair/znvpair.mod
/module/spl/spl.mod
/module/unicode/zunicode.mod
/module/zcommon/zcommon.mod
/module/zfs/zfs.mod
4 changes: 2 additions & 2 deletions META
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Meta: 1
Name: zfs
Branch: 1.0
Version: 0.8.1
Version: 0.8.2
Release: 1
Release-Tags: relext
License: CDDL
Author: OpenZFS on Linux
Linux-Maximum: 5.1
Linux-Maximum: 5.3
Linux-Minimum: 2.6.32
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ distclean-local::
-type f -print | xargs $(RM)

all-local:
-${top_srcdir}/scripts/zfs-tests.sh -c
-[ -x ${top_builddir}/scripts/zfs-tests.sh ] && \
${top_builddir}/scripts/zfs-tests.sh -c

dist-hook: gitrev
cp ${top_srcdir}/include/zfs_gitrev.h $(distdir)/include; \
Expand Down
2 changes: 1 addition & 1 deletion cmd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ if USING_PYTHON
SUBDIRS += arcstat arc_summary dbufstat
endif

SUBDIRS += mount_zfs zed zvol_id
SUBDIRS += mount_zfs zed zvol_id zvol_wait
57 changes: 2 additions & 55 deletions cmd/zed/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
SUBDIRS = zed.d

include $(top_srcdir)/config/Rules.am

DEFAULT_INCLUDES += \
-I$(top_srcdir)/include \
-I$(top_srcdir)/lib/libspl/include

EXTRA_DIST = zed.d/README \
zed.d/history_event-zfs-list-cacher.sh.in

sbin_PROGRAMS = zed

ZED_SRC = \
Expand Down Expand Up @@ -47,55 +46,3 @@ zed_LDADD = \

zed_LDADD += -lrt
zed_LDFLAGS = -pthread

zedconfdir = $(sysconfdir)/zfs/zed.d

dist_zedconf_DATA = \
zed.d/zed-functions.sh \
zed.d/zed.rc

zedexecdir = $(zfsexecdir)/zed.d

dist_zedexec_SCRIPTS = \
zed.d/all-debug.sh \
zed.d/all-syslog.sh \
zed.d/data-notify.sh \
zed.d/generic-notify.sh \
zed.d/resilver_finish-notify.sh \
zed.d/scrub_finish-notify.sh \
zed.d/statechange-led.sh \
zed.d/statechange-notify.sh \
zed.d/vdev_clear-led.sh \
zed.d/vdev_attach-led.sh \
zed.d/pool_import-led.sh \
zed.d/resilver_finish-start-scrub.sh

nodist_zedexec_SCRIPTS = zed.d/history_event-zfs-list-cacher.sh

$(nodist_zedexec_SCRIPTS): %: %.in
-$(SED) -e 's,@bindir\@,$(bindir),g' \
-e 's,@runstatedir\@,$(runstatedir),g' \
-e 's,@sbindir\@,$(sbindir),g' \
-e 's,@sysconfdir\@,$(sysconfdir),g' \
$< >'$@'

zedconfdefaults = \
all-syslog.sh \
data-notify.sh \
resilver_finish-notify.sh \
scrub_finish-notify.sh \
statechange-led.sh \
statechange-notify.sh \
vdev_clear-led.sh \
vdev_attach-led.sh \
pool_import-led.sh \
resilver_finish-start-scrub.sh

install-data-hook:
$(MKDIR_P) "$(DESTDIR)$(zedconfdir)"
for f in $(zedconfdefaults); do \
test -f "$(DESTDIR)$(zedconfdir)/$${f}" -o \
-L "$(DESTDIR)$(zedconfdir)/$${f}" || \
ln -s "$(zedexecdir)/$${f}" "$(DESTDIR)$(zedconfdir)"; \
done
chmod 0600 "$(DESTDIR)$(zedconfdir)/zed.rc"
3 changes: 2 additions & 1 deletion cmd/zed/agents/zfs_agents.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ zfs_agent_iter_vdev(zpool_handle_t *zhp, nvlist_t *nvl, void *arg)
/*
* On a devid match, grab the vdev guid and expansion time, if any.
*/
if ((nvlist_lookup_string(nvl, ZPOOL_CONFIG_DEVID, &path) == 0) &&
if (gsp->gs_devid != NULL &&
(nvlist_lookup_string(nvl, ZPOOL_CONFIG_DEVID, &path) == 0) &&
(strcmp(gsp->gs_devid, path) == 0)) {
(void) nvlist_lookup_uint64(nvl, ZPOOL_CONFIG_GUID,
&gsp->gs_vdev_guid);
Expand Down
57 changes: 57 additions & 0 deletions cmd/zed/zed.d/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
include $(top_srcdir)/config/Rules.am

EXTRA_DIST = \
README \
history_event-zfs-list-cacher.sh.in

zedconfdir = $(sysconfdir)/zfs/zed.d

dist_zedconf_DATA = \
zed-functions.sh \
zed.rc

zedexecdir = $(zfsexecdir)/zed.d

dist_zedexec_SCRIPTS = \
all-debug.sh \
all-syslog.sh \
data-notify.sh \
generic-notify.sh \
resilver_finish-notify.sh \
scrub_finish-notify.sh \
statechange-led.sh \
statechange-notify.sh \
vdev_clear-led.sh \
vdev_attach-led.sh \
pool_import-led.sh \
resilver_finish-start-scrub.sh

nodist_zedexec_SCRIPTS = history_event-zfs-list-cacher.sh

$(nodist_zedexec_SCRIPTS): %: %.in
-$(SED) -e 's,@bindir\@,$(bindir),g' \
-e 's,@runstatedir\@,$(runstatedir),g' \
-e 's,@sbindir\@,$(sbindir),g' \
-e 's,@sysconfdir\@,$(sysconfdir),g' \
$< >'$@'

zedconfdefaults = \
all-syslog.sh \
data-notify.sh \
resilver_finish-notify.sh \
scrub_finish-notify.sh \
statechange-led.sh \
statechange-notify.sh \
vdev_clear-led.sh \
vdev_attach-led.sh \
pool_import-led.sh \
resilver_finish-start-scrub.sh

install-data-hook:
$(MKDIR_P) "$(DESTDIR)$(zedconfdir)"
for f in $(zedconfdefaults); do \
test -f "$(DESTDIR)$(zedconfdir)/$${f}" -o \
-L "$(DESTDIR)$(zedconfdir)/$${f}" || \
ln -s "$(zedexecdir)/$${f}" "$(DESTDIR)$(zedconfdir)"; \
done
chmod 0600 "$(DESTDIR)$(zedconfdir)/zed.rc"
4 changes: 2 additions & 2 deletions cmd/zed/zed.d/history_event-zfs-list-cacher.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ case "${ZEVENT_HISTORY_INTERNAL_NAME}" in
# Only act if one of the tracked properties is altered.
case "${ZEVENT_HISTORY_INTERNAL_STR%%=*}" in
canmount|mountpoint|atime|relatime|devices|exec| \
readonly|setuid|nbmand) ;;
readonly|setuid|nbmand|encroot|keylocation) ;;
*) exit 0 ;;
esac
;;
Expand All @@ -62,7 +62,7 @@ zed_lock zfs-list
trap abort_alter EXIT

PROPS="name,mountpoint,canmount,atime,relatime,devices,exec,readonly"
PROPS="${PROPS},setuid,nbmand"
PROPS="${PROPS},setuid,nbmand,encroot,keylocation"

"${ZFS}" list -H -t filesystem -o $PROPS -r "${ZEVENT_POOL}" > "${FSLIST_TMP}"

Expand Down
23 changes: 20 additions & 3 deletions cmd/zfs/zfs_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6446,8 +6446,25 @@ share_mount_one(zfs_handle_t *zhp, int op, int flags, char *protocol,
return (1);
}

if (zfs_mount(zhp, options, flags) != 0)
if (zfs_mount(zhp, options, flags) != 0) {
/*
* Check if a mount sneaked in after we checked
*/
if (!explicit &&
libzfs_errno(g_zfs) == EZFS_MOUNTFAILED) {
usleep(10 * MILLISEC);
libzfs_mnttab_cache(g_zfs, B_FALSE);

if (zfs_is_mounted(zhp, NULL)) {
(void) fprintf(stderr, gettext(
"Ignoring previous 'already "
"mounted' error for '%s'\n"),
zfs_get_name(zhp));
return (0);
}
}
return (1);
}
break;
}

Expand Down Expand Up @@ -6733,8 +6750,8 @@ unshare_unmount_compare(const void *larg, const void *rarg, void *unused)

/*
* Convenience routine used by zfs_do_umount() and manual_unmount(). Given an
* absolute path, find the entry /proc/self/mounts, verify that its a
* ZFS filesystems, and unmount it appropriately.
* absolute path, find the entry /proc/self/mounts, verify that it's a
* ZFS filesystem, and unmount it appropriately.
*/
static int
unshare_unmount_path(int op, char *path, int flags, boolean_t is_manual)
Expand Down
18 changes: 8 additions & 10 deletions cmd/zpool/zpool_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ add_prop_list_default(const char *propname, char *propval, nvlist_t **props,
* -P Display full path for vdev name.
*
* Adds the given vdevs to 'pool'. As with create, the bulk of this work is
* handled by get_vdev_spec(), which constructs the nvlist needed to pass to
* handled by make_root_vdev(), which constructs the nvlist needed to pass to
* libzfs.
*/
int
Expand Down Expand Up @@ -883,7 +883,7 @@ zpool_do_add(int argc, char **argv)
}
}

/* pass off to get_vdev_spec for processing */
/* pass off to make_root_vdev for processing */
nvroot = make_root_vdev(zhp, props, force, !force, B_FALSE, dryrun,
argc, argv);
if (nvroot == NULL) {
Expand Down Expand Up @@ -1232,9 +1232,9 @@ zpool_do_labelclear(int argc, char **argv)
* -O Set fsproperty=value in the pool's root file system
*
* Creates the named pool according to the given vdev specification. The
* bulk of the vdev processing is done in get_vdev_spec() in zpool_vdev.c. Once
* we get the nvlist back from get_vdev_spec(), we either print out the contents
* (if '-n' was specified), or pass it to libzfs to do the creation.
* bulk of the vdev processing is done in make_root_vdev() in zpool_vdev.c.
* Once we get the nvlist back from make_root_vdev(), we either print out the
* contents (if '-n' was specified), or pass it to libzfs to do the creation.
*/
int
zpool_do_create(int argc, char **argv)
Expand Down Expand Up @@ -1388,7 +1388,7 @@ zpool_do_create(int argc, char **argv)
goto errout;
}

/* pass off to get_vdev_spec for bulk processing */
/* pass off to make_root_vdev for bulk processing */
nvroot = make_root_vdev(NULL, props, force, !force, B_FALSE, dryrun,
argc - 1, argv + 1);
if (nvroot == NULL)
Expand Down Expand Up @@ -6111,9 +6111,8 @@ zpool_do_detach(int argc, char **argv)
int ret;

/* check options */
while ((c = getopt(argc, argv, "f")) != -1) {
while ((c = getopt(argc, argv, "")) != -1) {
switch (c) {
case 'f':
case '?':
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
optopt);
Expand Down Expand Up @@ -6342,12 +6341,11 @@ zpool_do_online(int argc, char **argv)
int flags = 0;

/* check options */
while ((c = getopt(argc, argv, "et")) != -1) {
while ((c = getopt(argc, argv, "e")) != -1) {
switch (c) {
case 'e':
flags |= ZFS_ONLINE_EXPAND;
break;
case 't':
case '?':
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
optopt);
Expand Down
1 change: 1 addition & 0 deletions cmd/zpool/zpool_vdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ check_disk(const char *path, blkid_cache cache, int force,
char *value = blkid_get_tag_value(cache, "TYPE", path);
(void) fprintf(stderr, gettext("%s is in use and contains "
"a %s filesystem.\n"), path, value ? value : "unknown");
free(value);
return (-1);
}

Expand Down
Loading

0 comments on commit 79416f1

Please sign in to comment.