summaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2013-07-15 13:30:50 +0800
committerDavid Sterba <dsterba@suse.cz>2013-08-09 14:32:36 +0200
commit5333445574adf8415ce3b7e8b13cf8feeb39b836 (patch)
tree824ba45bb8bb56b341e8c40be7b9eb7f71cf497a /utils.h
parent8f7c5897e96607ef0b47ecbc2f0d3cb4df2b8c07 (diff)
btrfs-progs: congregate dev scan
the dev scan to find btrfs is performed at two locations all most the same way one at filesystem show and another at device scan. They both follow the same steps. This patch does not alter anything except that it brings these two same logic into the function scan_for_btrfs so that we can play tweaking it. the patch which recommends to use /dev/mapper will also need it Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils.h b/utils.h
index fb9670d4..79390cfb 100644
--- a/utils.h
+++ b/utils.h
@@ -25,6 +25,9 @@
#define BTRFS_MKFS_SYSTEM_GROUP_SIZE (4 * 1024 * 1024)
+#define BTRFS_SCAN_PROC 1
+#define BTRFS_SCAN_DEV 2
+
int make_btrfs(int fd, const char *device, const char *label,
u64 blocks[6], u64 num_bytes, u32 nodesize,
u32 leafsize, u32 sectorsize, u32 stripesize);
@@ -74,5 +77,5 @@ u64 btrfs_device_size(int fd, struct stat *st);
/* Helper to always get proper size of the destination string */
#define strncpy_null(dest, src) __strncpy__null(dest, src, sizeof(dest))
int test_dev_for_mkfs(char *file, int force_overwrite, char *estr);
-
+int scan_for_btrfs(int where, int update_kernel);
#endif