Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140301
b: refs/heads/master
c: 1d46dc0
h: refs/heads/master
i:
  140299: d0042e3
v: v3
  • Loading branch information
Mark Fasheh committed Apr 3, 2009
1 parent 69ab3a7 commit cc640d9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 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: b80b549c3520b31d3bbc4b36e37e0a5102da0b94
refs/heads/master: 1d46dc08d33138c29c63d717807c08ab704fc773
3 changes: 1 addition & 2 deletions trunk/fs/ocfs2/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -3941,8 +3941,7 @@ static int ocfs2_dx_dir_rebalance(struct ocfs2_super *osb, struct inode *dir,
goto out_commit;
}

orig_leaves_start = leaf_blkno & ~(osb->s_clustersize_bits -
osb->sb->s_blocksize_bits);
orig_leaves_start = ocfs2_block_to_cluster_start(dir->i_sb, leaf_blkno);
ret = ocfs2_read_dx_leaves(dir, orig_leaves_start, num_dx_leaves,
orig_dx_leaves);
if (ret) {
Expand Down
10 changes: 10 additions & 0 deletions trunk/fs/ocfs2/ocfs2.h
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,16 @@ static inline u64 ocfs2_clusters_to_bytes(struct super_block *sb,
return (u64)clusters << OCFS2_SB(sb)->s_clustersize_bits;
}

static inline u64 ocfs2_block_to_cluster_start(struct super_block *sb,
u64 blocks)
{
int bits = OCFS2_SB(sb)->s_clustersize_bits - sb->s_blocksize_bits;
unsigned int clusters;

clusters = ocfs2_blocks_to_clusters(sb, blocks);
return (u64)clusters << bits;
}

static inline u64 ocfs2_align_bytes_to_clusters(struct super_block *sb,
u64 bytes)
{
Expand Down

0 comments on commit cc640d9

Please sign in to comment.