Message ID | 1485524749-118532-18-git-send-email-pbonzini@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/block/file-posix.c b/block/file-posix.c index 9f83725..2134e0e 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -674,7 +674,7 @@ static void raw_refresh_limits(BlockDriverState *bs, Error **errp) struct stat st; if (!fstat(s->fd, &st)) { - if (S_ISBLK(st.st_mode)) { + if (S_ISBLK(st.st_mode) || S_ISCHR(st.st_mode)) { int ret = hdev_get_max_transfer_length(bs, s->fd); if (ret > 0 && ret <= BDRV_REQUEST_MAX_BYTES) { bs->bl.max_transfer = pow2floor(ret);