mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
Don't limit BIO_DELETE requests to MAXPHYS, they perform no data
transfers, so they are not subject to the VM system limitation.
This commit is contained in:
parent
20a0f65b77
commit
eed6cda966
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174669
|
@ -302,8 +302,7 @@ g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread
|
|||
offset = ((off_t *)data)[0];
|
||||
length = ((off_t *)data)[1];
|
||||
if ((offset % cp->provider->sectorsize) != 0 ||
|
||||
(length % cp->provider->sectorsize) != 0 ||
|
||||
length <= 0 || length > MAXPHYS) {
|
||||
(length % cp->provider->sectorsize) != 0 || length <= 0) {
|
||||
printf("%s: offset=%jd length=%jd\n", __func__, offset,
|
||||
length);
|
||||
error = EINVAL;
|
||||
|
|
|
@ -652,9 +652,8 @@ g_delete_data(struct g_consumer *cp, off_t offset, off_t length)
|
|||
struct bio *bp;
|
||||
int error;
|
||||
|
||||
KASSERT(length > 0 && length >= cp->provider->sectorsize &&
|
||||
length <= MAXPHYS, ("g_delete_data(): invalid length %jd",
|
||||
(intmax_t)length));
|
||||
KASSERT(length > 0 && length >= cp->provider->sectorsize,
|
||||
("g_delete_data(): invalid length %jd", (intmax_t)length));
|
||||
|
||||
bp = g_alloc_bio();
|
||||
bp->bio_cmd = BIO_DELETE;
|
||||
|
|
Loading…
Reference in a new issue