xfs
[Top] [All Lists]

Re: [PATCH] xfstests: test EROFS vs. EEXIST when creating on an RO files

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfstests: test EROFS vs. EEXIST when creating on an RO filesystem
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Tue, 27 Nov 2012 16:12:58 -0600
Cc: xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <20121127221111.GA13753@xxxxxxxxxxxxx>
References: <50B52DB7.3030506@xxxxxxxxxx> <20121127221111.GA13753@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20121026 Thunderbird/16.0.2
On 11/27/12 4:11 PM, Christoph Hellwig wrote:
> On Tue, Nov 27, 2012 at 03:16:39PM -0600, Eric Sandeen wrote:
>> TBH, I don't know if this is posix-specified, but I found out the
>> hard way that when trying to re-create existing files on a readonly 
>> filesystem, some apps expect/handle EEXIST, but fail on EROFS.
>>
>> This will test mkdir, mknod, and symlinks for that behavior.
> 
> Just curious, which filesystem would fail this currently or did in the
> past?

No single filesystem, really - 

I temporarily broke the VFS in a rhel backport.  ;)  But it seems like
the kind of thing that could be missed in the future, so figured it was
worth a quick test.

(basically this was from moving mnt_want_write outside i_mutex for freeze
work, and returning an error directly from mnt_want_write() would
give us EROFS instead of maybe EEXIST)

-Eric

<Prev in Thread] Current Thread [Next in Thread>