aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorEvgeniy Dushistov <dushistov@mail.ru>2007-02-12 03:54:30 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:40 -0500
commitcbcae39fa1cc16c0fb199223f5ec1aea5f4c7b2d (patch)
tree27a3f078d196cb0589a972554dde24b35a350e11 /fs
parentcca97de1184f6000d22b4106d47687b31cca1fa3 (diff)
[PATCH] ufs2 write: mount as rw
These series of patches add UFS2 write-support. UFS2 - is default file system for recent versions of FreeBSD. The main differences from UFS1 from write support point of view are: 1)Not all inodes are allocated during formatation of disk. 2)All meta-data(pointer to data blocks) are 64bit(in UFS1 they are 32bit). So patch series consist of 1)make possible mount UFS2 in read-write mode 2)code to write ufs2 inodes and code to initialize inodes chunks. 3)work with 64bit meta-data I made simple testing like create/deleting/writing/reading/truncating, also I ran fsx-linux and untar and build kernel on UFS1 and UFS2, after that FreeBSD fsck do not find any errors in fs. This patch makes possible to mount ufs2 "rw", and updates UFS2 documentation: remove note about bug(it fixed by reallocate blocks on the fly patch) and add me in the list of people who want receive bug reports. Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/ufs/super.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index 209be95e9d18..1427e44bfd2a 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -61,6 +61,8 @@
61 * UFS2 (of FreeBSD 5.x) support added by 61 * UFS2 (of FreeBSD 5.x) support added by
62 * Niraj Kumar <niraj17@iitbombay.org>, Jan 2004 62 * Niraj Kumar <niraj17@iitbombay.org>, Jan 2004
63 * 63 *
64 * UFS2 write support added by
65 * Evgeniy Dushistov <dushistov@mail.ru>, 2007
64 */ 66 */
65 67
66 68
@@ -674,10 +676,6 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
674 uspi->s_sbsize = super_block_size = 1536; 676 uspi->s_sbsize = super_block_size = 1536;
675 uspi->s_sbbase = 0; 677 uspi->s_sbbase = 0;
676 flags |= UFS_TYPE_UFS2 | UFS_DE_44BSD | UFS_UID_44BSD | UFS_ST_44BSD | UFS_CG_44BSD; 678 flags |= UFS_TYPE_UFS2 | UFS_DE_44BSD | UFS_UID_44BSD | UFS_ST_44BSD | UFS_CG_44BSD;
677 if (!(sb->s_flags & MS_RDONLY)) {
678 printk(KERN_INFO "ufstype=ufs2 is supported read-only\n");
679 sb->s_flags |= MS_RDONLY;
680 }
681 break; 679 break;
682 680
683 case UFS_MOUNT_UFSTYPE_SUN: 681 case UFS_MOUNT_UFSTYPE_SUN:
@@ -1156,7 +1154,8 @@ static int ufs_remount (struct super_block *sb, int *mount_flags, char *data)
1156#else 1154#else
1157 if (ufstype != UFS_MOUNT_UFSTYPE_SUN && 1155 if (ufstype != UFS_MOUNT_UFSTYPE_SUN &&
1158 ufstype != UFS_MOUNT_UFSTYPE_44BSD && 1156 ufstype != UFS_MOUNT_UFSTYPE_44BSD &&
1159 ufstype != UFS_MOUNT_UFSTYPE_SUNx86) { 1157 ufstype != UFS_MOUNT_UFSTYPE_SUNx86 &&
1158 ufstype != UFS_MOUNT_UFSTYPE_UFS2) {
1160 printk("this ufstype is read-only supported\n"); 1159 printk("this ufstype is read-only supported\n");
1161 return -EINVAL; 1160 return -EINVAL;
1162 } 1161 }