Merge tag 'md-3.3-fixes' of git://neil.brown.name/md
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 9 Feb 2012 03:06:30 +0000 (19:06 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 9 Feb 2012 03:06:30 +0000 (19:06 -0800)
Some simple md-related fixes.

1/ two small fixes to ensure we handle an interrupted resync properly.
2/ avoid loading the bitmap multiple times in dm-raid

* tag 'md-3.3-fixes' of git://neil.brown.name/md:
  md: two small fixes to handling interrupt resync.
  Prevent DM RAID from loading bitmap twice.

1  2 
drivers/md/md.c

diff --combined drivers/md/md.c
index 9417ae2fa0bbc68b061d6b50ba23f5127dae5b2c,81d1c43dd97fbcab03a0b3070be20017078ff3c8..ce88755baf4a91a6216b628117e84a697c21d3c8
@@@ -36,7 -36,8 +36,7 @@@
  #include <linux/blkdev.h>
  #include <linux/sysctl.h>
  #include <linux/seq_file.h>
 -#include <linux/mutex.h>
 -#include <linux/buffer_head.h> /* for invalidate_bdev */
 +#include <linux/fs.h>
  #include <linux/poll.h>
  #include <linux/ctype.h>
  #include <linux/string.h>
@@@ -4666,7 -4667,6 +4666,7 @@@ static int md_alloc(dev_t dev, char *na
        mddev->queue->queuedata = mddev;
  
        blk_queue_make_request(mddev->queue, md_make_request);
 +      blk_set_stacking_limits(&mddev->queue->limits);
  
        disk = alloc_disk(1 << shift);
        if (!disk) {
@@@ -7333,7 -7333,8 +7333,8 @@@ void md_do_sync(struct mddev *mddev
                                        printk(KERN_INFO
                                               "md: checkpointing %s of %s.\n",
                                               desc, mdname(mddev));
-                                       mddev->recovery_cp = mddev->curr_resync;
+                                       mddev->recovery_cp =
+                                               mddev->curr_resync_completed;
                                }
                        } else
                                mddev->recovery_cp = MaxSector;
                        rcu_read_unlock();
                }
        }
+  skip:
        set_bit(MD_CHANGE_DEVS, &mddev->flags);
  
-  skip:
        if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) {
                /* We completed so min/max setting can be forgotten if used. */
                if (test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery))