]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'md-3.4' of git://neil.brown.name/md
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 22 Mar 2012 19:29:50 +0000 (12:29 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 22 Mar 2012 19:29:50 +0000 (12:29 -0700)
Pull md updates for 3.4 from Neil Brown:
 "Mostly tidying up code in preparation for some bigger changes next
  time.

  A few bug fixes tagged for -stable.

  Main functionality change is that some RAID10 arrays can now grow to
  use extra space that may have been made available on the individual
  devices."

Fixed up trivial conflicts with the k[un]map_atomic() cleanups in
drivers/md/bitmap.c.

* tag 'md-3.4' of git://neil.brown.name/md: (22 commits)
  md: Add judgement bb->unacked_exist in function md_ack_all_badblocks().
  md: fix clearing of the 'changed' flags for the bad blocks list.
  md/bitmap: discard CHUNK_BLOCK_SHIFT macro
  md/bitmap: remove unnecessary indirection when allocating.
  md/bitmap: remove some pointless locking.
  md/bitmap: change a 'goto' to a normal 'if' construct.
  md/bitmap: move printing of bitmap status to bitmap.c
  md/bitmap: remove some unused noise from bitmap.h
  md/raid10 - support resizing some RAID10 arrays.
  md/raid1: handle merge_bvec_fn in member devices.
  md/raid10: handle merge_bvec_fn in member devices.
  md: add proper merge_bvec handling to RAID0 and Linear.
  md: tidy up rdev_for_each usage.
  md/raid1,raid10: avoid deadlock during resync/recovery.
  md/bitmap: ensure to load bitmap when creating via sysfs.
  md: don't set md arrays to readonly on shutdown.
  md: allow re-add to failed arrays.
  md/raid5: use atomic_dec_return() instead of atomic_dec() and atomic_read().
  md: Use existed macros instead of numbers
  md/raid5: removed unused 'added_devices' variable.
  ...

1  2 
drivers/md/bitmap.c

index 045e086144ad0601603ba68cb08b6e3891134a1d,cf5863ca258d3a9ef5861d590201e34d54473296..3d0dfa7a89a2d683c8ccdbe76eedd02260550cba
@@@ -451,13 -426,9 +426,9 @@@ void bitmap_update_sb(struct bitmap *bi
                return;
        if (bitmap->mddev->bitmap_info.external)
                return;
-       spin_lock_irqsave(&bitmap->lock, flags);
-       if (!bitmap->sb_page) { /* no superblock */
-               spin_unlock_irqrestore(&bitmap->lock, flags);
+       if (!bitmap->sb_page) /* no superblock */
                return;
-       }
-       spin_unlock_irqrestore(&bitmap->lock, flags);
 -      sb = kmap_atomic(bitmap->sb_page, KM_USER0);
 +      sb = kmap_atomic(bitmap->sb_page);
        sb->events = cpu_to_le64(bitmap->mddev->events);
        if (bitmap->mddev->events < bitmap->events_cleared)
                /* rocking back to read-only */
@@@ -680,16 -653,11 +653,11 @@@ static int bitmap_mask_state(struct bit
                             enum bitmap_mask_op op)
  {
        bitmap_super_t *sb;
-       unsigned long flags;
        int old;
  
-       spin_lock_irqsave(&bitmap->lock, flags);
-       if (!bitmap->sb_page) { /* can't set the state */
-               spin_unlock_irqrestore(&bitmap->lock, flags);
+       if (!bitmap->sb_page) /* can't set the state */
                return 0;
-       }
-       spin_unlock_irqrestore(&bitmap->lock, flags);
 -      sb = kmap_atomic(bitmap->sb_page, KM_USER0);
 +      sb = kmap_atomic(bitmap->sb_page);
        old = le32_to_cpu(sb->state) & bits;
        switch (op) {
        case MASK_SET:
@@@ -1066,13 -1034,13 +1034,13 @@@ static int bitmap_init_from_disk(struc
                        b = test_bit(bit, paddr);
                else
                        b = test_bit_le(bit, paddr);
 -              kunmap_atomic(paddr, KM_USER0);
 +              kunmap_atomic(paddr);
                if (b) {
                        /* if the disk bit is set, set the memory bit */
-                       int needed = ((sector_t)(i+1) << (CHUNK_BLOCK_SHIFT(bitmap))
+                       int needed = ((sector_t)(i+1) << bitmap->chunkshift
                                      >= start);
                        bitmap_set_memory_bits(bitmap,
-                                              (sector_t)i << CHUNK_BLOCK_SHIFT(bitmap),
+                                              (sector_t)i << bitmap->chunkshift,
                                               needed);
                        bit_cnt++;
                }