diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-02-15 04:44:46 -0500 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-03-01 17:34:18 -0500 |
commit | dda35b8f84d209784041bbad47f9e195a08a7527 (patch) | |
tree | d132d40c3f0646e74ab29ffd45f771f8b87a5883 /fs/xfs/xfs_mount.c | |
parent | b262e5dfd9ddd2f6d0ef3fa53eb88690f22134a5 (diff) |
xfs: merge xfs_lrw.c into xfs_file.c
Currently the code to implement the file operations is split over
two small files. Merge the content of xfs_lrw.c into xfs_file.c to
have it in one place. Note that I haven't done various cleanups
that are possible after this yet, they will follow in the next
patch. Also the function xfs_dev_is_read_only which was in
xfs_lrw.c before really doesn't fit in here at all and was moved to
xfs_mount.c.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r-- | fs/xfs/xfs_mount.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 6afaaeb2950a..c207fef6770b 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -2052,6 +2052,26 @@ xfs_mount_log_sb( | |||
2052 | return error; | 2052 | return error; |
2053 | } | 2053 | } |
2054 | 2054 | ||
2055 | /* | ||
2056 | * If the underlying (data/log/rt) device is readonly, there are some | ||
2057 | * operations that cannot proceed. | ||
2058 | */ | ||
2059 | int | ||
2060 | xfs_dev_is_read_only( | ||
2061 | struct xfs_mount *mp, | ||
2062 | char *message) | ||
2063 | { | ||
2064 | if (xfs_readonly_buftarg(mp->m_ddev_targp) || | ||
2065 | xfs_readonly_buftarg(mp->m_logdev_targp) || | ||
2066 | (mp->m_rtdev_targp && xfs_readonly_buftarg(mp->m_rtdev_targp))) { | ||
2067 | cmn_err(CE_NOTE, | ||
2068 | "XFS: %s required on read-only device.", message); | ||
2069 | cmn_err(CE_NOTE, | ||
2070 | "XFS: write access unavailable, cannot proceed."); | ||
2071 | return EROFS; | ||
2072 | } | ||
2073 | return 0; | ||
2074 | } | ||
2055 | 2075 | ||
2056 | #ifdef HAVE_PERCPU_SB | 2076 | #ifdef HAVE_PERCPU_SB |
2057 | /* | 2077 | /* |