Searched refs:fallocate (Results 1 - 25 of 40) sorted by relevance

12

/linux-master/tools/testing/selftests/kvm/
H A Dguest_memfd_test.c62 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE, 0, total_size);
63 TEST_ASSERT(!ret, "fallocate with aligned offset and size should succeed");
65 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE,
67 TEST_ASSERT(ret, "fallocate with unaligned offset should fail");
69 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE, total_size, page_size);
70 TEST_ASSERT(ret, "fallocate beginning at total_size should fail");
72 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE, total_size + page_size, page_size);
73 TEST_ASSERT(ret, "fallocate beginning after total_size should fail");
75 ret = fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE,
77 TEST_ASSERT(!ret, "fallocate(PUNCH_HOL
[all...]
/linux-master/tools/testing/selftests/mm/
H A Dhugetlb-madvise.c201 if (fallocate(fd, 0, 0, NR_HUGE_PAGES * huge_page_size)) {
202 perror("fallocate");
242 * The fallocate below certainly should free the pages associated
248 if (fallocate(fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
250 perror("fallocate");
260 if (fallocate(fd, 0, 0, NR_HUGE_PAGES * huge_page_size)) {
261 perror("fallocate");
300 if (fallocate(fd, 0, 0, NR_HUGE_PAGES * huge_page_size)) {
301 perror("fallocate");
H A Dgup_longterm.c103 if (fallocate(fd, 0, 0, size)) {
105 ksft_test_result_fail("fallocate() failed\n");
H A Dcow.c1538 if (fallocate(fd, 0, 0, pagesize)) {
1539 ksft_test_result_fail("fallocate() failed\n");
1589 if (fallocate(fd, 0, 0, pagesize)) {
1590 ksft_test_result_fail("fallocate() failed\n");
1638 if (fallocate(fd, 0, 0, hugetlbsize)) {
H A Duffd-common.c35 if (fallocate(mem_fd,
38 err("fallocate");
/linux-master/tools/testing/selftests/mincore/
H A Dmincore_selftest.c218 retval = fallocate(fd, 0, 0, FILE_SIZE);
224 SKIP(goto out_close, "fallocate not supported by filesystem.");
320 retval = fallocate(fd, 0, 0, FILE_SIZE);
/linux-master/tools/testing/selftests/kvm/x86_64/
H A Dprivate_mem_conversions_test.c220 /* "Mapping" memory shared via fallocate() is done via PUNCH_HOLE. */
275 * Run the conversion test twice, with and without doing fallocate() on
432 r = fallocate(memfd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE, 0, memfd_size);
433 TEST_ASSERT(!r, __KVM_SYSCALL_ERROR("fallocate()", r));
435 r = fallocate(memfd, FALLOC_FL_KEEP_SIZE, 0, memfd_size);
436 TEST_ASSERT(!r, __KVM_SYSCALL_ERROR("fallocate()", r));
/linux-master/fs/smb/client/
H A Dcifsfs.c345 if (server->ops->fallocate)
346 return server->ops->fallocate(file, tcon, mode, off, len);
1546 .fallocate = cifs_fallocate,
1566 .fallocate = cifs_fallocate,
1586 .fallocate = cifs_fallocate,
1604 .fallocate = cifs_fallocate,
1622 .fallocate = cifs_fallocate,
1640 .fallocate = cifs_fallocate,
/linux-master/tools/testing/selftests/memfd/
H A Dmemfd_test.c492 r = fallocate(fd,
497 printf("fallocate(PUNCH_HOLE) failed: %m\n");
557 r = fallocate(fd,
562 printf("fallocate(PUNCH_HOLE) didn't fail as expected\n");
614 r = fallocate(fd,
619 printf("fallocate(ALLOC) failed: %m\n");
636 r = fallocate(fd,
641 printf("fallocate(ALLOC) didn't fail as expected\n");
/linux-master/arch/um/os-Linux/
H A Dfile.c621 int n = fallocate(fd, FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE, offset, len);
630 int n = fallocate(fd, FALLOC_FL_ZERO_RANGE|FALLOC_FL_KEEP_SIZE, offset, len);
/linux-master/arch/sparc/kernel/
H A Dsys_sparc32.c232 COMPAT_SYSCALL_DEFINE6(fallocate, int, fd, int, mode, u32, offhi, u32, offlo,
/linux-master/fs/
H A Dopen.c287 * We can only allow pure fallocate on append only files
296 * We cannot allow any fallocate operation on an active swapfile
326 if (!file->f_op->fallocate)
330 ret = file->f_op->fallocate(file, mode, offset, len);
335 * To keep the logic simple always create events if fallocate succeeds.
359 SYSCALL_DEFINE4(fallocate, int, fd, int, mode, loff_t, offset, loff_t, len)
365 COMPAT_SYSCALL_DEFINE6(fallocate, int, fd, int, mode, compat_arg_u64_dual(offset),
/linux-master/ipc/
H A Dshm.c640 if (!sfd->file->f_op->fallocate)
642 return sfd->file->f_op->fallocate(file, mode, offset, len);
661 .fallocate = shm_fallocate,
674 .fallocate = shm_fallocate,
/linux-master/virt/kvm/
H A Dguest_memfd.c254 .fallocate = kvm_gmem_fallocate,
/linux-master/fs/nfs/
H A Dnfs4file.c465 .fallocate = nfs42_fallocate,
/linux-master/drivers/target/
H A Dtarget_core_file.c564 /* The backend is normal file, use fallocate */
570 if (!file->f_op->fallocate)
573 ret = file->f_op->fallocate(file, mode, pos, len);
575 pr_warn("FILEIO: fallocate() failed: %d\n", ret);
/linux-master/fs/fat/
H A Dfile.c214 .fallocate = fat_fallocate,
254 * Preallocate space for a file. This implements fat's fallocate file
271 /* No support for hole punch or other fallocate flags. */
/linux-master/fs/overlayfs/
H A Dfile.c607 .fallocate = ovl_fallocate,
/linux-master/fs/gfs2/
H A Dfile.c1291 * fallocate without exceeding quota or going over the
1375 /* fallocate is needed by gfs2_grow to reserve space in the rindex */
1587 .fallocate = gfs2_fallocate,
1618 .fallocate = gfs2_fallocate,
/linux-master/drivers/block/
H A Dloop.c309 * We use fallocate to manipulate the space mappings used by the image
320 ret = file->f_op->fallocate(file, mode, pos, blk_rq_bytes(rq));
779 } else if (file->f_op->fallocate && !vfs_statfs(&file->f_path, &sbuf)) {
/linux-master/tools/testing/selftests/kvm/lib/
H A Dkvm_util.c782 r = fallocate(fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, size);
783 TEST_ASSERT(!r, __KVM_SYSCALL_ERROR("fallocate()", r));
1280 ret = fallocate(region->region.guest_memfd, mode, fd_offset, len);
1281 TEST_ASSERT(!ret, "fallocate() failed to %s at %lx (len = %lu), fd = %d, mode = %x, offset = %lx",
/linux-master/fs/ext4/
H A Dfile.c948 .fallocate = ext4_fallocate,
/linux-master/fs/ntfs3/
H A Dfile.c426 * Preallocate space for a file. This implements ntfs's fallocate file
465 ntfs_inode_warn(inode, "fallocate(0x%x) is not supported",
1236 .fallocate = ntfs_fallocate,
/linux-master/block/
H A Dfops.c801 * de-allocate mode calls to fallocate().
865 .fallocate = blkdev_fallocate,
/linux-master/fs/nfsd/
H A Dnfs4proc.c1977 struct nfsd4_fallocate *fallocate, int flags)
1983 &fallocate->falloc_stateid,
1989 fallocate->falloc_offset,
1990 fallocate->falloc_length,
1976 nfsd4_fallocate(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_fallocate *fallocate, int flags) argument

Completed in 397 milliseconds

12