linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Trofimovich <slyfox@gentoo.org>
To: Chris Mason <chris.mason@oracle.com>
Cc: linux-btrfs@vger.kernel.org, Sergei Trofimovich <slyfox@gentoo.org>
Subject: [PATCH v2 0/9] btrfs-progs: some fixes for bugs spotted by valgrind
Date: Sat,  4 Jun 2011 11:19:15 +0300	[thread overview]
Message-ID: <1307175564-25355-1-git-send-email-slyfox@gentoo.org> (raw)

tmp branch recently got very nice feature: 'mkfs.btrfs -r /some/directory'.

It's very useful, when you need to creare minimal root: /bin/sh and fs_mark.

But there is another hidden feature! As '-r' can create whole filesystem
we can effectively valgrind a lot of code paths in btrfs and pick bugs.

This patch series is mostly (with one exception) dumb obvous holes plugs
(sometimes they are backports from kernel).

Patchset based on
    git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs-unstable.git#tmp

    commit e6bd18d8938986c997c45f0ea95b221d4edec095
    Author: Christoph Hellwig <hch@lst.de>
    Date:   Thu Apr 21 16:24:07 2011 -0400

First off the exception:

In order to make --mixed produce proper filesystems with meta+data only
blocks (and not meta+data/data ones, which confused space_cache and led
to an oops for me) I ask to consider for pulling Arne's patch:
> Subject: [PATCH v2 1/9] btrfs progs: fix extra metadata chunk allocation in --mixed case

The rest of patches should be obvoius. They don't fix all the fair valgrind
compaints, but reduce them severely.

Changes since v1:
  - "[PATCH 8/9] mkfs.btrfs: fix memory leak caused by 'scandir()' calls":
    'free_namelist()' now works correctly if 'count == -1'. It happens
    when 'free_namelist()' is called right after 'scandir()' returning
    an error.

Some stats:

    convert.c     |    2 +-
    extent-tree.c |    7 ++++---
    extent_io.c   |    1 +
    file-item.c   |    1 +
    mkfs.c        |   39 ++++++++++++++++++++++++++++++++++++---
    5 files changed, 43 insertions(+), 7 deletions(-)

Arne Jansen (1):
      btrfs progs: fix extra metadata chunk allocation in --mixed case

Sergei Trofimovich (8):
      btrfs-convert: fix typo: 'all inode' -> 'all inodes'
      mkfs.btrfs: fail on scandir error (-r mode)
      mkfs.btrfs: return some defined value instead of garbage when lookup checksum
      mkfs.btrfs: fix symlink names writing
      mkfs.btrfs: write zeroes instead on uninitialized data.
      mkfs.btrfs: free buffers allocated by pretty_sizes
      mkfs.btrfs: fix memory leak caused by 'scandir()' calls
      mkfs.btrfs: fix error text in '-r' mode

             reply	other threads:[~2011-06-04  8:19 UTC|newest]

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

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=1307175564-25355-1-git-send-email-slyfox@gentoo.org \
    --to=slyfox@gentoo.org \
    --cc=chris.mason@oracle.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).