Re: dm: free io_barrier after blk_cleanup_queue call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 10 2016 at  8:35am -0400,
Tahsin Erdogan <tahsin@xxxxxxxxxx> wrote:

> dm_old_request_fn() has paths that access md->io_barrier. The party
> destroying io_barrier should ensure that no future execution
> of dm_old_request_fn() is possible. Move destruction to below
> blk_cleanup_queue() to ensure this.

I have to believe this was born out of code inspection rather than
actual need (due to crash, etc)?

The cleanup order isn't relevant.  The reference counting of a DM device
governs whether a DM device (and its associated 'struct mapped_device')
can be destroyed.  Please have a look at  __dm_destroy, particularly:
        * No one should increment the reference count of the mapped_device,
        * after the mapped_device state becomes DMF_FREEING.

Mike
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux