Home
last modified time | relevance | path

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

12

/linux/tools/testing/selftests/kvm/
H A Dguest_memfd_test.c60 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 Dfalloc.h6 #define FALLOC_FL_KEEP_SIZE 0x01 /* default is extend size */ macro
/linux/fs/bcachefs/
H A Dfs-io.c714 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 Dfops.c774 (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 Dio-cmd-file.c275 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 Dprivate_mem_conversions_test.c431 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 Dfile.c272 if (mode & ~FALLOC_FL_KEEP_SIZE) in fat_fallocate()
280 if (mode & FALLOC_FL_KEEP_SIZE) { in fat_fallocate()
/linux/virt/kvm/
H A Dguest_memfd.c230 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 Dhugetlb-madvise.c248 if (fallocate(fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, in main()
H A Duffd-common.c36 FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, in uffd_mem_fd_create()
/linux/fs/
H A Dioctl.c291 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 Dfile.c1349 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 Dnfs4file.c228 if ((mode != 0) && (mode != (FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE))) in nfs42_fallocate()
/linux/tools/testing/selftests/memfd/
H A Dmemfd_test.c493 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 Dfile.c3112 (!(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 Dxfs_file.c895 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 Dinode.c814 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 Dio.c585 ret = vfs_fallocate(file, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, in __cachefiles_prepare_write()
/linux/fs/smb/server/
H A Dvfs.c995 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 Dkvm_util.c788 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 Dtarget_core_file.c568 int mode = FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE; in fd_execute_unmap()
/linux/tools/testing/selftests/kvm/aarch64/
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.c2834 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 Dfile.c2118 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 Dmadvise.c1013 FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, in madvise_remove()

12