ext4: replace MAX_DEFRAG_SIZE with EXT_MAX_BLOCK
There's no reason to redefine the maximum allowable offset in an extent-based file just for defrag; EXT_MAX_BLOCK already does this. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
committed by
Theodore Ts'o
parent
5534fb5bb3
commit
0a80e9867d
@ -1040,12 +1040,12 @@ mext_check_arguments(struct inode *orig_inode,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ((orig_start > MAX_DEFRAG_SIZE) ||
|
||||
(donor_start > MAX_DEFRAG_SIZE) ||
|
||||
(*len > MAX_DEFRAG_SIZE) ||
|
||||
(orig_start + *len > MAX_DEFRAG_SIZE)) {
|
||||
ext4_debug("ext4 move extent: Can't handle over [%lu] blocks "
|
||||
"[ino:orig %lu, donor %lu]\n", MAX_DEFRAG_SIZE,
|
||||
if ((orig_start > EXT_MAX_BLOCK) ||
|
||||
(donor_start > EXT_MAX_BLOCK) ||
|
||||
(*len > EXT_MAX_BLOCK) ||
|
||||
(orig_start + *len > EXT_MAX_BLOCK)) {
|
||||
ext4_debug("ext4 move extent: Can't handle over [%u] blocks "
|
||||
"[ino:orig %lu, donor %lu]\n", EXT_MAX_BLOCK,
|
||||
orig_inode->i_ino, donor_inode->i_ino);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user