• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/ntfs-3g-2009.3.8/libntfs-3g/

Lines Matching refs:runlist

2  * runlist.c - Run list handling code. Originated from the Linux-NTFS project.
52 * ntfs_rl_mm - runlist memmove
69 * ntfs_rl_mc - runlist memory copy
89 * @rl: original runlist
90 * @old_size: number of runlist elements in the original runlist @rl
91 * @new_size: number of runlist elements we need space for
115 * @dst: original runlist
116 * @src: new runlist to test for mergeability with @dst
151 * @dst: original, destination runlist
152 * @src: new runlist to merge with @dst
154 * Merge the two runlists, writing into the destination runlist @dst. The
156 * destination runlist.
164 * ntfs_rl_append - append a runlist after a given element
165 * @dst: original runlist to be worked on
167 * @src: runlist to be inserted into @dst
169 * @loc: append the new runlist @src after this element in @dst
171 * Append the runlist @src after element @loc in @dst. Merge the right end of
172 * the new runlist, if necessary. Adjust the size of the hole before the
173 * appended runlist.
175 * On success, return a pointer to the new, combined, runlist. Note, both
177 * the pointers for anything any more. (Strictly speaking the returned runlist
231 * ntfs_rl_insert - insert a runlist into another
232 * @dst: original runlist to be worked on
234 * @src: new runlist to be inserted
236 * @loc: insert the new runlist @src before this element in @dst
238 * Insert the runlist @src before element @loc in the runlist @dst. Merge the
239 * left end of the new runlist, if necessary. Adjust the size of the hole
240 * after the inserted runlist.
242 * On success, return a pointer to the new, combined, runlist. Note, both
244 * the pointers for anything any more. (Strictly speaking the returned runlist
289 * original runlist.
328 * ntfs_rl_replace - overwrite a runlist element with another runlist
329 * @dst: original runlist to be worked on
331 * @src: new runlist to be inserted
333 * @loc: index in runlist @dst to overwrite with @src
335 * Replace the runlist element @dst at @loc with @src. Merge the left and
336 * right ends of the inserted runlist, if necessary.
338 * On success, return a pointer to the new, combined, runlist. Note, both
340 * the pointers for anything any more. (Strictly speaking the returned runlist
415 * ntfs_rl_split - insert a runlist into the centre of a hole
416 * @dst: original runlist to be worked on
418 * @src: new runlist to be inserted
420 * @loc: index in runlist @dst at which to split and insert @src
422 * Split the runlist @dst at @loc into two and insert @new in between the two
426 * On success, return a pointer to the new, combined, runlist. Note, both
428 * the pointers for anything any more. (Strictly speaking the returned runlist
492 /* Complete the source runlist if necessary. */
494 /* Scan to the end of the source runlist. */
501 /* Insert start element at the front of the runlist. */
512 /* Skip any unmapped start element(s) in the source runlist. */
516 /* Can't have an entirely unmapped source runlist. */
519 ntfs_log_perror("%s: unmapped source runlist", __FUNCTION__);
615 * We need to create an unmapped runlist element in
624 /* Add an unmapped runlist element. */
663 ntfs_log_debug("Merged runlist:\n");
671 marker_vcn = ((runlist*)NULL)->lcn;
677 * @drl: original runlist to be worked on
678 * @srl: new runlist to be merged into @drl
681 * are sensible and can be merged. The runlist @srl must be either after the
682 * runlist @drl or completely within a hole (or unmapped region) in @drl.
693 * It can also be appended to the end of the runlist, which is just a variant
696 * On success, return a pointer to the new, combined, runlist. Note, both
698 * the pointers for anything any more. (Strictly speaking the returned runlist
703 * ENOMEM Not enough memory to allocate runlist array.
719 * ntfs_mapping_pairs_decompress - convert mapping pairs array to runlist
722 * @old_rl: optional runlist in which to insert @attr's runlist
724 * Decompress the attribute @attr's mapping pairs array into a runlist. On
725 * success, return the decompressed runlist.
727 * If @old_rl is not NULL, decompressed runlist is inserted into the
728 * appropriate place in @old_rl and the resultant, combined runlist is
735 * ENOMEM Not enough memory to allocate runlist array.
736 * EIO Corrupt runlist.
741 * new runlist disregarding the already existing one and then splicing the
743 * runlist if overlap present before returning NULL, with errno = ERANGE).
751 runlist_element *rl; /* The output runlist. */
754 int err, rlsize; /* Size of runlist buffer. */
755 u16 rlpos; /* Current runlist position in units of
778 /* Current position in runlist array. */
780 /* Allocate first 4kiB block and set current runlist size to 4kiB. */
810 /* Enter the current vcn into the current runlist element. */
839 * Enter the current run length into the current runlist
883 /* Enter the current lcn into the runlist element. */
886 /* Get to the next runlist element. */
895 * vcn in the runlist - 1, or something has gone badly wrong.
904 /* Setup not mapped runlist element if this is the base extent. */
913 * attribute so simply terminate the runlist with LCN_ENOENT).
918 * the highest cluster, the runlist is either corrupt
943 /* Setup terminating runlist element. */
946 /* If no existing runlist was specified, we are done. */
981 * ntfs_rl_vcn_to_lcn - convert a vcn into a lcn given a runlist
982 * @rl: runlist to use for conversion
986 * cluster number (lcn) of a device using the runlist @rl to map vcns to their
994 * -2 = LCN_RL_NOT_MAPPED This is part of the runlist which has not been
995 * inserted into the runlist yet.
1006 * If rl is NULL, assume that we have found an unmapped runlist. The
1037 * @rl: runlist specifying where to read the data from
1038 * @pos: byte position within runlist @rl at which to begin the read
1043 * @b gathering the data as specified by the runlist @rl. The read begins at
1044 * offset @pos into the runlist @rl.
1066 ntfs_log_perror("Failed to read runlist [vol: %p rl: %p "
1127 * @rl: runlist specifying where to write the data to
1128 * @pos: byte position within runlist @rl at which to begin the write
1133 * scattering the data as specified by the runlist @rl. The write begins at
1134 * offset @pos into the runlist @rl. If a run is sparse then the related buffer
1154 ntfs_log_perror("Failed to write runlist [vol: %p rl: %p "
1252 * @rl: runlist for which to determine the size of the mapping pairs
1255 * Walk the runlist @rl and calculate the size in bytes of the mapping pairs
1256 * array corresponding to the runlist @rl, starting at vcn @start_vcn. This
1267 * EIO - The runlist is corrupt.
1291 /* Skip to runlist element containing @start_vcn. */
1325 /* Go to next runlist element. */
1371 * This is used when building the mapping pairs array of a runlist to compress
1412 * ntfs_mapping_pairs_build - build the mapping pairs array from a runlist
1416 * @rl: runlist for which to build the mapping pairs array
1420 * Create the mapping pairs array from the runlist @rl, starting at vcn
1439 * EIO - The runlist is corrupt.
1462 /* Skip to runlist element containing @start_vcn. */
1513 /* Go to next runlist element. */
1582 * ntfs_rl_truncate - truncate a runlist starting at a specified vcn
1583 * @arl: address of runlist to truncate
1586 * Truncate the runlist *@arl starting at vcn @start_vcn as well as the memory
1587 * buffer holding the runlist.
1591 * NOTE: @arl is the address of the runlist. We need the address so we can
1592 * modify the pointer to the runlist with the new, reallocated memory buffer.
1594 int ntfs_rl_truncate(runlist **arl, const VCN start_vcn)
1596 runlist *rl;
1609 ntfs_log_perror("Start_vcn lies outside front of runlist");
1622 ntfs_log_trace("Truncating already truncated runlist?\n");
1630 * If a run was partially truncated, make the following runlist
1631 * element a terminator instead of the truncated runlist
1644 * FIXME: Below code is broken, because runlist allocations must be
1659 * ntfs_rl_sparse - check whether runlist have sparse regions or not.
1660 * @rl: runlist to check
1664 int ntfs_rl_sparse(runlist *rl)
1666 runlist *rlc;
1678 ntfs_log_perror("%s: bad runlist", __FUNCTION__);
1689 * @rl: runlist to calculate for
1693 s64 ntfs_rl_get_compressed_size(ntfs_volume *vol, runlist *rl)
1695 runlist *rlc;
1708 ntfs_log_perror("%s: bad runlist", __FUNCTION__);
1730 * test_rl_dump_runlist - Runlist test: Display the contents of a runlist
1808 * test_rl_read_buffer - Runlist test: Read a file containing a runlist
2010 * test_rl_zero - Runlist test: Merge a zero-length runlist
2095 if (!test_rl_read_buffer("runlist-data/attr1.bin", (u8*) attr1, 1024))
2097 if (!test_rl_read_buffer("runlist-data/attr2.bin", (u8*) attr2, 1024))
2099 if (!test_rl_read_buffer("runlist-data/attr3.bin", (u8*) attr3, 1024))