NVMe: Fix FS mount issue(hot-remove followed by hot-add)
Subsystems (2)
PATCH 1/1 NVMe: Fix FS mount issue(hot-remove followed by hot-add)
Jens, this version is against the linux-block tree.
After Hot-remove of a device with a mounted partition, when the device is hot-added again, the new node reappears as nvme0n1. Mounting this new node fails with the error:
mount: mount /dev/nvme0n1p1 on /mnt failed: File exists.
The old nodes's FS entries still exist and the kernel can't re-create procfs and sysfs entries for the new node with the same name. The patch fixes this issue.
drivers/block/nvme-core.c +1 -1
@@ -2600,6 +2600,7 @@ static void nvme_free_dev(struct kref *kref) struct nvme_dev *dev = container_of(kref, struct nvme_dev, kref);nvme_free_namespaces (dev); +nvme_release_instance (dev);free_percpu (dev->io_queue);kfree (dev->queues);kfree (dev->entry);
@@ -2859,7 +2860,6 @@ static void nvme_remove(struct pci_dev *pdev)nvme_dev_shutdown (dev);nvme_free_queues (dev,0 );rcu_barrier (); -nvme_release_instance (dev);nvme_release_prp_pools (dev);kref_put (&dev->kref, nvme_free_dev); }
Signature · 1 line
1.8.3.2
Jens Axboe
maintainerPATCH 1/1 NVMe: Fix FS mount issue(hot-remove followed by hot-add)
Quoted 1 line · Indraneel M
Jens, this version is against the linux-block tree.
It's not, though:
checking file drivers/block/nvme-core.c
Hunk #1 FAILED at 2600.
Hunk #2 FAILED at 2859.
2 out of 2 hunks FAILED
what branch are you on? It has to be against for-3.19/drivers or for-next. This was simple enough to hand apply, so I did that. This is the result:
http://git.kernel.dk/?p=linux-block.git;a=commit;h=285dffc9101244ac65c29672a1fb3fe614b52238
Signature · 1 line
Jens Axboe
PATCH 1/1 NVMe: Fix FS mount issue(hot-remove followed by hot-add)
Quoted 11 lines
-----Original Message-----
From: Linux-nvme [mailto:linux-nvme-bounces at lists.infradead.org] On Behalf Of Jens Axboe
Sent: Thursday, December 11, 2014 8:56 PM
To: Indraneel M; linux-nvme at lists.infradead.org; Keith Busch
Subject: Re: [PATCH][linux-block] NVMe: Fix FS mount issue(hot-remove followed by hot-add)Quoted 1 line · Indraneel M
Jens, this version is against the linux-block tree.
Quoted 8 lines
It's not, though:
checking file
drivers/block/nvme-core.c
Hunk #1 FAILED at 2600.
Hunk #2 FAILED at 2859.
2 out of 2 hunks FAILEDwhat branch are you on? It has to be against for-3.19/drivers or for-next.
This
Quoted 4 lines
was simple enough to hand apply, so I did that. This is the result:
http://git.kernel.dk/?p=linux-
block.git;a=commit;h=285dffc9101244ac65c29672a1fb3fe614b52238
Thanks Jens! I had just cloned linux-block and created a patch against it without any branch switch.
Quoted 9 lines
--
Jens Axboe_______________________________________________
Linux-nvme mailing list
Linux-nvme at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Jens Axboe
maintainerPATCH 1/1 NVMe: Fix FS mount issue(hot-remove followed by hot-add)
Quoted 20 lines · Indraneel Mukherjee
Quoted 11 lines
-----Original Message-----
From: Linux-nvme [mailto:linux-nvme-bounces at lists.infradead.org] On Behalf Of Jens Axboe
Sent: Thursday, December 11, 2014 8:56 PM
To: Indraneel M; linux-nvme at lists.infradead.org; Keith Busch
Subject: Re: [PATCH][linux-block] NVMe: Fix FS mount issue(hot-remove followed by hot-add)Quoted 1 line · Indraneel M
Jens, this version is against the linux-block tree.
Quoted 8 lines
It's not, though:
checking file
drivers/block/nvme-core.c
Hunk #1 FAILED at 2600.
Hunk #2 FAILED at 2859.
2 out of 2 hunks FAILEDwhat branch are you on? It has to be against for-3.19/drivers or for-next.
This
Quoted 8 lines
Quoted 4 lines
was simple enough to hand apply, so I did that. This is the result:
http://git.kernel.dk/?p=linux-
block.git;a=commit;h=285dffc9101244ac65c29672a1fb3fe614b52238Thanks Jens! I had just cloned linux-block and created a patch against it without any branch switch.
It's not easy to know... Generally, if we're before a merge window, patches should be sent against for-3.x/drivers, where x is the next release. If we're after a merge window and it needs to go into this version, then patches should be against for-linus (which is generally pretty close to master).
Signature · 1 line
Jens Axboe