public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* JFS resize=0 problem in 2.6.0
@ 2003-12-28 15:30 lkml
  2003-12-29  0:05 ` Mike Fedyk
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: lkml @ 2003-12-28 15:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: lkml

Let me know if I'm missing the goal of the code here, but lines 261-273
of linux-2.6.0/fs/jfs/super.c are:

case Opt_resize:
{
	char *resize = args[0].from;
	if (!resize || !*resize) {    /* LINE 264 HERE */
		*newLVSize = sb->s_bdev->bd_inode->i_size >>
			sb->s_blocksize_bits;
		if (*newLVSize == 0)
			printk(KERN_ERR
			"JFS: Cannot determine volume size\n");
	} else
		*newLVSize = simple_strtoull(resize, &resize, 0);
	break;
}

It seems to me that line 264 is attempting to test for the mount 
paramater "resize=0", and when it comes across this, resize to the full
size of the volume.  However, this doesn't work.  I believe it should
test for the char '0'  (*resize=='0'), not against literal zero.  

Let me know if I'm way off base here.  But the below patch does allow a
$ mount -o remount,resize=0 /mnt/test    
to resize the jfs filesystem to the full size of the volume.


Ok, I've never submitted a patch before, but here goes:



--- linux-2.6.0/fs/jfs/super.c  2003-12-28 10:16:00.000000000 -0500
+++ linux/fs/jfs/super.c        2003-12-28 10:15:34.000000000 -0500
@@ -261,7 +261,7 @@
		case Opt_resize:
		{
			char *resize = args[0].from;
-			if (!resize || !*resize) {
+			if (!resize || !*resize || *resize=='0') {
				*newLVSize = sb->s_bdev->bd_inode->i_size >>
					sb->s_blocksize_bits;
				if (*newLVSize == 0)



-Elliott Bennett
lkml@dhtns.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-01-06 15:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-28 15:30 JFS resize=0 problem in 2.6.0 lkml
2003-12-29  0:05 ` Mike Fedyk
2004-01-02 20:12   ` Elliott Bennett
2004-01-02 21:24     ` Mike Fedyk
2004-01-02 22:28       ` Christophe Saout
2004-01-02 22:33 ` Christophe Saout
2004-01-06 15:24   ` Elliott Bennett
2004-01-05 17:07 ` Dave Kleikamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox