• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/ntfs-3g-2009.3.8/libntfs-3g/

Lines Matching refs:vol

67 static void ntfs_cluster_update_zone_pos(ntfs_volume *vol, u8 zone, LCN tc)
72 ntfs_cluster_set_zone_pos(vol->mft_lcn, vol->mft_zone_end,
73 &vol->mft_zone_pos, tc);
75 ntfs_cluster_set_zone_pos(vol->mft_zone_end, vol->nr_clusters,
76 &vol->data1_zone_pos, tc);
78 ntfs_cluster_set_zone_pos(0, vol->mft_zone_start,
79 &vol->data2_zone_pos, tc);
118 static int bitmap_writeback(ntfs_volume *vol, s64 pos, s64 size, void *b,
130 written = ntfs_attr_pwrite(vol->lcnbmp_na, pos, size, b);
144 * @vol: mounted ntfs volume on which to allocate the clusters
152 * @vol. @zone is either DATA_ZONE for allocation of normal clusters and
182 runlist *ntfs_cluster_alloc(ntfs_volume *vol, VCN start_vcn, s64 count,
202 if (!vol || count < 0 || start_lcn < -1 || !vol->lcnbmp_na ||
234 zone_start = vol->data1_zone_pos;
236 zone_start = vol->mft_zone_pos;
242 if (!zone_start || zone_start == vol->mft_zone_start ||
243 zone_start == vol->mft_zone_end)
246 if (zone_start < vol->mft_zone_start) {
247 zone_end = vol->mft_zone_start;
249 } else if (zone_start < vol->mft_zone_end) {
250 zone_end = vol->mft_zone_end;
253 zone_end = vol->nr_clusters;
264 br = ntfs_attr_pread(vol->lcnbmp_na, last_read_pos,
315 if (vol->free_clusters <= 0)
318 (long long)vol->free_clusters);
320 vol->free_clusters--;
356 ntfs_cluster_update_zone_pos(vol,
365 if (bitmap_writeback(vol, last_read_pos, br, buf, &writeback)) {
375 zone_start = vol->mft_zone_pos;
377 zone_start = vol->data1_zone_pos;
379 zone_start = vol->data2_zone_pos;
381 if (!zone_start || zone_start == vol->mft_zone_start ||
382 zone_start == vol->mft_zone_end)
399 zone_start = vol->mft_zone_start;
401 zone_start = vol->mft_zone_end;
424 ntfs_cluster_update_zone_pos(vol,
432 zone_start = vol->data1_zone_pos;
433 zone_end = vol->nr_clusters;
434 if (zone_start == vol->mft_zone_end)
440 zone_start = vol->data2_zone_pos;
441 zone_end = vol->mft_zone_start;
452 zone_start = vol->mft_zone_pos;
453 zone_end = vol->mft_zone_end;
454 if (zone_start == vol->mft_zone_start)
479 if (bitmap_writeback(vol, last_read_pos, br, buf, &writeback)) {
496 if (bitmap_writeback(vol, last_read_pos, br, buf, &writeback))
506 ntfs_cluster_free_from_rl(vol, rl);
515 * @vol: mounted ntfs volume on which to free the clusters
520 int ntfs_cluster_free_from_rl(ntfs_volume *vol, runlist *rl)
533 if (ntfs_bitmap_clear_run(vol->lcnbmp_na, rl->lcn,
547 vol->free_clusters += nr_freed;
548 if (vol->free_clusters > vol->nr_clusters)
550 (long long)vol->free_clusters,
551 (long long)vol->nr_clusters);
557 * @vol: mounted ntfs volume on which to free the clusters
563 * described by the attribute @na from the mounted ntfs volume @vol.
571 int ntfs_cluster_free(ntfs_volume *vol, ntfs_attr *na, VCN start_vcn, s64 count)
577 if (!vol || !vol->lcnbmp_na || !na || start_vcn < 0 ||
612 if (ntfs_bitmap_clear_run(vol->lcnbmp_na, rl->lcn + delta,
644 if (ntfs_bitmap_clear_run(vol->lcnbmp_na, rl->lcn,
668 vol->free_clusters += nr_freed ;
669 if (vol->free_clusters > vol->nr_clusters)
671 (long long)vol->free_clusters,
672 (long long)vol->nr_clusters);