blob: 4cd85c3360f52125c4018df2440ba8b40f1096a2 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Nathan Scott7b718762005-11-02 14:58:39 +11002 * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 *
Nathan Scott7b718762005-11-02 14:58:39 +11005 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 * published by the Free Software Foundation.
8 *
Nathan Scott7b718762005-11-02 14:58:39 +11009 * 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.
Linus Torvalds1da177e2005-04-16 15:20:36 -070013 *
Nathan Scott7b718762005-11-02 14:58:39 +110014 * 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
Linus Torvalds1da177e2005-04-16 15:20:36 -070017 */
18#ifndef __XFS_LRW_H__
19#define __XFS_LRW_H__
20
Linus Torvalds1da177e2005-04-16 15:20:36 -070021struct bhv_desc;
22struct xfs_mount;
23struct xfs_iocore;
24struct xfs_inode;
25struct xfs_bmbt_irec;
26struct xfs_buf;
27struct xfs_iomap;
28
29#if defined(XFS_RW_TRACE)
30/*
31 * Defines for the trace mechanisms in xfs_lrw.c.
32 */
33#define XFS_RW_KTRACE_SIZE 128
34
35#define XFS_READ_ENTER 1
36#define XFS_WRITE_ENTER 2
37#define XFS_IOMAP_READ_ENTER 3
38#define XFS_IOMAP_WRITE_ENTER 4
39#define XFS_IOMAP_READ_MAP 5
40#define XFS_IOMAP_WRITE_MAP 6
41#define XFS_IOMAP_WRITE_NOSPACE 7
42#define XFS_ITRUNC_START 8
43#define XFS_ITRUNC_FINISH1 9
44#define XFS_ITRUNC_FINISH2 10
45#define XFS_CTRUNC1 11
46#define XFS_CTRUNC2 12
47#define XFS_CTRUNC3 13
48#define XFS_CTRUNC4 14
49#define XFS_CTRUNC5 15
50#define XFS_CTRUNC6 16
Olaf Weber3e57ecf2006-06-09 14:48:12 +100051#define XFS_BUNMAP 17
Linus Torvalds1da177e2005-04-16 15:20:36 -070052#define XFS_INVAL_CACHED 18
53#define XFS_DIORD_ENTER 19
54#define XFS_DIOWR_ENTER 20
55#define XFS_SENDFILE_ENTER 21
56#define XFS_WRITEPAGE_ENTER 22
57#define XFS_RELEASEPAGE_ENTER 23
Nathan Scottbcec2b72005-09-02 16:40:17 +100058#define XFS_INVALIDPAGE_ENTER 24
59#define XFS_IOMAP_ALLOC_ENTER 25
60#define XFS_IOMAP_ALLOC_MAP 26
61#define XFS_IOMAP_UNWRITTEN 27
Nathan Scott1b895842006-03-31 13:08:59 +100062#define XFS_SPLICE_READ_ENTER 28
63#define XFS_SPLICE_WRITE_ENTER 29
Linus Torvalds1da177e2005-04-16 15:20:36 -070064extern void xfs_rw_enter_trace(int, struct xfs_iocore *,
65 void *, size_t, loff_t, int);
66extern void xfs_inval_cached_trace(struct xfs_iocore *,
67 xfs_off_t, xfs_off_t, xfs_off_t, xfs_off_t);
68#else
69#define xfs_rw_enter_trace(tag, io, data, size, offset, ioflags)
70#define xfs_inval_cached_trace(io, offset, len, first, last)
71#endif
72
Linus Torvalds1da177e2005-04-16 15:20:36 -070073extern int xfsbdstrat(struct xfs_mount *, struct xfs_buf *);
74extern int xfs_bdstrat_cb(struct xfs_buf *);
Nathan Scott1b895842006-03-31 13:08:59 +100075extern int xfs_dev_is_read_only(struct xfs_mount *, char *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070076
Christoph Hellwig0a74cd12007-08-29 11:53:12 +100077extern int xfs_zero_eof(struct inode *, struct xfs_iocore *, xfs_off_t,
Lachlan McIlroy68160162007-02-10 18:36:47 +110078 xfs_fsize_t);
Linus Torvalds1da177e2005-04-16 15:20:36 -070079
Linus Torvalds1da177e2005-04-16 15:20:36 -070080#endif /* __XFS_LRW_H__ */