linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] btrfs-progs: mkfs: treat btrfs_add_to_fsid as fatal error
@ 2019-08-14  1:03 Jeff Mahoney
  2019-08-14  1:03 ` [PATCH 2/5] btrfs-progs: btrfs_add_to_fsid: check if adding device would overflow Jeff Mahoney
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Jeff Mahoney @ 2019-08-14  1:03 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Jeff Mahoney

When btrfs_add_to_fsid fails in mkfs we try to close the ctree.  That
complains that we already have a transaction open.  We should be taking
the error path and exit cleanly without writing.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
---
 mkfs/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mkfs/main.c b/mkfs/main.c
index 971cb395..b752da13 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -1268,7 +1268,7 @@ int BOX_MAIN(mkfs)(int argc, char **argv)
 					sectorsize, sectorsize, sectorsize);
 		if (ret) {
 			error("unable to add %s to filesystem: %d", file, ret);
-			goto out;
+			goto error;
 		}
 		if (verbose >= 2) {
 			struct btrfs_device *device;
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-08-27 15:30 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-14  1:03 [PATCH 1/5] btrfs-progs: mkfs: treat btrfs_add_to_fsid as fatal error Jeff Mahoney
2019-08-14  1:03 ` [PATCH 2/5] btrfs-progs: btrfs_add_to_fsid: check if adding device would overflow Jeff Mahoney
2019-08-14  1:50   ` Qu Wenruo
2019-08-27 15:23   ` David Sterba
2019-08-14  1:04 ` [PATCH 3/5] btrfs-progs: qgroups: use parse_size instead of open coding it Jeff Mahoney
2019-08-14  1:51   ` Qu Wenruo
2019-08-14  1:04 ` [PATCH 4/5] btrfs-progs: resize: more sensible error messages for bad sizes Jeff Mahoney
2019-08-14  1:53   ` Qu Wenruo
2019-08-27 15:22     ` David Sterba
2019-08-14  1:04 ` [PATCH 5/5] btrfs-progs: mkfs: print error messages instead of just error number Jeff Mahoney
2019-08-14  1:54   ` Qu Wenruo
2019-08-14  2:30     ` Jeff Mahoney
2019-08-14  1:48 ` [PATCH 1/5] btrfs-progs: mkfs: treat btrfs_add_to_fsid as fatal error Qu Wenruo
2019-08-27 15:27 ` David Sterba
2019-08-27 15:30   ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).