[PATCH] Remove readv/writev methods and use aio_read/aio_write instead
This patch removes readv() and writev() methods and replaces them with aio_read()/aio_write() methods. Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
027445c372
commit
ee0b3e671b
@@ -123,96 +123,6 @@ xfs_file_aio_write_invis(
|
||||
return __xfs_file_write(iocb, iov, nr_segs, IO_ISAIO|IO_INVIS, pos);
|
||||
}
|
||||
|
||||
STATIC inline ssize_t
|
||||
__xfs_file_readv(
|
||||
struct file *file,
|
||||
const struct iovec *iov,
|
||||
int ioflags,
|
||||
unsigned long nr_segs,
|
||||
loff_t *ppos)
|
||||
{
|
||||
struct inode *inode = file->f_mapping->host;
|
||||
bhv_vnode_t *vp = vn_from_inode(inode);
|
||||
struct kiocb kiocb;
|
||||
ssize_t rval;
|
||||
|
||||
init_sync_kiocb(&kiocb, file);
|
||||
kiocb.ki_pos = *ppos;
|
||||
|
||||
if (unlikely(file->f_flags & O_DIRECT))
|
||||
ioflags |= IO_ISDIRECT;
|
||||
rval = bhv_vop_read(vp, &kiocb, iov, nr_segs,
|
||||
&kiocb.ki_pos, ioflags, NULL);
|
||||
|
||||
*ppos = kiocb.ki_pos;
|
||||
return rval;
|
||||
}
|
||||
|
||||
STATIC ssize_t
|
||||
xfs_file_readv(
|
||||
struct file *file,
|
||||
const struct iovec *iov,
|
||||
unsigned long nr_segs,
|
||||
loff_t *ppos)
|
||||
{
|
||||
return __xfs_file_readv(file, iov, 0, nr_segs, ppos);
|
||||
}
|
||||
|
||||
STATIC ssize_t
|
||||
xfs_file_readv_invis(
|
||||
struct file *file,
|
||||
const struct iovec *iov,
|
||||
unsigned long nr_segs,
|
||||
loff_t *ppos)
|
||||
{
|
||||
return __xfs_file_readv(file, iov, IO_INVIS, nr_segs, ppos);
|
||||
}
|
||||
|
||||
STATIC inline ssize_t
|
||||
__xfs_file_writev(
|
||||
struct file *file,
|
||||
const struct iovec *iov,
|
||||
int ioflags,
|
||||
unsigned long nr_segs,
|
||||
loff_t *ppos)
|
||||
{
|
||||
struct inode *inode = file->f_mapping->host;
|
||||
bhv_vnode_t *vp = vn_from_inode(inode);
|
||||
struct kiocb kiocb;
|
||||
ssize_t rval;
|
||||
|
||||
init_sync_kiocb(&kiocb, file);
|
||||
kiocb.ki_pos = *ppos;
|
||||
if (unlikely(file->f_flags & O_DIRECT))
|
||||
ioflags |= IO_ISDIRECT;
|
||||
|
||||
rval = bhv_vop_write(vp, &kiocb, iov, nr_segs,
|
||||
&kiocb.ki_pos, ioflags, NULL);
|
||||
|
||||
*ppos = kiocb.ki_pos;
|
||||
return rval;
|
||||
}
|
||||
|
||||
STATIC ssize_t
|
||||
xfs_file_writev(
|
||||
struct file *file,
|
||||
const struct iovec *iov,
|
||||
unsigned long nr_segs,
|
||||
loff_t *ppos)
|
||||
{
|
||||
return __xfs_file_writev(file, iov, 0, nr_segs, ppos);
|
||||
}
|
||||
|
||||
STATIC ssize_t
|
||||
xfs_file_writev_invis(
|
||||
struct file *file,
|
||||
const struct iovec *iov,
|
||||
unsigned long nr_segs,
|
||||
loff_t *ppos)
|
||||
{
|
||||
return __xfs_file_writev(file, iov, IO_INVIS, nr_segs, ppos);
|
||||
}
|
||||
|
||||
STATIC ssize_t
|
||||
xfs_file_sendfile(
|
||||
struct file *filp,
|
||||
@@ -540,8 +450,6 @@ const struct file_operations xfs_file_operations = {
|
||||
.llseek = generic_file_llseek,
|
||||
.read = do_sync_read,
|
||||
.write = do_sync_write,
|
||||
.readv = xfs_file_readv,
|
||||
.writev = xfs_file_writev,
|
||||
.aio_read = xfs_file_aio_read,
|
||||
.aio_write = xfs_file_aio_write,
|
||||
.sendfile = xfs_file_sendfile,
|
||||
@@ -565,8 +473,6 @@ const struct file_operations xfs_invis_file_operations = {
|
||||
.llseek = generic_file_llseek,
|
||||
.read = do_sync_read,
|
||||
.write = do_sync_write,
|
||||
.readv = xfs_file_readv_invis,
|
||||
.writev = xfs_file_writev_invis,
|
||||
.aio_read = xfs_file_aio_read_invis,
|
||||
.aio_write = xfs_file_aio_write_invis,
|
||||
.sendfile = xfs_file_sendfile_invis,
|
||||
|
Reference in New Issue
Block a user