summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_fsrefs.h
blob: 66728755f74a2cc47759d3baad8f97b55600eb34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2021 Oracle.  All Rights Reserved.
 * Author: Darrick J. Wong <djwong@kernel.org>
 */
#ifndef __XFS_FSREFS_H__
#define __XFS_FSREFS_H__

struct fsrefs;

/* internal fsrefs representation */
struct xfs_fsrefs {
	dev_t		fcr_device;	/* device id */
	uint32_t	fcr_flags;	/* mapping flags */
	uint64_t	fcr_physical;	/* device offset of segment */
	uint64_t	fcr_owners;	/* number of owners */
	xfs_filblks_t	fcr_length;	/* length of segment, blocks */
};

struct xfs_fsrefs_head {
	uint32_t	fch_iflags;	/* control flags */
	uint32_t	fch_oflags;	/* output flags */
	unsigned int	fch_count;	/* # of entries in array incl. input */
	unsigned int	fch_entries;	/* # of entries filled in (output). */

	struct xfs_fsrefs fch_keys[2];	/* low and high keys */
};

void xfs_fsrefs_to_internal(struct xfs_fsrefs *dest, struct fsrefs *src);

int xfs_getfsrefs(struct xfs_mount *mp, struct xfs_fsrefs_head *head,
		struct fsrefs *out_recs);

#endif /* __XFS_FSREFS_H__ */