Filesystem questions
Filesystem questions
- Subject: Filesystem questions
- From: Brian Bergstrand <email@hidden>
- Date: Sun, 15 Jun 2003 14:08:05 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have two questions (well really one question and one problem) on
kernel filesystems.
1. I'm working on a filesystem that prefers 8K blocks (it's fully 64bit
and the indoes are double the size of UFS inodes). I noticed the
following comment in the UFS code:
/*
* Buffer cache does not handle multiple pages in a buf when
* invalidating incore buffer in pageout. There are no locks
* in the pageout path. So there is a danger of loosing data
when
* block allocation happens at the same time a pageout of buddy
* page occurs. incore() returns buf with both
* pages, this leads vnode-pageout to incorrectly flush of
entire.
* buf. Till the low level ffs code is modified to deal with
these
* do not mount any FS more than 4K size.
*/
/*
* Can't mount filesystems with a fragment size less than
DIRBLKSIZ
*/
/*
* Don't mount dirty filesystems, except for the root filesystem
*/
if ((fs->fs_bsize > PAGE_SIZE) || (fs->fs_fsize < DIRBLKSIZ) ||
((!(mp->mnt_flag & MNT_ROOTFS)) && (!fs->fs_clean))) {
Is this still true for the Jaguar (and beyond) buffer cache? What can I
do to work around the problem?
2. I've ported the Ext2 filesystem to Mac OS X. Current there is a bug
open
<
https://sourceforge.net/tracker/
index.php?func=detail&aid=742939&group_id=64713&atid=508406> that is
due to a problem copying RSRC forks. Specifically, the Apple Double
header for the Carbon FS layer RSRC file is being written as all 0's.
I've tracked this down to something in between my VOP_WRITE and
VOP_STRATEGY calls. The rsrc file is written as an 82 byte buffer
containing the Apple Double header followed by bigger chunks of the
actual data. For some reason, the 82 byte header is being written as
0's (but the data itself is fine). I can't figure out what the problem
would be; I can copy files smaller than 82 bytes with no problem. I can
also copy an existing RSRC fork (from a UFS FS) using cp with no
problem. I'm beginning to think it may be a problem with the Carbon FS
layer, but writing to UFS works fine, so I don't know.
Does anyone have any clues? The code is available on Sourceforge
<
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ext2fsx/src/gnu/ext2fs/
>
.
TIA.
Brian Bergstrand <
http://www.classicalguitar.net/brian/>
PGP Key: <
http://www.classicalguitar.net/brian/misc/public_key.txt>
Oh, I don't blame Congress. If I had $600 billion at my disposal, I'd
be irresponsible, too. - Lichty & Wagner
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.2
iQA/AwUBPuy2C3nR2Fu2x7aiEQLcOACg4riUrolD97eocx5t5Y80ar6iJa8An16S
0CjnBW5E8iH0S9QuxT1o4C91
=ySpQ
-----END PGP SIGNATURE-----
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.