Skip to content
Commit 1d46dc08 authored by Mark Fasheh's avatar Mark Fasheh
Browse files

ocfs2: fix leaf start calculation in ocfs2_dx_dir_rebalance()



ocfs2_dx_dir_rebalance() is passed the block offset of a dx leaf which needs
rebalancing. Since we rebalance an entire cluster at a time however, this
function needs to calculate the beginning of that cluster, in blocks. The
calculation was wrong, which would result in a read of non-leaf blocks. Fix
the calculation by adding ocfs2_block_to_cluster_start() which is a more
straight-forward way of determining this.

Reported-by: default avatarTristan Ye <tristan.ye@oracle.com>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
parent b80b549c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment