summaryrefslogtreecommitdiff
path: root/disk-io.h
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2015-01-16 11:22:28 +0800
committerDavid Sterba <dsterba@suse.cz>2015-02-11 17:19:30 +0100
commitabf010e593cec271a632b746c031a1bf206f7769 (patch)
tree8922b0e19fdc069e32635efafdbdafc44ef4d708 /disk-io.h
parent0c05f623b13f93105163535f016fc049fa04dbb6 (diff)
btrfs-progs: Add new btrfs_open_ctree_flags CHUNK_ONLY
Add new flag CHUNK_ONLY and internal used only flag __RETURN_CHUNK. CHUNK_ONLY will imply __RETURN_CHUNK, SUPPRESS_ERROR and PARTIAL, which will allow the fs to be opened with only chunk tree OK. This will improve the usability for btrfs-find-root. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'disk-io.h')
-rw-r--r--disk-io.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/disk-io.h b/disk-io.h
index a69a62f2..7a2a597f 100644
--- a/disk-io.h
+++ b/disk-io.h
@@ -38,7 +38,17 @@ enum btrfs_open_ctree_flags {
* Don't print error messages if bytenr or checksums do not match in
* tree block headers. Turn on by OPEN_CTREE_SUPPRESS_ERROR
*/
- OPEN_CTREE_SUPPRESS_CHECK_BLOCK_ERRORS = (1 << 8)
+ OPEN_CTREE_SUPPRESS_CHECK_BLOCK_ERRORS = (1 << 8),
+ /* Return chunk root */
+ __OPEN_CTREEE_RETURN_CHUNK_ROOT = (1 << 9),
+ OPEN_CTREE_CHUNK_ROOT_ONLY = OPEN_CTREE_PARTIAL +
+ OPEN_CTREE_SUPPRESS_CHECK_BLOCK_ERRORS +
+ __OPEN_CTREEE_RETURN_CHUNK_ROOT,
+ /*
+ * TODO: cleanup: Split the open_ctree_flags into more indepent
+ * tree bits.
+ * Like split PARTIAL into SKIP_CSUM/SKIP_EXTENT
+ */
};
static inline u64 btrfs_sb_offset(int mirror)