• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/fs/ntfs/

Lines Matching refs:runlist

38  * ntfs_map_runlist_nolock - map (a part of) a runlist of an ntfs inode
39 * @ni: ntfs inode for which to map (part of) a runlist
40 * @vcn: map runlist part containing this vcn
43 * Map the part of a runlist containing the @vcn of the ntfs inode @ni.
47 * runlist fragments and allows their mapping. If you do not have the mft
64 * of bounds of the runlist.
66 * Note the runlist can be NULL after this function returns if @vcn is zero and
67 * the attribute has zero allocated size, i.e. there simply is no runlist.
76 * Locking: - The runlist described by @ni must be locked for writing on entry
77 * and is locked on return. Note the runlist will be modified.
96 ntfs_debug("Mapping runlist part containing vcn 0x%llx.",
130 * map the runlist below, so there is definitely no need to get
178 * we then try to map the already mapped runlist fragment and
189 rl = ntfs_mapping_pairs_decompress(ni->vol, a, ni->runlist.rl);
193 ni->runlist.rl = rl;
286 * ntfs_map_runlist - map (a part of) a runlist of an ntfs inode
287 * @ni: ntfs inode for which to map (part of) a runlist
288 * @vcn: map runlist part containing this vcn
290 * Map the part of a runlist containing the @vcn of the ntfs inode @ni.
294 * of bounds of the runlist.
296 * Locking: - The runlist must be unlocked on entry and is unlocked on return.
297 * - This function takes the runlist lock for writing and may modify
298 * the runlist.
304 down_write(&ni->runlist.lock);
306 if (likely(ntfs_rl_vcn_to_lcn(ni->runlist.rl, vcn) <=
309 up_write(&ni->runlist.lock);
315 * @ni: ntfs inode of the attribute whose runlist to search
317 * @write_locked: true if the runlist is locked for writing
319 * Find the virtual cluster number @vcn in the runlist of the ntfs attribute
326 * If @write_locked is true the caller has locked the runlist for writing and
334 * LCN_ENOENT There is no such vcn in the runlist, i.e. @vcn is out of bounds.
335 * LCN_ENOMEM Not enough memory to map runlist.
336 * LCN_EIO Critical error (runlist/file is corrupt, i/o error, etc).
338 * Locking: - The runlist must be locked on entry and is left locked on return.
339 * - If @write_locked is 'false', i.e. the runlist is locked for reading,
341 * the runlist still being the same when this function returns.
356 if (!ni->runlist.rl) {
365 /* Convert vcn to lcn. If that fails map the runlist and retry once. */
366 lcn = ntfs_rl_vcn_to_lcn(ni->runlist.rl, vcn);
378 up_read(&ni->runlist.lock);
379 down_write(&ni->runlist.lock);
380 if (unlikely(ntfs_rl_vcn_to_lcn(ni->runlist.rl, vcn) !=
382 up_write(&ni->runlist.lock);
383 down_read(&ni->runlist.lock);
389 up_write(&ni->runlist.lock);
390 down_read(&ni->runlist.lock);
410 * ntfs_attr_find_vcn_nolock - find a vcn in the runlist of an ntfs inode
411 * @ni: ntfs inode describing the runlist to search
415 * Find the virtual cluster number @vcn in the runlist described by the ntfs
416 * inode @ni and return the address of the runlist element containing the @vcn.
423 * runlist fragments and allows their mapping. If you do not have the mft
437 * Note you need to distinguish between the lcn of the returned runlist element
441 * Return the runlist element containing the @vcn on success and
447 * -ENOENT - No such vcn in the runlist, i.e. @vcn is out of bounds.
448 * -ENOMEM - Not enough memory to map runlist.
449 * -EIO - Critical error (runlist/file is corrupt, i/o error, etc).
458 * Locking: - The runlist described by @ni must be locked for writing on entry
459 * and is locked on return. Note the runlist may be modified when
460 * needed runlist fragments need to be mapped.
479 if (!ni->runlist.rl) {
488 rl = ni->runlist.rl;
516 * The @vcn is in an unmapped region, map the runlist
699 * @runlist: runlist of the attribute list
704 * Walk the runlist @runlist and load all clusters from it copying them into
712 int load_attribute_list(ntfs_volume *vol, runlist *runlist, u8 *al_start,
727 if (!vol || !runlist || !al || size <= 0 || initialized_size < 0 ||
737 down_read(&runlist->lock);
738 rl = runlist->rl;
740 ntfs_error(sb, "Cannot read attribute list since runlist is "
744 /* Read all clusters specified by the runlist one run at a time. */
782 up_read(&runlist->lock);
1563 down_write(&ni->runlist.lock);
1668 ni->runlist.rl = rl;
1703 up_write(&ni->runlist.lock);
1773 ni->runlist.rl = NULL;
1774 up_write(&ni->runlist.lock);
1842 * Locking: This function takes the runlist lock of @ni for writing as well as
1937 * We will be modifying both the runlist (if non-resident) and the mft
1940 down_write(&ni->runlist.lock);
2025 up_write(&ni->runlist.lock);
2093 rl = ni->runlist.rl;
2095 /* Seek to the end of the runlist. */
2101 (rl->lcn == LCN_ENOENT && rl > ni->runlist.rl &&
2105 rl = ntfs_mapping_pairs_decompress(vol, a, ni->runlist.rl);
2112 "mapping of a runlist "
2121 ni->runlist.rl = rl;
2122 /* Seek to the end of the runlist. */
2127 * We now know the runlist of the last extent is mapped and @rl is at
2128 * the end of the runlist. We want to begin allocating clusters
2134 while (rl->lcn < 0 && rl > ni->runlist.rl)
2155 rl = ntfs_runlists_merge(ni->runlist.rl, rl2);
2161 "because the runlist merge failed "
2176 ni->runlist.rl = rl;
2179 /* Find the runlist element with which the attribute extent starts. */
2281 up_write(&ni->runlist.lock);
2312 up_write(&ni->runlist.lock);
2333 * If the runlist truncation fails and/or the search context is no
2338 if (ntfs_rl_truncate_nolock(vol, &ni->runlist, ll) || IS_ERR(m)) {
2342 "truncate attribute runlist");
2372 up_write(&ni->runlist.lock);