svn commit: r314497 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Andrey V. Elsukov
ae at FreeBSD.org
Wed Mar 1 18:03:33 UTC 2017
Author: ae
Date: Wed Mar 1 18:03:32 2017
New Revision: 314497
URL: https://svnweb.freebsd.org/changeset/base/314497
Log:
Do not invoke the resize event when previous provider's size was zero.
This is similar to r303637 fix for geom_disk.
Reported by: avg
Tested by: avg
MFC after: 1 week
Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Wed Mar 1 17:35:56 2017 (r314496)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Wed Mar 1 18:03:32 2017 (r314497)
@@ -278,7 +278,16 @@ zvol_size_changed(zvol_state_t *zv, uint
if (pp == NULL)
return;
g_topology_lock();
- g_resize_provider(pp, zv->zv_volsize);
+
+ /*
+ * Do not invoke resize event when initial size was zero.
+ * ZVOL initializes the size on first open, this is not
+ * real resizing.
+ */
+ if (pp->mediasize == 0)
+ pp->mediasize = zv->zv_volsize;
+ else
+ g_resize_provider(pp, zv->zv_volsize);
g_topology_unlock();
}
#endif /* illumos */
More information about the svn-src-head
mailing list