diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2009-01-06 03:46:55 +0100 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-01-06 03:46:55 +0100 |
commit | 8556e8f3b6c4c11601ce1e9ea8090a6d8bd5daae (patch) | |
tree | 8a0da99a4781cbde8c050d7cbcd85f31fd54e894 /fs/ext4/mballoc.h | |
parent | ext4: mark the blocks/inode bitmap beyond end of group as used (diff) | |
download | linux-8556e8f3b6c4c11601ce1e9ea8090a6d8bd5daae.tar.xz linux-8556e8f3b6c4c11601ce1e9ea8090a6d8bd5daae.zip |
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.h | 5 |
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 { __u8 ac_op; /* operation, for history only */ struct page *ac_bitmap_page; struct page *ac_buddy_page; + /* + * pointer to the held semaphore upon successful + * block allocation + */ + struct rw_semaphore *alloc_semp; struct ext4_prealloc_space *ac_pa; struct ext4_locality_group *ac_lg; }; |