Ah! You're right. I was confused, I'm sorry.
New patch is here (and works well)... Ugh.
--- linux-2.4.17-pre8.vanilla/mm/filemap.c Tue Dec 11 15:54:57 2001
+++ linux-2.4.17-pre8/mm/filemap.c Tue Dec 11 19:36:09 2001
@@ -1508,8 +1508,21 @@
new_iobuf = 1;
}
- blocksize = 1 << inode->i_blkbits;
- blocksize_bits = inode->i_blkbits;
+ /*
+ * If inode is block device, blocksize is set as hardsect_size.
+ */
+ if (S_ISBLK(inode->i_mode)) {
+ int size;
+
+ size = get_hardsect_size(inode->i_rdev);
+ blocksize = size;
+ for (blocksize_bits = 0; !(size & 1); )
+ size >>= 1, blocksize_bits++;
+ } else {
+ blocksize = 1 << inode->i_blkbits;
+ blocksize_bits = inode->i_blkbits;
+ }
+
blocksize_mask = blocksize - 1;
chunk_size = KIO_MAX_ATOMIC_IO << 10;
-- gotom
-
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/