blob: 314a0b17aaeb2096321f08cfb23c6100934875b7 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Christopher Ferris8177cdf2020-08-03 11:53:55 -07007#ifndef _UAPI_LINUX_FIEMAP_H
8#define _UAPI_LINUX_FIEMAP_H
Ben Cheng655a7c02013-10-16 16:09:24 -07009#include <linux/types.h>
10struct fiemap_extent {
Tao Baod7db5942015-01-28 10:07:51 -080011 __u64 fe_logical;
12 __u64 fe_physical;
13 __u64 fe_length;
14 __u64 fe_reserved64[2];
Tao Baod7db5942015-01-28 10:07:51 -080015 __u32 fe_flags;
16 __u32 fe_reserved[3];
Ben Cheng655a7c02013-10-16 16:09:24 -070017};
18struct fiemap {
Tao Baod7db5942015-01-28 10:07:51 -080019 __u64 fm_start;
20 __u64 fm_length;
21 __u32 fm_flags;
22 __u32 fm_mapped_extents;
Tao Baod7db5942015-01-28 10:07:51 -080023 __u32 fm_extent_count;
24 __u32 fm_reserved;
Christopher Ferris7447a1c2022-10-04 18:24:44 -070025 struct fiemap_extent fm_extents[];
Ben Cheng655a7c02013-10-16 16:09:24 -070026};
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define FIEMAP_MAX_OFFSET (~0ULL)
28#define FIEMAP_FLAG_SYNC 0x00000001
29#define FIEMAP_FLAG_XATTR 0x00000002
Christopher Ferris38062f92014-07-09 15:33:25 -070030#define FIEMAP_FLAG_CACHE 0x00000004
Christopher Ferris38062f92014-07-09 15:33:25 -070031#define FIEMAP_FLAGS_COMPAT (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR)
Ben Cheng655a7c02013-10-16 16:09:24 -070032#define FIEMAP_EXTENT_LAST 0x00000001
33#define FIEMAP_EXTENT_UNKNOWN 0x00000002
34#define FIEMAP_EXTENT_DELALLOC 0x00000004
Christopher Ferris38062f92014-07-09 15:33:25 -070035#define FIEMAP_EXTENT_ENCODED 0x00000008
Ben Cheng655a7c02013-10-16 16:09:24 -070036#define FIEMAP_EXTENT_DATA_ENCRYPTED 0x00000080
37#define FIEMAP_EXTENT_NOT_ALIGNED 0x00000100
38#define FIEMAP_EXTENT_DATA_INLINE 0x00000200
Christopher Ferris38062f92014-07-09 15:33:25 -070039#define FIEMAP_EXTENT_DATA_TAIL 0x00000400
Ben Cheng655a7c02013-10-16 16:09:24 -070040#define FIEMAP_EXTENT_UNWRITTEN 0x00000800
41#define FIEMAP_EXTENT_MERGED 0x00001000
42#define FIEMAP_EXTENT_SHARED 0x00002000
Christopher Ferris38062f92014-07-09 15:33:25 -070043#endif