diff options
author | David Chinner <david@fromorbit.com> | 2008-10-30 02:38:26 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@sgi.com> | 2008-10-30 02:38:26 -0400 |
commit | 82fa9012458d867936d7bf130e6e14bdebc6873c (patch) | |
tree | e2d8d7aa9a30c55b7d314df7406f1c47832340d7 /fs/xfs/linux-2.6/xfs_super.c | |
parent | a7444053fb3ebd3d905e3c7a7bd5ea80a54b083a (diff) |
[XFS] Allocate the struct xfs_ail
Rather than embedding the struct xfs_ail in the struct xfs_mount, allocate
it during AIL initialisation. Add a back pointer to the struct xfs_ail so
that we can pass around the xfs_ail and still be able to access the
xfs_mount if need be. This is th first step involved in isolating the AIL
implementation from the surrounding filesystem code.
SGI-PV: 988143
SGI-Modid: xfs-linux-melb:xfs-kern:32346a
Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_super.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 206a949e3870..655508ce2b73 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -814,18 +814,18 @@ xfs_setup_devices( | |||
814 | */ | 814 | */ |
815 | void | 815 | void |
816 | xfsaild_wakeup( | 816 | xfsaild_wakeup( |
817 | xfs_mount_t *mp, | 817 | struct xfs_ail *ailp, |
818 | xfs_lsn_t threshold_lsn) | 818 | xfs_lsn_t threshold_lsn) |
819 | { | 819 | { |
820 | mp->m_ail.xa_target = threshold_lsn; | 820 | ailp->xa_target = threshold_lsn; |
821 | wake_up_process(mp->m_ail.xa_task); | 821 | wake_up_process(ailp->xa_task); |
822 | } | 822 | } |
823 | 823 | ||
824 | int | 824 | int |
825 | xfsaild( | 825 | xfsaild( |
826 | void *data) | 826 | void *data) |
827 | { | 827 | { |
828 | xfs_mount_t *mp = (xfs_mount_t *)data; | 828 | struct xfs_ail *ailp = data; |
829 | xfs_lsn_t last_pushed_lsn = 0; | 829 | xfs_lsn_t last_pushed_lsn = 0; |
830 | long tout = 0; | 830 | long tout = 0; |
831 | 831 | ||
@@ -837,11 +837,11 @@ xfsaild( | |||
837 | /* swsusp */ | 837 | /* swsusp */ |
838 | try_to_freeze(); | 838 | try_to_freeze(); |
839 | 839 | ||
840 | ASSERT(mp->m_log); | 840 | ASSERT(ailp->xa_mount->m_log); |
841 | if (XFS_FORCED_SHUTDOWN(mp)) | 841 | if (XFS_FORCED_SHUTDOWN(ailp->xa_mount)) |
842 | continue; | 842 | continue; |
843 | 843 | ||
844 | tout = xfsaild_push(mp, &last_pushed_lsn); | 844 | tout = xfsaild_push(ailp, &last_pushed_lsn); |
845 | } | 845 | } |
846 | 846 | ||
847 | return 0; | 847 | return 0; |
@@ -849,20 +849,20 @@ xfsaild( | |||
849 | 849 | ||
850 | int | 850 | int |
851 | xfsaild_start( | 851 | xfsaild_start( |
852 | xfs_mount_t *mp) | 852 | struct xfs_ail *ailp) |
853 | { | 853 | { |
854 | mp->m_ail.xa_target = 0; | 854 | ailp->xa_target = 0; |
855 | mp->m_ail.xa_task = kthread_run(xfsaild, mp, "xfsaild"); | 855 | ailp->xa_task = kthread_run(xfsaild, ailp, "xfsaild"); |
856 | if (IS_ERR(mp->m_ail.xa_task)) | 856 | if (IS_ERR(ailp->xa_task)) |
857 | return -PTR_ERR(mp->m_ail.xa_task); | 857 | return -PTR_ERR(ailp->xa_task); |
858 | return 0; | 858 | return 0; |
859 | } | 859 | } |
860 | 860 | ||
861 | void | 861 | void |
862 | xfsaild_stop( | 862 | xfsaild_stop( |
863 | xfs_mount_t *mp) | 863 | struct xfs_ail *ailp) |
864 | { | 864 | { |
865 | kthread_stop(mp->m_ail.xa_task); | 865 | kthread_stop(ailp->xa_task); |
866 | } | 866 | } |
867 | 867 | ||
868 | 868 | ||