diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_sync.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_sync.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c index 34413ceaea9f..9e7f4dccab72 100644 --- a/fs/xfs/linux-2.6/xfs_sync.c +++ b/fs/xfs/linux-2.6/xfs_sync.c | |||
@@ -644,6 +644,47 @@ xfs_reclaim_inode( | |||
644 | return 0; | 644 | return 0; |
645 | } | 645 | } |
646 | 646 | ||
647 | void | ||
648 | xfs_inode_set_reclaim_tag( | ||
649 | xfs_inode_t *ip) | ||
650 | { | ||
651 | xfs_mount_t *mp = ip->i_mount; | ||
652 | xfs_perag_t *pag = xfs_get_perag(mp, ip->i_ino); | ||
653 | |||
654 | read_lock(&pag->pag_ici_lock); | ||
655 | spin_lock(&ip->i_flags_lock); | ||
656 | radix_tree_tag_set(&pag->pag_ici_root, | ||
657 | XFS_INO_TO_AGINO(mp, ip->i_ino), XFS_ICI_RECLAIM_TAG); | ||
658 | spin_unlock(&ip->i_flags_lock); | ||
659 | read_unlock(&pag->pag_ici_lock); | ||
660 | xfs_put_perag(mp, pag); | ||
661 | } | ||
662 | |||
663 | void | ||
664 | __xfs_inode_clear_reclaim_tag( | ||
665 | xfs_mount_t *mp, | ||
666 | xfs_perag_t *pag, | ||
667 | xfs_inode_t *ip) | ||
668 | { | ||
669 | radix_tree_tag_clear(&pag->pag_ici_root, | ||
670 | XFS_INO_TO_AGINO(mp, ip->i_ino), XFS_ICI_RECLAIM_TAG); | ||
671 | } | ||
672 | |||
673 | void | ||
674 | xfs_inode_clear_reclaim_tag( | ||
675 | xfs_inode_t *ip) | ||
676 | { | ||
677 | xfs_mount_t *mp = ip->i_mount; | ||
678 | xfs_perag_t *pag = xfs_get_perag(mp, ip->i_ino); | ||
679 | |||
680 | read_lock(&pag->pag_ici_lock); | ||
681 | spin_lock(&ip->i_flags_lock); | ||
682 | __xfs_inode_clear_reclaim_tag(mp, pag, ip); | ||
683 | spin_unlock(&ip->i_flags_lock); | ||
684 | read_unlock(&pag->pag_ici_lock); | ||
685 | xfs_put_perag(mp, pag); | ||
686 | } | ||
687 | |||
647 | int | 688 | int |
648 | xfs_reclaim_inodes( | 689 | xfs_reclaim_inodes( |
649 | xfs_mount_t *mp, | 690 | xfs_mount_t *mp, |