Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Aug 2017 10:44:52 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-doc@FreeBSD.org
Subject:   [Bug 91149] fix man page: read(2) and write(2) can return EINVAL for unaligned access to block devices
Message-ID:  <bug-91149-9-5x1f2M3pMb@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-91149-9@https.bugs.freebsd.org/bugzilla/>
References:  <bug-91149-9@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D91149

Matthias Andree <mandree@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|read(2) can return EINVAL   |fix man page: read(2) and
                   |for unaligned access to     |write(2) can return EINVAL
                   |block devices               |for unaligned access to
                   |                            |block devices
                 CC|                            |mandree@FreeBSD.org

--- Comment #1 from Matthias Andree <mandree@FreeBSD.org> ---
This should also be added to write(2); I have recently received a truss rep=
ort
from FreeBSD 12 running e2fsck that showed this fragment:

lseek(4,0x430,SEEK_SET)                 =3D 1072 (0x430)
write(4,"\^F0\M-!Y\0\0",6)             ERR#22 'Invalid argument'

where fd 4 is /dev/da0s1, an external 2015 Western Digital My Passport Ultra
USB hard disk of 1 TB with this diskinfo (identifying information removed):

# diskinfo -v /dev/da0
/dev/da0
        512             # sectorsize
        1000170586112   # mediasize in bytes (931G)
        1953458176      # mediasize in sectors
        4096            # stripesize
        0               # stripeoffset
        121597          # Cylinders according to firmware.
        255             # Heads according to firmware.
        63              # Sectors according to firmware.
        WD My Passport 0830     # Disk descr.
        [REMOVED]       # Disk ident.
        Not_Zoned       # Zone Mode

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-91149-9-5x1f2M3pMb>