Delete requests can be larger than MAXPHYS.

This commit is contained in:
Pawel Jakub Dawidek 2013-03-14 23:03:48 +00:00
parent 5632176c77
commit 9bb2b7f535

View File

@ -582,7 +582,7 @@ requnpack(struct hast_resource *res, struct hio *hio, struct nv *nv)
hio->hio_error = EINVAL;
goto end;
}
if (hio->hio_length > MAXPHYS) {
if (hio->hio_cmd != HIO_DELETE && hio->hio_length > MAXPHYS) {
pjdlog_error("Data length is too large (%ju > %ju).",
(uintmax_t)hio->hio_length, (uintmax_t)MAXPHYS);
hio->hio_error = EINVAL;