ocfs2-alloc_dinode-counts-and-group-bitmap-should-be-update-simultaneously.patch removed from -mm tree
Subject: [to-be-updated] ocfs2-alloc_dinode-counts-and-group-bitmap-should-be-update-simultaneously.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Mon, 31 Mar 2014 14:37:14 -0700
The patch titled
Subject: ocfs2: alloc_dinode counts and group bitmap should be update simultaneously
has been removed from the -mm tree. Its filename was
ocfs2-alloc_dinode-counts-and-group-bitmap-should-be-update-simultaneously.patch
This patch was dropped because an updated version will be merged
------------------------------------------------------
From: Younger Liu <[email protected]>
Subject: ocfs2: alloc_dinode counts and group bitmap should be update simultaneously
Updating alloc_dinode counts in ocfs2_alloc_dinode_update_counts() and setting group bitmap in ocfs2_alloc_dinode_update_bitmap() have to be done simultaneously. Two cases are as follow:
(1) If ocfs2_alloc_dinode_update_counts() fails, there is no need to set group bitmap. This case has been considered.
(2) If ocfs2_alloc_dinode_update_bitmap() fails, alloc_dinode counts should be rolled back. Otherwise, some clusters would never be used. This case is not considered.
So, we combine two functions, and ensure simultaneity.
---
fs/ocfs2/move_extents.c | 11 -- fs/ocfs2/ocfs2_trace.h | 2 fs/ocfs2/suballoc.c | 155 +++++++++++++++----------------------- fs/ocfs2/suballoc.h | 21 +---- 4 files changed, 77 insertions(+), 112 deletions(-)
fs/ocfs2/move_extents.c renamed from fs/ocfs2/move_extents.c~ocfs2-alloc_dinode-counts-and-group-bitmap-should-be-update-simultaneously +4 -7
@@ -681,18 +681,15 @@ static int ocfs2_move_extent(struct ocfs } gd = (struct ocfs2_group_desc *)gd_bh->b_data; - ret =ocfs2_alloc_dinode_update_counts (gb_inode, handle, gb_bh, len, -le16_to_cpu (gd->bg_chain)); + ret =ocfs2_alloc_dinode_update_bitmap (handle, + gb_inode, gb_bh, gd, gb_bh, +le16_to_cpu (gd->bg_chain), + goal_bit, len);if (ret) {mlog_errno (ret); goto out_commit; } - ret =ocfs2_block_group_set_bits (handle, gb_inode, gd, gd_bh, - goal_bit, len); -if (ret) -mlog_errno (ret); -/* * Here we should write the new page out first if we are * in write-back mode.
fs/ocfs2/ocfs2_trace.h renamed from fs/ocfs2/ocfs2_trace.h~ocfs2-alloc_dinode-counts-and-group-bitmap-should-be-update-simultaneously +1 -1
@@ -788,7 +788,7 @@ DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_DEFINE_OCFS2_ULL_EVENT (ocfs2_reserve_new_inode_new_group); -DEFINE_OCFS2_UINT_UINT_EVENT (ocfs2_block_group_set_bits); +DEFINE_OCFS2_UINT_UINT_EVENT (ocfs2_alloc_dinode_update_bitmap); TRACE_EVENT(ocfs2_relink_block_group, TP_PROTO(unsigned long long i_blkno, unsigned int chain,
fs/ocfs2/suballoc.c renamed from fs/ocfs2/suballoc.c~ocfs2-alloc_dinode-counts-and-group-bitmap-should-be-update-simultaneously +64 -91
208 lines not on this page · raw message
fs/ocfs2/suballoc.h renamed from fs/ocfs2/suballoc.h~ocfs2-alloc_dinode-counts-and-group-bitmap-should-be-update-simultaneously +0 -12
@@ -85,19 +85,14 @@ int ocfs2_reserve_new_inode(struct ocfs2int ocfs2_reserve_clusters (struct ocfs2_super *osb,u32 bits_wanted,struct ocfs2_alloc_context **ac); - -int ocfs2_alloc_dinode_update_counts (struct inode *inode, -handle_t *handle, -struct buffer_head *di_bh, -u32 num_bits, -u16 chain); -int ocfs2_block_group_set_bits (handle_t *handle, -struct inode *alloc_inode, -struct ocfs2_group_desc *bg, -struct buffer_head *group_bh, -unsigned int bit_off, -unsigned int num_bits);