Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0+
0002 /*
0003  * Copyright (C) 2017 Oracle.  All Rights Reserved.
0004  * Author: Darrick J. Wong <darrick.wong@oracle.com>
0005  */
0006 #ifndef __XFS_FSMAP_H__
0007 #define __XFS_FSMAP_H__
0008 
0009 struct fsmap;
0010 
0011 /* internal fsmap representation */
0012 struct xfs_fsmap {
0013     dev_t       fmr_device; /* device id */
0014     uint32_t    fmr_flags;  /* mapping flags */
0015     uint64_t    fmr_physical;   /* device offset of segment */
0016     uint64_t    fmr_owner;  /* owner id */
0017     xfs_fileoff_t   fmr_offset; /* file offset of segment */
0018     xfs_filblks_t   fmr_length; /* length of segment, blocks */
0019 };
0020 
0021 struct xfs_fsmap_head {
0022     uint32_t    fmh_iflags; /* control flags */
0023     uint32_t    fmh_oflags; /* output flags */
0024     unsigned int    fmh_count;  /* # of entries in array incl. input */
0025     unsigned int    fmh_entries;    /* # of entries filled in (output). */
0026 
0027     struct xfs_fsmap fmh_keys[2];   /* low and high keys */
0028 };
0029 
0030 void xfs_fsmap_to_internal(struct xfs_fsmap *dest, struct fsmap *src);
0031 
0032 int xfs_getfsmap(struct xfs_mount *mp, struct xfs_fsmap_head *head,
0033         struct fsmap *out_recs);
0034 
0035 #endif /* __XFS_FSMAP_H__ */