From: Rogier Wolff <R.E.Wolff@BitWizard.nl>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Ted Ts'o <tytso@mit.edu>, Ric Wheeler <rwheeler@redhat.com>,
Rogier Wolff <R.E.Wolff@bitwizard.nl>,
Con Kolivas <kernel@kolivas.org>,
adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org
Subject: Re: Regular ext4 error warning with HD in USB dock
Date: Sat, 8 Jan 2011 09:05:20 +0100 [thread overview]
Message-ID: <20110108080520.GE12433@bitwizard.nl> (raw)
In-Reply-To: <AANLkTimFA9Can0Oe39Jkw+1X6uxwsgNVW2aKPoV_VLoq@mail.gmail.com>
On Fri, Jan 07, 2011 at 11:07:23PM +0200, Amir Goldstein wrote:
> On Fri, Jan 7, 2011 at 9:41 PM, Amir Goldstein <amir73il@gmail.com> wrote:
> > On Fri, Jan 7, 2011 at 7:26 AM, Ted Ts'o <tytso@mit.edu> wrote:
> >> Am I missing something? The kernel stores up to 3k worth of data, on
> >> a 4k block file system. Whereas e2fsck patch blindly assume 2k worhth
> >> of data regardless of the block size. The kernel patch looks ok, but
> >> the e2fsprogs patch seems badly broken....
>
> So it's not badly broken, it copies blocksize-2K, which is clumsily
> written like this:
> + int len = ctx->fs->blocksize - 2*SUPERBLOCK_OFFSET;
So this should be:
int len = ctx->fs->blocksize - SUPERBLOCK_OFFSET - sizeof (<superblock>);
Although those two numbers are equal right now, there is no reason to
assume that they will remain so in the future. So if the superblock
size (or the offset) changes in the future, it's much better to have
programmed this so that it will keep on working as opposed to getting
to deal with ugly bugs in code that hasn't changed in years...
Roger.
--
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 **
** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement.
Does it sit on the couch all day? Is it unemployed? Please be specific!
Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-01-08 8:05 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-27 22:53 Regular ext4 error warning with HD in USB dock Con Kolivas
2010-12-28 2:53 ` Ted Ts'o
2010-12-28 8:19 ` Rogier Wolff
2010-12-28 9:09 ` Con Kolivas
2010-12-28 10:30 ` Amir Goldstein
2011-01-01 17:20 ` Ric Wheeler
2011-01-02 19:23 ` Amir Goldstein
2011-01-07 5:26 ` Ted Ts'o
2011-01-07 19:41 ` Amir Goldstein
2011-01-07 21:07 ` Amir Goldstein
2011-01-07 22:12 ` Amir Goldstein
2011-01-08 20:28 ` Amir Goldstein
2011-01-08 8:05 ` Rogier Wolff [this message]
2011-01-08 20:06 ` Amir Goldstein
2011-01-08 22:00 ` Ted Ts'o
2011-01-09 8:12 ` Rogier Wolff
2011-01-09 14:58 ` Ted Ts'o
2011-01-10 7:45 ` Andreas Dilger
2011-01-10 8:49 ` Rogier Wolff
2011-01-07 5:28 ` Ted Ts'o
2011-01-07 19:43 ` Amir Goldstein
2011-01-07 20:39 ` Amir Goldstein
2010-12-28 14:15 ` Ted Ts'o
2010-12-28 10:41 ` torn5
[not found] ` <4D19BEF1.9010708-9AbUPqfR1/2XDw4h08c5KA@public.gmane.org>
2010-12-28 14:32 ` Ted Ts'o
2010-12-28 15:02 ` Ben Pfaff
2010-12-28 15:20 ` torn5
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=20110108080520.GE12433@bitwizard.nl \
--to=r.e.wolff@bitwizard.nl \
--cc=adilger.kernel@dilger.ca \
--cc=amir73il@gmail.com \
--cc=kernel@kolivas.org \
--cc=linux-ext4@vger.kernel.org \
--cc=rwheeler@redhat.com \
--cc=tytso@mit.edu \
/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).