Commit 3527705e authored by Nathan Scott's avatar Nathan Scott

[XFS] Remove the one remaining, broken use of XFS_WRITEIO_LOG and

sanitize direct IO map blocks call.

SGI Modid: xfs-linux:xfs-kern:173562a
Signed-off-by: nathans@sgi.com
parent aa1e420a
...@@ -172,28 +172,15 @@ xfs_map_blocks( ...@@ -172,28 +172,15 @@ xfs_map_blocks(
struct inode *inode, struct inode *inode,
loff_t offset, loff_t offset,
ssize_t count, ssize_t count,
xfs_iomap_t *iomapp, xfs_iomap_t *mapp,
int flags) int flags)
{ {
vnode_t *vp = LINVFS_GET_VP(inode); vnode_t *vp = LINVFS_GET_VP(inode);
int error, niomaps = 1; int error, nmaps = 1;
if (((flags & (BMAPI_DIRECT|BMAPI_SYNC)) == BMAPI_DIRECT) && VOP_BMAP(vp, offset, count, flags, mapp, &nmaps, error);
(offset >= i_size_read(inode))) if (!error && (flags & (BMAPI_WRITE|BMAPI_ALLOCATE)))
count = max_t(ssize_t, count, XFS_WRITE_IO_LOG);
retry:
VOP_BMAP(vp, offset, count, flags, iomapp, &niomaps, error);
if ((error == EAGAIN) || (error == EIO))
return -error;
if (unlikely((flags & (BMAPI_WRITE|BMAPI_DIRECT)) ==
(BMAPI_WRITE|BMAPI_DIRECT) && niomaps &&
(iomapp->iomap_flags & IOMAP_DELAY))) {
flags = BMAPI_ALLOCATE;
goto retry;
}
if (flags & (BMAPI_WRITE|BMAPI_ALLOCATE)) {
VMODIFY(vp); VMODIFY(vp);
}
return -error; return -error;
} }
......
/* /*
* Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as * under the terms of version 2 of the GNU General Public License as
...@@ -424,10 +424,6 @@ typedef struct xfs_mount { ...@@ -424,10 +424,6 @@ typedef struct xfs_mount {
*/ */
#define XFS_READIO_LOG_LARGE 16 #define XFS_READIO_LOG_LARGE 16
#define XFS_WRITEIO_LOG_LARGE 16 #define XFS_WRITEIO_LOG_LARGE 16
/*
* Default allocation size
*/
#define XFS_WRITE_IO_LOG 16
/* /*
* Max and min values for UIO and mount-option defined I/O sizes; * Max and min values for UIO and mount-option defined I/O sizes;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment