summaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2013-04-15 14:38:09 +0800
committerDavid Sterba <dsterba@suse.cz>2013-04-23 18:56:20 +0200
commit4b3c9136be2b72fe4df33c5dfa7a33cf1bce9d8d (patch)
treef82152525ae31b30a26e5784319b4ee310d5af55 /utils.h
parent9b5a329c6cd9f89f0ed83300620581778b90d026 (diff)
btrfs-progs: mkfs should first check all disks before writing to a disk
In the cases where one of the disk is not suitable for btrfs, then we would fail the mkfs, however we determine that after we have written btrfs to the preceding disks. At this time if user changes mind for not to use btrfs will left with no choice. So this patch will check if all the provided disks are suitable for the btrfs at once before proceeding to create btrfs on a disk. Further this patch also removed duplicate code to check device suitability for the btrfs. Next, there is an existing bug about the -r mkfs option, which this patch would carry forward most of it. Ref: [PATCH 2/2, RFC] btrfs-progs: overhaul mkfs.btrfs -r option Signed-off-by: Anand Jain <anand.jain@oracle.com> to merg prev Signed-off-by: Anand Jain <anand.jain@oracle.com>
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index 4dcdc31a..3c17e14b 100644
--- a/utils.h
+++ b/utils.h
@@ -64,5 +64,6 @@ int is_swap_device(const char *file);
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);
#endif