In message <[EMAIL PROTECTED]>, Nate Lawson writes:
>> +void
>> +disk_gone(struct disk *dp)
>> +{
>> + struct g_geom *gp;
>> + struct g_provider *pp;
>> +
>> + gp = dp->d_geom;
>> + if (gp != NULL)
>> + LIST_FOREACH(pp, &gp->provider, provider)
>> + g_orphan_provider(pp, ENXIO);
>> +}
>> +
>
>Does there need to be locking for this list traversal? Couldn't
>disk_gone() race in parallel with a taste event if someone plugs/unplugs
>quickly, especially for a slow device (i.e. floppy)?
Disk gone is called by the driver which owns struct disk, so nobody
else has any business messing with that particular list.
Obviously the driver needs to not stomp on itself, but Giant does
that for CAM.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"