public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 14601] New: Wrong handling of META_BG when getting number of blocks for group descriptors
Date: Sat, 14 Nov 2009 11:15:18 GMT	[thread overview]
Message-ID: <bug-14601-13602@http.bugzilla.kernel.org/> (raw)

http://bugzilla.kernel.org/show_bug.cgi?id=14601

           Summary: Wrong handling of META_BG when getting number of
                    blocks for group descriptors
           Product: File System
           Version: 2.5
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: ext4
        AssignedTo: fs_ext4@kernel-bugs.osdl.org
        ReportedBy: DamienDGU@hotmail.com
        Regression: No


Created an attachment (id=23778)
 --> (http://bugzilla.kernel.org/attachment.cgi?id=23778)
ext3/balloc.c and ext4/balloc.c change to count number of descriptors blocks

When computing number of blocks for group descriptors for a given group, the
total number of blocks for group descriptors is returned in case META_BG is
enabled and group is inside the first groups (such as block of its descriptor
is below s_first_meta_bg). I think it should be limited to s_first_meta_bg.
This behaviour is incoherent with e2fsprogs behaviour (see
http://marc.info/?l=linux-ext4&m=125794126219545&w=2) and can lead to
corruption in case performing e2fsck on a filesystem where an uninitialized
block bitmap was initialized by kernel.
I attach a proposed change, but:
- I did not compiled, nor tried it.
- it is for ext3 and ext4.
- I am not sure it is enough: there is some other location where s_gdb_count is
used and where perhaps ext4_bg_num_gdb should be used instead as in
ext4_setup_system_zone (I do not understand the behaviour here, it seems to not
take META_BG flag into account at all) or ex4_iget.

-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.

             reply	other threads:[~2009-11-14 11:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-14 11:15 bugzilla-daemon [this message]
2009-11-17 21:47 ` [Bug 14601] Wrong handling of META_BG when getting number of blocks for group descriptors bugzilla-daemon
2009-11-17 22:57 ` bugzilla-daemon
2009-11-18  9:52 ` bugzilla-daemon

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=bug-14601-13602@http.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-ext4@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