Thread (2 messages) 2 messages, 2 authors, 2016-09-21

Re: [PATCH] btrfs: clean the old superblocks before freeing the device

From: David Sterba <hidden>
Date: 2016-09-21 14:15:22

On Tue, Sep 20, 2016 at 08:50:21AM -0400, jeffm@suse.com wrote:
From: Jeff Mahoney <redacted>

btrfs_rm_device frees the block device but then re-opens it using
the saved device name.  A race exists between the close and the
re-open that allows the block size to be changed.  The result
is getting stuck forever in the reclaim loop in __getblk_slow.

This patch moves the superblock cleanup before closing the block
device, which is also consistent with other callers.  We also don't
need a private copy of dev_name as the whole routine operates under
the uuid_mutex.

Signed-off-by: Jeff Mahoney <redacted>
Reviewed-by: David Sterba <dsterba@suse.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help