HomeFreeBSD

VirtIO: Make sure the guest knows the TRIM alignment requirements

Description

VirtIO: Make sure the guest knows the TRIM alignment requirements

If bhyve is used to emulate 512e access in guest OS, then discard addresses should be properly aligned.
Otherwise ioctl DIOCGDELETE fails for 512b requires on devices with 4K sector size.
see g_dev_ioctl() in sys/geom/geom_dev.c

Submitted by: Vitaliy Gusev <gusev.vitaliy@gmail.com>
MFC after: 1 week
Sponsored by: vStack.com
Differential Revision: https://reviews.freebsd.org/D27075

Details

Provenance
allanjudeAuthored on Nov 5 2020, 5:10 PM
Parents
rG926da0492a67: pmcstat: fix PPC kernel symbol resolution
Branches
Unknown
Tags
Unknown

Event Timeline