Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128700
b: refs/heads/master
c: d18a2c4
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent 104958d commit 31cc96d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 22 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: 6bc34676c0b5836655ec1c7998e2647cabb933ec
refs/heads/master: d18a2c447524751137a12cc8ccaf9d1e0b7fa1b3
13 changes: 7 additions & 6 deletions trunk/fs/btrfs/ctree.h
Original file line number Diff line number Diff line change
Expand Up @@ -506,12 +506,13 @@ struct btrfs_fs_info {
u64 delalloc_bytes;
u64 last_alloc;
u64 last_data_alloc;
int avail_data_alloc_bits;
int avail_metadata_alloc_bits;
int avail_system_alloc_bits;
int data_alloc_profile;
int metadata_alloc_profile;
int system_alloc_profile;

u64 avail_data_alloc_bits;
u64 avail_metadata_alloc_bits;
u64 avail_system_alloc_bits;
u64 data_alloc_profile;
u64 metadata_alloc_profile;
u64 system_alloc_profile;
};

/*
Expand Down
11 changes: 4 additions & 7 deletions trunk/fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -912,13 +912,10 @@ struct btrfs_root *open_ctree(struct super_block *sb,
btrfs_read_block_groups(extent_root);

fs_info->generation = btrfs_super_generation(disk_super) + 1;
if (btrfs_super_num_devices(disk_super) > 0) {
fs_info->data_alloc_profile = BTRFS_BLOCK_GROUP_RAID0 |
BTRFS_BLOCK_GROUP_RAID1;
fs_info->metadata_alloc_profile = BTRFS_BLOCK_GROUP_RAID1 |
BTRFS_BLOCK_GROUP_DUP;
fs_info->system_alloc_profile = fs_info->metadata_alloc_profile;
}
fs_info->data_alloc_profile = (u64)-1;
fs_info->metadata_alloc_profile = (u64)-1;
fs_info->system_alloc_profile = fs_info->metadata_alloc_profile;

mutex_unlock(&fs_info->fs_mutex);
return tree_root;

Expand Down
10 changes: 2 additions & 8 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,6 @@ printk("space info full %Lu\n", flags);
start, num_bytes);
BUG_ON(ret);

set_avail_alloc_bits(extent_root->fs_info, flags);
return 0;
}

Expand Down Expand Up @@ -2813,13 +2812,7 @@ int btrfs_make_block_group(struct btrfs_trans_handle *trans,
&cache->space_info);
BUG_ON(ret);

if (type & BTRFS_BLOCK_GROUP_DATA) {
bit = BLOCK_GROUP_DATA;
} else if (type & BTRFS_BLOCK_GROUP_SYSTEM) {
bit = BLOCK_GROUP_SYSTEM;
} else if (type & BTRFS_BLOCK_GROUP_METADATA) {
bit = BLOCK_GROUP_METADATA;
}
bit = block_group_state_bits(type);
set_extent_bits(block_group_cache, chunk_objectid,
chunk_objectid + size - 1,
bit | EXTENT_LOCKED, GFP_NOFS);
Expand All @@ -2833,5 +2826,6 @@ int btrfs_make_block_group(struct btrfs_trans_handle *trans,
finish_current_insert(trans, extent_root);
ret = del_pending_extents(trans, extent_root);
BUG_ON(ret);
set_avail_alloc_bits(extent_root->fs_info, type);
return 0;
}

0 comments on commit 31cc96d

Please sign in to comment.