Re: [bug report] A filesystem abnormal mount issue

From: Zizhi Wo
Date: Thu Jul 17 2025 - 07:50:16 EST




在 2025/7/17 19:04, Christoph Hellwig 写道:
On Thu, Jul 17, 2025 at 11:39:01AM +0200, Christian Brauner wrote:
As long as you use the new mount api you should pass
FSCONFIG_CMD_CREATE_EXCL which will refuse to mount if a superblock for
the device already exists. IOW, it ensure that you cannot silently reuse
a superblock.

Other than that I think a blkdev_get_no_open(dev, false) after
lookup_bdev() should sort the issue out. Christoph?

Or just check for GD_DEAD before the mount proceeds?


This is indeed concise and effective enough. Thank you for your
suggestion.

Thanks,
Zizhi Wo