[XFS] kill BMAPI_DEVICE

There is no reason to go into the iomap machinery just to get the right
block device for an inode. Instead look at the realtime flag in the inode
and grab the right device from the mount structure.

I created a new helper, xfs_find_bdev_for_inode instead of opencoding it
because I plan to use it in other places in the future.

SGI-PV: 970240
SGI-Modid: xfs-linux-melb:xfs-kern:29680a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
This commit is contained in:
Christoph Hellwig
2007-09-14 15:23:17 +10:00
committed by Lachlan McIlroy
parent cf441eeb79
commit 6214ed4461
3 changed files with 17 additions and 20 deletions

View File

@@ -193,7 +193,7 @@ xfs_iomap(
switch (flags &
(BMAPI_READ | BMAPI_WRITE | BMAPI_ALLOCATE |
BMAPI_UNWRITTEN | BMAPI_DEVICE)) {
BMAPI_UNWRITTEN)) {
case BMAPI_READ:
xfs_iomap_enter_trace(XFS_IOMAP_READ_ENTER, io, offset, count);
lockmode = XFS_LCK_MAP_SHARED(mp, io);
@@ -220,13 +220,6 @@ xfs_iomap(
break;
case BMAPI_UNWRITTEN:
goto phase2;
case BMAPI_DEVICE:
lockmode = XFS_LCK_MAP_SHARED(mp, io);
iomapp->iomap_target = io->io_flags & XFS_IOCORE_RT ?
mp->m_rtdev_targp : mp->m_ddev_targp;
error = 0;
*niomaps = 1;
goto out;
default:
BUG();
}