diff options
author | Christoph Hellwig <hch@sgi.com> | 2006-01-11 04:49:16 -0500 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-01-11 04:49:16 -0500 |
commit | 7336cea8c2737bbaf0296d67782f760828301d56 (patch) | |
tree | de5dd8666d4968b7f96204a3cdd8f070d3543124 /fs | |
parent | d5cb48aaac5bba1721bce3232e6fb022ade2c0b7 (diff) |
[XFS] pass full 64bit offsets to xfs_add_to_ioend
SGI-PV: 947118
SGI-Modid: xfs-linux-melb:xfs-kern:203828a
Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_aops.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 98d26c8e0565..562867316639 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -414,7 +414,7 @@ STATIC void | |||
414 | xfs_add_to_ioend( | 414 | xfs_add_to_ioend( |
415 | struct inode *inode, | 415 | struct inode *inode, |
416 | struct buffer_head *bh, | 416 | struct buffer_head *bh, |
417 | unsigned int p_offset, | 417 | xfs_off_t offset, |
418 | unsigned int type, | 418 | unsigned int type, |
419 | xfs_ioend_t **result, | 419 | xfs_ioend_t **result, |
420 | int need_ioend) | 420 | int need_ioend) |
@@ -423,10 +423,7 @@ xfs_add_to_ioend( | |||
423 | 423 | ||
424 | if (!ioend || need_ioend || type != ioend->io_type) { | 424 | if (!ioend || need_ioend || type != ioend->io_type) { |
425 | xfs_ioend_t *previous = *result; | 425 | xfs_ioend_t *previous = *result; |
426 | xfs_off_t offset; | ||
427 | 426 | ||
428 | offset = (xfs_off_t)bh->b_page->index << PAGE_CACHE_SHIFT; | ||
429 | offset += p_offset; | ||
430 | ioend = xfs_alloc_ioend(inode, type); | 427 | ioend = xfs_alloc_ioend(inode, type); |
431 | ioend->io_offset = offset; | 428 | ioend->io_offset = offset; |
432 | ioend->io_buffer_head = bh; | 429 | ioend->io_buffer_head = bh; |
@@ -666,7 +663,6 @@ xfs_convert_page( | |||
666 | p_offset = p_offset ? roundup(p_offset, len) : PAGE_CACHE_SIZE; | 663 | p_offset = p_offset ? roundup(p_offset, len) : PAGE_CACHE_SIZE; |
667 | page_dirty = p_offset / len; | 664 | page_dirty = p_offset / len; |
668 | 665 | ||
669 | p_offset = 0; | ||
670 | bh = head = page_buffers(page); | 666 | bh = head = page_buffers(page); |
671 | do { | 667 | do { |
672 | if (offset >= end_offset) | 668 | if (offset >= end_offset) |
@@ -694,7 +690,7 @@ xfs_convert_page( | |||
694 | 690 | ||
695 | xfs_map_at_offset(bh, offset, bbits, mp); | 691 | xfs_map_at_offset(bh, offset, bbits, mp); |
696 | if (startio) { | 692 | if (startio) { |
697 | xfs_add_to_ioend(inode, bh, p_offset, | 693 | xfs_add_to_ioend(inode, bh, offset, |
698 | type, ioendp, done); | 694 | type, ioendp, done); |
699 | } else { | 695 | } else { |
700 | set_buffer_dirty(bh); | 696 | set_buffer_dirty(bh); |
@@ -707,7 +703,7 @@ xfs_convert_page( | |||
707 | type = 0; | 703 | type = 0; |
708 | if (buffer_mapped(bh) && all_bh && startio) { | 704 | if (buffer_mapped(bh) && all_bh && startio) { |
709 | lock_buffer(bh); | 705 | lock_buffer(bh); |
710 | xfs_add_to_ioend(inode, bh, p_offset, | 706 | xfs_add_to_ioend(inode, bh, offset, |
711 | type, ioendp, done); | 707 | type, ioendp, done); |
712 | count++; | 708 | count++; |
713 | page_dirty--; | 709 | page_dirty--; |
@@ -715,8 +711,7 @@ xfs_convert_page( | |||
715 | done = 1; | 711 | done = 1; |
716 | } | 712 | } |
717 | } | 713 | } |
718 | } while (offset += len, p_offset += len, | 714 | } while (offset += len, (bh = bh->b_this_page) != head); |
719 | (bh = bh->b_this_page) != head); | ||
720 | 715 | ||
721 | if (uptodate && bh == head) | 716 | if (uptodate && bh == head) |
722 | SetPageUptodate(page); | 717 | SetPageUptodate(page); |
@@ -914,7 +909,7 @@ xfs_page_state_convert( | |||
914 | xfs_map_at_offset(bh, offset, | 909 | xfs_map_at_offset(bh, offset, |
915 | inode->i_blkbits, &iomap); | 910 | inode->i_blkbits, &iomap); |
916 | if (startio) { | 911 | if (startio) { |
917 | xfs_add_to_ioend(inode, bh, p_offset, | 912 | xfs_add_to_ioend(inode, bh, offset, |
918 | type, &ioend, | 913 | type, &ioend, |
919 | !iomap_valid); | 914 | !iomap_valid); |
920 | } else { | 915 | } else { |
@@ -930,8 +925,7 @@ xfs_page_state_convert( | |||
930 | 925 | ||
931 | if (!test_and_set_bit(BH_Lock, &bh->b_state)) { | 926 | if (!test_and_set_bit(BH_Lock, &bh->b_state)) { |
932 | ASSERT(buffer_mapped(bh)); | 927 | ASSERT(buffer_mapped(bh)); |
933 | xfs_add_to_ioend(inode, | 928 | xfs_add_to_ioend(inode, bh, offset, type, |
934 | bh, p_offset, type, | ||
935 | &ioend, !iomap_valid); | 929 | &ioend, !iomap_valid); |
936 | page_dirty--; | 930 | page_dirty--; |
937 | count++; | 931 | count++; |