summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2015-05-25 18:52:46 -0700
committerKent Overstreet <kent.overstreet@gmail.com>2015-05-25 18:52:46 -0700
commit445b4770a0b52981b219b55e62258cd2ff5d1a2d (patch)
tree3833195e15c4e26206fa4768c9c5d6b6b3809c7f
parentef13bd2f2717bc256023f342eaf0d78146219edb (diff)
formatting
-rw-r--r--Extents.mdwn47
1 files changed, 23 insertions, 24 deletions
diff --git a/Extents.mdwn b/Extents.mdwn
index b43985c..a11f1af 100644
--- a/Extents.mdwn
+++ b/Extents.mdwn
@@ -58,9 +58,9 @@ Documentation for design of new extent format (in dev branch):
* type of a given entry with a scheme similar to utf8, encoding the type in the
* position of the first set bit:
*
- * bch_extent_crc32 - field_type 1
- * bch_extent_ptr - field_type 10
- * bch_extent_crc64 - field_type 100
+ * bch_extent_crc32 - field_type 1
+ * bch_extent_ptr - field_type 10
+ * bch_extent_crc64 - field_type 100
*
* We do it this way because bch_extent_crc32 is _very_ constrained on bits (and
* bch_extent_crc64 is the least constrained).
@@ -74,57 +74,57 @@ Documentation for design of new extent format (in dev branch):
struct bch_extent_crc32 {
#if defined(__LITTLE_ENDIAN_BITFIELD)
- __u32 field_type:1,
+ __u32 field_type:1,
compressed_size:8,
uncompressed_size:8,
offset:7,
csum_type:4,
compression_type:4;
#elif defined (__BIG_ENDIAN_BITFIELD)
- __u32 csum_type:4,
+ __u32 csum_type:4,
compression_type:4,
offset:7,
uncompressed_size:8,
compressed_size:8,
field_type:1;
#endif
- __u32 csum;
+ __u32 csum;
};
- #define CRC32_EXTENT_SIZE_MAX (1U << 7)
+ #define CRC32_EXTENT_SIZE_MAX (1U << 7)
struct bch_extent_crc64 {
#if defined(__LITTLE_ENDIAN_BITFIELD)
- __u64 field_type:3,
+ __u64 field_type:3,
compressed_size:18,
uncompressed_size:18,
offset:17,
csum_type:4,
compression_type:4;
#elif defined (__BIG_ENDIAN_BITFIELD)
- __u64 csum_type:4,
+ __u64 csum_type:4,
compression_type:4,
offset:17,
uncompressed_size:18,
compressed_size:18,
field_type:3;
#endif
- __u64 csum;
+ __u64 csum;
};
- #define CRC64_EXTENT_SIZE_MAX (1U << 17)
+ #define CRC64_EXTENT_SIZE_MAX (1U << 17)
struct bch_extent_ptr {
union {
struct {
#if defined(__LITTLE_ENDIAN_BITFIELD)
- __u64 field_type:2,
+ __u64 field_type:2,
erasure_coded:1,
offset:45, /* 16 petabytes */
dev:8,
gen:8;
#elif defined (__BIG_ENDIAN_BITFIELD)
- __u64 gen:8,
+ __u64 gen:8,
dev:8,
offset:45,
erasure_coded:1,
@@ -132,37 +132,36 @@ Documentation for design of new extent format (in dev branch):
#endif
};
- __u64 _val;
+ __u64 _val;
};
};
static inline struct bch_extent_ptr PTR(__u64 gen, __u64 offset, __u64 dev)
{
return (struct bch_extent_ptr) {
- .gen = gen,
- .dev = dev,
- .offset = offset,
+ .gen = gen,
+ .dev = dev,
+ .offset = offset,
};
}
/* Dummy DEV numbers: */
- #define PTR_LOST_DEV 255 /* XXX: kill */
+ #define PTR_LOST_DEV 255 /* XXX: kill */
enum {
- BCH_EXTENT = 128,
+ BCH_EXTENT = 128,
/*
* This is kind of a hack, we're overloading the type for a boolean that
* really should be part of the value - BCH_EXTENT and BCH_EXTENT_CACHED
* have the same value type:
*/
- BCH_EXTENT_CACHED = 129,
- BCH_CEXTENT = 130,
+ BCH_EXTENT_CACHED = 129,
};
struct bch_extent {
- struct bch_val v;
- struct bch_extent_ptr ptr[0];
+ struct bch_val v;
+ struct bch_extent_ptr ptr[0];
};
- BKEY_VAL_TYPE(extent, BCH_EXTENT);
+ BKEY_VAL_TYPE(extent, BCH_EXTENT);