Searched refs:drl (Results 1 - 3 of 3) sorted by relevance
/linux-4.4.14/fs/ntfs/ |
H A D | runlist.c | 499 * @drl: original runlist to be worked on 500 * @srl: new runlist to be merged into @drl 502 * First we sanity check the two runlists @srl and @drl to make sure that they 504 * runlist @drl or completely within a hole (or unmapped region) in @drl. 506 * It is up to the caller to serialize access to the runlists @drl and @srl. 521 * runlists @drl and @srl are deallocated before returning so you cannot use 531 runlist_element *ntfs_runlists_merge(runlist_element *drl, ntfs_runlists_merge() argument 536 int dins; /* Index into @drl at which to insert @srl. */ ntfs_runlists_merge() 545 ntfs_debug_dump_runlist(drl); ntfs_runlists_merge() 552 return drl; ntfs_runlists_merge() 553 if (IS_ERR(srl) || IS_ERR(drl)) ntfs_runlists_merge() 557 if (unlikely(!drl)) { ntfs_runlists_merge() 558 drl = srl; ntfs_runlists_merge() 560 if (unlikely(drl[0].vcn)) { ntfs_runlists_merge() 562 for (dend = 0; likely(drl[dend].length); dend++) ntfs_runlists_merge() 565 drl = ntfs_rl_realloc(drl, dend, dend + 1); ntfs_runlists_merge() 566 if (IS_ERR(drl)) ntfs_runlists_merge() 567 return drl; ntfs_runlists_merge() 569 ntfs_rl_mm(drl, 1, 0, dend); ntfs_runlists_merge() 570 drl[0].vcn = 0; ntfs_runlists_merge() 571 drl[0].lcn = LCN_RL_NOT_MAPPED; ntfs_runlists_merge() 572 drl[0].length = drl[1].vcn; ntfs_runlists_merge() 590 * Skip forward in @drl until we reach the position where @srl needs to ntfs_runlists_merge() 591 * be inserted. If we reach the end of @drl, @srl just needs to be ntfs_runlists_merge() 592 * appended to @drl. ntfs_runlists_merge() 594 for (; drl[di].length; di++) { ntfs_runlists_merge() 595 if (drl[di].vcn + drl[di].length > srl[sstart].vcn) ntfs_runlists_merge() 601 if ((drl[di].vcn == srl[si].vcn) && (drl[di].lcn >= 0) && ntfs_runlists_merge() 610 for (dend = di; drl[dend].length; dend++) ntfs_runlists_merge() 619 for (dfinal = dend; dfinal >= 0 && drl[dfinal].lcn < LCN_HOLE; dfinal--) ntfs_runlists_merge() 625 int ds = dend + 1; /* Number of elements in drl & srl */ ntfs_runlists_merge() 628 start = ((drl[dins].lcn < LCN_RL_NOT_MAPPED) || /* End of file */ ntfs_runlists_merge() 629 (drl[dins].vcn == srl[sstart].vcn)); /* Start of hole */ ntfs_runlists_merge() 630 finish = ((drl[dins].lcn >= LCN_RL_NOT_MAPPED) && /* End of file */ ntfs_runlists_merge() 631 ((drl[dins].vcn + drl[dins].length) <= /* End of hole */ ntfs_runlists_merge() 635 if (finish && !drl[dins].length) ntfs_runlists_merge() 637 if (marker && (drl[dins].vcn + drl[dins].length > srl[send - 1].vcn)) ntfs_runlists_merge() 647 drl = ntfs_rl_replace(drl, ds, srl + sstart, ss, dins); ntfs_runlists_merge() 649 drl = ntfs_rl_insert(drl, ds, srl + sstart, ss, dins); ntfs_runlists_merge() 652 drl = ntfs_rl_append(drl, ds, srl + sstart, ss, dins); ntfs_runlists_merge() 654 drl = ntfs_rl_split(drl, ds, srl + sstart, ss, dins); ntfs_runlists_merge() 656 if (IS_ERR(drl)) { ntfs_runlists_merge() 658 return drl; ntfs_runlists_merge() 663 for (ds = dend; drl[ds].length; ds++) ntfs_runlists_merge() 665 /* We only need to care if @srl ended after @drl. */ ntfs_runlists_merge() 666 if (drl[ds].vcn <= marker_vcn) { ntfs_runlists_merge() 669 if (drl[ds].vcn == marker_vcn) { ntfs_runlists_merge() 673 drl[ds].lcn); ntfs_runlists_merge() 674 drl[ds].lcn = LCN_ENOENT; ntfs_runlists_merge() 679 * @drl or extend an existing one before adding the ntfs_runlists_merge() 682 if (drl[ds].lcn == LCN_ENOENT) { ntfs_runlists_merge() 686 if (drl[ds].lcn != LCN_RL_NOT_MAPPED) { ntfs_runlists_merge() 689 drl = ntfs_rl_realloc_nofail(drl, ds, ntfs_runlists_merge() 696 drl[ds].vcn = drl[ds - 1].vcn + ntfs_runlists_merge() 697 drl[ds - 1].length; ntfs_runlists_merge() 698 drl[ds].lcn = LCN_RL_NOT_MAPPED; ntfs_runlists_merge() 702 drl[ds].length = marker_vcn - drl[ds].vcn; ntfs_runlists_merge() 706 drl = ntfs_rl_realloc_nofail(drl, ds, ds + 1); ntfs_runlists_merge() 707 drl[ds].vcn = marker_vcn; ntfs_runlists_merge() 708 drl[ds].lcn = LCN_ENOENT; ntfs_runlists_merge() 709 drl[ds].length = (s64)0; ntfs_runlists_merge() 717 ntfs_debug_dump_runlist(drl); ntfs_runlists_merge() 718 return drl; ntfs_runlists_merge()
|
H A D | runlist.h | 73 extern runlist_element *ntfs_runlists_merge(runlist_element *drl,
|
/linux-4.4.14/drivers/scsi/ |
H A D | gdth.c | 1556 gdth_drlist_str *drl; gdth_search_drives() local 1769 drl = (gdth_drlist_str *)ha->pscratch; gdth_search_drives() 1770 drl->sc_no = ha->raw[bus_no].local_no; gdth_search_drives() 1771 drl->sc_cnt = ha->raw[bus_no].pdev_cnt; gdth_search_drives() 1777 ha->raw[bus_no].id_list[j] = drl->sc_list[j]; gdth_search_drives()
|
Completed in 121 milliseconds