diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_aops.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_aops.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 303a779406c0..2b09cc34dd07 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -568,10 +568,12 @@ xfs_map_buffer( | |||
568 | sector_t bn; | 568 | sector_t bn; |
569 | struct xfs_mount *m = XFS_I(inode)->i_mount; | 569 | struct xfs_mount *m = XFS_I(inode)->i_mount; |
570 | xfs_off_t iomap_offset = XFS_FSB_TO_B(m, mp->iomap_offset); | 570 | xfs_off_t iomap_offset = XFS_FSB_TO_B(m, mp->iomap_offset); |
571 | xfs_daddr_t iomap_bn = xfs_fsb_to_db(XFS_I(inode), mp->iomap_bn); | ||
571 | 572 | ||
572 | ASSERT(mp->iomap_bn != IOMAP_DADDR_NULL); | 573 | ASSERT(mp->iomap_bn != HOLESTARTBLOCK); |
574 | ASSERT(mp->iomap_bn != DELAYSTARTBLOCK); | ||
573 | 575 | ||
574 | bn = (mp->iomap_bn >> (inode->i_blkbits - BBSHIFT)) + | 576 | bn = (iomap_bn >> (inode->i_blkbits - BBSHIFT)) + |
575 | ((offset - iomap_offset) >> inode->i_blkbits); | 577 | ((offset - iomap_offset) >> inode->i_blkbits); |
576 | 578 | ||
577 | ASSERT(bn || XFS_IS_REALTIME_INODE(XFS_I(inode))); | 579 | ASSERT(bn || XFS_IS_REALTIME_INODE(XFS_I(inode))); |
@@ -587,8 +589,8 @@ xfs_map_at_offset( | |||
587 | xfs_iomap_t *iomapp, | 589 | xfs_iomap_t *iomapp, |
588 | xfs_off_t offset) | 590 | xfs_off_t offset) |
589 | { | 591 | { |
590 | ASSERT(!(iomapp->iomap_flags & IOMAP_HOLE)); | 592 | ASSERT(iomapp->iomap_bn != HOLESTARTBLOCK); |
591 | ASSERT(!(iomapp->iomap_flags & IOMAP_DELAY)); | 593 | ASSERT(iomapp->iomap_bn != DELAYSTARTBLOCK); |
592 | 594 | ||
593 | lock_buffer(bh); | 595 | lock_buffer(bh); |
594 | xfs_map_buffer(inode, bh, iomapp, offset); | 596 | xfs_map_buffer(inode, bh, iomapp, offset); |
@@ -818,8 +820,8 @@ xfs_convert_page( | |||
818 | continue; | 820 | continue; |
819 | } | 821 | } |
820 | 822 | ||
821 | ASSERT(!(mp->iomap_flags & IOMAP_HOLE)); | 823 | ASSERT(mp->iomap_bn != HOLESTARTBLOCK); |
822 | ASSERT(!(mp->iomap_flags & IOMAP_DELAY)); | 824 | ASSERT(mp->iomap_bn != DELAYSTARTBLOCK); |
823 | 825 | ||
824 | xfs_map_at_offset(inode, bh, mp, offset); | 826 | xfs_map_at_offset(inode, bh, mp, offset); |
825 | if (startio) { | 827 | if (startio) { |
@@ -1478,7 +1480,8 @@ __xfs_get_blocks( | |||
1478 | if (niomap == 0) | 1480 | if (niomap == 0) |
1479 | return 0; | 1481 | return 0; |
1480 | 1482 | ||
1481 | if (iomap.iomap_bn != IOMAP_DADDR_NULL) { | 1483 | if (iomap.iomap_bn != HOLESTARTBLOCK && |
1484 | iomap.iomap_bn != DELAYSTARTBLOCK) { | ||
1482 | /* | 1485 | /* |
1483 | * For unwritten extents do not report a disk address on | 1486 | * For unwritten extents do not report a disk address on |
1484 | * the read case (treat as if we're reading into a hole). | 1487 | * the read case (treat as if we're reading into a hole). |
@@ -1513,7 +1516,7 @@ __xfs_get_blocks( | |||
1513 | (iomap.iomap_flags & (IOMAP_NEW|IOMAP_UNWRITTEN)))) | 1516 | (iomap.iomap_flags & (IOMAP_NEW|IOMAP_UNWRITTEN)))) |
1514 | set_buffer_new(bh_result); | 1517 | set_buffer_new(bh_result); |
1515 | 1518 | ||
1516 | if (iomap.iomap_flags & IOMAP_DELAY) { | 1519 | if (iomap.iomap_bn == DELAYSTARTBLOCK) { |
1517 | BUG_ON(direct); | 1520 | BUG_ON(direct); |
1518 | if (create) { | 1521 | if (create) { |
1519 | set_buffer_uptodate(bh_result); | 1522 | set_buffer_uptodate(bh_result); |