Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163692
b: refs/heads/master
c: 0a80e98
h: refs/heads/master
v: v3
  • Loading branch information
Eric Sandeen authored and Theodore Ts'o committed Sep 17, 2009
1 parent 671eb2d commit 614a061
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5534fb5bb35a62a94e0bd1fa2421f7fb6e894f10
refs/heads/master: 0a80e9867db154966b2a771042e10452ac110e1e
1 change: 0 additions & 1 deletion trunk/fs/ext4/ext4.h
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,6 @@ struct move_extent {
__u64 len; /* block length to be moved */
__u64 moved_len; /* moved block length */
};
#define MAX_DEFRAG_SIZE ((1UL<<31) - 1)

#define EXT4_EPOCH_BITS 2
#define EXT4_EPOCH_MASK ((1 << EXT4_EPOCH_BITS) - 1)
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/ext4/ext4_extents.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ typedef int (*ext_prepare_callback)(struct inode *, struct ext4_ext_path *,
#define EXT_BREAK 1
#define EXT_REPEAT 2

/* Maximum logical block in a file; ext4_extent's ee_block is __le32 */
#define EXT_MAX_BLOCK 0xffffffff

/*
Expand Down
12 changes: 6 additions & 6 deletions trunk/fs/ext4/move_extent.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 614a061

Please sign in to comment.