Re: [PATCH md 6 of 6] Fix handling of overlapping requests in raid5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



NeilBrown <neilb@xxxxxxxxxxxxxxx> wrote:
>
> +	retry:
>   		sh = get_active_stripe(conf, new_sector, pd_idx, (bi->bi_rw&RWA_MASK));
>   		if (sh) {
>  -
>  -			while (!add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK))) {
>  -				/* add failed due to overlap.  Flush everything
>  +			if (!add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK))) {
>  +				/* Add failed due to overlap.  Flush everything
>   				 * and wait a while
>  -				 * FIXME - overlapping requests should be handled better
>   				 */
>   				raid5_unplug_device(mddev->queue);
>  -				set_current_state(TASK_UNINTERRUPTIBLE);
>  -				schedule_timeout(1);
>  +				release_stripe(sh);
>  +				schedule();
>  +				goto retry;

Worrisome.  If the calling process has SCHED_RR or SCHED_FIFO policy, this
could cause a lockup, perhaps.

Some sort of real synchronisation scheme would be nicer.  Or at the least,
what was wrong with the schedule_timeout(1)?
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux