diff options
Diffstat (limited to 'fs/xfs/linux-2.6')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_file.c | 26 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_linux.h | 1 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_lrw.c | 44 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_lrw.h | 3 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_vnode.h | 6 |
5 files changed, 0 insertions, 80 deletions
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index cb51dc961355..8c43cd2e237a 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c | |||
@@ -124,30 +124,6 @@ xfs_file_aio_write_invis( | |||
124 | } | 124 | } |
125 | 125 | ||
126 | STATIC ssize_t | 126 | STATIC ssize_t |
127 | xfs_file_sendfile( | ||
128 | struct file *filp, | ||
129 | loff_t *pos, | ||
130 | size_t count, | ||
131 | read_actor_t actor, | ||
132 | void *target) | ||
133 | { | ||
134 | return bhv_vop_sendfile(vn_from_inode(filp->f_path.dentry->d_inode), | ||
135 | filp, pos, 0, count, actor, target, NULL); | ||
136 | } | ||
137 | |||
138 | STATIC ssize_t | ||
139 | xfs_file_sendfile_invis( | ||
140 | struct file *filp, | ||
141 | loff_t *pos, | ||
142 | size_t count, | ||
143 | read_actor_t actor, | ||
144 | void *target) | ||
145 | { | ||
146 | return bhv_vop_sendfile(vn_from_inode(filp->f_path.dentry->d_inode), | ||
147 | filp, pos, IO_INVIS, count, actor, target, NULL); | ||
148 | } | ||
149 | |||
150 | STATIC ssize_t | ||
151 | xfs_file_splice_read( | 127 | xfs_file_splice_read( |
152 | struct file *infilp, | 128 | struct file *infilp, |
153 | loff_t *ppos, | 129 | loff_t *ppos, |
@@ -452,7 +428,6 @@ const struct file_operations xfs_file_operations = { | |||
452 | .write = do_sync_write, | 428 | .write = do_sync_write, |
453 | .aio_read = xfs_file_aio_read, | 429 | .aio_read = xfs_file_aio_read, |
454 | .aio_write = xfs_file_aio_write, | 430 | .aio_write = xfs_file_aio_write, |
455 | .sendfile = xfs_file_sendfile, | ||
456 | .splice_read = xfs_file_splice_read, | 431 | .splice_read = xfs_file_splice_read, |
457 | .splice_write = xfs_file_splice_write, | 432 | .splice_write = xfs_file_splice_write, |
458 | .unlocked_ioctl = xfs_file_ioctl, | 433 | .unlocked_ioctl = xfs_file_ioctl, |
@@ -475,7 +450,6 @@ const struct file_operations xfs_invis_file_operations = { | |||
475 | .write = do_sync_write, | 450 | .write = do_sync_write, |
476 | .aio_read = xfs_file_aio_read_invis, | 451 | .aio_read = xfs_file_aio_read_invis, |
477 | .aio_write = xfs_file_aio_write_invis, | 452 | .aio_write = xfs_file_aio_write_invis, |
478 | .sendfile = xfs_file_sendfile_invis, | ||
479 | .splice_read = xfs_file_splice_read_invis, | 453 | .splice_read = xfs_file_splice_read_invis, |
480 | .splice_write = xfs_file_splice_write_invis, | 454 | .splice_write = xfs_file_splice_write_invis, |
481 | .unlocked_ioctl = xfs_file_ioctl_invis, | 455 | .unlocked_ioctl = xfs_file_ioctl_invis, |
diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h index 715adad7dd4d..af24a457d3a3 100644 --- a/fs/xfs/linux-2.6/xfs_linux.h +++ b/fs/xfs/linux-2.6/xfs_linux.h | |||
@@ -101,7 +101,6 @@ | |||
101 | * Feature macros (disable/enable) | 101 | * Feature macros (disable/enable) |
102 | */ | 102 | */ |
103 | #undef HAVE_REFCACHE /* reference cache not needed for NFS in 2.6 */ | 103 | #undef HAVE_REFCACHE /* reference cache not needed for NFS in 2.6 */ |
104 | #define HAVE_SENDFILE /* sendfile(2) exists in 2.6, but not in 2.4 */ | ||
105 | #define HAVE_SPLICE /* a splice(2) exists in 2.6, but not in 2.4 */ | 104 | #define HAVE_SPLICE /* a splice(2) exists in 2.6, but not in 2.4 */ |
106 | #ifdef CONFIG_SMP | 105 | #ifdef CONFIG_SMP |
107 | #define HAVE_PERCPU_SB /* per cpu superblock counters are a 2.6 feature */ | 106 | #define HAVE_PERCPU_SB /* per cpu superblock counters are a 2.6 feature */ |
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index ed90403f0ee7..765ec16a6e39 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c | |||
@@ -287,50 +287,6 @@ xfs_read( | |||
287 | } | 287 | } |
288 | 288 | ||
289 | ssize_t | 289 | ssize_t |
290 | xfs_sendfile( | ||
291 | bhv_desc_t *bdp, | ||
292 | struct file *filp, | ||
293 | loff_t *offset, | ||
294 | int ioflags, | ||
295 | size_t count, | ||
296 | read_actor_t actor, | ||
297 | void *target, | ||
298 | cred_t *credp) | ||
299 | { | ||
300 | xfs_inode_t *ip = XFS_BHVTOI(bdp); | ||
301 | xfs_mount_t *mp = ip->i_mount; | ||
302 | ssize_t ret; | ||
303 | |||
304 | XFS_STATS_INC(xs_read_calls); | ||
305 | if (XFS_FORCED_SHUTDOWN(mp)) | ||
306 | return -EIO; | ||
307 | |||
308 | xfs_ilock(ip, XFS_IOLOCK_SHARED); | ||
309 | |||
310 | if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_READ) && | ||
311 | (!(ioflags & IO_INVIS))) { | ||
312 | bhv_vrwlock_t locktype = VRWLOCK_READ; | ||
313 | int error; | ||
314 | |||
315 | error = XFS_SEND_DATA(mp, DM_EVENT_READ, BHV_TO_VNODE(bdp), | ||
316 | *offset, count, | ||
317 | FILP_DELAY_FLAG(filp), &locktype); | ||
318 | if (error) { | ||
319 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); | ||
320 | return -error; | ||
321 | } | ||
322 | } | ||
323 | xfs_rw_enter_trace(XFS_SENDFILE_ENTER, &ip->i_iocore, | ||
324 | (void *)(unsigned long)target, count, *offset, ioflags); | ||
325 | ret = generic_file_sendfile(filp, offset, count, actor, target); | ||
326 | if (ret > 0) | ||
327 | XFS_STATS_ADD(xs_read_bytes, ret); | ||
328 | |||
329 | xfs_iunlock(ip, XFS_IOLOCK_SHARED); | ||
330 | return ret; | ||
331 | } | ||
332 | |||
333 | ssize_t | ||
334 | xfs_splice_read( | 290 | xfs_splice_read( |
335 | bhv_desc_t *bdp, | 291 | bhv_desc_t *bdp, |
336 | struct file *infilp, | 292 | struct file *infilp, |
diff --git a/fs/xfs/linux-2.6/xfs_lrw.h b/fs/xfs/linux-2.6/xfs_lrw.h index 7ac51b1d2161..7c60a1eed88b 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.h +++ b/fs/xfs/linux-2.6/xfs_lrw.h | |||
@@ -90,9 +90,6 @@ extern ssize_t xfs_read(struct bhv_desc *, struct kiocb *, | |||
90 | extern ssize_t xfs_write(struct bhv_desc *, struct kiocb *, | 90 | extern ssize_t xfs_write(struct bhv_desc *, struct kiocb *, |
91 | const struct iovec *, unsigned int, | 91 | const struct iovec *, unsigned int, |
92 | loff_t *, int, struct cred *); | 92 | loff_t *, int, struct cred *); |
93 | extern ssize_t xfs_sendfile(struct bhv_desc *, struct file *, | ||
94 | loff_t *, int, size_t, read_actor_t, | ||
95 | void *, struct cred *); | ||
96 | extern ssize_t xfs_splice_read(struct bhv_desc *, struct file *, loff_t *, | 93 | extern ssize_t xfs_splice_read(struct bhv_desc *, struct file *, loff_t *, |
97 | struct pipe_inode_info *, size_t, int, int, | 94 | struct pipe_inode_info *, size_t, int, int, |
98 | struct cred *); | 95 | struct cred *); |
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h index d1b2d01843d1..013048a92643 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.h +++ b/fs/xfs/linux-2.6/xfs_vnode.h | |||
@@ -139,9 +139,6 @@ typedef ssize_t (*vop_read_t)(bhv_desc_t *, struct kiocb *, | |||
139 | typedef ssize_t (*vop_write_t)(bhv_desc_t *, struct kiocb *, | 139 | typedef ssize_t (*vop_write_t)(bhv_desc_t *, struct kiocb *, |
140 | const struct iovec *, unsigned int, | 140 | const struct iovec *, unsigned int, |
141 | loff_t *, int, struct cred *); | 141 | loff_t *, int, struct cred *); |
142 | typedef ssize_t (*vop_sendfile_t)(bhv_desc_t *, struct file *, | ||
143 | loff_t *, int, size_t, read_actor_t, | ||
144 | void *, struct cred *); | ||
145 | typedef ssize_t (*vop_splice_read_t)(bhv_desc_t *, struct file *, loff_t *, | 142 | typedef ssize_t (*vop_splice_read_t)(bhv_desc_t *, struct file *, loff_t *, |
146 | struct pipe_inode_info *, size_t, int, int, | 143 | struct pipe_inode_info *, size_t, int, int, |
147 | struct cred *); | 144 | struct cred *); |
@@ -206,7 +203,6 @@ typedef struct bhv_vnodeops { | |||
206 | vop_close_t vop_close; | 203 | vop_close_t vop_close; |
207 | vop_read_t vop_read; | 204 | vop_read_t vop_read; |
208 | vop_write_t vop_write; | 205 | vop_write_t vop_write; |
209 | vop_sendfile_t vop_sendfile; | ||
210 | vop_splice_read_t vop_splice_read; | 206 | vop_splice_read_t vop_splice_read; |
211 | vop_splice_write_t vop_splice_write; | 207 | vop_splice_write_t vop_splice_write; |
212 | vop_ioctl_t vop_ioctl; | 208 | vop_ioctl_t vop_ioctl; |
@@ -254,8 +250,6 @@ typedef struct bhv_vnodeops { | |||
254 | VOP(vop_read, vp)(VNHEAD(vp),file,iov,segs,offset,ioflags,cr) | 250 | VOP(vop_read, vp)(VNHEAD(vp),file,iov,segs,offset,ioflags,cr) |
255 | #define bhv_vop_write(vp,file,iov,segs,offset,ioflags,cr) \ | 251 | #define bhv_vop_write(vp,file,iov,segs,offset,ioflags,cr) \ |
256 | VOP(vop_write, vp)(VNHEAD(vp),file,iov,segs,offset,ioflags,cr) | 252 | VOP(vop_write, vp)(VNHEAD(vp),file,iov,segs,offset,ioflags,cr) |
257 | #define bhv_vop_sendfile(vp,f,off,ioflags,cnt,act,targ,cr) \ | ||
258 | VOP(vop_sendfile, vp)(VNHEAD(vp),f,off,ioflags,cnt,act,targ,cr) | ||
259 | #define bhv_vop_splice_read(vp,f,o,pipe,cnt,fl,iofl,cr) \ | 253 | #define bhv_vop_splice_read(vp,f,o,pipe,cnt,fl,iofl,cr) \ |
260 | VOP(vop_splice_read, vp)(VNHEAD(vp),f,o,pipe,cnt,fl,iofl,cr) | 254 | VOP(vop_splice_read, vp)(VNHEAD(vp),f,o,pipe,cnt,fl,iofl,cr) |
261 | #define bhv_vop_splice_write(vp,f,o,pipe,cnt,fl,iofl,cr) \ | 255 | #define bhv_vop_splice_write(vp,f,o,pipe,cnt,fl,iofl,cr) \ |