svn commit: r303019 - head/sys/geom
Sepherosa Ziehau
sepherosa at gmail.com
Tue Jul 19 05:38:46 UTC 2016
Thanks!
On Tue, Jul 19, 2016 at 1:36 PM, Andrey V. Elsukov <ae at freebsd.org> wrote:
> Author: ae
> Date: Tue Jul 19 05:36:21 2016
> New Revision: 303019
> URL: https://svnweb.freebsd.org/changeset/base/303019
>
> Log:
> Use g_resize_provider() to change the size of GEOM_DISK provider,
> when it is being opened. This should fix the possible loss of a resize
> event when disk capacity changed.
>
> PR: 211028
> Reported by: Dexuan Cui <decui at microsoft dot com>
> MFC after: 3 weeks
>
> Modified:
> head/sys/geom/geom_disk.c
>
> Modified: head/sys/geom/geom_disk.c
> ==============================================================================
> --- head/sys/geom/geom_disk.c Tue Jul 19 04:56:59 2016 (r303018)
> +++ head/sys/geom/geom_disk.c Tue Jul 19 05:36:21 2016 (r303019)
> @@ -126,7 +126,6 @@ g_disk_access(struct g_provider *pp, int
> if (error != 0)
> return (error);
> }
> - pp->mediasize = dp->d_mediasize;
> pp->sectorsize = dp->d_sectorsize;
> if (dp->d_maxsize == 0) {
> printf("WARNING: Disk drive %s%d has no d_maxsize\n",
> @@ -143,6 +142,7 @@ g_disk_access(struct g_provider *pp, int
> pp->stripeoffset = dp->d_stripeoffset;
> pp->stripesize = dp->d_stripesize;
> dp->d_flags |= DISKFLAG_OPEN;
> + g_resize_provider(pp, dp->d_mediasize);
> } else if ((pp->acr + pp->acw + pp->ace) > 0 && (r + w + e) == 0) {
> if (dp->d_close != NULL) {
> error = dp->d_close(dp);
> _______________________________________________
> svn-src-all at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-all
> To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
--
Tomorrow Will Never Die
More information about the svn-src-all
mailing list