Date: Mon, 4 Nov 2002 00:45:42 -0800 From: Alfred Perlstein <bright@mu.org> To: fs@freebsd.org Cc: Kirk McKusick <mckusick@FreeBSD.org>, Poul-Henning Kamp <phk@critter.freebsd.dk> Subject: statfs and how do show the users that they are using ufs2 vs ufs1? Message-ID: <20021104084542.GS24139@elvis.mu.org>
next in thread | raw e-mail | index | archive | help
I recently had the (mis)fortune of having to redo my filesystems and I noticed that there doesn't seem to be an indicator of the filesystem I've created/mounted being either ufs1 or ufs2. As I started to drill down in the code I noticed some reentrancy problems with the way that statfs(2) is done. The kernel API allows/encourages one to pass the cached statfs structure hung off of the mount structure into the VFS_STATFS call. This can/will cause races in the code once Giant is pushed down into VFS. So I'm wondering: .) Do we really need the cached statfs structure? (I think leaving it is probably ok and will require less code changes) .) Shouldn't we have a generic routine to copy in the constant values from the struct mount->statfs that the filesystem specific STATFS routine can call? (although we could add the call automagically to the VFS_STATFS macro.) .) Shouldn't we stop passing in the 'cached' structure into the STATFS routine? (i think we should stop, it causes reentrancy issues) .) Any problems with me taking a shot at making the statfs structure for ufs2 mounts have the string "ufs2" instead of "ufs"? (Any gotchas I should be aware of for this?) Suggestions and comments appreciated. thanks, -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021104084542.GS24139>