[PATCH] NVMe: Force cancel commands on hot-removal

Mohana Goli mohana.goli at seagate.com
Wed Sep 9 20:06:50 PDT 2015


On Wed, Sep 9, 2015 at 9:39 PM, Keith Busch <keith.busch at intel.com> wrote:
> On Wed, 9 Sep 2015, Mohana Goli wrote:
>>
>> But issue is not seen if i use the my fix ,doing nvme_dev_shutdown
>> first and nvme_dev_remove in nvme_remove function.And calling
>> blk_cleanup_queue(ns->queue) before calling del_gendisk in
>> nvme_ns_remove function.
>
>
> The problem with your way is an orderly removal won't be able to sync
> dirty data, which is something you _really_ want to happen if it at
> all possible.

I think in case of orderly removal user will ensure flushing the dirty
data and unmounting the filesystem before physically remove the
drive.However there is a problem unloading the driver where we need to
sync the dirty data first.
For this i read csts register in nvme_remove,if that reads as
"0xffffffff" (device is no longer present), then i go my way,
otherwise your way.



More information about the Linux-nvme mailing list