projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d56251
)
ocfs2: Fix heartbeat sector calculation
author
Mathieu Avila
<mathieu.avila@seanodes.com>
Wed, 13 Sep 2006 18:11:27 +0000
(11:11 -0700)
committer
Mark Fasheh
<mark.fasheh@oracle.com>
Wed, 20 Sep 2006 22:50:53 +0000
(15:50 -0700)
This fixes things for devices which set max_sectors to 8.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
fs/ocfs2/cluster/heartbeat.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/ocfs2/cluster/heartbeat.c
b/fs/ocfs2/cluster/heartbeat.c
index 504595d6cf65c0f966aaf0d8ee3ce725837ac020..305cba3681fe0126b4d1e33dd58c3b0cc3bea8a5 100644
(file)
--- a/
fs/ocfs2/cluster/heartbeat.c
+++ b/
fs/ocfs2/cluster/heartbeat.c
@@
-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);