ufs: fix nexstep dir block size
authorEvgeniy Dushistov <dushistov@mail.ru>
Wed, 5 Dec 2007 07:45:06 +0000 (23:45 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 5 Dec 2007 17:21:18 +0000 (09:21 -0800)
This patch fixes regression, introduced since 2.6.16.  NextStep variant of
UFS as OpenStep uses directory block size equals to 1024.  Without this
change, ufs_check_page fails in many cases.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Cc: Dave Bailey <dsbailey@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ufs/dir.c
fs/ufs/super.c

index 30f8c2bb0c3e7a4c4aa29e86ae2ffdfc3cd9e00c..aaf2878305ceb6b0108ebb5a0ea832504cd43e54 100644 (file)
@@ -179,7 +179,7 @@ bad_entry:
        goto fail;
 Eend:
        p = (struct ufs_dir_entry *)(kaddr + offs);
-       ufs_error (sb, "ext2_check_page",
+       ufs_error(sb, __FUNCTION__,
                   "entry in directory #%lu spans the page boundary"
                   "offset=%lu",
                   dir->i_ino, (page->index<<PAGE_CACHE_SHIFT)+offs);
index c78c04fd993fe5fe1b95186d8f4d33ecdcf7e8ad..0072cb33ebec5da2f682574fbb36e809d0f1beb9 100644 (file)
@@ -755,13 +755,13 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
                break;
        
        case UFS_MOUNT_UFSTYPE_NEXTSTEP:
-               /*TODO: check may be we need set special dir block size?*/
                UFSD("ufstype=nextstep\n");
                uspi->s_fsize = block_size = 1024;
                uspi->s_fmask = ~(1024 - 1);
                uspi->s_fshift = 10;
                uspi->s_sbsize = super_block_size = 2048;
                uspi->s_sbbase = 0;
+               uspi->s_dirblksize = 1024;
                flags |= UFS_DE_OLD | UFS_UID_OLD | UFS_ST_OLD | UFS_CG_OLD;
                if (!(sb->s_flags & MS_RDONLY)) {
                        if (!silent)
@@ -771,13 +771,13 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
                break;
        
        case UFS_MOUNT_UFSTYPE_NEXTSTEP_CD:
-               /*TODO: check may be we need set special dir block size?*/
                UFSD("ufstype=nextstep-cd\n");
                uspi->s_fsize = block_size = 2048;
                uspi->s_fmask = ~(2048 - 1);
                uspi->s_fshift = 11;
                uspi->s_sbsize = super_block_size = 2048;
                uspi->s_sbbase = 0;
+               uspi->s_dirblksize = 1024;
                flags |= UFS_DE_OLD | UFS_UID_OLD | UFS_ST_OLD | UFS_CG_OLD;
                if (!(sb->s_flags & MS_RDONLY)) {
                        if (!silent)