Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 71fe3fca authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md: linear: Fix a division by zero bug for very small arrays.
  md: fix bug in raid10 recovery.
  md: revert the recent addition of a call to the BLKRRPART ioctl.
parents 38407aad f1cd14ae
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -148,6 +148,8 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks)

	min_sectors = conf->array_sectors;
	sector_div(min_sectors, PAGE_SIZE/sizeof(struct dev_info *));
	if (min_sectors == 0)
		min_sectors = 1;

	/* min_sectors is the minimum spacing that will fit the hash
	 * table in one PAGE.  This may be much smaller than needed.
+0 −6
Original line number Diff line number Diff line
@@ -3884,7 +3884,6 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open)
	if (mode == 0) {
		mdk_rdev_t *rdev;
		struct list_head *tmp;
		struct block_device *bdev;

		printk(KERN_INFO "md: %s stopped.\n", mdname(mddev));

@@ -3941,11 +3940,6 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open)
		mddev->degraded = 0;
		mddev->barriers_work = 0;
		mddev->safemode = 0;
		bdev = bdget_disk(mddev->gendisk, 0);
		if (bdev) {
			blkdev_ioctl(bdev, 0, BLKRRPART, 0);
			bdput(bdev);
		}
		kobject_uevent(&disk_to_dev(mddev->gendisk)->kobj, KOBJ_CHANGE);

	} else if (mddev->pers)
+1 −1
Original line number Diff line number Diff line
@@ -1137,7 +1137,7 @@ static int raid10_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
	if (!enough(conf))
		return -EINVAL;

	if (rdev->raid_disk)
	if (rdev->raid_disk >= 0)
		first = last = rdev->raid_disk;

	if (rdev->saved_raid_disk >= 0 &&