extents.c (847c6c422aa0ae81a5517a9558ec2737806dca48) | extents.c (40c406c74eb9eed58ae7d4d12a0197f7279c9499) |
---|---|
1/* 2 * Copyright (c) 2003-2006, Cluster File Systems, Inc, info@clusterfs.com 3 * Written by Alex Tomas <alex@clusterfs.com> 4 * 5 * Architecture independence: 6 * Copyright (c) 2005, Bull S.A. 7 * Written by Pierre Peiffer <pierre.peiffer@bull.net> 8 * --- 4864 unchanged lines hidden (view full) --- 4873 /* Return error if mode is not supported */ 4874 if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE | 4875 FALLOC_FL_COLLAPSE_RANGE | FALLOC_FL_ZERO_RANGE)) 4876 return -EOPNOTSUPP; 4877 4878 if (mode & FALLOC_FL_PUNCH_HOLE) 4879 return ext4_punch_hole(inode, offset, len); 4880 | 1/* 2 * Copyright (c) 2003-2006, Cluster File Systems, Inc, info@clusterfs.com 3 * Written by Alex Tomas <alex@clusterfs.com> 4 * 5 * Architecture independence: 6 * Copyright (c) 2005, Bull S.A. 7 * Written by Pierre Peiffer <pierre.peiffer@bull.net> 8 * --- 4864 unchanged lines hidden (view full) --- 4873 /* Return error if mode is not supported */ 4874 if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE | 4875 FALLOC_FL_COLLAPSE_RANGE | FALLOC_FL_ZERO_RANGE)) 4876 return -EOPNOTSUPP; 4877 4878 if (mode & FALLOC_FL_PUNCH_HOLE) 4879 return ext4_punch_hole(inode, offset, len); 4880 |
4881 if (mode & FALLOC_FL_COLLAPSE_RANGE) 4882 return ext4_collapse_range(inode, offset, len); 4883 | |
4884 ret = ext4_convert_inline_data(inode); 4885 if (ret) 4886 return ret; 4887 4888 /* 4889 * currently supporting (pre)allocate mode for extent-based 4890 * files _only_ 4891 */ 4892 if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) 4893 return -EOPNOTSUPP; 4894 | 4881 ret = ext4_convert_inline_data(inode); 4882 if (ret) 4883 return ret; 4884 4885 /* 4886 * currently supporting (pre)allocate mode for extent-based 4887 * files _only_ 4888 */ 4889 if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) 4890 return -EOPNOTSUPP; 4891 |
4892 if (mode & FALLOC_FL_COLLAPSE_RANGE) 4893 return ext4_collapse_range(inode, offset, len); 4894 |
|
4895 if (mode & FALLOC_FL_ZERO_RANGE) 4896 return ext4_zero_range(file, offset, len, mode); 4897 4898 trace_ext4_fallocate_enter(inode, offset, len, mode); 4899 lblk = offset >> blkbits; 4900 /* 4901 * We can't just convert len to max_blocks because 4902 * If blocksize = 4096 offset = 3072 and len = 2048 --- 568 unchanged lines hidden --- | 4895 if (mode & FALLOC_FL_ZERO_RANGE) 4896 return ext4_zero_range(file, offset, len, mode); 4897 4898 trace_ext4_fallocate_enter(inode, offset, len, mode); 4899 lblk = offset >> blkbits; 4900 /* 4901 * We can't just convert len to max_blocks because 4902 * If blocksize = 4096 offset = 3072 and len = 2048 --- 568 unchanged lines hidden --- |