From: Goffredo Baroncelli <kreijack@gmail.com>
To: linux-btrfs@vger.kernel.org
Cc: Goffredo Baroncelli <kreijack@inwind.it>
Subject: [PATCH 4/8] Add strdup in btrfs_add_to_fsid() to track the device path.
Date: Wed, 17 Dec 2014 21:14:08 +0100 [thread overview]
Message-ID: <1418847252-14184-5-git-send-email-kreijack@inwind.it> (raw)
In-Reply-To: <1418847252-14184-1-git-send-email-kreijack@inwind.it>
When creating a new btrfs_device, copy the path to track it.
This path is then used by mkfs.btrfs to list all devices.
Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
---
utils.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/utils.c b/utils.c
index dcb4f74..3f50e4d 100644
--- a/utils.c
+++ b/utils.c
@@ -647,6 +647,7 @@ int btrfs_add_to_fsid(struct btrfs_trans_handle *trans,
device->bytes_used = 0;
device->total_ios = 0;
device->dev_root = root->fs_info->dev_root;
+ device->name = strdup(path);
ret = btrfs_add_device(trans, root, device);
BUG_ON(ret);
--
2.1.3
next prev parent reply other threads:[~2014-12-17 20:12 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 20:14 [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command Goffredo Baroncelli
2014-12-17 20:14 ` [PATCH 1/8] Add -v -q switches to mkfs.btrfs Goffredo Baroncelli
2014-12-25 1:19 ` Satoru Takeuchi
2014-12-17 20:14 ` [PATCH 2/8] Move group_profile_str() in utils.c Goffredo Baroncelli
2014-12-25 1:20 ` Satoru Takeuchi
2014-12-17 20:14 ` [PATCH 3/8] Add verbose option to btrfs_add_to_fsid() Goffredo Baroncelli
2014-12-25 1:28 ` Satoru Takeuchi
2014-12-17 20:14 ` Goffredo Baroncelli [this message]
2014-12-25 1:29 ` [PATCH 4/8] Add strdup in btrfs_add_to_fsid() to track the device path Satoru Takeuchi
2014-12-17 20:14 ` [PATCH 5/8] Return the fsid from make_btrfs() Goffredo Baroncelli
2014-12-25 2:44 ` Satoru Takeuchi
2014-12-25 9:22 ` Goffredo Baroncelli
2014-12-17 20:14 ` [PATCH 6/8] Track the size of the chunk created Goffredo Baroncelli
2014-12-17 20:14 ` [PATCH 7/8] Print the summary Goffredo Baroncelli
2014-12-17 20:14 ` [PATCH 8/8] Add -v and -q switches in the mkfs.btrfs man page Goffredo Baroncelli
2014-12-17 22:38 ` [PATCH V2][BTRFS-PROGS] Improve output of mkfs.btrfs command Martin Steigerwald
2014-12-18 2:28 ` Anand Jain
2015-03-23 23:46 ` David Sterba
2015-03-25 19:07 ` Goffredo Baroncelli
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=1418847252-14184-5-git-send-email-kreijack@inwind.it \
--to=kreijack@gmail.com \
--cc=kreijack@inwind.it \
--cc=linux-btrfs@vger.kernel.org \
/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 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).