From: Byongho Lee <bhlee.kernel@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v2 5/6] btrfs-progs: fix endian bug in update_super()
Date: Mon, 4 Jan 2016 10:01:33 +0900 [thread overview]
Message-ID: <1451869294-4291-6-git-send-email-bhlee.kernel@gmail.com> (raw)
In-Reply-To: <1451869294-4291-1-git-send-email-bhlee.kernel@gmail.com>
In update_super() 'chunk->stripe.devid' and 'super->dev_item.devid' both
are little endian. So we should not use endian helper
btrfs_set_stack_stripe_devid().
Signed-off-by: Byongho Lee <bhlee.kernel@gmail.com>
---
btrfs-image.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/btrfs-image.c b/btrfs-image.c
index 4a0a7c5414a7..bb1f63511647 100644
--- a/btrfs-image.c
+++ b/btrfs-image.c
@@ -1464,8 +1464,7 @@ static int update_super(struct mdrestore_struct *mdres, u8 *buffer)
btrfs_set_stack_chunk_sub_stripes(chunk, 0);
btrfs_set_stack_chunk_type(chunk,
BTRFS_BLOCK_GROUP_SYSTEM);
- btrfs_set_stack_stripe_devid(&chunk->stripe,
- super->dev_item.devid);
+ chunk->stripe.devid = super->dev_item.devid;
physical = logical_to_physical(mdres, key.offset,
&size);
if (size != (u64)-1)
--
2.6.4
next prev parent reply other threads:[~2016-01-04 1:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-04 1:01 [PATCH v2 0/6] btrfs-progs: fix endian bugs and clean-ups Byongho Lee
2016-01-04 1:01 ` [PATCH v2 1/6] btrfs-progs: get sparse checking working Byongho Lee
2016-01-04 1:01 ` [PATCH v2 2/6] btrfs-progs: use NULL instead of 0 Byongho Lee
2016-01-04 1:01 ` [PATCH v2 3/6] btrfs-progs: make private symbols to static Byongho Lee
2016-01-04 1:01 ` [PATCH v2 4/6] btrfs-progs: fix endian bugs in chunk rebuilding Byongho Lee
2016-01-04 1:01 ` Byongho Lee [this message]
2016-01-04 1:01 ` [PATCH v2 6/6] btrfs-progs: fix using on-disk structure to store in memory data Byongho Lee
2016-01-04 9:59 ` [PATCH v2 0/6] btrfs-progs: fix endian bugs and clean-ups David Sterba
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=1451869294-4291-6-git-send-email-bhlee.kernel@gmail.com \
--to=bhlee.kernel@gmail.com \
--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).