From: Joe Thornber <thornber@redhat.com>
To: Jens Axboe <axboe@suse.de>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
kenneth.w.chen@intel.com, Andrew Morton <akpm@osdl.org>,
thornber@redhat.com
Subject: Re: [PATCH] backing dev unplugging
Date: Thu, 11 Mar 2004 09:14:30 +0000 [thread overview]
Message-ID: <20040311091430.GB2138@reti> (raw)
In-Reply-To: <20040310124507.GU4949@suse.de>
Jens,
Small locking changes to the dm bits. I've just seen that you've
posted an updated version of your patch to lkml, so I'll post another
version of this patch to that thread too.
- Joe
Fix md->map protection in the global unplug removal patch.
--- diff/drivers/md/dm.c 2004-03-11 08:41:27.000000000 +0000
+++ source/drivers/md/dm.c 2004-03-11 08:57:14.000000000 +0000
@@ -578,8 +578,12 @@ static int dm_request(request_queue_t *q
static void dm_unplug_all(request_queue_t *q)
{
struct mapped_device *md = q->queuedata;
+ struct dm_table *map = dm_get_table(md);
- dm_table_unplug_all(md->map);
+ if (map) {
+ dm_table_unplug_all(map);
+ dm_table_put(map);
+ }
}
static int dm_any_congested(void *congested_data, int bdi_bits)
@@ -904,11 +908,17 @@ int dm_suspend(struct mapped_device *md)
add_wait_queue(&md->wait, &wait);
up_write(&md->lock);
+ /* unplug */
+ map = dm_get_table(md);
+ if (map) {
+ dm_table_unplug_all(map);
+ dm_table_put(map);
+ }
+
/*
* Then we wait for the already mapped ios to
* complete.
*/
- dm_table_unplug_all(md->map);
while (1) {
set_current_state(TASK_INTERRUPTIBLE);
@@ -953,10 +963,9 @@ int dm_resume(struct mapped_device *md)
def = bio_list_get(&md->deferred);
__flush_deferred_io(md, def);
up_write(&md->lock);
+ dm_table_unplug_all(map);
dm_table_put(map);
- dm_table_unplug_all(md->map);
-
return 0;
}
next prev parent reply other threads:[~2004-03-11 9:13 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-10 12:45 [PATCH] backing dev unplugging Jens Axboe
2004-03-10 19:55 ` Andrew Morton
2004-03-10 20:03 ` Kenneth Chen
2004-03-10 20:20 ` Jens Axboe
2004-03-10 20:45 ` Jesse Barnes
2004-03-10 20:49 ` Jens Axboe
[not found] ` <20040310205237.GK15087@suse.de>
2004-03-10 21:01 ` Jesse Barnes
2004-03-10 21:02 ` Jens Axboe
2004-03-10 21:35 ` Jesse Barnes
2004-03-10 23:54 ` Andrew Morton
2004-03-11 0:03 ` David Mosberger
2004-03-11 6:30 ` Jesse Barnes
2004-03-10 20:17 ` Jens Axboe
2004-03-15 5:53 ` Kenneth Chen
2004-03-10 20:14 ` Jeff Garzik
2004-03-10 20:19 ` Jens Axboe
2004-03-10 21:00 ` Andrew Morton
2004-03-10 21:02 ` Jens Axboe
2004-03-10 21:40 ` Miquel van Smoorenburg
2004-03-10 23:05 ` Andrew Morton
2004-03-11 0:05 ` Miquel van Smoorenburg
2004-03-11 0:17 ` Andrew Morton
2004-03-11 6:43 ` Jens Axboe
2004-03-10 22:22 ` Nathan Scott
2004-03-10 23:32 ` Steve Lord
2004-03-11 7:05 ` Jens Axboe
2004-03-11 9:14 ` Joe Thornber [this message]
2004-03-11 9:16 ` Jens Axboe
2004-03-11 12:17 ` Christophe Saout
2004-03-11 12:22 ` Jens Axboe
2004-03-11 13:11 ` Christophe Saout
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040311091430.GB2138@reti \
--to=thornber@redhat.com \
--cc=akpm@osdl.org \
--cc=axboe@suse.de \
--cc=kenneth.w.chen@intel.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox