Lines Matching refs:src
126 struct hfs_bnode *src_node, int src, int len) in hfs_bnode_copy() argument
132 dprint(DBG_BNODE_MOD, "copybytes: %u,%u,%u\n", dst, src, len); in hfs_bnode_copy()
136 src += src_node->page_offset; in hfs_bnode_copy()
138 src_page = src_node->page + (src >> PAGE_CACHE_SHIFT); in hfs_bnode_copy()
139 src &= ~PAGE_CACHE_MASK; in hfs_bnode_copy()
143 if (src == dst) { in hfs_bnode_copy()
144 l = min(len, (int)PAGE_CACHE_SIZE - src); in hfs_bnode_copy()
145 memcpy(kmap(*dst_page) + src, kmap(*src_page) + src, l); in hfs_bnode_copy()
161 src_ptr = kmap(*src_page) + src; in hfs_bnode_copy()
163 if (PAGE_CACHE_SIZE - src < PAGE_CACHE_SIZE - dst) { in hfs_bnode_copy()
164 l = PAGE_CACHE_SIZE - src; in hfs_bnode_copy()
165 src = 0; in hfs_bnode_copy()
169 src += l; in hfs_bnode_copy()
185 void hfs_bnode_move(struct hfs_bnode *node, int dst, int src, int len) in hfs_bnode_move() argument
190 dprint(DBG_BNODE_MOD, "movebytes: %u,%u,%u\n", dst, src, len); in hfs_bnode_move()
193 src += node->page_offset; in hfs_bnode_move()
195 if (dst > src) { in hfs_bnode_move()
196 src += len - 1; in hfs_bnode_move()
197 src_page = node->page + (src >> PAGE_CACHE_SHIFT); in hfs_bnode_move()
198 src = (src & ~PAGE_CACHE_MASK) + 1; in hfs_bnode_move()
203 if (src == dst) { in hfs_bnode_move()
204 while (src < len) { in hfs_bnode_move()
205 memmove(kmap(*dst_page), kmap(*src_page), src); in hfs_bnode_move()
209 len -= src; in hfs_bnode_move()
210 src = PAGE_CACHE_SIZE; in hfs_bnode_move()
214 src -= len; in hfs_bnode_move()
215 memmove(kmap(*dst_page) + src, kmap(*src_page) + src, len); in hfs_bnode_move()
223 src_ptr = kmap(*src_page) + src; in hfs_bnode_move()
225 if (src < dst) { in hfs_bnode_move()
226 l = src; in hfs_bnode_move()
227 src = PAGE_CACHE_SIZE; in hfs_bnode_move()
231 src -= l; in hfs_bnode_move()
246 src_page = node->page + (src >> PAGE_CACHE_SHIFT); in hfs_bnode_move()
247 src &= ~PAGE_CACHE_MASK; in hfs_bnode_move()
251 if (src == dst) { in hfs_bnode_move()
252 l = min(len, (int)PAGE_CACHE_SIZE - src); in hfs_bnode_move()
253 memmove(kmap(*dst_page) + src, kmap(*src_page) + src, l); in hfs_bnode_move()
269 src_ptr = kmap(*src_page) + src; in hfs_bnode_move()
271 if (PAGE_CACHE_SIZE - src < PAGE_CACHE_SIZE - dst) { in hfs_bnode_move()
272 l = PAGE_CACHE_SIZE - src; in hfs_bnode_move()
273 src = 0; in hfs_bnode_move()
277 src += l; in hfs_bnode_move()