1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _LINUX_FSMAP_H
20#define _LINUX_FSMAP_H
21#include <linux/types.h>
22struct fsmap {
23  __u32 fmr_device;
24  __u32 fmr_flags;
25  __u64 fmr_physical;
26  __u64 fmr_owner;
27  __u64 fmr_offset;
28  __u64 fmr_length;
29  __u64 fmr_reserved[3];
30};
31struct fsmap_head {
32  __u32 fmh_iflags;
33  __u32 fmh_oflags;
34  __u32 fmh_count;
35  __u32 fmh_entries;
36  __u64 fmh_reserved[6];
37  struct fsmap fmh_keys[2];
38  struct fsmap fmh_recs[];
39};
40#define FMH_IF_VALID 0
41#define FMH_OF_DEV_T 0x1
42#define FMR_OF_PREALLOC 0x1
43#define FMR_OF_ATTR_FORK 0x2
44#define FMR_OF_EXTENT_MAP 0x4
45#define FMR_OF_SHARED 0x8
46#define FMR_OF_SPECIAL_OWNER 0x10
47#define FMR_OF_LAST 0x20
48#define FMR_OWNER(type,code) (((__u64) type << 32) | ((__u64) code & 0xFFFFFFFFULL))
49#define FMR_OWNER_TYPE(owner) ((__u32) ((__u64) owner >> 32))
50#define FMR_OWNER_CODE(owner) ((__u32) (((__u64) owner & 0xFFFFFFFFULL)))
51#define FMR_OWN_FREE FMR_OWNER(0, 1)
52#define FMR_OWN_UNKNOWN FMR_OWNER(0, 2)
53#define FMR_OWN_METADATA FMR_OWNER(0, 3)
54#define FS_IOC_GETFSMAP _IOWR('X', 59, struct fsmap_head)
55#endif
56