summaryrefslogtreecommitdiff
path: root/fsfeatures.h
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2017-07-31 14:54:24 +0100
committerDimitri John Ledkov <xnox@ubuntu.com>2017-07-31 14:54:24 +0100
commit6a0440391da7a99ffab94ccc66264af9b5f3ce34 (patch)
tree1c7cf4f07b08c4965ab19819ebce367be16fb980 /fsfeatures.h
parent5f2e2384443a09e3f1fec71940e9e32b70789102 (diff)
New upstream release.
Diffstat (limited to 'fsfeatures.h')
-rw-r--r--fsfeatures.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/fsfeatures.h b/fsfeatures.h
new file mode 100644
index 00000000..513ed1e7
--- /dev/null
+++ b/fsfeatures.h
@@ -0,0 +1,50 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License v2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 021110-1307, USA.
+ */
+
+#ifndef __BTRFS_FSFEATURES_H__
+#define __BTRFS_FSFEATURES_H__
+
+#include "kerncompat.h"
+
+#define BTRFS_MKFS_DEFAULT_NODE_SIZE SZ_16K
+#define BTRFS_MKFS_DEFAULT_FEATURES \
+ (BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF \
+ | BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA)
+
+/*
+ * Avoid multi-device features (RAID56) and mixed block groups
+ */
+#define BTRFS_CONVERT_ALLOWED_FEATURES \
+ (BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF \
+ | BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL \
+ | BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO \
+ | BTRFS_FEATURE_INCOMPAT_COMPRESS_LZOv2 \
+ | BTRFS_FEATURE_INCOMPAT_BIG_METADATA \
+ | BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF \
+ | BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA \
+ | BTRFS_FEATURE_INCOMPAT_NO_HOLES)
+
+#define BTRFS_FEATURE_LIST_ALL (1ULL << 63)
+
+void btrfs_list_all_fs_features(u64 mask_disallowed);
+char* btrfs_parse_fs_features(char *namelist, u64 *flags);
+void btrfs_process_fs_features(u64 flags);
+void btrfs_parse_features_to_string(char *buf, u64 flags);
+void print_kernel_version(FILE *stream, u32 version);
+u32 get_running_kernel_version(void);
+int btrfs_check_nodesize(u32 nodesize, u32 sectorsize, u64 features);
+
+#endif