• Home
  • Raw
  • Download

Lines Matching refs:drl

517 runlist_element *ntfs_runlists_merge(runlist_element *drl,  in ntfs_runlists_merge()  argument
531 ntfs_debug_dump_runlist(drl); in ntfs_runlists_merge()
538 return drl; in ntfs_runlists_merge()
539 if (IS_ERR(srl) || IS_ERR(drl)) in ntfs_runlists_merge()
543 if (unlikely(!drl)) { in ntfs_runlists_merge()
544 drl = srl; in ntfs_runlists_merge()
546 if (unlikely(drl[0].vcn)) { in ntfs_runlists_merge()
548 for (dend = 0; likely(drl[dend].length); dend++) in ntfs_runlists_merge()
551 drl = ntfs_rl_realloc(drl, dend, dend + 1); in ntfs_runlists_merge()
552 if (IS_ERR(drl)) in ntfs_runlists_merge()
553 return drl; in ntfs_runlists_merge()
555 ntfs_rl_mm(drl, 1, 0, dend); in ntfs_runlists_merge()
556 drl[0].vcn = 0; in ntfs_runlists_merge()
557 drl[0].lcn = LCN_RL_NOT_MAPPED; in ntfs_runlists_merge()
558 drl[0].length = drl[1].vcn; in ntfs_runlists_merge()
580 for (; drl[di].length; di++) { in ntfs_runlists_merge()
581 if (drl[di].vcn + drl[di].length > srl[sstart].vcn) in ntfs_runlists_merge()
587 if ((drl[di].vcn == srl[si].vcn) && (drl[di].lcn >= 0) && in ntfs_runlists_merge()
596 for (dend = di; drl[dend].length; dend++) in ntfs_runlists_merge()
605 for (dfinal = dend; dfinal >= 0 && drl[dfinal].lcn < LCN_HOLE; dfinal--) in ntfs_runlists_merge()
614 start = ((drl[dins].lcn < LCN_RL_NOT_MAPPED) || /* End of file */ in ntfs_runlists_merge()
615 (drl[dins].vcn == srl[sstart].vcn)); /* Start of hole */ in ntfs_runlists_merge()
616 finish = ((drl[dins].lcn >= LCN_RL_NOT_MAPPED) && /* End of file */ in ntfs_runlists_merge()
617 ((drl[dins].vcn + drl[dins].length) <= /* End of hole */ in ntfs_runlists_merge()
621 if (finish && !drl[dins].length) in ntfs_runlists_merge()
623 if (marker && (drl[dins].vcn + drl[dins].length > srl[send - 1].vcn)) in ntfs_runlists_merge()
633 drl = ntfs_rl_replace(drl, ds, srl + sstart, ss, dins); in ntfs_runlists_merge()
635 drl = ntfs_rl_insert(drl, ds, srl + sstart, ss, dins); in ntfs_runlists_merge()
638 drl = ntfs_rl_append(drl, ds, srl + sstart, ss, dins); in ntfs_runlists_merge()
640 drl = ntfs_rl_split(drl, ds, srl + sstart, ss, dins); in ntfs_runlists_merge()
642 if (IS_ERR(drl)) { in ntfs_runlists_merge()
644 return drl; in ntfs_runlists_merge()
649 for (ds = dend; drl[ds].length; ds++) in ntfs_runlists_merge()
652 if (drl[ds].vcn <= marker_vcn) { in ntfs_runlists_merge()
655 if (drl[ds].vcn == marker_vcn) { in ntfs_runlists_merge()
659 drl[ds].lcn); in ntfs_runlists_merge()
660 drl[ds].lcn = LCN_ENOENT; in ntfs_runlists_merge()
668 if (drl[ds].lcn == LCN_ENOENT) { in ntfs_runlists_merge()
672 if (drl[ds].lcn != LCN_RL_NOT_MAPPED) { in ntfs_runlists_merge()
675 drl = ntfs_rl_realloc_nofail(drl, ds, in ntfs_runlists_merge()
682 drl[ds].vcn = drl[ds - 1].vcn + in ntfs_runlists_merge()
683 drl[ds - 1].length; in ntfs_runlists_merge()
684 drl[ds].lcn = LCN_RL_NOT_MAPPED; in ntfs_runlists_merge()
688 drl[ds].length = marker_vcn - drl[ds].vcn; in ntfs_runlists_merge()
692 drl = ntfs_rl_realloc_nofail(drl, ds, ds + 1); in ntfs_runlists_merge()
693 drl[ds].vcn = marker_vcn; in ntfs_runlists_merge()
694 drl[ds].lcn = LCN_ENOENT; in ntfs_runlists_merge()
695 drl[ds].length = (s64)0; in ntfs_runlists_merge()
703 ntfs_debug_dump_runlist(drl); in ntfs_runlists_merge()
704 return drl; in ntfs_runlists_merge()