| 1 | package btrfsscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/ |
| 2 | |
| 3 | import "stringsscip-go gomod github.com/golang/go/src go1.12 strings/" |
| 4 | |
| 5 | const maxUint64scip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/maxUint64. = 1<<64 - 1 |
| 6 | |
| 7 | const labelSizescip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/labelSize. = 256 |
| 8 | |
| 9 | type FeatureFlagsscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/FeatureFlags# uint64 |
| 10 | |
| 11 | const ( |
| 12 | FeatureCompatROFreeSpaceTreescip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/FeatureCompatROFreeSpaceTree. = FeatureFlagsscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/FeatureFlags#(1 << 0) |
| 13 | ) |
| 14 | |
| 15 | type IncompatFeaturesscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/IncompatFeatures# uint64 |
| 16 | |
| 17 | func (f IncompatFeaturesscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/IncompatFeatures#) Stringscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/IncompatFeatures#String().() string { |
| 18 | var s []string |
| 19 | for i, name := range incompatFeatureNamesscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/incompatFeatureNames. { |
| 20 | if uint64(f)&uint64(i) != 0 { |
| 21 | s = append(s, name) |
| 22 | } |
| 23 | } |
| 24 | return stringsscip-go gomod github.com/golang/go/src go1.12 strings/.Joinscip-go gomod github.com/golang/go/src go1.12 strings/Join().(s, ",") |
| 25 | } |
| 26 | |
| 27 | var incompatFeatureNamesscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/incompatFeatureNames. = []string{ |
| 28 | "DefaultSubvol", |
| 29 | "MixedGroups", |
| 30 | "CompressLZO", |
| 31 | "CompressLZOv2", |
| 32 | "BigMetadata", |
| 33 | "ExtendedIRef", |
| 34 | "RAID56", |
| 35 | "SkinnyMetadata", |
| 36 | "NoHoles", |
| 37 | } |
| 38 | |
| 39 | const ( |
| 40 | FeatureIncompatMixedBackRefscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/FeatureIncompatMixedBackRef. = IncompatFeaturesscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/IncompatFeatures#(1 << 0) |
| 41 | FeatureIncompatDefaultSubvolscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/FeatureIncompatDefaultSubvol. = IncompatFeaturesscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/IncompatFeatures#(1 << 1) |
| 42 | FeatureIncompatMixedGroupsscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/FeatureIncompatMixedGroups. = IncompatFeaturesscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/IncompatFeatures#(1 << 2) |
| 43 | FeatureIncompatCompressLZOscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/FeatureIncompatCompressLZO. = IncompatFeaturesscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/IncompatFeatures#(1 << 3) |
| 44 | |
| 45 | // Some patches floated around with a second compression method |
| 46 | // lets save that incompat here for when they do get in. |
| 47 | // Note we don't actually support it, we're just reserving the number. |
| 48 | FeatureIncompatCompressLZOv2scip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/FeatureIncompatCompressLZOv2. = IncompatFeaturesscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/IncompatFeatures#(1 << 4) |
| 49 | |
| 50 | // Older kernels tried to do bigger metadata blocks, but the |
| 51 | // code was pretty buggy. Lets not let them try anymore. |
| 52 | FeatureIncompatBigMetadatascip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/FeatureIncompatBigMetadata. = IncompatFeaturesscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/IncompatFeatures#(1 << 5) |
| 53 | |
| 54 | FeatureIncompatExtendedIRefscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/FeatureIncompatExtendedIRef. = IncompatFeaturesscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/IncompatFeatures#(1 << 6) |
| 55 | FeatureIncompatRAID56scip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/FeatureIncompatRAID56. = IncompatFeaturesscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/IncompatFeatures#(1 << 7) |
| 56 | FeatureIncompatSkinnyMetadatascip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/FeatureIncompatSkinnyMetadata. = IncompatFeaturesscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/IncompatFeatures#(1 << 8) |
| 57 | FeatureIncompatNoHolesscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/FeatureIncompatNoHoles. = IncompatFeaturesscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/IncompatFeatures#(1 << 9) |
| 58 | ) |
| 59 | |
| 60 | // Flags definition for balance. |
| 61 | type BalanceFlagsscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/BalanceFlags# uint64 |
| 62 | |
| 63 | // Restriper's general type filter. |
| 64 | const ( |
| 65 | BalanceDatascip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/BalanceData. = BalanceFlagsscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/BalanceFlags#(1 << 0) |
| 66 | BalanceSystemscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/BalanceSystem. = BalanceFlagsscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/BalanceFlags#(1 << 1) |
| 67 | BalanceMetadatascip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/BalanceMetadata. = BalanceFlagsscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/BalanceFlags#(1 << 2) |
| 68 | |
| 69 | BalanceMaskscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/BalanceMask. = (BalanceDatascip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/BalanceData. | BalanceSystemscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/BalanceSystem. | BalanceMetadatascip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/BalanceMetadata.) |
| 70 | |
| 71 | BalanceForcescip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/BalanceForce. = BalanceFlagsscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/BalanceFlags#(1 << 3) |
| 72 | BalanceResumescip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/BalanceResume. = BalanceFlagsscip-go gomod github.com/dennwc/btrfs . `github.com/dennwc/btrfs`/BalanceFlags#(1 << 4) |
| 73 | ) |