Home
last modified time | relevance | path

Searched refs:FALLOC_FL_KEEP_SIZE (Results 1 – 25 of 40) sorted by relevance

12

/linux/tools/testing/selftests/kvm/
H A Dguest_memfd_test.c63 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, 0, in test_mmap_supported()
143 kvm_fallocate(fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, page_size); in test_numa_allocation()
158 kvm_fallocate(fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, total_size); in test_numa_allocation()
227 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE, 0, total_size); in test_fallocate()
230 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, in test_fallocate()
234 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE, total_size, page_size); in test_fallocate()
237 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE, total_size + page_size, page_size); in test_fallocate()
240 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, in test_fallocate()
244 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, in test_fallocate()
248 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, in test_fallocate()
[all …]
/linux/include/uapi/linux/
H A Dfalloc.h6 #define FALLOC_FL_KEEP_SIZE 0x01 /* default is extend size */ macro
/linux/block/
H A Dfops.c865 (FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE | \
894 if (mode & FALLOC_FL_KEEP_SIZE) { in blkdev_fallocate()
912 case FALLOC_FL_ZERO_RANGE | FALLOC_FL_KEEP_SIZE: in blkdev_fallocate()
915 case FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE: in blkdev_fallocate()
/linux/tools/testing/selftests/kvm/x86/
H A Dprivate_mem_conversions_test.c431 kvm_fallocate(memfd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, 0, memfd_size); in test_mem_conversions()
432 kvm_fallocate(memfd, FALLOC_FL_KEEP_SIZE, 0, memfd_size); in test_mem_conversions()
/linux/drivers/nvme/target/
H A Dio-cmd-file.c274 int mode = FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE; in nvmet_file_execute_discard()
336 int mode = FALLOC_FL_ZERO_RANGE | FALLOC_FL_KEEP_SIZE; in nvmet_file_write_zeroes_work()
/linux/fs/
H A Dopen.c259 if (mode & ~(FALLOC_FL_MODE_MASK | FALLOC_FL_KEEP_SIZE)) in vfs_fallocate()
275 if (!(mode & FALLOC_FL_KEEP_SIZE)) in vfs_fallocate()
281 if (mode & FALLOC_FL_KEEP_SIZE) in vfs_fallocate()
294 if ((mode & ~FALLOC_FL_KEEP_SIZE) && IS_APPEND(inode)) in vfs_fallocate()
H A Dioctl.c289 return vfs_fallocate(filp, mode | FALLOC_FL_KEEP_SIZE, sr.l_start, in ioctl_preallocate()
318 return vfs_fallocate(file, mode | FALLOC_FL_KEEP_SIZE, sr.l_start, sr.l_len); in compat_ioctl_preallocate()
/linux/arch/um/os-Linux/
H A Dfile.c618 int n = fallocate(fd, FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE, offset, len); in os_falloc_punch()
627 int n = fallocate(fd, FALLOC_FL_ZERO_RANGE|FALLOC_FL_KEEP_SIZE, offset, len); in os_falloc_zeroes()
/linux/fs/fat/
H A Dfile.c275 if (mode & ~FALLOC_FL_KEEP_SIZE) in fat_fallocate()
283 if (mode & FALLOC_FL_KEEP_SIZE) { in fat_fallocate()
/linux/tools/testing/selftests/mm/
H A Dhugetlb-madvise.c240 if (fallocate(fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, in main()
H A Duffd-common.c46 FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, in uffd_mem_fd_create()
/linux/virt/kvm/
H A Dguest_memfd.c305 if (!(mode & FALLOC_FL_KEEP_SIZE)) in kvm_gmem_fallocate()
308 if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE)) in kvm_gmem_fallocate()
/linux/fs/gfs2/
H A Dfile.c1351 if (!(mode & FALLOC_FL_KEEP_SIZE) && (pos + count) > inode->i_size) in __gfs2_fallocate()
1376 if (mode & ~(FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE)) in gfs2_fallocate()
1389 if (!(mode & FALLOC_FL_KEEP_SIZE) && in gfs2_fallocate()
/linux/fs/nfs/
H A Dnfs4file.c229 case FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE: in nfs42_fallocate()
/linux/fs/fuse/
H A Dfile.c2939 (!(mode & FALLOC_FL_KEEP_SIZE) || in fuse_file_fallocate()
2942 if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE | in fuse_file_fallocate()
2965 if (!(mode & FALLOC_FL_KEEP_SIZE) && in fuse_file_fallocate()
2976 if (!(mode & FALLOC_FL_KEEP_SIZE)) in fuse_file_fallocate()
2993 if (!(mode & FALLOC_FL_KEEP_SIZE)) { in fuse_file_fallocate()
3004 if (!(mode & FALLOC_FL_KEEP_SIZE)) in fuse_file_fallocate()
/linux/tools/testing/selftests/memfd/
H A Dmemfd_test.c529 FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, in mfd_assert_write()
594 FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, in mfd_fail_write()
/linux/fs/ntfs3/
H A Dfile.c477 ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE | in ntfs_fallocate()
682 if (mode & FALLOC_FL_KEEP_SIZE) { in ntfs_fallocate()
/linux/fs/hugetlbfs/
H A Dinode.c741 if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE)) in hugetlbfs_fallocate()
846 if (!(mode & FALLOC_FL_KEEP_SIZE) && offset + len > inode->i_size) in hugetlbfs_fallocate()
/linux/fs/xfs/
H A Dxfs_file.c1236 if ((mode & FALLOC_FL_KEEP_SIZE) || offset + len <= i_size_read(inode)) in xfs_falloc_newsize()
1470 (FALLOC_FL_ALLOCATE_RANGE | FALLOC_FL_KEEP_SIZE | \
/linux/fs/smb/server/
H A Dvfs.c925 FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, in ksmbd_vfs_zero_data()
929 FALLOC_FL_ZERO_RANGE | FALLOC_FL_KEEP_SIZE, in ksmbd_vfs_zero_data()
/linux/fs/cachefiles/
H A Dio.c585 ret = vfs_fallocate(file, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, in __cachefiles_prepare_write()
/linux/drivers/target/
H A Dtarget_core_file.c568 int mode = FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE; in fd_execute_unmap()
/linux/tools/testing/selftests/kvm/lib/
H A Dkvm_util.c864 kvm_fallocate(fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, size); in kvm_memfd_alloc()
1286 const int mode = FALLOC_FL_KEEP_SIZE | (punch_hole ? FALLOC_FL_PUNCH_HOLE : 0); in vm_guest_mem_fallocate()
/linux/tools/testing/selftests/kvm/arm64/
H A Dpage_fault_test.c414 ret = fallocate(fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, in punch_hole_in_backing_store()
/linux/fs/btrfs/
H A Dfile.c2865 if (mode & FALLOC_FL_KEEP_SIZE || end <= i_size_read(inode)) in btrfs_fallocate_update_isize()
3130 if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE | in btrfs_fallocate()
3139 if (!(mode & FALLOC_FL_KEEP_SIZE) && offset + len > inode->i_size) { in btrfs_fallocate()

12