Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Sep 2004 00:37:43 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Matthias Andree <ma@dt.e-technik.uni-dortmund.de>
Cc:        current@FreeBSD.org
Subject:   Re: FreeBSD 5.3-BETA6 available
Message-ID:  <20040929002825.M60452@delplex.bde.org>
In-Reply-To: <m37jqfxqyd.fsf@merlin.emma.line.org>
References:  <415720FD.8080603@samsco.org> <m3oejs3tom.fsf@merlin.emma.line.org> <415812AD.2090901@FreeBSD.org> <m3brfr691u.fsf@merlin.emma.line.org> <m37jqfxqyd.fsf@merlin.emma.line.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 28 Sep 2004, Matthias Andree wrote:

> Matthias Andree <ma@dt.e-technik.uni-dortmund.de> 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).

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040929002825.M60452>