diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-01-13 17:17:56 -0500 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-01-15 16:35:17 -0500 |
commit | 4e23471a3f3aba885ea70100db47ccacb5f069f6 (patch) | |
tree | 976d7943087e8f49fada9204b6914c84b3c25a31 /fs/xfs/linux-2.6/xfs_lrw.c | |
parent | 64e0bc7d2a6609ad265757a600e2a0d93c8adb47 (diff) |
xfs: move more buffer helpers into xfs_buf.c
Move xfsbdstrat and xfs_bdstrat_cb from xfs_lrw.c and xfs_bioerror
and xfs_bioerror_relse from xfs_rw.c into xfs_buf.c. This also
means xfs_bioerror and xfs_bioerror_relse can be marked static now.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_lrw.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_lrw.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index 0d32457abef1..c80fa00d2ad7 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c | |||
@@ -784,53 +784,6 @@ write_retry: | |||
784 | } | 784 | } |
785 | 785 | ||
786 | /* | 786 | /* |
787 | * All xfs metadata buffers except log state machine buffers | ||
788 | * get this attached as their b_bdstrat callback function. | ||
789 | * This is so that we can catch a buffer | ||
790 | * after prematurely unpinning it to forcibly shutdown the filesystem. | ||
791 | */ | ||
792 | int | ||
793 | xfs_bdstrat_cb(struct xfs_buf *bp) | ||
794 | { | ||
795 | if (XFS_FORCED_SHUTDOWN(bp->b_mount)) { | ||
796 | trace_xfs_bdstrat_shut(bp, _RET_IP_); | ||
797 | /* | ||
798 | * Metadata write that didn't get logged but | ||
799 | * written delayed anyway. These aren't associated | ||
800 | * with a transaction, and can be ignored. | ||
801 | */ | ||
802 | if (XFS_BUF_IODONE_FUNC(bp) == NULL && | ||
803 | (XFS_BUF_ISREAD(bp)) == 0) | ||
804 | return (xfs_bioerror_relse(bp)); | ||
805 | else | ||
806 | return (xfs_bioerror(bp)); | ||
807 | } | ||
808 | |||
809 | xfs_buf_iorequest(bp); | ||
810 | return 0; | ||
811 | } | ||
812 | |||
813 | /* | ||
814 | * Wrapper around bdstrat so that we can stop data from going to disk in case | ||
815 | * we are shutting down the filesystem. Typically user data goes thru this | ||
816 | * path; one of the exceptions is the superblock. | ||
817 | */ | ||
818 | void | ||
819 | xfsbdstrat( | ||
820 | struct xfs_mount *mp, | ||
821 | struct xfs_buf *bp) | ||
822 | { | ||
823 | ASSERT(mp); | ||
824 | if (!XFS_FORCED_SHUTDOWN(mp)) { | ||
825 | xfs_buf_iorequest(bp); | ||
826 | return; | ||
827 | } | ||
828 | |||
829 | trace_xfs_bdstrat_shut(bp, _RET_IP_); | ||
830 | xfs_bioerror_relse(bp); | ||
831 | } | ||
832 | |||
833 | /* | ||
834 | * If the underlying (data/log/rt) device is readonly, there are some | 787 | * If the underlying (data/log/rt) device is readonly, there are some |
835 | * operations that cannot proceed. | 788 | * operations that cannot proceed. |
836 | */ | 789 | */ |