Re: [PATCH v5 10/10] manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate

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

 



On 04/18/2014 05:55 PM, Theodore Ts'o wrote:
> On Fri, Apr 18, 2014 at 11:45:35AM +0200, Lukáš Czerner wrote:
>>
>> I'd like to point out that do_fallocate() in vfs uses ENODEV in the
>> case it is not regular file nor directory.
>>
>> Also I thought of the EOPNOTSUP to be the right way to go. For
>> example we do not support it on non-extent based files in ext4 so we
>> return EOPNOTSUP.
>>
>> The same is for the case that we do not support the particular
>> fallocate mode.
>>
>> So I am not really sure about what's the right error to use.
> 
> Yes, there is some inconsistency here.  I'll change this particular
> case (a non-REGULAR file to use EINVAL) to be consistent with xfs, but
> I suspect programs are going to have to be flexible.

Okay -- I'll document EINVAL as the (sole) error for this case.

Thanks, Ted.

> As far as non-extent based files, at least in theory at some point we
> could support COLLAPSE_RANGE on regular files, so I'll leave it as
> EOPNOTSUPP for now, but the choice is admittedly somewhat arbitrary.

Agreed that its somewhat inconsistent, though not as egregiously so as
the other case.

Cheers,

Michael




-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux