[dm-devel] enforce read-only state at the block layer
Mike Snitzer
snitzer at kernel.org
Tue Jun 6 16:11:00 UTC 2023
On Thu, Jun 01 2023 at 3:28P -0400,
Christoph Hellwig <hch at lst.de> wrote:
> Hi all,
>
> I've recently got a report where a file system can write to a read-only
> block device, and while I've not found the root cause yet, it is very
> clear that we should not prevents writes to read-only at all.
>
> This did in fact get fixed 5 years ago, but Linus reverted it as older
> lvm2 tools relying on this broken behavior. This series tries to
> restore it, although I'm still worried about thee older lvm2 tools
> to be honest. Question to the device mapper maintainers: is the
> any good way to work around that behavior in device mapper if needed
> instead of leaving the core block layer and drivers exposed?
Given the block core change (in patch 3) _and_ old lvm2 code: it'll
obviously fail.
Not sure of a crafty hack to workaround. Hopefully 5 year old lvm2
remains tightly coupled to kernels of the same vintage and we get
lucky moving forward.
So I agree with Linus, worth trying this simple change again and
seeing if there is fallout. Revert/worry about it again as needed.
Mike
More information about the dm-devel
mailing list