Re: [PATCH 4/6] Ext4: fail if we try to use hole punch

From: Pádraig Brady
Date: Tue Nov 16 2010 - 11:57:21 EST


On 16/11/10 16:33, Josef Bacik wrote:
> On Tue, Nov 16, 2010 at 04:20:43PM +0000, Pádraig Brady wrote:
>>
>> So for older versions of ext4 or other filesystems, how do we know
>> that fallocate(...,FALLOC_FL_PUNCH_HOLE) is not supported.
>> I.E. how do we detect at runtime that the call succeeded
>> and didn't just do a normal fallocate()?
>>
>
> Older kernels won't accept FALLOC_FL_PUNCH_HOLE, so you'll get an error.
> Thanks,

Oops right.
Older kernels filter FALLOC_FL_PUNCH_HOLE at a higher level in fs/open.c
Whereas newer kernels will do it per file system.

thanks,
Pádraig.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/