On Thu, Nov 26, 2015 at 06:29:30PM +0700, Robert Elz wrote: > Just try making a ccd by combining a 512 byte sector drive and a 4K > sector drive, and watch what happens...
CCD is a very old device that isn't even configured "correctly" and I would be very surprised if it could concat drives of different sector sizes. After all, what fake geometry should it present to the user? > Or put a cgd on a 4K sector > drive, and then attempt to fix the obvious bug. Yes, CGD is broken. Looks like a simple fix. > It is a mess. Things > still get very confused as to where inside the kernel "sectors" are > really sectors, and where they're DEV_BSIZE units, which can lead to > conversions happening improperly sometimes. This isn't to say that it > gets things wrong in the common cases, just that it is a mess... The kernel always treats disks as having DEV_BSIZE blocks, the translation is done by the device driver. The userland (when accessing raw devices) obviously addresses disks with byte positions, but the userland tools like fsck access disks in terms of device blocks. This is how the original UNIX kernel did it. Greetings, -- Michael van Elst Internet: mlel...@serpens.de "A potential Snark may lurk in every tree."