/linux/tools/testing/selftests/kvm/ |
H A D | guest_memfd_test.c | 60 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE, 0, total_size); in test_fallocate() 63 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, in test_fallocate() 67 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE, total_size, page_size); in test_fallocate() 70 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE, total_size + page_size, page_size); in test_fallocate() 73 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, in test_fallocate() 77 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, in test_fallocate() 81 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, in test_fallocate() 85 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, in test_fallocate() 89 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE, page_size, page_size); in test_fallocate() 115 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, in test_invalid_punch_hole()
|
/linux/include/uapi/linux/ |
H A D | falloc.h | 6 #define FALLOC_FL_KEEP_SIZE 0x01 /* default is extend size */ macro
|
/linux/fs/bcachefs/ |
H A D | fs-io.c | 714 if (!(mode & FALLOC_FL_KEEP_SIZE) && end > inode->v.i_size) { in bchfs_fallocate() 743 if (mode & FALLOC_FL_KEEP_SIZE && end > inode->v.i_size) in bchfs_fallocate() 748 !(mode & FALLOC_FL_KEEP_SIZE))) { in bchfs_fallocate() 779 if (!(mode & ~(FALLOC_FL_KEEP_SIZE|FALLOC_FL_ZERO_RANGE))) in bch2_fallocate_dispatch() 781 else if (mode == (FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE)) in bch2_fallocate_dispatch()
|
/linux/block/ |
H A D | fops.c | 774 (FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE | \ 795 if (mode & FALLOC_FL_KEEP_SIZE) { in blkdev_fallocate() 816 case FALLOC_FL_ZERO_RANGE | FALLOC_FL_KEEP_SIZE: in blkdev_fallocate() 825 case FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE: in blkdev_fallocate()
|
/linux/drivers/nvme/target/ |
H A D | io-cmd-file.c | 275 int mode = FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE; in nvmet_file_execute_discard() 337 int mode = FALLOC_FL_ZERO_RANGE | FALLOC_FL_KEEP_SIZE; in nvmet_file_write_zeroes_work()
|
/linux/tools/testing/selftests/kvm/x86_64/ |
H A D | private_mem_conversions_test.c | 431 r = fallocate(memfd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, 0, memfd_size); in test_mem_conversions() 434 r = fallocate(memfd, FALLOC_FL_KEEP_SIZE, 0, memfd_size); in test_mem_conversions()
|
/linux/fs/fat/ |
H A D | file.c | 272 if (mode & ~FALLOC_FL_KEEP_SIZE) in fat_fallocate() 280 if (mode & FALLOC_FL_KEEP_SIZE) { in fat_fallocate()
|
/linux/virt/kvm/ |
H A D | guest_memfd.c | 230 if (!(mode & FALLOC_FL_KEEP_SIZE)) in kvm_gmem_fallocate() 233 if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE)) in kvm_gmem_fallocate()
|
/linux/tools/testing/selftests/mm/ |
H A D | hugetlb-madvise.c | 248 if (fallocate(fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, in main()
|
H A D | uffd-common.c | 36 FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, in uffd_mem_fd_create()
|
/linux/fs/ |
H A D | ioctl.c | 291 return vfs_fallocate(filp, mode | FALLOC_FL_KEEP_SIZE, sr.l_start, in ioctl_preallocate() 320 return vfs_fallocate(file, mode | FALLOC_FL_KEEP_SIZE, sr.l_start, sr.l_len); in compat_ioctl_preallocate()
|
/linux/fs/gfs2/ |
H A D | file.c | 1349 if (!(mode & FALLOC_FL_KEEP_SIZE) && (pos + count) > inode->i_size) in __gfs2_fallocate() 1374 if (mode & ~(FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE)) in gfs2_fallocate() 1387 if (!(mode & FALLOC_FL_KEEP_SIZE) && in gfs2_fallocate()
|
/linux/fs/nfs/ |
H A D | nfs4file.c | 228 if ((mode != 0) && (mode != (FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE))) in nfs42_fallocate()
|
/linux/tools/testing/selftests/memfd/ |
H A D | memfd_test.c | 493 FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, in mfd_assert_write() 558 FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, in mfd_fail_write()
|
/linux/fs/fuse/ |
H A D | file.c | 3112 (!(mode & FALLOC_FL_KEEP_SIZE) || in fuse_file_fallocate() 3115 if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE | in fuse_file_fallocate() 3138 if (!(mode & FALLOC_FL_KEEP_SIZE) && in fuse_file_fallocate() 3149 if (!(mode & FALLOC_FL_KEEP_SIZE)) in fuse_file_fallocate() 3166 if (!(mode & FALLOC_FL_KEEP_SIZE)) { in fuse_file_fallocate() 3177 if (!(mode & FALLOC_FL_KEEP_SIZE)) in fuse_file_fallocate()
|
/linux/fs/xfs/ |
H A D | xfs_file.c | 895 if ((mode & FALLOC_FL_KEEP_SIZE) || offset + len <= i_size_read(inode)) in xfs_falloc_newsize() 1072 (FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE | \
|
/linux/fs/hugetlbfs/ |
H A D | inode.c | 814 if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE)) in hugetlbfs_fallocate() 917 if (!(mode & FALLOC_FL_KEEP_SIZE) && offset + len > inode->i_size) in hugetlbfs_fallocate()
|
/linux/fs/cachefiles/ |
H A D | io.c | 585 ret = vfs_fallocate(file, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, in __cachefiles_prepare_write()
|
/linux/fs/smb/server/ |
H A D | vfs.c | 995 FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, in ksmbd_vfs_zero_data() 999 FALLOC_FL_ZERO_RANGE | FALLOC_FL_KEEP_SIZE, in ksmbd_vfs_zero_data()
|
/linux/tools/testing/selftests/kvm/lib/ |
H A D | kvm_util.c | 788 r = fallocate(fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, size); in kvm_memfd_alloc() 1206 const int mode = FALLOC_FL_KEEP_SIZE | (punch_hole ? FALLOC_FL_PUNCH_HOLE : 0); in vm_guest_mem_fallocate()
|
/linux/drivers/target/ |
H A D | target_core_file.c | 568 int mode = FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE; in fd_execute_unmap()
|
/linux/tools/testing/selftests/kvm/aarch64/ |
H A D | page_fault_test.c | 414 ret = fallocate(fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, in punch_hole_in_backing_store()
|
/linux/fs/btrfs/ |
H A D | file.c | 2834 if (mode & FALLOC_FL_KEEP_SIZE || end <= i_size_read(inode)) in btrfs_fallocate_update_isize() 3085 if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE | in btrfs_fallocate() 3094 if (!(mode & FALLOC_FL_KEEP_SIZE) && offset + len > inode->i_size) { in btrfs_fallocate()
|
/linux/fs/ocfs2/ |
H A D | file.c | 2118 if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE)) in ocfs2_fallocate() 2123 if (mode & FALLOC_FL_KEEP_SIZE) { in ocfs2_fallocate()
|
/linux/mm/ |
H A D | madvise.c | 1013 FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, in madvise_remove()
|