]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: Add support for FALLOC_FL_ZERO_RANGE
authorLukas Czerner <lczerner@redhat.com>
Thu, 13 Mar 2014 08:07:58 +0000 (19:07 +1100)
committerDave Chinner <david@fromorbit.com>
Thu, 13 Mar 2014 08:07:58 +0000 (19:07 +1100)
commit7e328f88b1fa3cdbea66cb686e835cc9eb44b402
treefdea729e188c6d2b61c7f14fc470da7b965694e5
parent1da7c9f5bdc76b508076e8a41c7a54988ac39d9b
xfs: Add support for FALLOC_FL_ZERO_RANGE

Introduce new FALLOC_FL_ZERO_RANGE flag for fallocate. This has the same
functionality as xfs ioctl XFS_IOC_ZERO_RANGE.

We can also preallocate blocks past EOF in the same was as with
fallocate. Flag FALLOC_FL_KEEP_SIZE will cause the inode size to remain
the same even if we preallocate blocks past EOF.

It uses the same code to zero range as it is used by the
XFS_IOC_ZERO_RANGE ioctl.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_file.c