re-tasting of providers held with withering consumers

Andriy Gapon avg at FreeBSD.org
Wed Oct 3 14:53:24 UTC 2012


on 24/09/2012 07:27 Andrey V. Elsukov said the following:
> On 22.09.2012 21:23, Andriy Gapon wrote:
>>
>> Because removal of withered geoms is done asynchronously, there is a window when
>> some provider may require re-tasting (because of media change or size change),
>> but it would still be in use by the withering geom.  That prevents re-tasting a
>> class of that withering geom (for obvious reasons).
>>
>> The following patch tries to trigger owed re-tasting after the withering
>> provider is gone for good:
>> http://people.freebsd.org/~avg/geom-withered-retaste.diff
> 
> Hi, Andriy,
> 
> it seems you forgot to include g_renew_provider() implementation into the patch.
> 

Oh, yes, it is as simple as:
void
g_renew_provider(struct g_provider *pp)
{

	g_topology_assert();
	G_VALID_PROVIDER(pp);
	KASSERT(!(pp->geom->flags & G_GEOM_WITHER),
	    ("renew provider on WITHERing geom(%s) (class %s)",
	    pp->geom->name, pp->geom->class->name));
	g_post_event(g_new_provider_event, pp, M_WAITOK, pp, NULL);
}

I actually borrowed it from a patch of yours :-)

-- 
Andriy Gapon


More information about the freebsd-geom mailing list