[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <79effa0e-7ffe-4275-cf36-01fd3d0615b9@huaweicloud.com>
Date: Fri, 2 Sep 2022 14:09:58 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: Christoph Hellwig <hch@...radead.org>,
Yu Kuai <yukuai1@...weicloud.com>
Cc: viro@...iv.linux.org.uk, linux-fsdevel@...r.kernel.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
yi.zhang@...wei.com, "yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH] fs: fix possible inconsistent mount device
Hi, Christoph!
在 2022/08/13 15:15, Christoph Hellwig 写道:
> On Sat, Aug 13, 2022 at 03:09:58PM +0800, Yu Kuai wrote:
>> Thanks for your reply. Do you think it's better to remove the rename
>> support from dm? Or it's better to add such limit?
>
> It will probably be hard to entirely remove it. But documentation
> and a rate limited warning discouraging it seems like a good idea.
> .
>
I just found that not just rename, mount concurrent with device
remove/create can trigger this problem as well:
t1: t2
// create dm-0 with name test1
// mount /dev/mapper/test1
mount_bdev
blkdev_get_by_path
lookup_bdev
// remove dm-0
// create dm-0 with different name test2
blkdev_get_by_dev
// succeed
Do you think it's ok to add such checking to prevent this problem?
Thanks,
Kuai
Powered by blists - more mailing lists