]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - fs/xfs/xfs_aops.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[mirror_ubuntu-jammy-kernel.git] / fs / xfs / xfs_aops.h
CommitLineData
0b61f8a4 1// SPDX-License-Identifier: GPL-2.0
65b3da37 2/*
ad723875 3 * Copyright (c) 2005-2006 Silicon Graphics, Inc.
7b718769 4 * All Rights Reserved.
65b3da37
CH
5 */
6#ifndef __XFS_AOPS_H__
7#define __XFS_AOPS_H__
8
e292d7bc 9extern struct bio_set xfs_ioend_bioset;
65b3da37 10
a206c817
CH
11/*
12 * Types of I/O for bmap clustering and I/O completion tracking.
13 */
14enum {
97e5a6e6 15 XFS_IO_HOLE, /* covers region without any block allocation */
0d882a36
AR
16 XFS_IO_DELALLOC, /* covers delalloc region */
17 XFS_IO_UNWRITTEN, /* covers allocated but uninitialized data */
18 XFS_IO_OVERWRITE, /* covers already allocated extent */
ef473667 19 XFS_IO_COW, /* covers copy-on-write extent */
a206c817
CH
20};
21
22#define XFS_IO_TYPES \
97e5a6e6
CH
23 { XFS_IO_HOLE, "hole" }, \
24 { XFS_IO_DELALLOC, "delalloc" }, \
25 { XFS_IO_UNWRITTEN, "unwritten" }, \
26 { XFS_IO_OVERWRITE, "overwrite" }, \
27 { XFS_IO_COW, "CoW" }
a206c817 28
f6d6d4fc 29/*
0e51a8e1 30 * Structure for buffered I/O completions.
f6d6d4fc 31 */
0e51a8e1 32struct xfs_ioend {
e10de372 33 struct list_head io_list; /* next ioend in chain */
f6d6d4fc 34 unsigned int io_type; /* delalloc / unwritten */
b677c210 35 struct inode *io_inode; /* file being written to */
65b3da37
CH
36 size_t io_size; /* size of the extent */
37 xfs_off_t io_offset; /* offset in the file */
38 struct work_struct io_work; /* xfsdatad work queue */
281627df 39 struct xfs_trans *io_append_trans;/* xact. for size update */
bb18782a 40 struct bio *io_bio; /* bio being built */
0e51a8e1
CH
41 struct bio io_inline_bio; /* MUST BE LAST! */
42};
65b3da37 43
f5e54d6e 44extern const struct address_space_operations xfs_address_space_operations;
6e2608df 45extern const struct address_space_operations xfs_dax_aops;
6b698ede 46
e372843a 47int xfs_setfilesize(struct xfs_inode *ip, xfs_off_t offset, size_t size);
fa8d972d 48
20cb52eb 49extern void xfs_count_page_state(struct page *, int *, int *);
20a90f58 50extern struct block_device *xfs_find_bdev_for_inode(struct inode *);
486aff5e 51extern struct dax_device *xfs_find_daxdev_for_inode(struct inode *);
0b1b213f 52
ad723875 53#endif /* __XFS_AOPS_H__ */