aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_rw.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_rw.h')
-rw-r--r--fs/xfs/xfs_rw.h99
1 files changed, 28 insertions, 71 deletions
diff --git a/fs/xfs/xfs_rw.h b/fs/xfs/xfs_rw.h
index c8b10bf8f530..90233037fab1 100644
--- a/fs/xfs/xfs_rw.h
+++ b/fs/xfs/xfs_rw.h
@@ -68,87 +68,44 @@ struct xfs_mount;
68 * file is a real time file or not, because the bmap code 68 * file is a real time file or not, because the bmap code
69 * does. 69 * does.
70 */ 70 */
71#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_FSB_TO_DB)
72xfs_daddr_t xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb);
73#define XFS_FSB_TO_DB(ip,fsb) xfs_fsb_to_db(ip,fsb) 71#define XFS_FSB_TO_DB(ip,fsb) xfs_fsb_to_db(ip,fsb)
74#else 72static inline xfs_daddr_t
75#define XFS_FSB_TO_DB(ip,fsb) \ 73xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb)
76 (((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) ? \ 74{
75 return (((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) ? \
77 (xfs_daddr_t)XFS_FSB_TO_BB((ip)->i_mount, (fsb)) : \ 76 (xfs_daddr_t)XFS_FSB_TO_BB((ip)->i_mount, (fsb)) : \
78 XFS_FSB_TO_DADDR((ip)->i_mount, (fsb))) 77 XFS_FSB_TO_DADDR((ip)->i_mount, (fsb)));
79#endif 78}
80 79#define XFS_FSB_TO_DB_IO(io,fsb) xfs_fsb_to_db_io(io,fsb)
81#define XFS_FSB_TO_DB_IO(io,fsb) \ 80static inline xfs_daddr_t
82 (((io)->io_flags & XFS_IOCORE_RT) ? \ 81xfs_fsb_to_db_io(struct xfs_iocore *io, xfs_fsblock_t fsb)
82{
83 return (((io)->io_flags & XFS_IOCORE_RT) ? \
83 XFS_FSB_TO_BB((io)->io_mount, (fsb)) : \ 84 XFS_FSB_TO_BB((io)->io_mount, (fsb)) : \
84 XFS_FSB_TO_DADDR((io)->io_mount, (fsb))) 85 XFS_FSB_TO_DADDR((io)->io_mount, (fsb)));
86}
85 87
86/* 88/*
87 * Prototypes for functions in xfs_rw.c. 89 * Prototypes for functions in xfs_rw.c.
88 */ 90 */
89 91extern int xfs_write_clear_setuid(struct xfs_inode *ip);
90int 92extern int xfs_bwrite(struct xfs_mount *mp, struct xfs_buf *bp);
91xfs_write_clear_setuid( 93extern int xfs_bioerror(struct xfs_buf *bp);
92 struct xfs_inode *ip); 94extern int xfs_bioerror_relse(struct xfs_buf *bp);
93 95extern int xfs_read_buf(struct xfs_mount *mp, xfs_buftarg_t *btp,
94int 96 xfs_daddr_t blkno, int len, uint flags,
95xfs_bwrite( 97 struct xfs_buf **bpp);
96 struct xfs_mount *mp, 98extern void xfs_ioerror_alert(char *func, struct xfs_mount *mp,
97 struct xfs_buf *bp); 99 xfs_buf_t *bp, xfs_daddr_t blkno);
98
99int
100xfs_bioerror(
101 struct xfs_buf *b);
102
103int
104xfs_bioerror_relse(
105 struct xfs_buf *b);
106
107int
108xfs_read_buf(
109 struct xfs_mount *mp,
110 xfs_buftarg_t *target,
111 xfs_daddr_t blkno,
112 int len,
113 uint flags,
114 struct xfs_buf **bpp);
115
116void
117xfs_ioerror_alert(
118 char *func,
119 struct xfs_mount *mp,
120 xfs_buf_t *bp,
121 xfs_daddr_t blkno);
122
123 100
124/* 101/*
125 * Prototypes for functions in xfs_vnodeops.c. 102 * Prototypes for functions in xfs_vnodeops.c.
126 */ 103 */
127 104extern int xfs_rwlock(bhv_desc_t *bdp, vrwlock_t write_lock);
128int 105extern void xfs_rwunlock(bhv_desc_t *bdp, vrwlock_t write_lock);
129xfs_rwlock( 106extern int xfs_change_file_space(bhv_desc_t *bdp, int cmd, xfs_flock64_t *bf,
130 bhv_desc_t *bdp, 107 xfs_off_t offset, cred_t *credp, int flags);
131 vrwlock_t write_lock); 108extern int xfs_set_dmattrs(bhv_desc_t *bdp, u_int evmask, u_int16_t state,
132 109 cred_t *credp);
133void
134xfs_rwunlock(
135 bhv_desc_t *bdp,
136 vrwlock_t write_lock);
137
138int
139xfs_change_file_space(
140 bhv_desc_t *bdp,
141 int cmd,
142 xfs_flock64_t *bf,
143 xfs_off_t offset,
144 cred_t *credp,
145 int flags);
146
147int
148xfs_set_dmattrs(
149 bhv_desc_t *bdp,
150 u_int evmask,
151 u_int16_t state,
152 cred_t *credp);
153 110
154#endif /* __XFS_RW_H__ */ 111#endif /* __XFS_RW_H__ */