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:
Poul-Henning Kamp 2007-12-16 18:03:31 +00:00
parent 20a0f65b77
commit eed6cda966
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174669
2 changed files with 3 additions and 5 deletions

View file

@ -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;

View file

@ -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;