[dm-devel] [PATCH 10/12] Limit bio_endio recursion
Ming Lei
tom.leiming at gmail.com
Thu Apr 7 06:03:23 UTC 2016
On Thu, Apr 7, 2016 at 1:44 PM, Ming Lei <tom.leiming at gmail.com> wrote:
> On Thu, 7 Apr 2016 11:54:49 +0800
> Ming Lei <tom.leiming at gmail.com> wrote:
>
> @@ -1737,6 +1739,46 @@ static inline bool bio_remaining_done(struct bio *bio)
> return false;
> }
>
> +/* disable local irq when manipulating the percpu bio_list */
> +static void unwind_bio_endio(struct bio *bio)
> +{
> + struct bio_list bl_in_stack;
> + struct bio_list *bl;
> + unsigned long flags;
> + bool clear_list = false;
> +
> + local_irq_save(flags);
> +
> + bl = this_cpu_read(bio_end_list);
> + if (!bl) {
> + bl = &bl_in_stack;
> + bio_list_init(bl);
> + clear_list = true;
oops, forget to write the pointer into the percpu bio_list pointer.
But it is still working after I fix that by the following line:
this_cpu_write(bio_end_list, bl);
thanks,
More information about the dm-devel
mailing list