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

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


On Tue, Feb 15, 2011 at 03:46:25PM +0000, Alasdair G Kergon wrote:
> Exactly:)  If the filesystem permissions were what was blocking this
> (say r--) then I'd agree with EACCES.  Interpret those man pages in the
> context of 'pathname refers to a block device not a file'.
> If it's EACCES, I just need to gain more privilege/capabilities and then
> repeat the system call and it could succeed.
> But EROFS tells me however much extra privilege I get it's going to make
> no difference.
> That's why I'm arguing EACCES is not a good error to return and EROFS is
> more appropriate.

Frankly, I don't really mind one way or the other but EROFS isn't
usually used in those areas.  It might make sense for this use case
and then there will be cases it just feels awkward.  This being a dm
thing, wouldn't it be just better to let dm massage the return value?



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