mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] LBD fix for 2.6.3
@ 2004-03-04  6:09 Eric Sandeen
  2004-03-04  7:04 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Sandeen @ 2004-03-04  6:09 UTC (permalink / raw)
  To: linux-kernel, lbd; +Cc: neilb

A couple xfs users stumbled upon this problem while trying to
use 2.6 + CONFIG_LBD on ia32 boxes - mkfs.xfs followed by
xfs_repair was failing.  At first we thought it was
a raid/md problem, but it's more generic than that.  There's
a problem in __block_write_full_page():

--- linux-2.6.3/fs/buffer.c.orig	2004-03-04 00:01:42.000000000 -0600
+++ linux-2.6.3/fs/buffer.c		2004-03-03 23:46:56.000000000 -0600
@@ -1738,8 +1738,8 @@
 			get_block_t *get_block, struct writeback_control *wbc)
 {
 	int err;
-	unsigned long block;
-	unsigned long last_block;
+	sector_t block;
+	sector_t last_block;
 	struct buffer_head *bh, *head;
 	int nr_underway = 0;
 
later in the function we do:
	last_block = (i_size_read(inode) - 1) >> inode->i_blkbits;
and
	block = page->index << (PAGE_CACHE_SHIFT - inode->i_blkbits);

... these overflow 32 bits for large devices.

The sophisticated mkfs/repair test works with that patch in place.  ;)

-Eric


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-03-04 23:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-04  6:09 [PATCH] LBD fix for 2.6.3 Eric Sandeen
2004-03-04  7:04 ` Andrew Morton
2004-03-04 23:41   ` Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®