diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_sync.c')
| -rw-r--r-- | fs/xfs/linux-2.6/xfs_sync.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c index c91d5b2a568e..7eb9d9cca52a 100644 --- a/fs/xfs/linux-2.6/xfs_sync.c +++ b/fs/xfs/linux-2.6/xfs_sync.c | |||
| @@ -385,7 +385,7 @@ xfs_quiesce_fs( | |||
| 385 | int count = 0, pincount; | 385 | int count = 0, pincount; |
| 386 | 386 | ||
| 387 | xfs_flush_buftarg(mp->m_ddev_targp, 0); | 387 | xfs_flush_buftarg(mp->m_ddev_targp, 0); |
| 388 | xfs_reclaim_inodes(mp, 0, XFS_IFLUSH_DELWRI_ELSE_ASYNC); | 388 | xfs_reclaim_inodes(mp, XFS_IFLUSH_DELWRI_ELSE_ASYNC); |
| 389 | 389 | ||
| 390 | /* | 390 | /* |
| 391 | * This loop must run at least twice. The first instance of the loop | 391 | * This loop must run at least twice. The first instance of the loop |
| @@ -509,7 +509,7 @@ xfs_sync_worker( | |||
| 509 | 509 | ||
| 510 | if (!(mp->m_flags & XFS_MOUNT_RDONLY)) { | 510 | if (!(mp->m_flags & XFS_MOUNT_RDONLY)) { |
| 511 | xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE); | 511 | xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE); |
| 512 | xfs_reclaim_inodes(mp, 0, XFS_IFLUSH_DELWRI_ELSE_ASYNC); | 512 | xfs_reclaim_inodes(mp, XFS_IFLUSH_DELWRI_ELSE_ASYNC); |
| 513 | /* dgc: errors ignored here */ | 513 | /* dgc: errors ignored here */ |
| 514 | error = xfs_qm_sync(mp, SYNC_BDFLUSH); | 514 | error = xfs_qm_sync(mp, SYNC_BDFLUSH); |
| 515 | error = xfs_sync_fsdata(mp, SYNC_BDFLUSH); | 515 | error = xfs_sync_fsdata(mp, SYNC_BDFLUSH); |
| @@ -703,7 +703,6 @@ STATIC void | |||
| 703 | xfs_reclaim_inodes_ag( | 703 | xfs_reclaim_inodes_ag( |
| 704 | xfs_mount_t *mp, | 704 | xfs_mount_t *mp, |
| 705 | int ag, | 705 | int ag, |
| 706 | int noblock, | ||
| 707 | int mode) | 706 | int mode) |
| 708 | { | 707 | { |
| 709 | xfs_inode_t *ip = NULL; | 708 | xfs_inode_t *ip = NULL; |
| @@ -749,25 +748,13 @@ restart: | |||
| 749 | continue; | 748 | continue; |
| 750 | } | 749 | } |
| 751 | 750 | ||
| 752 | if (noblock) { | ||
| 753 | if (!xfs_ilock_nowait(ip, XFS_ILOCK_EXCL)) { | ||
| 754 | read_unlock(&pag->pag_ici_lock); | ||
| 755 | continue; | ||
| 756 | } | ||
| 757 | if (xfs_ipincount(ip) || | ||
| 758 | !xfs_iflock_nowait(ip)) { | ||
| 759 | xfs_iunlock(ip, XFS_ILOCK_EXCL); | ||
| 760 | read_unlock(&pag->pag_ici_lock); | ||
| 761 | continue; | ||
| 762 | } | ||
| 763 | } | ||
| 764 | read_unlock(&pag->pag_ici_lock); | 751 | read_unlock(&pag->pag_ici_lock); |
| 765 | 752 | ||
| 766 | /* | 753 | /* |
| 767 | * hmmm - this is an inode already in reclaim. Do | 754 | * hmmm - this is an inode already in reclaim. Do |
| 768 | * we even bother catching it here? | 755 | * we even bother catching it here? |
| 769 | */ | 756 | */ |
| 770 | if (xfs_reclaim_inode(ip, noblock, mode)) | 757 | if (xfs_reclaim_inode(ip, 0, mode)) |
| 771 | skipped++; | 758 | skipped++; |
| 772 | } while (nr_found); | 759 | } while (nr_found); |
| 773 | 760 | ||
| @@ -782,7 +769,6 @@ restart: | |||
| 782 | int | 769 | int |
| 783 | xfs_reclaim_inodes( | 770 | xfs_reclaim_inodes( |
| 784 | xfs_mount_t *mp, | 771 | xfs_mount_t *mp, |
| 785 | int noblock, | ||
| 786 | int mode) | 772 | int mode) |
| 787 | { | 773 | { |
| 788 | int i; | 774 | int i; |
| @@ -790,7 +776,7 @@ xfs_reclaim_inodes( | |||
| 790 | for (i = 0; i < mp->m_sb.sb_agcount; i++) { | 776 | for (i = 0; i < mp->m_sb.sb_agcount; i++) { |
| 791 | if (!mp->m_perag[i].pag_ici_init) | 777 | if (!mp->m_perag[i].pag_ici_init) |
| 792 | continue; | 778 | continue; |
| 793 | xfs_reclaim_inodes_ag(mp, i, noblock, mode); | 779 | xfs_reclaim_inodes_ag(mp, i, mode); |
| 794 | } | 780 | } |
| 795 | return 0; | 781 | return 0; |
| 796 | } | 782 | } |
