linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Sergei Trofimovich <slyfox@gentoo.org>
Cc: Andi Kleen <andi@firstfloor.org>,
	Chris Mason <chris.mason@oracle.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/9] some fixes for bugs spotted by valgrind
Date: Fri, 3 Jun 2011 01:26:36 +0200	[thread overview]
Message-ID: <20110602232636.GJ27166@one.firstfloor.org> (raw)
In-Reply-To: <20110603001325.4a64b7c3@sf>

>         bh = btrfs_read_dev_super(fs_devices->latest_bdev);
>         if (!bh) {
>                 err = -EINVAL;
>                 goto fail_alloc;
>         }
> 
>         memcpy(&fs_info->super_copy, bh->b_data, sizeof(fs_info->super_copy));
>         memcpy(&fs_info->super_for_commit, &fs_info->super_copy,
>                sizeof(fs_info->super_for_commit));
>         brelse(bh);
> 
> But the way superblocks are written look racy.

FWIW for my ext4 checksumming work I had to add an extra lock to stabilize 
the super block (and the inodes) during checksumming.

Maybe something similar is needed here too.

-Andi
-- 
ak@linux.intel.com -- Speaking for myself only.

      reply	other threads:[~2011-06-02 23:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-30 21:18 [PATCH 0/9] some fixes for bugs spotted by valgrind Sergei Trofimovich
2011-05-30 21:19 ` [PATCH 1/9] btrfs progs: fix extra metadata chunk allocation in --mixed case Sergei Trofimovich
2011-05-30 21:19 ` [PATCH 2/9] btrfs-convert: fix typo: 'all inode' -> 'all inodes' Sergei Trofimovich
2011-05-30 21:19 ` [PATCH 3/9] mkfs.btrfs: fail on scandir error (-r mode) Sergei Trofimovich
2011-05-30 21:19 ` [PATCH 4/9] mkfs.btrfs: return some defined value instead of garbage when lookup checksum Sergei Trofimovich
2011-05-30 21:19 ` [PATCH 5/9] mkfs.btrfs: fix symlink names writing Sergei Trofimovich
2011-05-30 21:19 ` [PATCH 6/9] mkfs.btrfs: write zeroes instead on uninitialized data Sergei Trofimovich
2011-05-30 21:19 ` [PATCH 7/9] mkfs.btrfs: free buffers allocated by pretty_sizes Sergei Trofimovich
2011-05-30 21:19 ` [PATCH 8/9] mkfs.btrfs: fix memory leak caused by 'scandir()' calls Sergei Trofimovich
2011-05-30 21:19 ` [PATCH 9/9] mkfs.btrfs: fix error text in '-r' mode Sergei Trofimovich
2011-05-31 19:10 ` [PATCH 0/9] some fixes for bugs spotted by valgrind Sergei Trofimovich
2011-06-02 20:17   ` Andi Kleen
2011-06-02 21:13     ` Sergei Trofimovich
2011-06-02 23:26       ` Andi Kleen [this message]

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=20110602232636.GJ27166@one.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=chris.mason@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=slyfox@gentoo.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).