diff options
author | Joel Becker <joel.becker@oracle.com> | 2010-03-26 10:09:15 +0800 |
---|---|---|
committer | Tao Ma <tao.ma@oracle.com> | 2010-03-26 10:09:15 +0800 |
commit | 2b6cb576aa80611f1f6a3c88708d1e68a8d97985 (patch) | |
tree | a984f09104970133379e4d370b9f01e7f85c6f9b /fs/ocfs2/alloc.c | |
parent | ba2066351b630f0205ebf725f5c81a2a07a77cd7 (diff) | |
download | linux-3.10-2b6cb576aa80611f1f6a3c88708d1e68a8d97985.tar.gz linux-3.10-2b6cb576aa80611f1f6a3c88708d1e68a8d97985.tar.bz2 linux-3.10-2b6cb576aa80611f1f6a3c88708d1e68a8d97985.zip |
ocfs2: Set suballoc_loc on allocated metadata.
Get the suballoc_loc from ocfs2_claim_new_inode() or
ocfs2_claim_metadata(). Store it on the appropriate field of the block
we just allocated.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/alloc.c')
-rw-r--r-- | fs/ocfs2/alloc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index b6e2ba1f6a7..479d2ecae34 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -1006,7 +1006,7 @@ static int ocfs2_create_new_meta_bhs(handle_t *handle, int count, status, i; u16 suballoc_bit_start; u32 num_got; - u64 first_blkno; + u64 suballoc_loc, first_blkno; struct ocfs2_super *osb = OCFS2_SB(ocfs2_metadata_cache_get_super(et->et_ci)); struct ocfs2_extent_block *eb; @@ -1018,6 +1018,7 @@ static int ocfs2_create_new_meta_bhs(handle_t *handle, status = ocfs2_claim_metadata(handle, meta_ac, wanted - count, + &suballoc_loc, &suballoc_bit_start, &num_got, &first_blkno); @@ -1051,6 +1052,7 @@ static int ocfs2_create_new_meta_bhs(handle_t *handle, eb->h_fs_generation = cpu_to_le32(osb->fs_generation); eb->h_suballoc_slot = cpu_to_le16(meta_ac->ac_alloc_slot); + eb->h_suballoc_loc = cpu_to_le64(suballoc_loc); eb->h_suballoc_bit = cpu_to_le16(suballoc_bit_start); eb->h_list.l_count = cpu_to_le16(ocfs2_extent_recs_per_eb(osb->sb)); |