Skip to content

Commit 88ed806

Browse files
committed
Merge tag 'md/3.18' of git://neil.brown.name/md
Pull md updates from Neil Brown: - a few minor bug fixes - quite a lot of code tidy-up and simplification - remove PRINT_RAID_DEBUG ioctl. I'm fairly sure it is unused, and it isn't particularly useful. * tag 'md/3.18' of git://neil.brown.name/md: (21 commits) lib/raid6: Add log level to printks md: move EXPORT_SYMBOL to after function in md.c md: discard PRINT_RAID_DEBUG ioctl md: remove MD_BUG() md: clean up 'exit' labels in md_ioctl(). md: remove unnecessary test for MD_MAJOR in md_ioctl() md: don't allow "-sync" to be set for device in an active array. md: remove unwanted white space from md.c md: don't start resync thread directly from md thread. md: Just use RCU when checking for overlap between arrays. md: avoid potential long delay under pers_lock md: simplify export_array() md: discard find_rdev_nr in favour of find_rdev_nr_rcu md: use wait_event() to simplify md_super_wait() md: be more relaxed about stopping an array which isn't started. md/raid1: process_checks doesn't use its return value. md/raid5: fix init_stripe() inconsistencies md/raid10: another memory leak due to reshape. md: use set_bit/clear_bit instead of shift/mask for bi_flags changes. md/raid1: minor typos and reformatting. ...
2 parents e56d9fc + b395f75 commit 88ed806

13 files changed

Lines changed: 266 additions & 533 deletions

File tree

‎drivers/md/bitmap.c‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,6 @@ void bitmap_unplug(struct bitmap *bitmap)
879879
{
880880
unsigned long i;
881881
int dirty, need_write;
882-
int wait = 0;
883882

884883
if (!bitmap || !bitmap->storage.filemap ||
885884
test_bit(BITMAP_STALE, &bitmap->flags))
@@ -897,16 +896,13 @@ void bitmap_unplug(struct bitmap *bitmap)
897896
clear_page_attr(bitmap, i, BITMAP_PAGE_PENDING);
898897
write_page(bitmap, bitmap->storage.filemap[i], 0);
899898
}
900-
if (dirty)
901-
wait = 1;
902-
}
903-
if (wait) { /* if any writes were performed, we need to wait on them */
904-
if (bitmap->storage.file)
905-
wait_event(bitmap->write_wait,
906-
atomic_read(&bitmap->pending_writes)==0);
907-
else
908-
md_super_wait(bitmap->mddev);
909899
}
900+
if (bitmap->storage.file)
901+
wait_event(bitmap->write_wait,
902+
atomic_read(&bitmap->pending_writes)==0);
903+
else
904+
md_super_wait(bitmap->mddev);
905+
910906
if (test_bit(BITMAP_WRITE_ERROR, &bitmap->flags))
911907
bitmap_file_kick(bitmap);
912908
}

‎drivers/md/linear.c‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
it under the terms of the GNU General Public License as published by
1111
the Free Software Foundation; either version 2, or (at your option)
1212
any later version.
13-
13+
1414
You should have received a copy of the GNU General Public License
1515
(for example /usr/src/linux/COPYING); if not, write to the Free
16-
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16+
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
1717
*/
1818

1919
#include <linux/blkdev.h>
@@ -25,7 +25,7 @@
2525
#include "linear.h"
2626

2727
/*
28-
* find which device holds a particular offset
28+
* find which device holds a particular offset
2929
*/
3030
static inline struct dev_info *which_dev(struct mddev *mddev, sector_t sector)
3131
{
@@ -355,7 +355,6 @@ static void linear_status (struct seq_file *seq, struct mddev *mddev)
355355
seq_printf(seq, " %dk rounding", mddev->chunk_sectors / 2);
356356
}
357357

358-
359358
static struct md_personality linear_personality =
360359
{
361360
.name = "linear",
@@ -379,7 +378,6 @@ static void linear_exit (void)
379378
unregister_md_personality (&linear_personality);
380379
}
381380

382-
383381
module_init(linear_init);
384382
module_exit(linear_exit);
385383
MODULE_LICENSE("GPL");

0 commit comments

Comments
 (0)