lkml.org 
[lkml]   [2004]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] LBD fix for 2.6.3
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.045 / U:1.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site