aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/mballoc.h
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2009-01-05 21:46:55 -0500
committerTheodore Ts'o <tytso@mit.edu>2009-01-05 21:46:55 -0500
commit8556e8f3b6c4c11601ce1e9ea8090a6d8bd5daae (patch)
tree8a0da99a4781cbde8c050d7cbcd85f31fd54e894 /fs/ext4/mballoc.h
parent648f5879f5892dddd3ba71cd0d285599f40f2512 (diff)
ext4: Don't allow new groups to be added during block allocation
After we mark the blocks in the buddy cache as allocated, we need to ensure that we don't reinit the buddy cache until the block bitmap is updated. This commit achieves this by holding the group_info alloc_semaphore till ext4_mb_release_context Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: stable@kernel.org
Diffstat (limited to 'fs/ext4/mballoc.h')
-rw-r--r--fs/ext4/mballoc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h
index 95d4c7f29a8a..10a2921baf14 100644
--- a/fs/ext4/mballoc.h
+++ b/fs/ext4/mballoc.h
@@ -195,6 +195,11 @@ struct ext4_allocation_context {
195 __u8 ac_op; /* operation, for history only */ 195 __u8 ac_op; /* operation, for history only */
196 struct page *ac_bitmap_page; 196 struct page *ac_bitmap_page;
197 struct page *ac_buddy_page; 197 struct page *ac_buddy_page;
198 /*
199 * pointer to the held semaphore upon successful
200 * block allocation
201 */
202 struct rw_semaphore *alloc_semp;
198 struct ext4_prealloc_space *ac_pa; 203 struct ext4_prealloc_space *ac_pa;
199 struct ext4_locality_group *ac_lg; 204 struct ext4_locality_group *ac_lg;
200}; 205};