Re: [PATCH] Btrfs: fix deadlock in wait_for_more_refs

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

 



On Mon, Aug 6, 2012 at 3:18 PM, Arne Jansen <sensille@xxxxxxx> wrote:
> Commit a168650c introduced a waiting mechanism to prevent busy waiting in
> btrfs_run_delayed_refs. This can deadlock with btrfs_run_ordered_operations,
> where a tree_mod_seq is held while waiting for the io to complete, while
> the end_io calls btrfs_run_delayed_refs.
> This whole mechanism is unnecessary. If not enough runnable refs are
> available to satisfy count, just return as count is more like a guideline
> than a strict requirement.
> In case we have to run all refs, commit transaction makes sure that no
> other threads are working in the transaction anymore, so we just assert
> here that no refs are blocked.
>

I've been testing this patch after manually merging on top of Josef's
"Btrfs: barrier before waitqueue_active V2" patch.

With that arrangement, I've been unable to reproduce the deadlock on my system.

I'll continue banging away on it tomorrow, and let you know if I
attain a deadlock.

Also, let me know if you need me to test without including Josef's
added barriers.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux