Lines Matching defs:vol
424 * @vol: volume to read from
430 * volume @vol into buffer @b. Return number of clusters read or -1 on error,
433 s64 ntfs_cluster_read(const ntfs_volume *vol, const s64 lcn, const s64 count,
438 if (!vol || lcn < 0 || count < 0) {
442 if (vol->nr_clusters < lcn + count) {
445 "(%lld < %lld)", (long long)vol->nr_clusters,
449 br = ntfs_pread(vol->dev, lcn << vol->cluster_size_bits,
450 count << vol->cluster_size_bits, b);
455 return br >> vol->cluster_size_bits;
460 * @vol: volume to write to
466 * buffer @b to volume @vol. Return the number of clusters written or -1 on
469 s64 ntfs_cluster_write(const ntfs_volume *vol, const s64 lcn,
474 if (!vol || lcn < 0 || count < 0) {
478 if (vol->nr_clusters < lcn + count) {
481 "(%lld < %lld)", (long long)vol->nr_clusters,
485 if (!NVolReadOnly(vol))
486 bw = ntfs_pwrite(vol->dev, lcn << vol->cluster_size_bits,
487 count << vol->cluster_size_bits, b);
489 bw = count << vol->cluster_size_bits;
494 return bw >> vol->cluster_size_bits;