dholland-t...@netbsd.org (David Holland) writes: >The problem I see with carrying around unit values at runtime (besides >potential overhead) is that at least in FS-level code it'll make a >huge mess. FFS, for example, has hardware-level sectors, DEV_BSIZE >blocks, fragments, its own blocks, and maybe other things;
FFS (without WAPBL) has - a superblock at a byte offset - fragments All disk I/O except for the superblock is just accessing one or more fragments. Fragment addresses used to be converted to physical sector addresses, but in NetBSD they are converted to DEV_BSIZE adresses when passed to the disk driver. This is done with a single macro. It's very simple. And all previous issues were caused by code that did not follow this simple rule. WAPBL breaks this. WAPBL wants to do I/O on physical sectors and the code must convert back and forth. It's pretty alien to the filesystem code. -- -- Michael van Elst Internet: mlel...@serpens.de "A potential Snark may lurk in every tree."