svn commit: r238656 -
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Edward Tomasz Napierala
trasz at FreeBSD.org
Fri Jul 20 16:56:35 UTC 2012
Author: trasz
Date: Fri Jul 20 16:56:34 2012
New Revision: 238656
URL: http://svn.freebsd.org/changeset/base/238656
Log:
Make ZVOL resizing ('zfs set volsize') properly resize the GEOM provider.
Sponsored by: FreeBSD Foundation
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 Fri Jul 20 09:49:50 2012 (r238655)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Fri Jul 20 16:56:34 2012 (r238656)
@@ -177,15 +177,9 @@ zvol_size_changed(zvol_state_t *zv)
pp = zv->zv_provider;
if (pp == NULL)
return;
- if (zv->zv_volsize == pp->mediasize)
- return;
- /*
- * Changing provider size is not really supported by GEOM, but it
- * should be safe when provider is closed.
- */
- if (zv->zv_total_opens > 0)
- return;
- pp->mediasize = zv->zv_volsize;
+ g_topology_lock();
+ g_resize_provider(pp, zv->zv_volsize);
+ g_topology_unlock();
#endif /* !sun */
}
More information about the svn-src-head
mailing list