Whamcloud - gitweb
LU-3606 fallocate: Implement fallocate preallocate operation 75/9275/79
authorSwapnil Pimpale <spimpale@ddn.com>
Sat, 20 May 2017 18:13:37 +0000 (23:43 +0530)
committerOleg Drokin <green@whamcloud.com>
Thu, 14 May 2020 05:41:41 +0000 (05:41 +0000)
commit48457868a02ae5a0407f304c9028f7e80e7fb574
tree4ebf80782881ca879a4ba9d77df677ff645f0edd
parent4ffd7976fdfd38fee947ca5dd317caff32dac486
LU-3606 fallocate: Implement fallocate preallocate operation

This patch adds fallocate(2) preallocate operation support
for Lustre. fallocate(2) method of the inode_operations or
file_operations is implemented and transported to the OSTs
to interface with the underlying OSD's fallocate(2) code.

In a saperate patch, a new RPC, OST_FALLOCATE has been
added and reserved for space preallocation. The fallocate
functionality (prealloc) in CLIO has been multiplexed
with CIT_SETATTR. (https://review.whamcloud.com/37277)

Lustre fsx(File system exerciser) is updated in a saperate
patch to handle fallocate calls. (https://review.whamcloud.com/37277)

Only fallocate preallocate operation is supported by this
patch for now. Other operations like, FALLOC_FL_PUNCH
(deallocate), FALLOC_FL_ZERO_RANGE, FALLOC_FL_COLLAPSE_RANGE
and FALLOC_FL_INSPECT_RANGE is not supported by this patch
and will be addressed by a separate patch.

ZFS operation is not supported by this patch. ZFS fallocate(2)
will be addressed by patch (https://review.whamcloud.com/36506/)

New test case under sanity is added to verify fallocate
call.

Test-Parameters: fstype=ldiskfs testlist=sanity,sanityn,sanity-dom
Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Abrarahmed Momin <abrar.momin@gmail.com>
Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Change-Id: I03f27d356616fbf3a3ab8e6309af26c00434d81b
Reviewed-on: https://review.whamcloud.com/9275
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
27 files changed:
lustre/include/cl_object.h
lustre/include/dt_object.h
lustre/include/lustre_req_layout.h
lustre/include/obd_support.h
lustre/llite/file.c
lustre/llite/lcommon_cl.c
lustre/llite/llite_internal.h
lustre/llite/lproc_llite.c
lustre/llite/vvp_io.c
lustre/lov/lov_io.c
lustre/ofd/lproc_ofd.c
lustre/ofd/ofd_dev.c
lustre/ofd/ofd_internal.h
lustre/ofd/ofd_objects.c
lustre/osc/osc_internal.h
lustre/osc/osc_io.c
lustre/osc/osc_request.c
lustre/osd-ldiskfs/osd_internal.h
lustre/osd-ldiskfs/osd_io.c
lustre/osd-zfs/osd_io.c
lustre/ptlrpc/layout.c
lustre/target/tgt_handler.c
lustre/tests/Makefile.am
lustre/tests/check_fallocate.c [new file with mode: 0644]
lustre/tests/sanity-benchmark.sh
lustre/tests/sanity.sh
lustre/tests/sanityn.sh