Lines Matching full:copy
127 size_t copy; in copy_to_brd_setup() local
130 copy = min_t(size_t, n, PAGE_SIZE - offset); in copy_to_brd_setup()
134 if (copy < n) { in copy_to_brd_setup()
135 sector += copy >> SECTOR_SHIFT; in copy_to_brd_setup()
142 * Copy n bytes from src to the brd starting at sector. Does not sleep.
150 size_t copy; in copy_to_brd() local
152 copy = min_t(size_t, n, PAGE_SIZE - offset); in copy_to_brd()
157 memcpy(dst + offset, src, copy); in copy_to_brd()
160 if (copy < n) { in copy_to_brd()
161 src += copy; in copy_to_brd()
162 sector += copy >> SECTOR_SHIFT; in copy_to_brd()
163 copy = n - copy; in copy_to_brd()
168 memcpy(dst, src, copy); in copy_to_brd()
174 * Copy n bytes to dst from the brd starting at sector. Does not sleep.
182 size_t copy; in copy_from_brd() local
184 copy = min_t(size_t, n, PAGE_SIZE - offset); in copy_from_brd()
188 memcpy(dst, src + offset, copy); in copy_from_brd()
191 memset(dst, 0, copy); in copy_from_brd()
193 if (copy < n) { in copy_from_brd()
194 dst += copy; in copy_from_brd()
195 sector += copy >> SECTOR_SHIFT; in copy_from_brd()
196 copy = n - copy; in copy_from_brd()
200 memcpy(dst, src, copy); in copy_from_brd()
203 memset(dst, 0, copy); in copy_from_brd()