Magellan Linux

Annotation of /trunk/kernel26-magellan/patches-2.6.16-r10/0113-2.6.16.12-dm-flush-queue-EINTR.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 70 - (hide annotations) (download)
Thu May 11 19:09:22 2006 UTC (18 years ago) by niro
File size: 1340 byte(s)
import

1 niro 70 From: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
2     Date: Mon, 27 Mar 2006 09:17:51 +0000 (-0800)
3     Subject: [PATCH] dm flush queue EINTR
4     X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/stable/linux-2.6.16.y.git;a=commitdiff;h=ebea8457d4b94864a818ae3e6a95655602244935
5    
6     [PATCH] dm flush queue EINTR
7    
8     If dm_suspend() is cancelled, bios already added to the deferred list need to
9     be submitted. Otherwise they remain 'in limbo' until there's a dm_resume().
10    
11     Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
12     Signed-off-by: Alasdair G Kergon <agk@redhat.com>
13     Signed-off-by: Andrew Morton <akpm@osdl.org>
14     Signed-off-by: Linus Torvalds <torvalds@osdl.org>
15     Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16     ---
17    
18     --- a/drivers/md/dm.c
19     +++ b/drivers/md/dm.c
20     @@ -1098,6 +1098,7 @@ int dm_suspend(struct mapped_device *md,
21     {
22     struct dm_table *map = NULL;
23     DECLARE_WAITQUEUE(wait, current);
24     + struct bio *def;
25     int r = -EINVAL;
26    
27     down(&md->suspend_lock);
28     @@ -1157,9 +1158,11 @@ int dm_suspend(struct mapped_device *md,
29     /* were we interrupted ? */
30     r = -EINTR;
31     if (atomic_read(&md->pending)) {
32     + clear_bit(DMF_BLOCK_IO, &md->flags);
33     + def = bio_list_get(&md->deferred);
34     + __flush_deferred_io(md, def);
35     up_write(&md->io_lock);
36     unlock_fs(md);
37     - clear_bit(DMF_BLOCK_IO, &md->flags);
38     goto out;
39     }
40     up_write(&md->io_lock);