Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34266
b: refs/heads/master
c: 471e3f5
h: refs/heads/master
v: v3
  • Loading branch information
Mathieu Avila authored and Mark Fasheh committed Sep 20, 2006
1 parent b9e07fe commit 969f31f
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 2d5625181fac18f572cbbd18878d28f5eebf4733
refs/heads/master: 471e3f57286da7ce8820ad42c77d5f5f49d56a41
8 changes: 6 additions & 2 deletions trunk/fs/ocfs2/cluster/heartbeat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

max_sectors = max_pages << (PAGE_SHIFT - 9);

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);

Expand Down

0 comments on commit 969f31f

Please sign in to comment.