linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adam Buchbinder <abuchbinder@google.com>
To: linux-btrfs@vger.kernel.org
Cc: dave@jikos.cz, Adam Buchbinder <abuchbinder@google.com>
Subject: [PATCH] Properly size the leafsize field in the mdrestore_struct struct.
Date: Thu, 12 Jun 2014 15:57:33 -0700	[thread overview]
Message-ID: <1402613853-14956-1-git-send-email-abuchbinder@google.com> (raw)

It's 32 bits as defined in ctree.h, but the struct had it as 64 bits.

Found using MemorySanitizer.

Signed-off-by: Adam Buchbinder <abuchbinder@google.com>
---
 btrfs-image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/btrfs-image.c b/btrfs-image.c
index cf1fe2d..98d765a 100644
--- a/btrfs-image.c
+++ b/btrfs-image.c
@@ -128,7 +128,7 @@ struct mdrestore_struct {
 	struct rb_root chunk_tree;
 	struct list_head list;
 	size_t num_items;
-	u64 leafsize;
+	u32 leafsize;
 	u64 devid;
 	u8 uuid[BTRFS_UUID_SIZE];
 	u8 fsid[BTRFS_FSID_SIZE];
-- 
2.0.0.526.g5318336


             reply	other threads:[~2014-06-12 22:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-12 22:57 Adam Buchbinder [this message]
     [not found] ` <CALb+jKqYiQYsHdfOBbOhd4bkR1Y_+Qjv4mvyqq8ZBuLoJkyeag@mail.gmail.com>
2014-06-13 23:58   ` [PATCH] Properly size the leafsize field in the mdrestore_struct struct Adam Buchbinder
2014-06-18  6:01 ` Satoru Takeuchi
2014-06-23 13:44   ` David Sterba
2014-06-23 23:12     ` Satoru Takeuchi
2014-06-24  8:50       ` 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=1402613853-14956-1-git-send-email-abuchbinder@google.com \
    --to=abuchbinder@google.com \
    --cc=dave@jikos.cz \
    --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).