ctree.h (b18c6685810af8e6763760711aece31ccc7a8ea8) | ctree.h (70b2befd0c8a4064715d8b340270650cc9d15af8) |
---|---|
1#ifndef __BTRFS__ 2#define __BTRFS__ 3 4#include <linux/fs.h> 5#include <linux/buffer_head.h> 6#include <linux/kobject.h> 7#include "bit-radix.h" 8 --- 30 unchanged lines hidden (view full) --- 39 * offset is the starting byte offset for this key in the stream. 40 * 41 * btrfs_disk_key is in disk byte order. struct btrfs_key is always 42 * in cpu native order. Otherwise they are identical and their sizes 43 * should be the same (ie both packed) 44 */ 45struct btrfs_disk_key { 46 __le64 objectid; | 1#ifndef __BTRFS__ 2#define __BTRFS__ 3 4#include <linux/fs.h> 5#include <linux/buffer_head.h> 6#include <linux/kobject.h> 7#include "bit-radix.h" 8 --- 30 unchanged lines hidden (view full) --- 39 * offset is the starting byte offset for this key in the stream. 40 * 41 * btrfs_disk_key is in disk byte order. struct btrfs_key is always 42 * in cpu native order. Otherwise they are identical and their sizes 43 * should be the same (ie both packed) 44 */ 45struct btrfs_disk_key { 46 __le64 objectid; |
47 __le64 offset; | |
48 __le32 flags; | 47 __le32 flags; |
48 __le64 offset; |
|
49} __attribute__ ((__packed__)); 50 51struct btrfs_key { 52 u64 objectid; | 49} __attribute__ ((__packed__)); 50 51struct btrfs_key { 52 u64 objectid; |
53 u64 offset; | |
54 u32 flags; | 53 u32 flags; |
54 u64 offset; |
|
55} __attribute__ ((__packed__)); 56 57/* 58 * every tree block (leaf or node) starts with this header. 59 */ 60struct btrfs_header { 61 u8 csum[BTRFS_CSUM_SIZE]; 62 u8 fsid[16]; /* FS specific uuid */ --- 159 unchanged lines hidden (view full) --- 222 __le64 offset; 223 /* 224 * the logical number of file blocks (no csums included) 225 */ 226 __le64 num_blocks; 227} __attribute__ ((__packed__)); 228 229struct btrfs_csum_item { | 55} __attribute__ ((__packed__)); 56 57/* 58 * every tree block (leaf or node) starts with this header. 59 */ 60struct btrfs_header { 61 u8 csum[BTRFS_CSUM_SIZE]; 62 u8 fsid[16]; /* FS specific uuid */ --- 159 unchanged lines hidden (view full) --- 222 __le64 offset; 223 /* 224 * the logical number of file blocks (no csums included) 225 */ 226 __le64 num_blocks; 227} __attribute__ ((__packed__)); 228 229struct btrfs_csum_item { |
230 __le64 extent_offset; | |
231 u8 csum[BTRFS_CSUM_SIZE]; 232} __attribute__ ((__packed__)); 233 234struct btrfs_device_item { 235 __le16 pathlen; 236 __le64 device_id; 237} __attribute__ ((__packed__)); 238 --- 681 unchanged lines hidden (view full) --- 920 921static inline void btrfs_set_file_extent_num_blocks(struct 922 btrfs_file_extent_item *e, 923 u64 val) 924{ 925 e->num_blocks = cpu_to_le64(val); 926} 927 | 230 u8 csum[BTRFS_CSUM_SIZE]; 231} __attribute__ ((__packed__)); 232 233struct btrfs_device_item { 234 __le16 pathlen; 235 __le64 device_id; 236} __attribute__ ((__packed__)); 237 --- 681 unchanged lines hidden (view full) --- 919 920static inline void btrfs_set_file_extent_num_blocks(struct 921 btrfs_file_extent_item *e, 922 u64 val) 923{ 924 e->num_blocks = cpu_to_le64(val); 925} 926 |
928static inline u64 btrfs_csum_extent_offset(struct btrfs_csum_item *c) 929{ 930 return le64_to_cpu(c->extent_offset); 931} 932 933static inline void btrfs_set_csum_extent_offset(struct btrfs_csum_item *c, 934 u64 val) 935{ 936 c->extent_offset = cpu_to_le64(val); 937} 938 | |
939static inline u16 btrfs_device_pathlen(struct btrfs_device_item *d) 940{ 941 return le16_to_cpu(d->pathlen); 942} 943 944static inline void btrfs_set_device_pathlen(struct btrfs_device_item *d, 945 u16 val) 946{ --- 139 unchanged lines hidden (view full) --- 1086 u64 num_blocks); 1087int btrfs_lookup_file_extent(struct btrfs_trans_handle *trans, 1088 struct btrfs_root *root, 1089 struct btrfs_path *path, u64 objectid, 1090 u64 blocknr, int mod); 1091int btrfs_csum_file_block(struct btrfs_trans_handle *trans, 1092 struct btrfs_root *root, 1093 u64 objectid, u64 offset, | 927static inline u16 btrfs_device_pathlen(struct btrfs_device_item *d) 928{ 929 return le16_to_cpu(d->pathlen); 930} 931 932static inline void btrfs_set_device_pathlen(struct btrfs_device_item *d, 933 u16 val) 934{ --- 139 unchanged lines hidden (view full) --- 1074 u64 num_blocks); 1075int btrfs_lookup_file_extent(struct btrfs_trans_handle *trans, 1076 struct btrfs_root *root, 1077 struct btrfs_path *path, u64 objectid, 1078 u64 blocknr, int mod); 1079int btrfs_csum_file_block(struct btrfs_trans_handle *trans, 1080 struct btrfs_root *root, 1081 u64 objectid, u64 offset, |
1094 u64 extent_offset, | |
1095 char *data, size_t len); 1096int btrfs_csum_verify_file_block(struct btrfs_root *root, 1097 u64 objectid, u64 offset, 1098 char *data, size_t len); 1099struct btrfs_csum_item *btrfs_lookup_csum(struct btrfs_trans_handle *trans, 1100 struct btrfs_root *root, 1101 struct btrfs_path *path, 1102 u64 objectid, u64 offset, 1103 int cow); 1104/* super.c */ 1105extern struct subsystem btrfs_subsys; 1106 1107#endif | 1082 char *data, size_t len); 1083int btrfs_csum_verify_file_block(struct btrfs_root *root, 1084 u64 objectid, u64 offset, 1085 char *data, size_t len); 1086struct btrfs_csum_item *btrfs_lookup_csum(struct btrfs_trans_handle *trans, 1087 struct btrfs_root *root, 1088 struct btrfs_path *path, 1089 u64 objectid, u64 offset, 1090 int cow); 1091/* super.c */ 1092extern struct subsystem btrfs_subsys; 1093 1094#endif |