Lines Matching refs:copy
224 size_t copy; in _shift_data_right_pages() local
248 copy = len; in _shift_data_right_pages()
249 if (copy > pgto_base) in _shift_data_right_pages()
250 copy = pgto_base; in _shift_data_right_pages()
251 if (copy > pgfrom_base) in _shift_data_right_pages()
252 copy = pgfrom_base; in _shift_data_right_pages()
253 pgto_base -= copy; in _shift_data_right_pages()
254 pgfrom_base -= copy; in _shift_data_right_pages()
259 memcpy(vto + pgto_base, vfrom + pgfrom_base, copy); in _shift_data_right_pages()
262 memmove(vto + pgto_base, vto + pgfrom_base, copy); in _shift_data_right_pages()
266 } while ((len -= copy) != 0); in _shift_data_right_pages()
284 size_t copy; in _copy_to_pages() local
290 copy = PAGE_SIZE - pgbase; in _copy_to_pages()
291 if (copy > len) in _copy_to_pages()
292 copy = len; in _copy_to_pages()
295 memcpy(vto + pgbase, p, copy); in _copy_to_pages()
298 len -= copy; in _copy_to_pages()
302 pgbase += copy; in _copy_to_pages()
308 p += copy; in _copy_to_pages()
328 size_t copy; in _copy_from_pages() local
334 copy = PAGE_SIZE - pgbase; in _copy_from_pages()
335 if (copy > len) in _copy_from_pages()
336 copy = len; in _copy_from_pages()
339 memcpy(p, vfrom + pgbase, copy); in _copy_from_pages()
342 pgbase += copy; in _copy_from_pages()
347 p += copy; in _copy_from_pages()
349 } while ((len -= copy) != 0); in _copy_from_pages()
366 size_t copy, offs; in xdr_shrink_bufhead() local
381 copy = tail->iov_len - len; in xdr_shrink_bufhead()
383 tail->iov_base, copy); in xdr_shrink_bufhead()
384 result += copy; in xdr_shrink_bufhead()
387 copy = len; in xdr_shrink_bufhead()
388 if (copy > pglen) in xdr_shrink_bufhead()
389 copy = pglen; in xdr_shrink_bufhead()
390 offs = len - copy; in xdr_shrink_bufhead()
392 copy = 0; in xdr_shrink_bufhead()
393 else if (copy > tail->iov_len - offs) in xdr_shrink_bufhead()
394 copy = tail->iov_len - offs; in xdr_shrink_bufhead()
395 if (copy != 0) { in xdr_shrink_bufhead()
399 copy); in xdr_shrink_bufhead()
400 result += copy; in xdr_shrink_bufhead()
404 offs = copy = len - pglen; in xdr_shrink_bufhead()
405 if (copy > tail->iov_len) in xdr_shrink_bufhead()
406 copy = tail->iov_len; in xdr_shrink_bufhead()
410 copy); in xdr_shrink_bufhead()
411 result += copy; in xdr_shrink_bufhead()
421 copy = len; in xdr_shrink_bufhead()
423 copy = pglen; in xdr_shrink_bufhead()
426 copy); in xdr_shrink_bufhead()
427 result += copy; in xdr_shrink_bufhead()
450 size_t copy; in xdr_shrink_pagelen() local
469 copy = len; in xdr_shrink_pagelen()
475 copy = tail->iov_len; in xdr_shrink_pagelen()
479 copy); in xdr_shrink_pagelen()
480 result += copy; in xdr_shrink_pagelen()