Lines Matching refs:src
122 struct hfs_bnode *src_node, int src, int len) in hfs_bnode_copy() argument
127 hfs_dbg(BNODE_MOD, "copybytes: %u,%u,%u\n", dst, src, len); in hfs_bnode_copy()
130 src += src_node->page_offset; in hfs_bnode_copy()
132 src_page = src_node->page + (src >> PAGE_SHIFT); in hfs_bnode_copy()
133 src &= ~PAGE_MASK; in hfs_bnode_copy()
137 if (src == dst) { in hfs_bnode_copy()
138 l = min_t(int, len, PAGE_SIZE - src); in hfs_bnode_copy()
139 memcpy_page(*dst_page, src, *src_page, src, l); in hfs_bnode_copy()
152 src_ptr = kmap_local_page(*src_page) + src; in hfs_bnode_copy()
153 if (PAGE_SIZE - src < PAGE_SIZE - dst) { in hfs_bnode_copy()
154 l = PAGE_SIZE - src; in hfs_bnode_copy()
155 src = 0; in hfs_bnode_copy()
159 src += l; in hfs_bnode_copy()
175 void hfs_bnode_move(struct hfs_bnode *node, int dst, int src, int len) in hfs_bnode_move() argument
181 hfs_dbg(BNODE_MOD, "movebytes: %u,%u,%u\n", dst, src, len); in hfs_bnode_move()
184 src += node->page_offset; in hfs_bnode_move()
186 if (dst > src) { in hfs_bnode_move()
187 src += len - 1; in hfs_bnode_move()
188 src_page = node->page + (src >> PAGE_SHIFT); in hfs_bnode_move()
189 src = (src & ~PAGE_MASK) + 1; in hfs_bnode_move()
194 if (src == dst) { in hfs_bnode_move()
195 while (src < len) { in hfs_bnode_move()
198 memmove(dst_ptr, src_ptr, src); in hfs_bnode_move()
202 len -= src; in hfs_bnode_move()
203 src = PAGE_SIZE; in hfs_bnode_move()
207 src -= len; in hfs_bnode_move()
210 memmove(dst_ptr + src, src_ptr + src, len); in hfs_bnode_move()
217 src_ptr = kmap_local_page(*src_page) + src; in hfs_bnode_move()
218 if (src < dst) { in hfs_bnode_move()
219 l = src; in hfs_bnode_move()
220 src = PAGE_SIZE; in hfs_bnode_move()
224 src -= l; in hfs_bnode_move()
239 src_page = node->page + (src >> PAGE_SHIFT); in hfs_bnode_move()
240 src &= ~PAGE_MASK; in hfs_bnode_move()
244 if (src == dst) { in hfs_bnode_move()
245 l = min_t(int, len, PAGE_SIZE - src); in hfs_bnode_move()
247 dst_ptr = kmap_local_page(*dst_page) + src; in hfs_bnode_move()
248 src_ptr = kmap_local_page(*src_page) + src; in hfs_bnode_move()
266 src_ptr = kmap_local_page(*src_page) + src; in hfs_bnode_move()
267 if (PAGE_SIZE - src < in hfs_bnode_move()
269 l = PAGE_SIZE - src; in hfs_bnode_move()
270 src = 0; in hfs_bnode_move()
274 src += l; in hfs_bnode_move()