aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorBadari Pulavarty <pbadari@us.ibm.com>2006-10-01 02:28:47 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 03:39:28 -0400
commitee0b3e671baff681d69fbf0db33b47603c0a8280 (patch)
tree3202ff815b2196c6c353bc5b28d7a2800df273ec /fs/xfs
parent027445c37282bc1ed26add45e573ad2d3e4860a5 (diff)
[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>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/linux-2.6/xfs_file.c94
1 files changed, 0 insertions, 94 deletions
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c
index 4737971c6a39..d93d8dd1958d 100644
--- a/fs/xfs/linux-2.6/xfs_file.c
+++ b/fs/xfs/linux-2.6/xfs_file.c
@@ -123,96 +123,6 @@ xfs_file_aio_write_invis(
123 return __xfs_file_write(iocb, iov, nr_segs, IO_ISAIO|IO_INVIS, pos); 123 return __xfs_file_write(iocb, iov, nr_segs, IO_ISAIO|IO_INVIS, pos);
124} 124}
125 125
126STATIC inline ssize_t
127__xfs_file_readv(
128 struct file *file,
129 const struct iovec *iov,
130 int ioflags,
131 unsigned long nr_segs,
132 loff_t *ppos)
133{
134 struct inode *inode = file->f_mapping->host;
135 bhv_vnode_t *vp = vn_from_inode(inode);
136 struct kiocb kiocb;
137 ssize_t rval;
138
139 init_sync_kiocb(&kiocb, file);
140 kiocb.ki_pos = *ppos;
141
142 if (unlikely(file->f_flags & O_DIRECT))
143 ioflags |= IO_ISDIRECT;
144 rval = bhv_vop_read(vp, &kiocb, iov, nr_segs,
145 &kiocb.ki_pos, ioflags, NULL);
146
147 *ppos = kiocb.ki_pos;
148 return rval;
149}
150
151STATIC ssize_t
152xfs_file_readv(
153 struct file *file,
154 const struct iovec *iov,
155 unsigned long nr_segs,
156 loff_t *ppos)
157{
158 return __xfs_file_readv(file, iov, 0, nr_segs, ppos);
159}
160
161STATIC ssize_t
162xfs_file_readv_invis(
163 struct file *file,
164 const struct iovec *iov,
165 unsigned long nr_segs,
166 loff_t *ppos)
167{
168 return __xfs_file_readv(file, iov, IO_INVIS, nr_segs, ppos);
169}
170
171STATIC inline ssize_t
172__xfs_file_writev(
173 struct file *file,
174 const struct iovec *iov,
175 int ioflags,
176 unsigned long nr_segs,
177 loff_t *ppos)
178{
179 struct inode *inode = file->f_mapping->host;
180 bhv_vnode_t *vp = vn_from_inode(inode);
181 struct kiocb kiocb;
182 ssize_t rval;
183
184 init_sync_kiocb(&kiocb, file);
185 kiocb.ki_pos = *ppos;
186 if (unlikely(file->f_flags & O_DIRECT))
187 ioflags |= IO_ISDIRECT;
188
189 rval = bhv_vop_write(vp, &kiocb, iov, nr_segs,
190 &kiocb.ki_pos, ioflags, NULL);
191
192 *ppos = kiocb.ki_pos;
193 return rval;
194}
195
196STATIC ssize_t
197xfs_file_writev(
198 struct file *file,
199 const struct iovec *iov,
200 unsigned long nr_segs,
201 loff_t *ppos)
202{
203 return __xfs_file_writev(file, iov, 0, nr_segs, ppos);
204}
205
206STATIC ssize_t
207xfs_file_writev_invis(
208 struct file *file,
209 const struct iovec *iov,
210 unsigned long nr_segs,
211 loff_t *ppos)
212{
213 return __xfs_file_writev(file, iov, IO_INVIS, nr_segs, ppos);
214}
215
216STATIC ssize_t 126STATIC ssize_t
217xfs_file_sendfile( 127xfs_file_sendfile(
218 struct file *filp, 128 struct file *filp,
@@ -540,8 +450,6 @@ const struct file_operations xfs_file_operations = {
540 .llseek = generic_file_llseek, 450 .llseek = generic_file_llseek,
541 .read = do_sync_read, 451 .read = do_sync_read,
542 .write = do_sync_write, 452 .write = do_sync_write,
543 .readv = xfs_file_readv,
544 .writev = xfs_file_writev,
545 .aio_read = xfs_file_aio_read, 453 .aio_read = xfs_file_aio_read,
546 .aio_write = xfs_file_aio_write, 454 .aio_write = xfs_file_aio_write,
547 .sendfile = xfs_file_sendfile, 455 .sendfile = xfs_file_sendfile,
@@ -565,8 +473,6 @@ const struct file_operations xfs_invis_file_operations = {
565 .llseek = generic_file_llseek, 473 .llseek = generic_file_llseek,
566 .read = do_sync_read, 474 .read = do_sync_read,
567 .write = do_sync_write, 475 .write = do_sync_write,
568 .readv = xfs_file_readv_invis,
569 .writev = xfs_file_writev_invis,
570 .aio_read = xfs_file_aio_read_invis, 476 .aio_read = xfs_file_aio_read_invis,
571 .aio_write = xfs_file_aio_write_invis, 477 .aio_write = xfs_file_aio_write_invis,
572 .sendfile = xfs_file_sendfile_invis, 478 .sendfile = xfs_file_sendfile_invis,