diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-04-14 09:46:10 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:01 -0400 |
commit | 98d20f67cf99ccda638dbcdf7b3a9ee0a428d932 (patch) | |
tree | 2cd417558d34777ee8aabc950ccc0993d542d1b0 /fs/btrfs/ctree.h | |
parent | 73f61b2a6459df982cb4faf0e5cf5ac8b153aaff (diff) |
Add a min size parameter to btrfs_alloc_extent
On huge machines, delayed allocation may try to allocate massive extents.
This change allows btrfs_alloc_extent to return something smaller than
the caller asked for, and the data allocation routines will loop over
the allocations until it fills the whole delayed alloc.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index e803c4daad21..09d614fcafb1 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -1286,7 +1286,8 @@ int btrfs_insert_extent_backref(struct btrfs_trans_handle *trans, | |||
1286 | u64 owner, u64 owner_offset); | 1286 | u64 owner, u64 owner_offset); |
1287 | int btrfs_alloc_extent(struct btrfs_trans_handle *trans, | 1287 | int btrfs_alloc_extent(struct btrfs_trans_handle *trans, |
1288 | struct btrfs_root *root, | 1288 | struct btrfs_root *root, |
1289 | u64 num_bytes, u64 root_objectid, u64 ref_generation, | 1289 | u64 num_bytes, u64 min_bytes, |
1290 | u64 root_objectid, u64 ref_generation, | ||
1290 | u64 owner, u64 owner_offset, | 1291 | u64 owner, u64 owner_offset, |
1291 | u64 empty_size, u64 hint_byte, | 1292 | u64 empty_size, u64 hint_byte, |
1292 | u64 search_end, struct btrfs_key *ins, int data); | 1293 | u64 search_end, struct btrfs_key *ins, int data); |