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

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

 



On Tue, Sep 20, 2016 at 08:50:21AM -0400, jeffm@xxxxxxxx wrote:
> From: Jeff Mahoney <jeffm@xxxxxxxx>
> 
> 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 <jeffm@xxxxxxxx>

Reviewed-by: David Sterba <dsterba@xxxxxxxx>
--
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