aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ufs/super.c
diff options
context:
space:
mode:
authorEvgeniy Dushistov <dushistov@mail.ru>2007-02-08 17:20:25 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-09 12:25:46 -0500
commitf336953bfdee8d5e7f69cb8e080704546541f04b (patch)
tree03c86a0c0ce782edb4cf077fddea08f29dbdae84 /fs/ufs/super.c
parentcbb9450234fb28f60fea36520cd710a988ac5812 (diff)
[PATCH] ufs: restore back support of openstep
This is a fix of regression, which triggered by ~2.6.16. Patch with name ufs-directory-and-page-cache-from-blocks-to-pages.patch: in additional to conversation from block to page cache mechanism added new checks of directory integrity, one of them that directory entry do not across directory chunks. But some kinds of UFS: OpenStep UFS and Apple UFS (looks like these are the same filesystems) have different directory chunk size, then common UFSes(BSD and Solaris UFS). So this patch adds ability to works with variable size of directory chunks, and set it for ufstype=openstep to right size. Tested on darwin ufs. Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ufs/super.c')
-rw-r--r--fs/ufs/super.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index 8a8e9382ec09..209be95e9d18 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -649,7 +649,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
649 kmalloc (sizeof(struct ufs_sb_private_info), GFP_KERNEL); 649 kmalloc (sizeof(struct ufs_sb_private_info), GFP_KERNEL);
650 if (!uspi) 650 if (!uspi)
651 goto failed; 651 goto failed;
652 652 uspi->s_dirblksize = UFS_SECTOR_SIZE;
653 super_block_offset=UFS_SBLOCK; 653 super_block_offset=UFS_SBLOCK;
654 654
655 /* Keep 2Gig file limit. Some UFS variants need to override 655 /* Keep 2Gig file limit. Some UFS variants need to override
@@ -718,6 +718,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
718 break; 718 break;
719 719
720 case UFS_MOUNT_UFSTYPE_NEXTSTEP: 720 case UFS_MOUNT_UFSTYPE_NEXTSTEP:
721 /*TODO: check may be we need set special dir block size?*/
721 UFSD("ufstype=nextstep\n"); 722 UFSD("ufstype=nextstep\n");
722 uspi->s_fsize = block_size = 1024; 723 uspi->s_fsize = block_size = 1024;
723 uspi->s_fmask = ~(1024 - 1); 724 uspi->s_fmask = ~(1024 - 1);
@@ -733,6 +734,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
733 break; 734 break;
734 735
735 case UFS_MOUNT_UFSTYPE_NEXTSTEP_CD: 736 case UFS_MOUNT_UFSTYPE_NEXTSTEP_CD:
737 /*TODO: check may be we need set special dir block size?*/
736 UFSD("ufstype=nextstep-cd\n"); 738 UFSD("ufstype=nextstep-cd\n");
737 uspi->s_fsize = block_size = 2048; 739 uspi->s_fsize = block_size = 2048;
738 uspi->s_fmask = ~(2048 - 1); 740 uspi->s_fmask = ~(2048 - 1);
@@ -754,6 +756,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
754 uspi->s_fshift = 10; 756 uspi->s_fshift = 10;
755 uspi->s_sbsize = super_block_size = 2048; 757 uspi->s_sbsize = super_block_size = 2048;
756 uspi->s_sbbase = 0; 758 uspi->s_sbbase = 0;
759 uspi->s_dirblksize = 1024;
757 flags |= UFS_DE_44BSD | UFS_UID_44BSD | UFS_ST_44BSD | UFS_CG_44BSD; 760 flags |= UFS_DE_44BSD | UFS_UID_44BSD | UFS_ST_44BSD | UFS_CG_44BSD;
758 if (!(sb->s_flags & MS_RDONLY)) { 761 if (!(sb->s_flags & MS_RDONLY)) {
759 if (!silent) 762 if (!silent)