提交 471e3f57 编写于 作者: M Mathieu Avila 提交者: Mark Fasheh

ocfs2: Fix heartbeat sector calculation

This fixes things for devices which set max_sectors to 8.
Signed-off-by: NMark Fasheh <mark.fasheh@oracle.com>
上级 2d562518
......@@ -320,8 +320,12 @@ static int compute_max_sectors(struct block_device *bdev)
max_pages = q->max_hw_segments;
max_pages--; /* Handle I/Os that straddle a page */
if (max_pages) {
max_sectors = max_pages << (PAGE_SHIFT - 9);
} else {
/* If BIO contains 1 or less than 1 page. */
max_sectors = q->max_sectors;
}
/* Why is fls() 1-based???? */
pow_two_sectors = 1 << (fls(max_sectors) - 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册