From: Andreas Dilger <adilger@clusterfs.com>
To: Juan Quintela <quintela@mandrakesoft.com>
Cc: Frank Krauss <fmfkrauss@mindspring.com>,
linux-kernel@vger.kernel.org, ext2-devel@lists.sourceforge.net,
Marcelo Tosatti <marcelo@conectiva.com.br>
Subject: Re: [PATCH] Possible EXT2 File System Corruption in Kernel 2.4
Date: Mon, 20 May 2002 21:57:02 -0600 [thread overview]
Message-ID: <20020521035702.GA9901@turbolinux.com> (raw)
In-Reply-To: <E16vKwg-00056q-00@barry.mail.mindspring.net> <02041112492500.01786@sevencardstud.cable.nu> <20020417075637.GJ20464@turbolinux.com> <m2661jxioj.fsf@demo.mitica>
On May 20, 2002 11:38 +0200, Juan Quintela wrote:
> >>>>> "andreas" == Andreas Dilger <adilger@clusterfs.com> writes:
> andreas> diff -ru linux-2.4.18.orig/fs/ext2/balloc.c linux-2.4.18-aed/fs/ext2/balloc.c
> andreas> --- linux-2.4.18.orig/fs/ext2/balloc.c Wed Feb 27 10:31:58 2002
> andreas> +++ linux-2.4.18-aed/fs/ext2/balloc.c Mon Mar 18 17:07:55 2002
> andreas> @@ -269,7 +269,8 @@
> andreas> }
> andreas> lock_super (sb);
> andreas> es = sb->u.ext2_sb.s_es;
> andreas> - if (block < le32_to_cpu(es->s_first_data_block) ||
> andreas> + if (block < le32_to_cpu(es->s_first_data_block) ||
> andreas> + block + count < block ||
>
> It is just me, or this will allways be false? A fast grep shows that
> count is always bigger than 1. Same for the ext3 part.
Well, under normal operation this test will never be true (same as the
other tests there), but it appears that in some cases there _are_ values
of "block + count" which pass this test but fail later on. I don't know
the exact source of the problem, but it appears to happen when "block"
is -1, and "block + count" is then 0, which does not trigger the
existing tests (s_first_data_block is 0 for 4kB filesystems).
It is likely that block is being set as -EPERM or something like that,
but I'm not sure. In any case, you can check l-k archives for the
original emails on this thread where the users report trying to access
group 131071, which is 2^32 / 32768 (i.e. -1 / number of blocks per
group for a 4kB block ext2 filesystem).
Cheers, Andreas
--
Andreas Dilger
http://www-mddsp.enel.ucalgary.ca/People/adilger/
http://sourceforge.net/projects/ext2resize/
next prev parent reply other threads:[~2002-05-21 3:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E16vKwg-00056q-00@barry.mail.mindspring.net>
2002-04-11 16:40 ` Possible EXT2 File System Corruption in Kernel 2.4 Frank Krauss
2002-04-11 19:12 ` [PATCH] " Andreas Dilger
2002-04-11 20:10 ` Andrew Morton
2002-04-17 7:56 ` [PATCH] " Andreas Dilger
2002-05-20 9:38 ` Juan Quintela
2002-05-21 3:57 ` Andreas Dilger [this message]
2002-05-21 4:02 ` David S. Miller
2002-04-17 17:31 Marc-Christian Petersen
[not found] <20020417170758.8070026884@smtp.clusterfs.com>
2002-04-17 18:33 ` Andreas Dilger
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=20020521035702.GA9901@turbolinux.com \
--to=adilger@clusterfs.com \
--cc=ext2-devel@lists.sourceforge.net \
--cc=fmfkrauss@mindspring.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=quintela@mandrakesoft.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