forked from kdave/btrfs-progs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stubs.h
50 lines (40 loc) · 1.28 KB
/
stubs.h
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef _BTRFS_STUBS_H
#define _BTRFS_STUBS_H
#include <fcntl.h>
#include <linux/fs.h>
#include <sys/types.h>
struct iovec;
ssize_t pwritev2(int fd, const struct iovec *iov, int iovcnt, off_t offset,
int flags);
#ifndef O_ALLOW_ENCODED
#define O_ALLOW_ENCODED 040000000
#endif
#ifndef RWF_ENCODED
enum {
ENCODED_IOV_COMPRESSION_NONE,
#define ENCODED_IOV_COMPRESSION_NONE ENCODED_IOV_COMPRESSION_NONE
ENCODED_IOV_COMPRESSION_ZLIB,
#define ENCODED_IOV_COMPRESSION_ZLIB ENCODED_IOV_COMPRESSION_ZLIB
ENCODED_IOV_COMPRESSION_LZO,
#define ENCODED_IOV_COMPRESSION_LZO ENCODED_IOV_COMPRESSION_LZO
ENCODED_IOV_COMPRESSION_ZSTD,
#define ENCODED_IOV_COMPRESSION_ZSTD ENCODED_IOV_COMPRESSION_ZSTD
ENCODED_IOV_COMPRESSION_TYPES = ENCODED_IOV_COMPRESSION_ZSTD,
};
enum {
ENCODED_IOV_ENCRYPTION_NONE,
#define ENCODED_IOV_ENCRYPTION_NONE ENCODED_IOV_ENCRYPTION_NONE
ENCODED_IOV_ENCRYPTION_TYPES = ENCODED_IOV_ENCRYPTION_NONE,
};
struct encoded_iov {
__aligned_u64 len;
__aligned_u64 unencoded_len;
__aligned_u64 unencoded_offset;
__u32 compression;
__u32 encryption;
};
#define ENCODED_IOV_SIZE_VER0 32
/* encoded (e.g., compressed and/or encrypted) IO */
#define RWF_ENCODED ((__kernel_rwf_t)0x00000020)
#endif /* RWF_ENCODED */
#endif /* _BTRFS_STUBS_H */