diff options
author | Christoph Hellwig <hch@infradead.org> | 2007-09-14 01:23:31 -0400 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-07 00:43:44 -0500 |
commit | 7642861b7eeaddfc82d762b3342044c809c3f77e (patch) | |
tree | badaaae721ab515df925b0b6eddf610e6678542e /fs/xfs/xfs_iomap.c | |
parent | 6214ed4461f1ad8aeec41857c73d58afb31be335 (diff) |
[XFS] kill BMAPI_UNWRITTEN
There is no reason to go through xfs_iomap for the BMAPI_UNWRITTEN because
it has nothing in common with the other cases. Instead check for the
shutdown filesystem in xfs_end_bio_unwritten and perform a direct call to
xfs_iomap_write_unwritten (which should be renamed to something more
sensible one day)
SGI-PV: 970241
SGI-Modid: xfs-linux-melb:xfs-kern:29681a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_iomap.c')
-rw-r--r-- | fs/xfs/xfs_iomap.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index 58cda06a1846..21ca62880514 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c | |||
@@ -191,9 +191,7 @@ xfs_iomap( | |||
191 | if (XFS_FORCED_SHUTDOWN(mp)) | 191 | if (XFS_FORCED_SHUTDOWN(mp)) |
192 | return XFS_ERROR(EIO); | 192 | return XFS_ERROR(EIO); |
193 | 193 | ||
194 | switch (flags & | 194 | switch (flags & (BMAPI_READ | BMAPI_WRITE | BMAPI_ALLOCATE)) { |
195 | (BMAPI_READ | BMAPI_WRITE | BMAPI_ALLOCATE | | ||
196 | BMAPI_UNWRITTEN)) { | ||
197 | case BMAPI_READ: | 195 | case BMAPI_READ: |
198 | xfs_iomap_enter_trace(XFS_IOMAP_READ_ENTER, io, offset, count); | 196 | xfs_iomap_enter_trace(XFS_IOMAP_READ_ENTER, io, offset, count); |
199 | lockmode = XFS_LCK_MAP_SHARED(mp, io); | 197 | lockmode = XFS_LCK_MAP_SHARED(mp, io); |
@@ -218,8 +216,6 @@ xfs_iomap( | |||
218 | XFS_ILOCK(mp, io, lockmode); | 216 | XFS_ILOCK(mp, io, lockmode); |
219 | } | 217 | } |
220 | break; | 218 | break; |
221 | case BMAPI_UNWRITTEN: | ||
222 | goto phase2; | ||
223 | default: | 219 | default: |
224 | BUG(); | 220 | BUG(); |
225 | } | 221 | } |
@@ -238,8 +234,7 @@ xfs_iomap( | |||
238 | if (error) | 234 | if (error) |
239 | goto out; | 235 | goto out; |
240 | 236 | ||
241 | phase2: | 237 | switch (flags & (BMAPI_WRITE|BMAPI_ALLOCATE)) { |
242 | switch (flags & (BMAPI_WRITE|BMAPI_ALLOCATE|BMAPI_UNWRITTEN)) { | ||
243 | case BMAPI_WRITE: | 238 | case BMAPI_WRITE: |
244 | /* If we found an extent, return it */ | 239 | /* If we found an extent, return it */ |
245 | if (nimaps && | 240 | if (nimaps && |
@@ -277,11 +272,6 @@ phase2: | |||
277 | error = XFS_IOMAP_WRITE_ALLOCATE(mp, io, offset, count, | 272 | error = XFS_IOMAP_WRITE_ALLOCATE(mp, io, offset, count, |
278 | &imap, &nimaps); | 273 | &imap, &nimaps); |
279 | break; | 274 | break; |
280 | case BMAPI_UNWRITTEN: | ||
281 | lockmode = 0; | ||
282 | error = XFS_IOMAP_WRITE_UNWRITTEN(mp, io, offset, count); | ||
283 | nimaps = 0; | ||
284 | break; | ||
285 | } | 275 | } |
286 | 276 | ||
287 | if (nimaps) { | 277 | if (nimaps) { |