Index: sys/kern/vfs_vnops.c =================================================================== --- sys/kern/vfs_vnops.c +++ sys/kern/vfs_vnops.c @@ -3263,13 +3263,13 @@ len = savlen = rounddown(len - rem, blksize) + rem; } - if (blksize <= 1) + if (blksize <= 512) blksize = MAX(invp->v_mount->mnt_stat.f_iosize, outvp->v_mount->mnt_stat.f_iosize); if (blksize < 4096) blksize = 4096; - else if (blksize > 1024 * 1024) - blksize = 1024 * 1024; + else if (blksize > maxphys) + blksize = maxphys; dat = malloc(blksize, M_TEMP, M_WAITOK); /* @@ -3378,7 +3378,7 @@ } xfer = blksize; - if (cantseek) { + if (__predict_false(cantseek)) { /* * Set first xfer to end at a block boundary, so that * holes are more likely detected in the loop below via