blob: 45a1ea240cbbb0a0b3ded8fcd982169b11789c72 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2005-2006 Silicon Graphics, Inc.
4 * All Rights Reserved.
5 */
6#ifndef __XFS_AOPS_H__
7#define __XFS_AOPS_H__
8
9extern struct bio_set xfs_ioend_bioset;
10
11/*
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000012 * Structure for buffered I/O completions.
13 */
14struct xfs_ioend {
15 struct list_head io_list; /* next ioend in chain */
David Brazdil0f672f62019-12-10 10:32:29 +000016 int io_fork; /* inode fork written back */
17 xfs_exntst_t io_state; /* extent state */
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000018 struct inode *io_inode; /* file being written to */
19 size_t io_size; /* size of the extent */
20 xfs_off_t io_offset; /* offset in the file */
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000021 struct xfs_trans *io_append_trans;/* xact. for size update */
22 struct bio *io_bio; /* bio being built */
23 struct bio io_inline_bio; /* MUST BE LAST! */
24};
25
26extern const struct address_space_operations xfs_address_space_operations;
27extern const struct address_space_operations xfs_dax_aops;
28
29int xfs_setfilesize(struct xfs_inode *ip, xfs_off_t offset, size_t size);
30
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000031extern struct block_device *xfs_find_bdev_for_inode(struct inode *);
32extern struct dax_device *xfs_find_daxdev_for_inode(struct inode *);
33
34#endif /* __XFS_AOPS_H__ */