Lines Matching refs:vol
758 * @vol: ntfs volume on which the attribute resides
783 static runlist_element *ntfs_mapping_pairs_decompress_i(const ntfs_volume *vol,
908 if (vol->major_ver < 3) {
962 vol->cluster_size - 1) >>
963 vol->cluster_size_bits);
1024 runlist_element *ntfs_mapping_pairs_decompress(const ntfs_volume *vol,
1030 rle = ntfs_mapping_pairs_decompress_i(vol, attr, old_rl);
1091 * @vol: ntfs volume to read from
1097 * This function will read @count bytes from the volume @vol to the data buffer
1113 s64 ntfs_rl_pread(const ntfs_volume *vol, const runlist_element *rl,
1119 if (!vol || !rl || pos < 0 || count < 0) {
1121 ntfs_log_perror("Failed to read runlist [vol: %p rl: %p "
1122 "pos: %lld count: %lld]", vol, rl,
1130 vol->cluster_size_bits) <= pos); rl++)
1131 ofs += (rl->length << vol->cluster_size_bits);
1142 vol->cluster_size_bits) - ofs);
1151 to_read = min(count, (rl->length << vol->cluster_size_bits) -
1154 bytes_read = ntfs_pread(vol->dev, (rl->lcn <<
1155 vol->cluster_size_bits) + ofs, to_read, b);
1181 * @vol: ntfs volume to write to
1188 * This function will write @count bytes from data buffer @b to the volume @vol
1202 s64 ntfs_rl_pwrite(const ntfs_volume *vol, const runlist_element *rl,
1208 if (!vol || !rl || pos < 0 || count < 0) {
1210 ntfs_log_perror("Failed to write runlist [vol: %p rl: %p "
1211 "pos: %lld count: %lld]", vol, rl,
1219 vol->cluster_size_bits) <= pos)) {
1220 ofs += (rl->length << vol->cluster_size_bits);
1234 vol->cluster_size_bits) - ofs);
1242 to_write = min(count, (rl->length << vol->cluster_size_bits) -
1245 if (!NVolReadOnly(vol))
1246 written = ntfs_pwrite(vol->dev, (rl->lcn <<
1247 vol->cluster_size_bits) + ofs,
1308 * @vol: ntfs volume (needed for the ntfs version)
1326 int ntfs_get_size_for_mapping_pairs(const ntfs_volume *vol,
1375 if (rl->lcn >= 0 || vol->major_ver < 3) {
1398 if (rl->lcn >= 0 || vol->major_ver < 3) {
1460 * @vol: ntfs volume (needed for the ntfs version)
1489 int ntfs_mapping_pairs_build(const ntfs_volume *vol, u8 *dst,
1542 if (rl->lcn >= 0 || vol->major_ver < 3) {
1581 if (rl->lcn >= 0 || vol->major_ver < 3) {
1741 * @vol: ntfs volume (need for cluster size)
1746 s64 ntfs_rl_get_compressed_size(ntfs_volume *vol, runlist *rl)
1767 return ret << vol->cluster_size_bits;
2090 * @vol:
2099 static void test_rl_frag_combine(ntfs_volume *vol, ATTR_RECORD *attr1, ATTR_RECORD *attr2, ATTR_RECORD *attr3)
2105 run1 = ntfs_mapping_pairs_decompress(vol, attr1, NULL);
2109 run2 = ntfs_mapping_pairs_decompress(vol, attr2, NULL);
2115 run3 = ntfs_mapping_pairs_decompress(vol, attr3, NULL);
2134 ntfs_volume vol;
2142 vol.sb = NULL;
2143 vol.sector_size_bits = 9;
2144 vol.cluster_size = 2048;
2145 vol.cluster_size_bits = 11;
2146 vol.major_ver = 3;
2155 if (strcmp(test, "123") == 0) test_rl_frag_combine(&vol, attr1, attr2, attr3);
2156 else if (strcmp(test, "132") == 0) test_rl_frag_combine(&vol, attr1, attr3, attr2);
2157 else if (strcmp(test, "213") == 0) test_rl_frag_combine(&vol, attr2, attr1, attr3);
2158 else if (strcmp(test, "231") == 0) test_rl_frag_combine(&vol, attr2, attr3, attr1);
2159 else if (strcmp(test, "312") == 0) test_rl_frag_combine(&vol, attr3, attr1, attr2);
2160 else if (strcmp(test, "321") == 0) test_rl_frag_combine(&vol, attr3, attr2, attr1);