NeilBrown <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to