* [RFC PATCH 1/4] Btrfs: add filesystem state for error handle
@ 2010-11-25 9:53 Miao Xie
0 siblings, 0 replies; only message in thread
From: Miao Xie @ 2010-11-25 9:53 UTC (permalink / raw)
To: Chris Mason, Josef Bacik; +Cc: Linux Btrfs, Liu Bo
From: Liu Bo <liubo2009@cn.fujitsu.com>
Add filesystem state and two flags of it to tell if the filesystem is
valid or insane now.
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
---
fs/btrfs/ctree.h | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 8db9234..78b4c34 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -294,6 +294,16 @@ static inline unsigned long btrfs_chunk_item_size(int num_stripes)
#define BTRFS_FSID_SIZE 16
#define BTRFS_HEADER_FLAG_WRITTEN (1ULL << 0)
#define BTRFS_HEADER_FLAG_RELOC (1ULL << 1)
+
+/*
+ * File system states
+ */
+
+/* Unmount cleanly */
+#define BTRFS_SUPER_FLAG_VALID (1ULL << 2)
+/* Errors detected */
+#define BTRFS_SUPER_FLAG_ERROR (1ULL << 3)
+
#define BTRFS_SUPER_FLAG_SEEDING (1ULL << 32)
#define BTRFS_SUPER_FLAG_METADUMP (1ULL << 33)
@@ -1050,6 +1060,9 @@ struct btrfs_fs_info {
unsigned metadata_ratio;
void *bdev_holder;
+
+ /* filesystem state */
+ unsigned short fs_state;
};
/*
--
1.7.0.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-11-25 9:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-25 9:53 [RFC PATCH 1/4] Btrfs: add filesystem state for error handle Miao Xie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.