aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-02-05 10:20:17 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:00 -0400
commit068fe39fa18e8921062e2e16e6aa2b46768b2a35 (patch)
tree604770af3b7d650dc1c184649e9e91ecd8824354 /fs/btrfs
parentdacb473ad81d5c1650cb73d1cb9b866202f6bab0 (diff)
Btrfs: Add checks for last byte in disk to allocator grouping
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/extent-tree.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index a340eeedd6c7..9e0869959cde 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -1611,8 +1611,13 @@ check_pending:
1611 } 1611 }
1612 ins->offset = num_bytes; 1612 ins->offset = num_bytes;
1613 btrfs_free_path(path); 1613 btrfs_free_path(path);
1614 if (last_ptr) 1614 if (last_ptr) {
1615 *last_ptr = ins->objectid + ins->offset; 1615 *last_ptr = ins->objectid + ins->offset;
1616 if (*last_ptr ==
1617 btrfs_super_total_bytes(&root->fs_info->super_copy)) {
1618 *last_ptr = 0;
1619 }
1620 }
1616 return 0; 1621 return 0;
1617 1622
1618new_group: 1623new_group: