From: Andrew Morton <akpm@osdl.org>
To: Nick Orlov <bugfixer@list.ru>
Cc: linux-kernel@vger.kernel.org, Jeff Mahoney <jeffm@suse.com>,
reiserfs-dev@namesys.com
Subject: Re: bitmap loading related reiserfs changes in 2.6.17-mm1 are broken
Date: Wed, 21 Jun 2006 20:43:03 -0700 [thread overview]
Message-ID: <20060621204303.47facd01.akpm@osdl.org> (raw)
In-Reply-To: <20060622032733.GA5158@nickolas.homeunix.com>
On Wed, 21 Jun 2006 23:27:33 -0400
Nick Orlov <bugfixer@list.ru> wrote:
> subj.
>
> I've got a lot of BUG's during the boot and eventually box locked up.
> SYS-RQ worked. Unfortunately none of these errors did make it to log files,
> so I cannot provide the backtraces.
>
> But reverting last 4 patches of reiserfs-changes series, namely
>
> reiserfs-reorganize-bitmap-loading-functions.patch
> reiserfs-on-demand-bitmap-loading.patch
> reiserfs-on-demand-bitmap-loading-fix.patch
> reiserfs-use-generic_file_open-for-open-checks.patch
>
> fixed the problem for me.
>
Yeah, sorry. I've uploaded the below to the hot-fixes directory - it
should repair things.
Jeff, given its track record, I have to say that my confidence in this work
is nanoscopic. Given that, and given the importance of reiserfs and given
the low rate of reiser3 development and given my ignorance of how reiserfs
works, I'm inclined to move very slowly on these patches.
It would really help if Chris or one of the namesys developers could take
the time to review and test these patches closely, please.
diff -puN fs/reiserfs/bitmap.c~reiserfs-reorganize-bitmap-loading-functions-fix fs/reiserfs/bitmap.c
--- a/fs/reiserfs/bitmap.c~reiserfs-reorganize-bitmap-loading-functions-fix
+++ a/fs/reiserfs/bitmap.c
@@ -1292,25 +1292,25 @@ void reiserfs_cache_bitmap_metadata(stru
struct buffer_head *bh,
struct reiserfs_bitmap_info *info)
{
- unsigned long *cur = (unsigned long *)bh->b_data;
- int i;
+ unsigned long *cur = (unsigned long *)(bh->b_data + bh->b_size);
+
+ while (--cur >= (unsigned long *)bh->b_data) {
+ int base = ((char *)cur - bh->b_data) << 3;
- for (i = sb->s_blocksize / sizeof (*cur); i > 0; i--, cur++) {
/* 0 and ~0 are special, we can optimize for them */
if (*cur == 0) {
- info->first_zero_hint = i << 3;
- info->free_count += sizeof (*cur) << 3;
+ info->first_zero_hint = base;
+ info->free_count += BITS_PER_LONG;
} else if (*cur != ~0L) { /* A mix, investigate */
int b;
- for (b = sizeof (*cur) << 3; b >= 0; b--) {
+ for (b = BITS_PER_LONG - 1; b >= 0; b--) {
if (!reiserfs_test_le_bit(b, cur)) {
- info->first_zero_hint = (i << 3) + b;
+ info->first_zero_hint = base + b;
info->free_count++;
}
}
}
}
-
/* The first bit must ALWAYS be 1 */
BUG_ON(info->first_zero_hint == 0);
}
_
next prev parent reply other threads:[~2006-06-22 3:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-22 3:27 bitmap loading related reiserfs changes in 2.6.17-mm1 are broken Nick Orlov
2006-06-22 3:43 ` Andrew Morton [this message]
2006-06-22 3:50 ` Jeffrey Mahoney
2006-06-22 5:09 ` Barry K. Nathan
2006-06-22 10:11 ` Barry K. Nathan
2006-06-22 6:33 ` Hans Reiser
2006-06-22 7:02 ` Hans Reiser
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=20060621204303.47facd01.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=bugfixer@list.ru \
--cc=jeffm@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=reiserfs-dev@namesys.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox