> On Sat, Apr 19, 2014 at 02:11:07PM +0900, Namjae Jeon wrote: > > From: Namjae Jeon <namjae.jeon@xxxxxxxxxxx> > > > > 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@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html