Bug 69446 - [PATCH] UFS blocksize bug
Summary: [PATCH] UFS blocksize bug
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 7.3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-07-22 17:16 UTC by Martin
Modified: 2007-04-18 16:44 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-06-08 16:31:29 UTC
Embargoed:


Attachments (Terms of Use)

Description Martin 2002-07-22 17:16:56 UTC
Description of Problem:
The UFS filesystem of kernel-2.4.18 works quite well (at least in RO
mode) but there is a bug (oversight) in linux/fs/ufs/super.c that
prevents UFS filesystems with a block size of 16K from being
mounted. (4K, 8K, 32K are working).

Between Redhat kernel-2.4.18-3 and kernel-2.4.18-5 ufs/super.c was
patched to make things worse. A small patch inside the jumbo patch
file redhat/SOURCES/linux-2.4.17-selected-ac-bits.patch tries to do
the right thing but consistently confuses block size with fragment
size.

Apply the following patch to correct this miscarried patch. I have
this patch running for quite a while and mount 8K/1K and 16K/2K UFS
filesystems.

HTH Martin


diff -urN linux/fs/ufs/super.c linux-ufs/fs/ufs/super.c
--- linux/fs/ufs/super.c	Mon Jun 10 20:51:36 2002
+++ linux-ufs/fs/ufs/super.c	Wed Jul 17 17:35:44 2002
@@ -662,12 +662,12 @@
 			uspi->s_fsize);
 		goto failed;
 	}
-	if (uspi->s_bsize < 512) {
+	if (uspi->s_fsize < 512) {
 		printk(KERN_ERR "ufs_read_super: fragment size %u is too small\n",
 			uspi->s_fsize);
 		goto failed;
 	}
-	if (uspi->s_bsize > 4096) {
+	if (uspi->s_fsize > 4096) {
 		printk(KERN_ERR "ufs_read_super: fragment size %u is too large\n",
 			uspi->s_fsize);
 		goto failed;
@@ -679,7 +679,7 @@
 	}
 	if (uspi->s_bsize < 4096) {
 		printk(KERN_ERR "ufs_read_super: block size %u is too small\n",
-			uspi->s_fsize);
+			uspi->s_bsize);
 		goto failed;
 	}
 	if (uspi->s_bsize / uspi->s_fsize > 8) {



Version-Release number of selected component (if applicable):
see above

How Reproducible:
mount -t ufs <any ufs with blocksize != 4k>


Note You need to log in before you can comment on or make changes to this bug.