From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 4/8] libgfs2: Improve and simplify blk_alloc_in_rg
Date: Mon, 27 Jan 2014 10:46:55 -0500 (EST) [thread overview]
Message-ID: <458038268.10900790.1390837615544.JavaMail.root@redhat.com> (raw)
In-Reply-To: <1390832242-10197-4-git-send-email-anprice@redhat.com>
----- Original Message -----
| This function included naive implementations of gfs2_setbit and
| gfs2_bitfit so these have been replaced with calls to those functions.
| The 'type' parameter has been replaced with 'state' and the type
| defines removed in favour of the GFS2_BLKST_* values. As these were the
| same for both meta and data block allocations, data_alloc() has been
| removed and its callers updated to use meta_alloc().
|
| Signed-off-by: Andrew Price <anprice@redhat.com>
Hi,
I've been staring at this patch for a long time now.
The patch looks correct. However, my concern is this:
The fsck.gfs2 tool is designed to repair either GFS2 or GFS1 file systems,
and GFS1 uses bitmaps differently from GFS2. An indirect block, for example,
will be marked as a data block in a GFS2 file system, but "meta" in GFS1,
(which translates to unlinked dinode in a GFS2 bitmap).
Of course, since this is upstream code, it's tempting to say that there
won't be any GFS1 file systems hanging around. However, in theory, users
might take a GFS1 file system from a legacy system and try migrate it to
a newer system, upstream, RHEL7, Fedora, whatever, in which case they
want to use gfs2_convert. But gfs2_convert doesn't do any error checking,
so we recommend running fsck before the convert. However, on newer OSes,
there isn't a gfs_fsck, there's only fsck.gfs2, which should handle both.
So we need to ask some hard questions:
(1) Does it matter? If the fsck is only being run for the sake of sanity
for gfs2_convert, allocating those "metadata" blocks as "data" blocks
will likely be all right, since gfs2_convert will need to convert them
anyway.
(2) From the patch, it looks like "data" and "meta" are being treated the
same anyway, so is there a bug in today's fsck.gfs2? This might
show up if there's a GFS1 file system that has enough damage as to
push a pile of directory entries into lost+found, thus increasing its
size enough to add indirect blocks. Due to that same bug, fsck.gfs2
might not catch the discrepancy, so we probably should check it by hand
using gfs2_edit.
(3) If there is a bug with how fsck.gfs2 handles GFS1 bitmaps, do we need
to fix it? Or is it too much work for too little gain?
(4) I've got a test case I run called fsck.gfs2.nightmare2.sh, which tests
fsck against my entire collection of metadata sets, both GFS and GFS2.
It can run for days, depending on the hardware. Do the GFS1 metadata
sets still pass with this patch?
Regards,
Bob Peterson
Red Hat File Systems
next prev parent reply other threads:[~2014-01-27 15:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-27 14:17 [Cluster-devel] [PATCH 1/8] libgfs2: Remove sdp argument from compute_heightsize Andrew Price
2014-01-27 14:17 ` [Cluster-devel] [PATCH 2/8] libgfs2: Remove sdp and j arguments from write_journal Andrew Price
2014-01-27 14:17 ` [Cluster-devel] [PATCH 3/8] libgfs2: Rework find_metapath Andrew Price
2014-01-27 14:17 ` [Cluster-devel] [PATCH 4/8] libgfs2: Improve and simplify blk_alloc_in_rg Andrew Price
2014-01-27 15:46 ` Bob Peterson [this message]
2014-01-27 17:09 ` Andrew Price
2014-01-27 14:17 ` [Cluster-devel] [PATCH 5/8] mkfs.gfs2 tests: Enable debug output Andrew Price
2014-01-27 14:17 ` [Cluster-devel] [PATCH 6/8] libgfs2: Refactor block allocation functions Andrew Price
2014-01-27 14:17 ` [Cluster-devel] [PATCH 7/8] gfs2-utils: Clean up unused functions Andrew Price
2014-01-27 14:17 ` [Cluster-devel] [PATCH 8/8] libgfs2: Remove exit call from build_rgrps Andrew Price
2014-01-27 14:47 ` [Cluster-devel] [PATCH 1/8] libgfs2: Remove sdp argument from compute_heightsize Steven Whitehouse
2014-01-27 15:03 ` Andrew Price
2014-01-27 15:04 ` Steven Whitehouse
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=458038268.10900790.1390837615544.JavaMail.root@redhat.com \
--to=rpeterso@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.