Lines Matching refs:loc

186  * @loc:	append the new runlist @src after this element in @dst
188 * Append the runlist @src after element @loc in @dst. Merge the right end of
205 int dsize, runlist_element *src, int ssize, int loc)
214 if ((loc + 1) < dsize)
215 right = ntfs_are_rl_mergeable(src + ssize - 1, dst + loc + 1);
228 __ntfs_rl_merge(src + ssize - 1, dst + loc + 1);
231 marker = loc + ssize + 1;
234 ntfs_rl_mm(dst, marker, loc + 1 + right, dsize - (loc + 1 + right));
235 ntfs_rl_mc(dst, loc + 1, src, 0, ssize);
238 dst[loc].length = dst[loc + 1].vcn - dst[loc].vcn;
253 * @loc: insert the new runlist @src before this element in @dst
255 * Insert the runlist @src before element @loc in the runlist @dst. Merge the
272 int dsize, runlist_element *src, int ssize, int loc)
285 if (loc == 0)
290 left = ntfs_are_rl_mergeable(dst + loc - 1, src);
292 merged_length = dst[loc - 1].length;
296 disc = (src[0].vcn > dst[loc - 1].vcn + merged_length);
310 __ntfs_rl_merge(dst + loc - 1, src);
313 * Nominally, @marker equals @loc + @ssize, i.e. location + number of
318 marker = loc + ssize - left + disc;
321 ntfs_rl_mm(dst, marker, loc, dsize - loc);
322 ntfs_rl_mc(dst, loc + disc, src, left, ssize - left);
332 if (loc > 0) {
333 dst[loc].vcn = dst[loc - 1].vcn + dst[loc - 1].length;
334 dst[loc].length = dst[loc + 1].vcn - dst[loc].vcn;
336 dst[loc].vcn = 0;
337 dst[loc].length = dst[loc + 1].vcn;
339 dst[loc].lcn = LCN_RL_NOT_MAPPED;
350 * @loc: index in runlist @dst to overwrite with @src
352 * Replace the runlist element @dst at @loc with @src. Merge the left and
368 int dsize, runlist_element *src, int ssize, int loc)
380 if ((loc + 1) < dsize)
381 right = ntfs_are_rl_mergeable(src + ssize - 1, dst + loc + 1);
382 if (loc > 0)
383 left = ntfs_are_rl_mergeable(dst + loc - 1, src);
401 __ntfs_rl_merge(src + ssize - 1, dst + loc + 1);
403 __ntfs_rl_merge(dst + loc - 1, src);
408 * Nominally, @tail equals @loc + 1, i.e. location, skipping the
412 tail = loc + right + 1;
416 * Nominally, @marker equals @loc + @ssize, i.e. location + number of
420 marker = loc + ssize - left;
424 ntfs_rl_mc(dst, loc, src, left, ssize - left);
438 * @loc: index in runlist @dst at which to split and insert @src
440 * Split the runlist @dst at @loc into two and insert @new in between the two
457 runlist_element *src, int ssize, int loc)
472 ntfs_rl_mm(dst, loc + 1 + ssize, loc, dsize - loc);
473 ntfs_rl_mc(dst, loc + 1, src, 0, ssize);
476 dst[loc].length = dst[loc+1].vcn - dst[loc].vcn;
477 dst[loc+ssize+1].vcn = dst[loc+ssize].vcn + dst[loc+ssize].length;
478 dst[loc+ssize+1].length = dst[loc+ssize+2].vcn - dst[loc+ssize+1].vcn;