* Patch "mtip32xx: Fix for rmmod crash when drive is in FTL rebuild" has been added to the 4.5-stable tree
@ 2016-04-10 0:41 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-04-10 0:41 UTC (permalink / raw)
To: asamymuthupa, axboe, gregkh, smani; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
mtip32xx: Fix for rmmod crash when drive is in FTL rebuild
to the 4.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mtip32xx-fix-for-rmmod-crash-when-drive-is-in-ftl-rebuild.patch
and it can be found in the queue-4.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 59cf70e236c96594d9f1e065755d8fce9df5356b Mon Sep 17 00:00:00 2001
From: Asai Thambi SP <asamymuthupa@micron.com>
Date: Wed, 24 Feb 2016 21:17:47 -0800
Subject: mtip32xx: Fix for rmmod crash when drive is in FTL rebuild
From: Asai Thambi SP <asamymuthupa@micron.com>
commit 59cf70e236c96594d9f1e065755d8fce9df5356b upstream.
When FTL rebuild is in progress, alloc_disk() initializes the disk
but device node will be created by add_disk() only after successful
completion of FTL rebuild. So, skip deletion of device node in
removal path when FTL rebuild is in progress.
Signed-off-by: Selvan Mani <smani@micron.com>
Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/block/mtip32xx/mtip32xx.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -2968,10 +2968,8 @@ restart_eh:
}
if (test_bit(MTIP_PF_REBUILD_BIT, &port->flags)) {
- if (mtip_ftl_rebuild_poll(dd) < 0)
- set_bit(MTIP_DDF_REBUILD_FAILED_BIT,
- &dd->dd_flag);
- clear_bit(MTIP_PF_REBUILD_BIT, &port->flags);
+ if (mtip_ftl_rebuild_poll(dd) == 0)
+ clear_bit(MTIP_PF_REBUILD_BIT, &port->flags);
}
}
@@ -3851,7 +3849,6 @@ static int mtip_block_initialize(struct
mtip_hw_debugfs_init(dd);
-skip_create_disk:
memset(&dd->tags, 0, sizeof(dd->tags));
dd->tags.ops = &mtip_mq_ops;
dd->tags.nr_hw_queues = 1;
@@ -3881,6 +3878,7 @@ skip_create_disk:
dd->disk->queue = dd->queue;
dd->queue->queuedata = dd;
+skip_create_disk:
/* Initialize the protocol layer. */
wait_for_rebuild = mtip_hw_get_identify(dd);
if (wait_for_rebuild < 0) {
@@ -4041,7 +4039,8 @@ static int mtip_block_remove(struct driv
dd->bdev = NULL;
}
if (dd->disk) {
- del_gendisk(dd->disk);
+ if (test_bit(MTIP_DDF_INIT_DONE_BIT, &dd->dd_flag))
+ del_gendisk(dd->disk);
if (dd->disk->queue) {
blk_cleanup_queue(dd->queue);
blk_mq_free_tag_set(&dd->tags);
@@ -4082,7 +4081,8 @@ static int mtip_block_shutdown(struct dr
dev_info(&dd->pdev->dev,
"Shutting down %s ...\n", dd->disk->disk_name);
- del_gendisk(dd->disk);
+ if (test_bit(MTIP_DDF_INIT_DONE_BIT, &dd->dd_flag))
+ del_gendisk(dd->disk);
if (dd->disk->queue) {
blk_cleanup_queue(dd->queue);
blk_mq_free_tag_set(&dd->tags);
Patches currently in stable-queue which might be from asamymuthupa@micron.com are
queue-4.5/mtip32xx-print-exact-time-when-an-internal-command-is-interrupted.patch
queue-4.5/mtip32xx-implement-timeout-handler.patch
queue-4.5/mtip32xx-cleanup-queued-requests-after-surprise-removal.patch
queue-4.5/mtip32xx-avoid-issuing-standby-immediate-cmd-during-ftl-rebuild.patch
queue-4.5/mtip32xx-handle-safe-removal-during-io.patch
queue-4.5/mtip32xx-remove-unwanted-code-from-taskfile-error-handler.patch
queue-4.5/mtip32xx-handle-ftl-rebuild-failure-state-during-device-initialization.patch
queue-4.5/mtip32xx-fix-for-rmmod-crash-when-drive-is-in-ftl-rebuild.patch
queue-4.5/mtip32xx-fix-broken-service-thread-handling.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-04-10 0:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-10 0:41 Patch "mtip32xx: Fix for rmmod crash when drive is in FTL rebuild" has been added to the 4.5-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.