From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199703241742.MAA00619@linux03.amt.tay1.dec.com> Date: Mon, 24 Mar 1997 12:42:05 -0500 From: jestabro@amt.tay1.dec.com Subject: Re: UFS File System? In-Reply-To: <199703061438.JAA26361@ms1.act.net> >>> raster@act.net said: > > Has anyone had any luck using the UFS filesystem? I'm trying to get > to either my Digital UNIX 3.2 or 4.0 CDs, and I know that at least > the 4.0 one is fromatted UFS, but when I try and mount it (with -t > ufs), it tells me that either the superblock is bad, wrong > filesystem, or that I've got too many things mounted. Well, I'm > pretty sure the Superblock is fine, since it boots up fine when you > try and install Digital UNIX, and I don't have anything else mounted > except for my root ext2 partition and my /winnt vfat partition. > > Origitanally I had thought they were formatted AdvFS, but upon > booting to the CD and typing mount it informed me that it was indeed > UFS. > > Anybody have any ideas? Well, I had the need, and found that the following patches to 2.1.29 did the trick for me. Note that these are *not* pretty, and prolly should be reworked to be (partially) done via configuration options, but they worked. I don't think they'll allow access to DU UFS on any other platform, just Alpha, but that'd be fixed by changing the activation of the __alpha__ code in ufs_inode.c to a configuration option instead. Also, the header file patches could be made such that no conditional compilation is required. Somebody want to try formalizing these changes? I'll be happy to test 'em... BTW, I configured both the BSD style and SUN style UFS options. Good luck. --Jay++ ------------------------------------------------------------------------------- American Non Sequitur Society: we don't make sense, but we do like pizza... Jay A Estabrook Alpha Migration Tools - LINUX Project Digital Equipment Corp. (508) 952-4202 or (DTN) 227-4202 151 Taylor Street - TAY1-2 enet: jestabro@amt.tay1.dec.com Littleton, MA 01460-1407 decnet: tallis::jestabro ------------------------------------------------------------------------------- diff -urP old/fs/ufs/ufs_inode.c new/fs/ufs/ufs_inode.c --- old/fs/ufs/ufs_inode.c Sat Nov 30 06:22:19 1996 +++ new/fs/ufs/ufs_inode.c Sun Mar 23 11:40:41 1997 @@ -197,8 +197,16 @@ * for the rw code, we may want to mark these inodes as read-only. * XXX - bug Linus to make i_size a __u64 instead of a __u32. */ - inode->u.ufs_i.i_size = ((__u64)(ufs_swab32(ufsip->ui_size.val[0]))<<32) | - (__u64)(ufs_swab32(ufsip->ui_size.val[1])); +#ifdef __alpha__ + inode->u.ufs_i.i_size = + ((__u64)(ufs_swab32(ufsip->ui_size.val[1]))<<32) | + (__u64)(ufs_swab32(ufsip->ui_size.val[0])); +#else /* __alpha__ */ + inode->u.ufs_i.i_size = + ((__u64)(ufs_swab32(ufsip->ui_size.val[0]))<<32) | + (__u64)(ufs_swab32(ufsip->ui_size.val[1])); +#endif /* __alpha__ */ + /* KRR - Just type cast inode->u.ufs_i.i_size into off_t and * worry about overflow later */ diff -urP old/include/linux/ufs_fs.h new/include/linux/ufs_fs.h --- old/include/linux/ufs_fs.h Thu Feb 6 05:53:33 1997 +++ new/include/linux/ufs_fs.h Sun Mar 23 11:07:15 1997 @@ -109,7 +109,11 @@ __u32 fs_dblkno; /* offset of first data after cg */ __u32 fs_cgoffset; /* cylinder group offset in cylinder */ __u32 fs_cgmask; /* used to calc mod fs_ntrak */ +#ifdef __alpha__ + __s32 fs_time; +#else /* __alpha__ */ time_t fs_time; /* last time written */ +#endif /* __alpha__ */ __u32 fs_size; /* number of blocks in fs */ __u32 fs_dsize; /* number of data blocks in fs */ __u32 fs_ncg; /* number of cylinder groups */ @@ -172,7 +176,11 @@ __u8 fs_fsmnt[MAXMNTLEN]; /* name mounted on */ /* these fields retain the current block allocation info */ __u32 fs_cgrotor; /* last cg searched */ +#ifdef __alpha__ + __u32 fs_csp[MAXCSBUFS]; /* list of fs_cs info buffers */ +#else /* __alpha__ */ struct ufs_csum * fs_csp[MAXCSBUFS]; /* list of fs_cs info buffers */ +#endif /* __alpha__ */ __u32 fs_cpc; /* cyl per cycle in postbl */ __u16 fs_opostbl[16][8]; /* old rotation block list head */ __s32 fs_sparecon[55]; /* reserved for future constants */ ------------------------------------------------------------------------------- -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com