diff options
author | mav <mav@FreeBSD.org> | 2016-04-04 09:47:39 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2016-04-04 09:47:39 +0000 |
commit | be0c6e50d78c8a594679933cbaf9793362406158 (patch) | |
tree | 0a4f008d92d96dacad728bda24fabd419bf6695e /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c | |
parent | 2dae0103a34ef216468f8c4d4c1696b13af5ccef (diff) | |
download | FreeBSD-src-be0c6e50d78c8a594679933cbaf9793362406158.zip FreeBSD-src-be0c6e50d78c8a594679933cbaf9793362406158.tar.gz |
MFC r297232: Unify ignoring EEXIST from zvol_create_minor().
This fixes creation of zvol devices for snapshots during zfs receive,
that previously failed with "ZFS WARNING: Unable to create ZVOL" message.
This solution is not perfect, but IMHO better then it was before.
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c index d4d10e3..57ca0f8 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c @@ -2841,7 +2841,8 @@ zvol_create_snapshots(objset_t *os, const char *name) break; } - if ((error = zvol_create_minor(sname)) != 0) { + error = zvol_create_minor(sname); + if (error != 0 && error != EEXIST) { printf("ZFS WARNING: Unable to create ZVOL %s (error=%d).\n", sname, error); break; |