[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <004b01cf5ece$ff6fe1b0$fe4fa510$@samsung.com>
Date: Wed, 23 Apr 2014 17:35:35 +0900
From: Namjae Jeon <namjae.jeon@...sung.com>
To: 'Zheng Liu' <gnehzuil.liu@...il.com>
Cc: 'Theodore Ts'o' <tytso@....edu>,
'linux-ext4' <linux-ext4@...r.kernel.org>,
'Lukáš Czerner' <lczerner@...hat.com>
Subject: RE: [PATCH] ext4: use EINVAL if not a regular file in ext4_fallocate()
> On Sat, Apr 19, 2014 at 02:11:07PM +0900, Namjae Jeon wrote:
> > From: Namjae Jeon <namjae.jeon@...sung.com>
> >
> > Punch hole return EOPNOTSUPP about a non-REGULAR file also. So change EINVAL
> > to be consistent with xfs. And move this check to the start of
> > ext4_fallocate().
>
> IMHO, EOPNOTSUPP makes sense to me. From the man page of fallocate(2):
Hi Zheng.
IMHO, EOPNOTSUPP should be used where the operation is not yet implemented but
there is some chance that it could be implemented in future.
for example, it is ok for FS which has not yet implemented punch hole to
return EOPNOTSUPP as they could implement it in future. but for the cases where
it does not make sense to implement the operation, for example punching hole
for non regular files does not make any sense, it is better to use EINVAL.
On these lines, I agree that returning EOPNOTSUPP for collapse range in case of
non-extent based file is ok, as it is plausible to implemet collapse range for
non extent files in future.
Thanks for your opinion!
>
> EOPNOTSUPP
> The filesystem containing the file referred to by fd does not
> support this operation; or the mode is not supported by the
> filesystem containing the file referred to by fd.
>
> Regards,
> - Zheng
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists