From: Andreas Dilger <adilger@turbolinux.com>
To: Ext2 development mailing list <ext2-devel@lists.sourceforge.net>,
Linux FS development list <linux-fsdevel@vger.kernel.org>
Cc: Linux kernel development list <linux-kernel@vger.kernel.org>
Subject: [PATCH] 2.2.18 ext2 large file bug?
Date: Wed, 13 Dec 2000 01:14:21 -0700 (MST) [thread overview]
Message-ID: <200012130814.eBD8ELc10852@webber.adilger.net> (raw)
Hello,
while looking at the COMPAT flag patches I made, I noticed the following
in the ext2/ext3 code. I believe that this bug is fixed in 2.4, but it
also needs to be fixed in 2.2. Basically, we are checking for an ext2
large file, which would be a file > 2GB on systems that don't support
such. However, we are checking for a file > 8GB which is clearly wrong.
The ext3 version of the patch is also attached.
Cheers, Andreas
==========================================================================
--- linux-2.2.18pre27-TL/fs/ext2/file.c.orig Mon Dec 11 22:43:17 2000
+++ linux-2.2.18pre27-TL/fs/ext2/file.c Wed Dec 13 00:13:00 2000
@@ -208,7 +208,7 @@
if (!count)
return -EFBIG;
}
- if (((pos + count) >> 31) &&
+ if (((pos + count) >> 33) &&
!(sb->u.ext2_sb.s_es->s_feature_ro_compat &
cpu_to_le32(EXT2_FEATURE_RO_COMPAT_LARGE_FILE))) {
/* If this is the first large file created, add a flag
--- linux-2.2.18pre27-TL/fs/ext3/file.c.orig Mon Dec 11 22:43:17 2000
+++ linux-2.2.18pre27-TL/fs/ext3/file.c Wed Dec 13 00:13:00 2000
@@ -208,7 +208,7 @@
if (!count)
return -EFBIG;
}
- if (((pos + count) >> 31) &&
+ if (((pos + count) >> 33) &&
!EXT3_HAS_RO_COMPAT_FEATURE(sb,
EXT3_FEATURE_RO_COMPAT_LARGE_FILE)) {
/* If this is the first large file created, add a flag
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next reply other threads:[~2000-12-13 8:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-13 8:14 Andreas Dilger [this message]
2000-12-13 8:42 ` [PATCH] 2.2.18 ext2 large file bug? Alexander Viro
2000-12-13 8:53 ` Andreas Dilger
2000-12-13 14:46 ` Alan Cox
2000-12-13 14:46 ` Alan Cox
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=200012130814.eBD8ELc10852@webber.adilger.net \
--to=adilger@turbolinux.com \
--cc=ext2-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).