Whamcloud - gitweb
LU-14160 fallocate: Add punch mode to fallocate
authorArshad Hussain <arshad.hussain@aeoncomputing.com>
Thu, 20 Jan 2022 02:58:30 +0000 (18:58 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 21 Jan 2022 23:26:23 +0000 (23:26 +0000)
commitef57c0d5c449270511b3bec5e9ddd660c96adf5a
tree2d7fedbeb72b5ce5d9969ff024d7f5a17c8d1c5d
parentf942bb09716247f4d3599e0e68fc06a81ffae0a4
LU-14160 fallocate: Add punch mode to fallocate

This patch adds fallocate(2) punch operation
(FALLOCATE_FL_PUNCH_HOLE) mode support for ldiskfs backend
OSD and for OSC/OST

Test cases sanity/150{f,g} are added for verification.
FSX test was modified:
 - add 'punch' operation to an output
 - fix 'No space' problem when fallocate length become negative
 - fix wrong bytes number in output

Lustre-change: https://review.whamcloud.com/40877
Lustre-commit: cb037f305c64cd5121fa308afc1e6b7d3df3f61a

Test-Parameters: testlist=sanity ostsizegb=12 env=ONLY="150f 150g"
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I0c180d413efdf995823e25d5c340013bec0c8611
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-on: https://review.whamcloud.com/46221
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
13 files changed:
lustre/include/cl_object.h
lustre/llite/file.c
lustre/mdc/mdc_dev.c
lustre/ofd/ofd_dev.c
lustre/ofd/ofd_objects.c
lustre/osc/osc_io.c
lustre/osc/osc_request.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_internal.h
lustre/osd-ldiskfs/osd_io.c
lustre/tests/fsx.c
lustre/tests/sanity-dom.sh
lustre/tests/sanity.sh