Lines Matching refs:vol
51 if (NVolShutdown(ni->vol))
81 struct ntfs_volume *vol = ni->vol;
92 aligned_data_size = round_up(ni->data_size, vol->cluster_size);
96 vcn_ds = ntfs_bytes_to_cluster(vol, aligned_data_size);
107 err = ntfs_rl_truncate_nolock(vol, &ni->runlist, vcn_tr);
111 ntfs_error(vol->sb, "Preallocated block rollback failed");
113 ni->allocated_size = ntfs_cluster_to_bytes(vol, vcn_tr);
116 ntfs_error(vol->sb,
162 struct ntfs_volume *vol = ni->vol;
169 if (NVolShutdown(vol))
228 write_inode_now(vol->mftbmp_ino, 1);
229 down_write(&vol->lcnbmp_lock);
230 write_inode_now(vol->lcnbmp_ino, 1);
231 up_write(&vol->lcnbmp_lock);
232 write_inode_now(vol->mft_ino, 1);
306 struct ntfs_volume *vol = ni->vol;
308 if (NVolShutdown(vol))
315 if (!(vol->vol_flags & VOLUME_IS_DIRTY))
316 ntfs_set_volume_flags(vol, VOLUME_IS_DIRTY);
328 if (vol->sb->s_flags & SB_POSIXACL && !S_ISLNK(vi->i_mode)) {
350 vi->i_mode &= ~vol->dmask;
352 vi->i_mode &= ~vol->fmask;
543 struct ntfs_volume *vol = ni->vol;
550 if (NVolShutdown(vol))
578 if (!(vol->vol_flags & VOLUME_IS_DIRTY))
579 ntfs_set_volume_flags(vol, VOLUME_IS_DIRTY);
692 if (NVolNativeSymlinkRel(ni->vol)) {
728 struct ntfs_volume *vol = NTFS_SB(file_inode(filp)->i_sb);
733 mutex_lock(&vol->volume_label_lock);
734 if (!vol->volume_label) {
738 len = strscpy(label, vol->volume_label, sizeof(label));
742 mutex_unlock(&vol->volume_label_lock);
751 struct ntfs_volume *vol = NTFS_SB(file_inode(filp)->i_sb);
766 ret = ntfs_write_volume_label(vol, label);
773 static int ntfs_ioctl_fitrim(struct ntfs_volume *vol, unsigned long arg)
783 dev = vol->sb->s_bdev;
794 if (range.len < vol->cluster_size)
799 err = ntfs_trim_fs(vol, &range);
837 struct ntfs_volume *vol = ni->vol;
845 start_vcn = ntfs_bytes_to_cluster(vol, offset);
846 end_vcn = ntfs_bytes_to_cluster(vol, offset + len - 1) + 1;
852 need_space = ntfs_bytes_to_cluster(vol, ni->allocated_size);
858 need_space > (atomic64_read(&vol->free_clusters) -
859 atomic64_read(&vol->dirty_clusters))) {
876 struct ntfs_volume *vol = ni->vol;
883 vol->cluster_size, PAGE_SIZE));
885 if (NVolDisableSparse(vol)) {
903 start_vcn = ntfs_bytes_to_cluster(vol, offset);
904 end_vcn = ntfs_bytes_to_cluster(vol, end_offset - 1) + 1;
906 if (offset & vol->cluster_size_mask) {
911 ntfs_cluster_to_bytes(vol, start_vcn + 1),
924 if (end_offset & vol->cluster_size_mask) {
927 from = ntfs_cluster_to_bytes(vol, end_vcn - 1);
950 struct ntfs_volume *vol = ni->vol;
957 max_t(unsigned long, vol->cluster_size, PAGE_SIZE));
959 if ((offset & vol->cluster_size_mask) ||
960 (len & vol->cluster_size_mask) ||
967 start_vcn = ntfs_bytes_to_cluster(vol, offset);
968 end_vcn = ntfs_bytes_to_cluster(vol, offset + len - 1) + 1;
970 if (ntfs_cluster_to_bytes(vol, end_vcn) > ni->allocated_size)
972 vol->cluster_size) >> vol->cluster_size_bits) + 1;
973 new_size = old_size - ntfs_cluster_to_bytes(vol, end_vcn - start_vcn);
996 struct ntfs_volume *vol = ni->vol;
999 max_t(unsigned long, vol->cluster_size, PAGE_SIZE));
1005 if (NVolDisableSparse(vol)) {
1010 if ((offset & vol->cluster_size_mask) ||
1011 (len & vol->cluster_size_mask) ||
1018 start_vcn = ntfs_bytes_to_cluster(vol, offset);
1019 end_vcn = ntfs_bytes_to_cluster(vol, end_offset - 1) + 1;
1021 new_size = old_size + ntfs_cluster_to_bytes(vol, end_vcn - start_vcn);
1023 ntfs_cluster_to_bytes(vol, end_vcn - start_vcn);
1059 struct ntfs_volume *vol = ni->vol;
1067 if (!NVolFreeClusterKnown(vol))
1068 wait_event(vol->free_waitq, NVolFreeClusterKnown(vol));
1070 if ((ni->vol->mft_zone_end - ni->vol->mft_zone_start) == 0)
1081 if (!(vol->vol_flags & VOLUME_IS_DIRTY)) {
1082 err = ntfs_set_volume_flags(vol, VOLUME_IS_DIRTY);