aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2006-06-09 00:57:30 -0400
committerNathan Scott <nathans@sgi.com>2006-06-09 00:57:30 -0400
commit3d80ede4799889ede2aa785c2511aef3e78d5bb1 (patch)
treea35aeeb3cc34871e65d0368b011831a96b5a9a70
parent72c93bcc6348a385416603459c2fdb4cf6c43687 (diff)
[XFS] Drop use of m_writeio_blocks when zeroing, its not meaningful
anymore here. SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:26094a Signed-off-by: Nathan Scott <nathans@sgi.com>
-rw-r--r--fs/xfs/linux-2.6/xfs_lrw.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c
index 67b5e1c20deb..6fbdca3eaa7a 100644
--- a/fs/xfs/linux-2.6/xfs_lrw.c
+++ b/fs/xfs/linux-2.6/xfs_lrw.c
@@ -510,7 +510,6 @@ xfs_zero_eof(
510 xfs_fileoff_t end_zero_fsb; 510 xfs_fileoff_t end_zero_fsb;
511 xfs_fileoff_t zero_count_fsb; 511 xfs_fileoff_t zero_count_fsb;
512 xfs_fileoff_t last_fsb; 512 xfs_fileoff_t last_fsb;
513 xfs_extlen_t buf_len_fsb;
514 xfs_mount_t *mp = io->io_mount; 513 xfs_mount_t *mp = io->io_mount;
515 int nimaps; 514 int nimaps;
516 int error = 0; 515 int error = 0;
@@ -579,16 +578,7 @@ xfs_zero_eof(
579 } 578 }
580 579
581 /* 580 /*
582 * There are blocks in the range requested. 581 * There are blocks we need to zero.
583 * Zero them a single write at a time. We actually
584 * don't zero the entire range returned if it is
585 * too big and simply loop around to get the rest.
586 * That is not the most efficient thing to do, but it
587 * is simple and this path should not be exercised often.
588 */
589 buf_len_fsb = XFS_FILBLKS_MIN(imap.br_blockcount,
590 mp->m_writeio_blocks << 8);
591 /*
592 * Drop the inode lock while we're doing the I/O. 582 * Drop the inode lock while we're doing the I/O.
593 * We'll still have the iolock to protect us. 583 * We'll still have the iolock to protect us.
594 */ 584 */
@@ -596,14 +586,13 @@ xfs_zero_eof(
596 586
597 error = xfs_iozero(ip, 587 error = xfs_iozero(ip,
598 XFS_FSB_TO_B(mp, start_zero_fsb), 588 XFS_FSB_TO_B(mp, start_zero_fsb),
599 XFS_FSB_TO_B(mp, buf_len_fsb), 589 XFS_FSB_TO_B(mp, imap.br_blockcount),
600 end_size); 590 end_size);
601
602 if (error) { 591 if (error) {
603 goto out_lock; 592 goto out_lock;
604 } 593 }
605 594
606 start_zero_fsb = imap.br_startoff + buf_len_fsb; 595 start_zero_fsb = imap.br_startoff + imap.br_blockcount;
607 ASSERT(start_zero_fsb <= (end_zero_fsb + 1)); 596 ASSERT(start_zero_fsb <= (end_zero_fsb + 1));
608 597
609 XFS_ILOCK(mp, io, XFS_ILOCK_EXCL|XFS_EXTSIZE_RD); 598 XFS_ILOCK(mp, io, XFS_ILOCK_EXCL|XFS_EXTSIZE_RD);