What does your patch look like?
I'll include it at end... it's actually a bit worse than I described before...
if (lbn < 0)
return (EFBIG);
You get this error when you do truncate(), right?
Actually, at that time I was getting it just about everywhere, because (I think) fs_maxfilesize wasn't getting set anywhere, so I couldn't write any file greater than 0 bytes. That's a pretty safe setup! The patch included below causes a kernel panic when the file size gets > 4GB. I forgot to bring the backtrace I scrawled down with me, so if it is of interest, I'll get it later (is there anything else you'ld like to see; I don't mind krashing the machine again to get it ;) Note that there are a couple of these - ffs_oldfscompat(fs); + /*ffs_oldfscompat(fs);*/ /*cjb - guess*/ out of desperation; they don't appear to make any difference, as expected.
in the superblock is 4GB. I'll have to play with dumpfs later (I wonder
why that doesn't work on a mounted FS?)
Supply the characher device corresponding to your mounted file system to
make it happy...
Ah, kool. However, with or without my patch, on any UFS, I get something like dumpfs: /dev/rdisk2s10: error reading cg dumpfs: /dev/rdisk2s10: Operation not supported by device at some point. Is that normal?
Just a side note - I should have known Apple would deliver a system
wherein it's EASY to build and install a kernel ;)
You are welcome :-D :-D
Well, I do appreciate it for the first shot, but I might eventually want to configure all sorts of things. This kind of stuff goes especially quik on Linux, since you can config ufs support modular, and not have to reboot (except for panics, of course). I promise to RTFM before I complain... The downside of the Apple Way is that sometimes WYSIWYG == WISIAYG... ---- Chris J. Bednar Director, Distributed Computing Product Group http://AdvancedDataSolutions.com/ ----------------------------- --- xnu-201-5/bsd/ufs/ffs/ffs_vfsops.c.filesize Fri Sep 7 17:52:44 2001 +++ xnu-201-5/bsd/ufs/ffs/ffs_vfsops.c Thu Dec 13 10:07:52 2001 @@ -329,7 +329,7 @@ struct buf *bp; struct fs *fs, *newfs; int i, blks, size, error; - u_int64_t maxfilesize; /* XXX */ + /*u_int64_t maxfilesize; XXX */ int32_t *lp; #if REV_ENDIAN_FS int rev_endian = (mountp->mnt_flag & MNT_REVEND); @@ -366,7 +366,7 @@ #endif /* REV_ENDIAN_FS */ brelse(bp); - return (EIO); /* XXX needs translation */ + /*return (EIO); XXX needs translation */ } fs = VFSTOUFS(mountp)->um_fs; /* @@ -385,10 +385,10 @@ #endif /* REV_ENDIAN_FS */ brelse(bp); mountp->mnt_maxsymlinklen = fs->fs_maxsymlinklen; - ffs_oldfscompat(fs); - maxfilesize = (u_int64_t)0x100000000; /* 4GB */ - if (fs->fs_maxfilesize > maxfilesize) /* XXX */ - fs->fs_maxfilesize = maxfilesize; /* XXX */ + /*ffs_oldfscompat(fs);*/ /*cjb - guess*/ + /*maxfilesize = (u_int64_t)0x100000000; 4GB */ + /*if (fs->fs_maxfilesize > maxfilesize) XXX */ + /* fs->fs_maxfilesize = maxfilesize; XXX */ /* * Step 3: re-read summary information from disk. */ @@ -501,7 +501,7 @@ int32_t *lp; struct ucred *cred; extern struct vnode *rootvp; - u_int64_t maxfilesize; /* XXX */ + /*u_int64_t maxfilesize; XXX */ u_int dbsize = DEV_BSIZE; #if REV_ENDIAN_FS int rev_endian=0; @@ -727,14 +727,14 @@ for (i = 0; i < MAXQUOTAS; i++) ump->um_quotas[i] = NULLVP; devvp->v_specflags |= SI_MOUNTEDON; - ffs_oldfscompat(fs); - ump->um_savedmaxfilesize = fs->fs_maxfilesize; /* XXX */ - maxfilesize = (u_int64_t)0x100000000; /* 4GB */ -#if 0 - maxfilesize = (u_int64_t)0x40000000 * fs->fs_bsize - 1; /* XXX */ + /*ffs_oldfscompat(fs);*/ /*cjb - guess*/ + /*ump->um_savedmaxfilesize = fs->fs_maxfilesize; XXX */ + /*maxfilesize = (u_int64_t)0x100000000; 4GB */ +#if 1 + fs->fs_maxfilesize = (u_int64_t)0x40000000 * fs->fs_bsize - 1; /* XXX */ #endif /* 0 */ - if (fs->fs_maxfilesize > maxfilesize) /* XXX */ - fs->fs_maxfilesize = maxfilesize; /* XXX */ + /*if (fs->fs_maxfilesize > maxfilesize) XXX */ + /* fs->fs_maxfilesize = maxfilesize; XXX */ if (ronly == 0) { fs->fs_clean = 0; (void) ffs_sbupdate(ump, MNT_WAIT); --- xnu-201-5/bsd/ufs/ufs/ufs_readwrite.c.filesize Wed Aug 1 16:00:35 2001 +++ xnu-201-5/bsd/ufs/ufs/ufs_readwrite.c Thu Dec 13 09:19:14 2001 @@ -419,7 +419,7 @@ ip->i_size = uio->uio_offset + xfersize; if (UBCISVALID(vp)) - ubc_setsize(vp, (u_long)ip->i_size); /* XXX check errors */ + ubc_setsize(vp, (off_t)ip->i_size); /* XXX check errors */ } size = BLKSIZE(fs, ip, lbn) - bp->b_resid;