2 Index: linux-2.6.22-rc1/fs/ext4/writeback.c
3 ===================================================================
4 --- linux-2.6.22-rc1.orig/fs/ext4/writeback.c 2007-05-15 16:26:07.000000000 -0700
5 +++ linux-2.6.22-rc1/fs/ext4/writeback.c 2007-05-15 16:26:10.000000000 -0700
7 struct inode *inode = wc->mapping->host;
8 int blkbits = inode->i_blkbits;
10 - unsigned long blk, off, len, remain;
12 + unsigned long blk, len, remain;
13 unsigned long pstart, plen, prev;
14 struct bio *bio = NULL;
17 nr_pages = (nr_pages >> (PAGE_CACHE_SHIFT - blkbits));
18 off = le32_to_cpu(ex->ee_start) +
19 (blk - le32_to_cpu(ex->ee_block));
20 + off |= (ext4_fsblk_t)
21 + le16_to_cpu(ex->ee_start_hi) << 32;
22 bio = ext4_wb_bio_alloc(inode, off, nr_pages + 2);
27 /* try to predict block placement */
28 if ((ex = path[depth].p_ext))
29 - return le32_to_cpu(ex->ee_start) +
30 + return (le32_to_cpu(ex->ee_start) |
32 + le16_to_cpu(ex->ee_start_hi) << 32)) +
33 (block - le32_to_cpu(ex->ee_block));
35 /* it looks index is empty
37 (unsigned) ec->ec_block,
38 (unsigned) ec->ec_len,
39 (unsigned) ec->ec_start);
40 - nex.ee_start = cpu_to_le32(ec->ec_start);
41 + nex.ee_start = cpu_to_le32(ec->ec_start & 0xffffffff);
42 + nex.ee_start_hi = cpu_to_le16((ec->ec_start >> 32) & 0xffff);
43 nex.ee_block = cpu_to_le32(ec->ec_block);
44 nex.ee_len = cpu_to_le16(ec->ec_len);
45 err = ext4_wb_submit_extent(wc, NULL, &nex, 0);
47 pblock, count, inode->i_ino, ec->ec_len);
49 /* insert new extent */
50 - nex.ee_start = cpu_to_le32(pblock);
51 - nex.ee_start_hi = 0;
52 + nex.ee_start = cpu_to_le32(pblock & 0xffffffff);
53 + nex.ee_start_hi = cpu_to_le16((pblock >> 32) & 0xffff);
54 nex.ee_len = cpu_to_le16(count);
55 nex.ee_block = cpu_to_le32(ec->ec_block);
56 err = ext4_ext_insert_extent(handle, inode, path, &nex);
58 * in correspondend buffer_heads to prevent corruptions */
59 for (i = 0; i < le16_to_cpu(nex.ee_len); i++)
60 unmap_underlying_metadata(sb->s_bdev,
61 - le32_to_cpu(nex.ee_start) + i);
63 + le16_to_cpu(nex.ee_start_hi) << 32) +
64 + le32_to_cpu(nex.ee_start) + i);
66 /* correct on-disk inode size */
67 if (le16_to_cpu(nex.ee_len) > 0) {