hyperv/stor: Fix off-by-one bug; this brings back TRIM support.

Submitted by:	Hongjiang Zhang <honzhan microsoft com>
Reported by:	Lili Deng <v-lide microsoft com>
MFC after:	3 days
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8238
This commit is contained in:
Sepherosa Ziehau 2016-10-14 05:32:47 +00:00
parent 563193fd0c
commit e52a79e5c1

View File

@ -2210,7 +2210,7 @@ storvsc_io_done(struct hv_storvsc_request *reqp)
resp_buf[3], resp_buf[4]);
}
if (vm_srb->srb_status == SRB_STATUS_SUCCESS &&
data_len > SHORT_INQUIRY_LENGTH) {
data_len >= SHORT_INQUIRY_LENGTH) {
char vendor[16];
cam_strvis(vendor, inq_data->vendor,