From: Jan Schmidt <list.btrfs@jan-o-sch.net>
To: linux-btrfs@vger.kernel.org
Cc: chris.mason@oracle.com, sensille@gmx.net
Subject: [PATCH 3/7] check open_ctree() right after it returned
Date: Tue, 1 Feb 2011 14:54:46 +0100 [thread overview]
Message-ID: <1296568490-13264-4-git-send-email-list.btrfs@jan-o-sch.net> (raw)
In-Reply-To: <1296568490-13264-1-git-send-email-list.btrfs@jan-o-sch.net>
Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
---
mkfs.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/mkfs.c b/mkfs.c
index d1dd4a3..0a80d1c 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -430,7 +430,13 @@ int main(int ac, char **av)
fprintf(stderr, "error during mkfs %d\n", ret);
exit(1);
}
+
root = open_ctree(file, 0, O_RDWR);
+ if (!root) {
+ fprintf(stderr, "ctree init failed\n");
+ return -1;
+ }
+
root->fs_info->alloc_start = alloc_start;
ret = make_root_dir(root);
@@ -445,10 +451,6 @@ int main(int ac, char **av)
goto raid_groups;
btrfs_register_one_device(file);
- if (!root) {
- fprintf(stderr, "ctree init failed\n");
- return -1;
- }
zero_end = 1;
while(ac-- > 0) {
--
1.7.2.2
next prev parent reply other threads:[~2011-02-01 13:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-01 13:54 [PATCH 0/7] Btrfs: Progs modifications to introduce speed profiles and dedicated log devices Jan Schmidt
2011-02-01 13:54 ` [PATCH 1/7] moved parse_size() to utils.c Jan Schmidt
2011-02-01 13:54 ` [PATCH 2/7] pulled current kernel version of ioctl.h Jan Schmidt
2011-02-01 13:54 ` Jan Schmidt [this message]
2011-02-01 13:54 ` [PATCH 4/7] speed classes (needed for profiles) for device add. subsequent patch needed to fix mkfs Jan Schmidt
2011-02-01 13:54 ` [PATCH 5/7] speed classes (needed for profiles) for mkfs Jan Schmidt
2011-02-01 13:54 ` [PATCH 6/7] debug-tree output: device speed added; type output switched to hex Jan Schmidt
2011-02-01 13:54 ` [PATCH 7/7] made btrfs-vol compile. looks unused, so no speed class support here for now Jan Schmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1296568490-13264-4-git-send-email-list.btrfs@jan-o-sch.net \
--to=list.btrfs@jan-o-sch.net \
--cc=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=sensille@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.