sendfile: remove .sendfile from filesystems that use generic_file_sendfile()
[deliverable/linux.git] / fs / xfs / linux-2.6 / xfs_lrw.h
CommitLineData
1da177e4 1/*
7b718769
NS
2 * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
1da177e4 4 *
7b718769
NS
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
1da177e4
LT
7 * published by the Free Software Foundation.
8 *
7b718769
NS
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
1da177e4 13 *
7b718769
NS
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1da177e4
LT
17 */
18#ifndef __XFS_LRW_H__
19#define __XFS_LRW_H__
20
1da177e4 21struct bhv_desc;
67fcaa73 22struct bhv_vnode;
1da177e4
LT
23struct xfs_mount;
24struct xfs_iocore;
25struct xfs_inode;
26struct xfs_bmbt_irec;
27struct xfs_buf;
28struct xfs_iomap;
29
30#if defined(XFS_RW_TRACE)
31/*
32 * Defines for the trace mechanisms in xfs_lrw.c.
33 */
34#define XFS_RW_KTRACE_SIZE 128
35
36#define XFS_READ_ENTER 1
37#define XFS_WRITE_ENTER 2
38#define XFS_IOMAP_READ_ENTER 3
39#define XFS_IOMAP_WRITE_ENTER 4
40#define XFS_IOMAP_READ_MAP 5
41#define XFS_IOMAP_WRITE_MAP 6
42#define XFS_IOMAP_WRITE_NOSPACE 7
43#define XFS_ITRUNC_START 8
44#define XFS_ITRUNC_FINISH1 9
45#define XFS_ITRUNC_FINISH2 10
46#define XFS_CTRUNC1 11
47#define XFS_CTRUNC2 12
48#define XFS_CTRUNC3 13
49#define XFS_CTRUNC4 14
50#define XFS_CTRUNC5 15
51#define XFS_CTRUNC6 16
3e57ecf6 52#define XFS_BUNMAP 17
1da177e4
LT
53#define XFS_INVAL_CACHED 18
54#define XFS_DIORD_ENTER 19
55#define XFS_DIOWR_ENTER 20
56#define XFS_SENDFILE_ENTER 21
57#define XFS_WRITEPAGE_ENTER 22
58#define XFS_RELEASEPAGE_ENTER 23
bcec2b7f
NS
59#define XFS_INVALIDPAGE_ENTER 24
60#define XFS_IOMAP_ALLOC_ENTER 25
61#define XFS_IOMAP_ALLOC_MAP 26
62#define XFS_IOMAP_UNWRITTEN 27
1b895840
NS
63#define XFS_SPLICE_READ_ENTER 28
64#define XFS_SPLICE_WRITE_ENTER 29
1da177e4
LT
65extern void xfs_rw_enter_trace(int, struct xfs_iocore *,
66 void *, size_t, loff_t, int);
67extern void xfs_inval_cached_trace(struct xfs_iocore *,
68 xfs_off_t, xfs_off_t, xfs_off_t, xfs_off_t);
69#else
70#define xfs_rw_enter_trace(tag, io, data, size, offset, ioflags)
71#define xfs_inval_cached_trace(io, offset, len, first, last)
72#endif
73
74/*
75 * Maximum count of bmaps used by read and write paths.
76 */
77#define XFS_MAX_RW_NBMAPS 4
78
79extern int xfs_bmap(struct bhv_desc *, xfs_off_t, ssize_t, int,
80 struct xfs_iomap *, int *);
81extern int xfsbdstrat(struct xfs_mount *, struct xfs_buf *);
82extern int xfs_bdstrat_cb(struct xfs_buf *);
1b895840 83extern int xfs_dev_is_read_only(struct xfs_mount *, char *);
1da177e4 84
67fcaa73 85extern int xfs_zero_eof(struct bhv_vnode *, struct xfs_iocore *, xfs_off_t,
68160161 86 xfs_fsize_t);
1da177e4
LT
87extern ssize_t xfs_read(struct bhv_desc *, struct kiocb *,
88 const struct iovec *, unsigned int,
89 loff_t *, int, struct cred *);
90extern ssize_t xfs_write(struct bhv_desc *, struct kiocb *,
91 const struct iovec *, unsigned int,
92 loff_t *, int, struct cred *);
cbb7e577 93extern ssize_t xfs_splice_read(struct bhv_desc *, struct file *, loff_t *,
3a326a2c 94 struct pipe_inode_info *, size_t, int, int,
1b895840 95 struct cred *);
3a326a2c 96extern ssize_t xfs_splice_write(struct bhv_desc *, struct pipe_inode_info *,
cbb7e577 97 struct file *, loff_t *, size_t, int, int,
1b895840 98 struct cred *);
1da177e4 99
1da177e4 100#endif /* __XFS_LRW_H__ */
This page took 0.232088 seconds and 5 git commands to generate.