FreeBSD 5.3-BETA6 available

Bruce Evans bde at
Tue Sep 28 07:37:56 PDT 2004

On Tue, 28 Sep 2004, Matthias Andree wrote:

> Matthias Andree <ma at> writes:
> >>> 3. data corruption on unaligned block access bug, kern/60313,
> >>>    is still open and unpatched AFAICS
> >>
> >> Is this actually an issue in FreeBSD 5?  In the audit trail of the PR,
> >> Bruce Evans seems to concede that GEOM checks block alignment
> >> properly.
> OK, seeking to a position that is not a multiple of the block size
> appears to trigger EINVAL on a subsequent write so this is
> NOT an issue for FreeBSD 5.

Except EINVAL is an undocumented and unreasonable errno for write(2).
(It is documented and reasonable for pwrite(2) because it is for
pwrite()'s offset arg, but even for pwrite(), misaligned offsets are
not invalid: as specified in POSIX.1 but not in pwrite(4), only
negative args are invalid for pwrite().)

The correct errno seems to be EIO (because the device is physically
incapable of doing misaligned i/o).


More information about the freebsd-current mailing list