]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: get rid of endio_repair_workers
authorOmar Sandoval <osandov@fb.com>
Thu, 16 Apr 2020 21:46:24 +0000 (14:46 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 May 2020 09:25:27 +0000 (11:25 +0200)
commit87f89311cffa02458b13c1d9304792ca43838b14
tree6b50a96455fab869499f944b0f7d4cc4eecf013f
parentefba9571af95d32482aee7882cea2dbd3b65166c
btrfs: get rid of endio_repair_workers

This was originally added in commit d4d6c35a34b1 ("Btrfs: implement
repair function when direct read fails") to avoid a deadlock. In that
commit, the direct I/O read endio executes on the endio_workers
workqueue, submits a repair bio, and waits for it to complete. The
repair bio endio must execute on a different workqueue, otherwise it
could block on the endio_workers workqueue becoming available, which
won't happen because the original endio is blocked on the repair bio.

As of the previous commit, the original endio doesn't wait for the
repair bio, so this separate workqueue is unnecessary.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/disk-io.h
fs/btrfs/inode.c