[Ocfs2-devel] [PATCH 06/20] ocfs2: Fix possibly too long write in
o2hb_setup_one_bio()
Sunil Mushran
sunil.mushran at oracle.com
Wed Jan 16 11:32:43 PST 2008
Mainline commit bc7e97cbdd4bef162e5772c74ee2cc4487a2d997
Author: Jan Kara <jack at suse.cz>
Date: Wed, 10 Oct 2007 16:25:42 +0200
We should subtract start of our IO from PAGE_CACHE_SIZE to get the right
length of the write we want to perform.
Signed-off-by: Jan Kara <jack at suse.cz>
Signed-off-by: Mark Fasheh <mark.fasheh at oracle.com>
---
fs/ocfs2/cluster/heartbeat.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
index 6a91607..999e7e5 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -275,7 +275,7 @@ static struct bio *o2hb_setup_one_bio(struct o2hb_region *reg,
current_page = cs / spp;
page = reg->hr_slot_data[current_page];
- vec_len = min(PAGE_CACHE_SIZE,
+ vec_len = min(PAGE_CACHE_SIZE - vec_start,
(max_slots-cs) * (PAGE_CACHE_SIZE/spp) );
mlog(ML_HB_BIO, "page %d, vec_len = %u, vec_start = %u\n",
--
1.5.3.4
More information about the Ocfs2-devel
mailing list