Lines Matching defs:chunk
2960 size_t chunk, orig_chunk;
2970 chunk = 4096;
2971 if (len < chunk) {
2972 chunk = len;
2974 orig_chunk = chunk;
2976 if (kmem_alloc(kernel_map, (vm_offset_t *)&buff, chunk)) {
2980 for(pos=start+len-chunk; pos >= start; pos-=chunk) {
2981 ret = vn_rdwr(UIO_READ, xvp, buff, chunk, pos, UIO_SYSSPACE, IO_NODELOCKED|IO_NOAUTH, ucred, &iolen, p);
2984 pos, ret, chunk, ret);
2988 ret = vn_rdwr(UIO_WRITE, xvp, buff, chunk, pos + delta, UIO_SYSSPACE, IO_NODELOCKED|IO_NOAUTH, ucred, &iolen, p);
2991 pos+delta, ret, chunk, ret);
2995 if ((pos - chunk) < start) {
2996 chunk = pos - start;
2998 if (chunk == 0) { // we're all done
3013 size_t chunk, orig_chunk;
3024 chunk = 4096;
3025 if (len < chunk) {
3026 chunk = len;
3028 orig_chunk = chunk;
3031 if (kmem_alloc(kernel_map, (vm_offset_t *)&buff, chunk)) {
3035 for(pos = start; pos < end; pos += chunk) {
3036 ret = vn_rdwr(UIO_READ, xvp, buff, chunk, pos, UIO_SYSSPACE, IO_NODELOCKED|IO_NOAUTH, ucred, &iolen, p);
3039 pos, ret, chunk, ret);
3043 ret = vn_rdwr(UIO_WRITE, xvp, buff, chunk, pos - delta, UIO_SYSSPACE, IO_NODELOCKED|IO_NOAUTH, ucred, &iolen, p);
3046 pos+delta, ret, chunk, ret);
3050 if ((pos + chunk) > end) {
3051 chunk = end - pos;
3053 if (chunk == 0) { // we're all done