Re: [dm-devel] [PATCH][RFC] dm: Do not open log and cow deviceread-write for read-only mappings

From: Tejun Heo
Date: Wed Feb 16 2011 - 03:46:26 EST


Hello, Alasdair.

On Tue, Feb 15, 2011 at 04:56:18PM +0000, Alasdair G Kergon wrote:
> On Tue, Feb 15, 2011 at 05:41:28PM +0100, Tejun Heo wrote:
> > That said, maybe -EROFS is the better fit. I really have no idea.
> > Maybe we should just revert and leave rw accesses to ro block devices
> > alone.
>
> I'd agree that the change to enforce readonly devs is a desirable change
> to make. But we're still discovering exactly what things it breaks and
> as well as further kernel patches some userspace changes seem
> unavoidable. Personally I'd prefer it if this change went back into
> linux-next to give us more time to prepare for it cleanly. It's
> unfortunate none of us picked up on these problems sooner.

Yeah, yeah, I think we need revert. It's a bit too late to sort this
out in this cycle, but, then again, can we ever change this? Given
that the 'ro' part is hardly used with md, I think dm probably is the
only one which has noticeable problem with this change.

No matter when we change it, it's gonna be visible to userland. To
me, most of the changes seem like bug fixes and pretty important ones
at that. As it currently stands, the kernel goes behind the user's
back and issues writes to devices which the user believes to have
allowed only ro access.

So, if dm can figure out how to deal with this, it would be great.

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/