Lines Matching refs:vol

79 	attr = ntfs_find_attr(ino, ino->vol->at_data, NULL);  in ntfs_read()
92 error = ntfs_read_attr(ino, ino->vol->at_data, NULL, *off, &io); in ntfs_read()
123 data = ntfs_find_attr(ntfs_ino, ntfs_ino->vol->at_data, NULL); in ntfs_write()
345 static void init_ntfs_super_block(ntfs_volume* vol) in init_ntfs_super_block() argument
347 vol->uid = vol->gid = 0; in init_ntfs_super_block()
348 vol->umask = 0077; in init_ntfs_super_block()
349 vol->ngt = ngt_nt; in init_ntfs_super_block()
350 vol->nls_map = (void*)-1; in init_ntfs_super_block()
351 vol->mft_zone_multiplier = -1; in init_ntfs_super_block()
355 static int parse_options(ntfs_volume *vol, char *opt) in parse_options() argument
457 if (vol->nls_map == (void*)-1) in parse_options()
458 vol->nls_map = load_nls_default(); in parse_options()
461 if (vol->nls_map && vol->nls_map != (void*)-1) in parse_options()
462 unload_nls(vol->nls_map); in parse_options()
464 vol->nls_map = nls_map; in parse_options()
475 if (vol->nls_map && vol->nls_map != (void*)-1) in parse_options()
476 unload_nls(vol->nls_map); in parse_options()
481 vol->nls_map = load_nls_default(); in parse_options()
484 vol->nls_map = nls_map; in parse_options()
487 vol->nls_map = NULL; in parse_options()
490 vol->uid = uid; in parse_options()
492 vol->gid = gid; in parse_options()
494 vol->umask = (ntmode_t)umask; in parse_options()
496 vol->ngt = ngt; in parse_options()
499 if (vol->mft_zone_multiplier != -1) { in parse_options()
501 if (vol->mft_zone_multiplier != mft_zone_mul) in parse_options()
509 vol->mft_zone_multiplier = mft_zone_mul; in parse_options()
510 } else if (vol->mft_zone_multiplier == -1) in parse_options()
512 vol->mft_zone_multiplier = 1; in parse_options()
576 ntfs_volume *vol; in ntfs_create() local
586 vol = NTFS_INO2VOL(dir); in ntfs_create()
603 r->i_uid = vol->uid; in ntfs_create()
604 r->i_gid = vol->gid; in ntfs_create()
607 si = ntfs_find_attr(ino, vol->at_standard_information, NULL); in ntfs_create()
621 r->i_mode &= ~vol->umask; in ntfs_create()
635 ntfs_volume *vol; in _linux_ntfs_mkdir() local
647 vol = NTFS_INO2VOL(dir); in _linux_ntfs_mkdir()
656 r->i_uid = vol->uid; in _linux_ntfs_mkdir()
657 r->i_gid = vol->gid; in _linux_ntfs_mkdir()
658 si = ntfs_find_attr(ino, vol->at_standard_information, NULL); in _linux_ntfs_mkdir()
672 r->i_mode &= ~vol->umask; in _linux_ntfs_mkdir()
702 ntfs_volume *vol; in ntfs_read_inode() local
707 vol = NTFS_INO2VOL(inode); in ntfs_read_inode()
713 if (!vol->mft_ino || ((vol->ino_flags & 1) == 0)) in ntfs_read_inode()
715 ntfs_memcpy(&inode->u.ntfs_i, vol->mft_ino, sizeof(ntfs_inode)); in ntfs_read_inode()
716 ino = vol->mft_ino; in ntfs_read_inode()
717 vol->mft_ino = &inode->u.ntfs_i; in ntfs_read_inode()
718 vol->ino_flags &= ~1; in ntfs_read_inode()
720 ino = vol->mft_ino; in ntfs_read_inode()
724 if (!vol->mftmirr || ((vol->ino_flags & 2) == 0)) in ntfs_read_inode()
726 ntfs_memcpy(&inode->u.ntfs_i, vol->mftmirr, sizeof(ntfs_inode)); in ntfs_read_inode()
727 ino = vol->mftmirr; in ntfs_read_inode()
728 vol->mftmirr = &inode->u.ntfs_i; in ntfs_read_inode()
729 vol->ino_flags &= ~2; in ntfs_read_inode()
731 ino = vol->mftmirr; in ntfs_read_inode()
735 if (!vol->bitmap || ((vol->ino_flags & 4) == 0)) in ntfs_read_inode()
737 ntfs_memcpy(&inode->u.ntfs_i, vol->bitmap, sizeof(ntfs_inode)); in ntfs_read_inode()
738 ino = vol->bitmap; in ntfs_read_inode()
739 vol->bitmap = &inode->u.ntfs_i; in ntfs_read_inode()
740 vol->ino_flags &= ~4; in ntfs_read_inode()
742 ino = vol->bitmap; in ntfs_read_inode()
761 inode->i_uid = vol->uid; in ntfs_read_inode()
762 inode->i_gid = vol->gid; in ntfs_read_inode()
765 data = ntfs_find_attr(ino, vol->at_data, NULL); in ntfs_read_inode()
771 si = ntfs_find_attr(ino, vol->at_standard_information, NULL); in ntfs_read_inode()
779 if (ntfs_find_attr(ino, vol->at_index_root, "$I30")) { in ntfs_read_inode()
781 at = ntfs_find_attr(ino, vol->at_index_allocation, "$I30"); in ntfs_read_inode()
795 inode->i_mode &= ~vol->umask; in ntfs_read_inode()
816 ntfs_volume *vol; in _ntfs_clear_inode() local
820 vol = NTFS_INO2VOL(inode); in _ntfs_clear_inode()
821 if (!vol) in _ntfs_clear_inode()
826 if (vol->mft_ino && ((vol->ino_flags & 1) == 0)) { in _ntfs_clear_inode()
829 vol->mft_ino = ino; in _ntfs_clear_inode()
830 vol->ino_flags |= 1; in _ntfs_clear_inode()
835 if (vol->mftmirr && ((vol->ino_flags & 2) == 0)) { in _ntfs_clear_inode()
838 vol->mftmirr = ino; in _ntfs_clear_inode()
839 vol->ino_flags |= 2; in _ntfs_clear_inode()
844 if (vol->bitmap && ((vol->ino_flags & 4) == 0)) { in _ntfs_clear_inode()
847 vol->bitmap = ino; in _ntfs_clear_inode()
848 vol->ino_flags |= 4; in _ntfs_clear_inode()
863 ntfs_volume *vol; in ntfs_put_super() local
866 vol = NTFS_SB2VOL(sb); in ntfs_put_super()
867 ntfs_release_volume(vol); in ntfs_put_super()
868 if (vol->nls_map) in ntfs_put_super()
869 unload_nls(vol->nls_map); in ntfs_put_super()
877 ntfs_volume *vol; in ntfs_statfs() local
882 vol = NTFS_SB2VOL(sb); in ntfs_statfs()
884 sf->f_bsize = vol->cluster_size; in ntfs_statfs()
889 size = (__s64)ntfs_get_free_cluster_count(vol->bitmap); in ntfs_statfs()
901 sf->f_files = mft->i_size >> vol->mft_record_size_bits; in ntfs_statfs()
1011 ntfs_volume *vol; in ntfs_read_super() local
1016 vol = NTFS_SB2VOL(sb); in ntfs_read_super()
1017 init_ntfs_super_block(vol); in ntfs_read_super()
1018 if (!parse_options(vol, (char*)options)) in ntfs_read_super()
1041 if (ntfs_init_volume(vol, bh->b_data) < 0) { in ntfs_read_super()
1046 ntfs_debug(DEBUG_OTHER, "$Mft at cluster 0x%lx\n", vol->mft_lcn); in ntfs_read_super()
1048 vol->sb = sb; in ntfs_read_super()
1049 if (vol->cluster_size > PAGE_SIZE) { in ntfs_read_super()
1056 sb->s_blocksize = vol->cluster_size; in ntfs_read_super()
1057 sb->s_blocksize_bits = vol->cluster_size_bits; in ntfs_read_super()
1058 if (blocksize != vol->cluster_size && in ntfs_read_super()
1065 i = vol->cluster_size; in ntfs_read_super()
1066 if (i < vol->mft_record_size) in ntfs_read_super()
1067 i = vol->mft_record_size; in ntfs_read_super()
1068 if (!(vol->mft = ntfs_malloc(i))) in ntfs_read_super()
1072 to_read = vol->mft_clusters_per_record; in ntfs_read_super()
1076 if (!(bh = sb_bread(sb, vol->mft_lcn + i))) { in ntfs_read_super()
1080 ntfs_memcpy(vol->mft + ((__s64)i << vol->cluster_size_bits), in ntfs_read_super()
1081 bh->b_data, vol->cluster_size); in ntfs_read_super()
1084 vol->mft_lcn + i); in ntfs_read_super()
1087 if (!ntfs_check_mft_record(vol, vol->mft)){ in ntfs_read_super()
1096 if (ntfs_load_special_files(vol)) { in ntfs_read_super()
1110 ntfs_free(vol->mft); in ntfs_read_super()