From: achurch@achurch.org (Andrew Church)
To: linux-kernel@vger.kernel.org
Subject: [PATCH] ext2fs sb= mount option fix (kernel 2.4.25)
Date: Tue, 06 Apr 2004 20:21:08 JST [thread overview]
Message-ID: <407293b0.24174@achurch.org> (raw)
The following patch fixes a bug in the processing of the sb=
(alternate superblock) mount option for ext2: for devices with 1024-byte
blocks, the value from the option is never actually used. This patch is
for kernel 2.4.25. 2.6.5 also has an issue with sb=, and I'll send a patch
for that separately.
--Andrew Church
achurch@achurch.org
http://achurch.org/
---------------------------------------------------------------------------
--- linux-2.4.25-orig/fs/ext2/super.c Wed Feb 18 22:36:31 2004
+++ fs/ext2/super.c Mon Apr 5 09:23:19 2004
@@ -427,7 +427,7 @@
unsigned short resuid = EXT2_DEF_RESUID;
unsigned short resgid = EXT2_DEF_RESGID;
unsigned long block;
- unsigned long logic_sb_block = 1;
+ unsigned long logic_sb_block;
unsigned long offset = 0;
kdev_t dev = sb->s_dev;
int blocksize = BLOCK_SIZE;
@@ -465,6 +465,8 @@
if (blocksize != BLOCK_SIZE) {
logic_sb_block = (sb_block*BLOCK_SIZE) / blocksize;
offset = (sb_block*BLOCK_SIZE) % blocksize;
+ } else {
+ logic_sb_block = sb_block;
}
if (!(bh = sb_bread(sb, logic_sb_block))) {
reply other threads:[~2004-04-06 11:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=407293b0.24174@achurch.org \
--to=achurch@achurch.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 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.