From: Srinivasa Ds <srinivasa@in.ibm.com>
To: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
Linus Torvalds <torvalds@osdl.org>,
swhiteho@redhat.com, fabbione@ubuntu.com, bunk@stusta.de,
aarora@linux.vnet.ibm.com, aarora@in.ibm.com
Subject: [RFC][PATCH] Mount problem with the GFS2 code
Date: Thu, 30 Nov 2006 15:04:55 +0530 [thread overview]
Message-ID: <456EA5BF.6090304@in.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1251 bytes --]
Hi all
While mounting the gfs2 filesystem,our test team had a problem and we
got this error message.
=======================================================
GFS2: fsid=: Trying to join cluster "lock_nolock", "dasde1"
GFS2: fsid=dasde1.0: Joined cluster. Now mounting FS...
GFS2: not a GFS2 filesystem
GFS2: fsid=dasde1.0: can't read superblock: -22
==========================================================================
On debugging further we found that problem is while reading the super
block(gfs2_read_super) and comparing the magic number in it.
When I replace the submit_bio() call(present in gfs2_read_super) with
the sb_getblk() and ll_rw_block(), mount operation succeded.
On further analysis we found that before calling submit_bio(),
bio->bi_sector was set to "sector" variable. This "sector" variable has
the same value of bh->b_blocknr(block number). Hence there is a need to
multiply this valuwith (blocksize >> 9)(9 because,sector size
2^9,samething happens in ll_rw_block also, before calling submit_bio()).
So I have developed the patch which solves this problem. Please let me
know your comments.
================================================================
Signed-off-by: Srinivasa DS <srinivasa@in.ibm.com>
[-- Attachment #2: gfs2.fix --]
[-- Type: text/plain, Size: 488 bytes --]
super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.19-rc6/fs/gfs2/super.c
===================================================================
--- linux-2.6.19-rc6.orig/fs/gfs2/super.c
+++ linux-2.6.19-rc6/fs/gfs2/super.c
@@ -199,7 +199,7 @@ struct page *gfs2_read_super(struct supe
return NULL;
}
- bio->bi_sector = sector;
+ bio->bi_sector = sector * (sb->s_blocksize >> 9);
bio->bi_bdev = sb->s_bdev;
bio_add_page(bio, page, PAGE_SIZE, 0);
next reply other threads:[~2006-11-30 7:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-30 9:34 Srinivasa Ds [this message]
2006-11-30 8:29 ` [RFC][PATCH] Mount problem with the GFS2 code Andrew Morton
2006-11-30 9:05 ` Steven Whitehouse
2006-11-30 9:12 ` Andrew Morton
2006-11-30 9:30 ` Steven Whitehouse
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=456EA5BF.6090304@in.ibm.com \
--to=srinivasa@in.ibm.com \
--cc=aarora@in.ibm.com \
--cc=aarora@linux.vnet.ibm.com \
--cc=akpm@osdl.org \
--cc=bunk@stusta.de \
--cc=fabbione@ubuntu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=swhiteho@redhat.com \
--cc=torvalds@osdl.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.