Lines Matching defs:vol

192  * ntfs_boot_sector_parse - parse the boot sector and store the data in @vol
193 * @vol: volume structure to initialise with data from boot sector
197 * the ntfs_volume @vol.
205 static int ntfs_boot_sector_parse(ntfs_volume *vol, const NTFS_BOOT_SECTOR *b)
210 vol->sector_size = le16_to_cpu(b->bpb.bytes_per_sector);
211 vol->cluster_size = vol->sector_size * b->bpb.sectors_per_cluster;
212 if (vol->cluster_size < vol->sector_size)
216 vol->mft_record_size = vol->cluster_size *
224 vol->mft_record_size = 1 << -clusters_per_mft_record;
235 vol->nr_clusters = ll;
237 if (ll >= vol->nr_clusters)
239 vol->mft_lcn = ll;
241 if (ll >= vol->nr_clusters)
243 vol->mftmirr_lcn = ll;
390 * @vol: ntfs volume on which the attribute resides
407 static int ntfs_mapping_pairs_decompress(ntfs_volume *vol,
551 vol->cluster_size - 1) / vol->cluster_size) - 1;
700 * @vol: ntfs_volume structure to set up describing the NTFS volume
704 * initialized ntfs_volume structure in @vol as well as the mft record for the
712 static int get_volume_mft_record(char *rdev, ntfs_volume *vol,
780 /* Parse the boot sector and initialize @vol with its information. */
781 err = ntfs_boot_sector_parse(vol, bs);
784 m = malloc(vol->mft_record_size);
790 if (ntfs_pread(f, buf, sector_size, m, vol->mft_record_size,
791 vol->mft_lcn * vol->cluster_size) !=
792 (ssize_t)vol->mft_record_size) {
797 err = ntfs_mst_fixup_post_read((NTFS_RECORD*)m, vol->mft_record_size);
809 err = ntfs_mapping_pairs_decompress(vol, ctx.a, &rl);
812 vcn = FILE_Volume * vol->mft_record_size;
813 vcn_ofs = vcn & (vol->cluster_size - 1);
814 vcn /= vol->cluster_size;
815 to_read = vol->mft_record_size;
828 io_size = (clusters * vol->cluster_size) - vcn_ofs;
832 vol->cluster_size) + vcn_ofs) != io_size) {
842 err = ntfs_mst_fixup_post_read((NTFS_RECORD*)m, vol->mft_record_size);
884 ntfs_volume vol;
889 err = get_volume_mft_record(rdev, &vol, &m);
915 if ((u8*)obj_id + obj_id_len > (u8*)m + vol.mft_record_size ||
1016 ntfs_volume vol;
1020 err = get_volume_mft_record(rdev, &vol, &m);
1046 if ((u8*)uname + uname_len > (u8*)m + vol.mft_record_size ||