• Home
  • Raw
  • Download

Lines Matching refs:dir_ni

249 u64 ntfs_inode_lookup_by_name(ntfs_inode *dir_ni,  in ntfs_inode_lookup_by_name()  argument
255 ntfs_volume *vol = dir_ni->vol; in ntfs_inode_lookup_by_name()
269 if (!dir_ni || !dir_ni->mrec || !uname || uname_len <= 0) { in ntfs_inode_lookup_by_name()
274 ctx = ntfs_attr_get_search_ctx(dir_ni, NULL); in ntfs_inode_lookup_by_name()
282 "%lld", (unsigned long long)dir_ni->mft_no); in ntfs_inode_lookup_by_name()
313 (unsigned long long)dir_ni->mft_no); in ntfs_inode_lookup_by_name()
325 dir_ni->mft_no)) { in ntfs_inode_lookup_by_name()
372 ia_na = ntfs_attr_open(dir_ni, AT_INDEX_ALLOCATION, NTFS_INDEX_I30, 4); in ntfs_inode_lookup_by_name()
375 (unsigned long long)dir_ni->mft_no); in ntfs_inode_lookup_by_name()
433 (unsigned long long)dir_ni->mft_no); in ntfs_inode_lookup_by_name()
446 dir_ni->mft_no)) { in ntfs_inode_lookup_by_name()
482 (unsigned long long)dir_ni->mft_no); in ntfs_inode_lookup_by_name()
491 "0x%llx.\n", (unsigned long long)dir_ni->mft_no); in ntfs_inode_lookup_by_name()
531 u64 ntfs_inode_lookup_by_mbsname(ntfs_inode *dir_ni, const char *name) in ntfs_inode_lookup_by_mbsname() argument
539 if (!NVolCaseSensitive(dir_ni->vol)) { in ntfs_inode_lookup_by_mbsname()
541 dir_ni->vol->upcase, dir_ni->vol->upcase_len); in ntfs_inode_lookup_by_mbsname()
554 if (dir_ni->vol->lookup_cache) { in ntfs_inode_lookup_by_mbsname()
560 item.parent = dir_ni->mft_no; in ntfs_inode_lookup_by_mbsname()
562 dir_ni->vol->lookup_cache, in ntfs_inode_lookup_by_mbsname()
572 inum = ntfs_inode_lookup_by_name(dir_ni, in ntfs_inode_lookup_by_mbsname()
576 ntfs_enter_cache(dir_ni->vol->lookup_cache, in ntfs_inode_lookup_by_mbsname()
589 inum = ntfs_inode_lookup_by_name(dir_ni, in ntfs_inode_lookup_by_mbsname()
607 void ntfs_inode_update_mbsname(ntfs_inode *dir_ni, const char *name, u64 inum) in ntfs_inode_update_mbsname() argument
614 if (dir_ni->vol->lookup_cache) { in ntfs_inode_update_mbsname()
615 if (!NVolCaseSensitive(dir_ni->vol)) { in ntfs_inode_update_mbsname()
617 dir_ni->vol->upcase, dir_ni->vol->upcase_len); in ntfs_inode_update_mbsname()
625 item.parent = dir_ni->mft_no; in ntfs_inode_update_mbsname()
628 dir_ni->vol->lookup_cache, in ntfs_inode_update_mbsname()
913 static u32 ntfs_dir_entry_type(ntfs_inode *dir_ni, MFT_REF mref, in ntfs_dir_entry_type() argument
920 ni = ntfs_inode_open(dir_ni->vol, mref); in ntfs_dir_entry_type()
959 static int ntfs_filldir(ntfs_inode *dir_ni, s64 *pos, u8 ivcn_bits, in ntfs_filldir() argument
976 dir_ni->vol->mft_record_size; in ntfs_filldir()
987 dt_type = ntfs_dir_entry_type(dir_ni, mref, in ntfs_filldir()
996 if ((!metadata && (NVolShowHidFiles(dir_ni->vol) in ntfs_filldir()
998 || (NVolShowSysFiles(dir_ni->vol) && (NVolShowHidFiles(dir_ni->vol) in ntfs_filldir()
1000 if (NVolCaseSensitive(dir_ni->vol)) { in ntfs_filldir()
1011 dir_ni->vol->locase, in ntfs_filldir()
1012 dir_ni->vol->upcase_len); in ntfs_filldir()
1101 int ntfs_readdir(ntfs_inode *dir_ni, s64 *pos, in ntfs_readdir() argument
1118 if (!dir_ni || !pos || !filldir) { in ntfs_readdir()
1123 if (!(dir_ni->mrec->flags & MFT_RECORD_IS_DIRECTORY)) { in ntfs_readdir()
1128 vol = dir_ni->vol; in ntfs_readdir()
1131 (unsigned long long)dir_ni->mft_no, (long long)*pos); in ntfs_readdir()
1134 ia_na = ntfs_attr_open(dir_ni, AT_INDEX_ALLOCATION, NTFS_INDEX_I30, 4); in ntfs_readdir()
1139 (unsigned long long)dir_ni->mft_no); in ntfs_readdir()
1155 MK_MREF(dir_ni->mft_no, in ntfs_readdir()
1156 le16_to_cpu(dir_ni->mrec->sequence_number)), in ntfs_readdir()
1165 parent_mref = ntfs_mft_get_parent_ref(dir_ni); in ntfs_readdir()
1178 ctx = ntfs_attr_get_search_ctx(dir_ni, NULL); in ntfs_readdir()
1188 "%lld", (unsigned long long)dir_ni->mft_no); in ntfs_readdir()
1235 (unsigned long long)dir_ni->mft_no); in ntfs_readdir()
1251 dir_ni->mft_no)) { in ntfs_readdir()
1259 rc = ntfs_filldir(dir_ni, pos, index_vcn_size_bits, in ntfs_readdir()
1287 bmp_na = ntfs_attr_open(dir_ni, AT_BITMAP, NTFS_INDEX_I30, 4); in ntfs_readdir()
1377 "%lld.\n", (unsigned long long)dir_ni->mft_no); in ntfs_readdir()
1393 dir_ni->mft_no)) { in ntfs_readdir()
1401 rc = ntfs_filldir(dir_ni, pos, index_vcn_size_bits, in ntfs_readdir()
1469 static ntfs_inode *__ntfs_create(ntfs_inode *dir_ni, le32 securid, in __ntfs_create() argument
1484 if (!dir_ni || !name || !name_len) { in __ntfs_create()
1490 ni = ntfs_mft_record_alloc(dir_ni->vol, NULL); in __ntfs_create()
1494 ntfs_inode_invalidate(dir_ni->vol, ni->mft_no); in __ntfs_create()
1496 special_files = dir_ni->vol->special_files; in __ntfs_create()
1539 if (NVolHideDotFiles(dir_ni->vol) in __ntfs_create()
1549 if ((dir_ni->flags & FILE_ATTR_COMPRESSED) in __ntfs_create()
1550 && (dir_ni->vol->major_ver >= 3) in __ntfs_create()
1551 && NVolCompression(dir_ni->vol) in __ntfs_create()
1552 && (dir_ni->vol->cluster_size <= MAX_COMPRESSION_CLUSTER_SIZE) in __ntfs_create()
1695 fn->parent_directory = MK_LE_MREF(dir_ni->mft_no, in __ntfs_create()
1696 le16_to_cpu(dir_ni->mrec->sequence_number)); in __ntfs_create()
1726 if (ntfs_index_add_filename(dir_ni, fn, MK_MREF(ni->mft_no, in __ntfs_create()
1776 ntfs_index_remove(dir_ni, ni, fn, fn_len); in __ntfs_create()
1807 ntfs_inode *ntfs_create(ntfs_inode *dir_ni, le32 securid, const ntfschar *name, in ntfs_create() argument
1815 return __ntfs_create(dir_ni, securid, name, name_len, type, 0, NULL, 0); in ntfs_create()
1818 ntfs_inode *ntfs_create_device(ntfs_inode *dir_ni, le32 securid, in ntfs_create_device() argument
1825 return __ntfs_create(dir_ni, securid, name, name_len, type, dev, NULL, 0); in ntfs_create_device()
1828 ntfs_inode *ntfs_create_symlink(ntfs_inode *dir_ni, le32 securid, in ntfs_create_symlink() argument
1837 return __ntfs_create(dir_ni, securid, name, name_len, S_IFLNK, 0, in ntfs_create_symlink()
1905 ntfs_inode *ni, ntfs_inode *dir_ni, const ntfschar *name, in ntfs_delete() argument
1928 if (!ni || !dir_ni || !name || !name_len) { in ntfs_delete()
1935 if (dir_ni->nr_extents == -1) in ntfs_delete()
1936 dir_ni = dir_ni->base_ni; in ntfs_delete()
1978 if (dir_ni->mft_no != MREF_LE(fn->parent_directory)) { in ntfs_delete()
1981 (long long unsigned)dir_ni->mft_no, in ntfs_delete()
2020 if (ntfs_index_remove(dir_ni, ni, fn, le32_to_cpu(actx->attr->value_length))) in ntfs_delete()
2057 lkitem.parent = dir_ni->mft_no; in ntfs_delete()
2165 ntfs_inode_update_times(dir_ni, NTFS_UPDATE_MCTIME); in ntfs_delete()
2169 if (ntfs_inode_close(dir_ni) && !err) in ntfs_delete()
2200 static int ntfs_link_i(ntfs_inode *ni, ntfs_inode *dir_ni, const ntfschar *name, in ntfs_link_i() argument
2208 if (!ni || !dir_ni || !name || !name_len || in ntfs_link_i()
2209 ni->mft_no == dir_ni->mft_no) { in ntfs_link_i()
2215 if (NVolHideDotFiles(dir_ni->vol)) { in ntfs_link_i()
2232 fn->parent_directory = MK_LE_MREF(dir_ni->mft_no, in ntfs_link_i()
2233 le16_to_cpu(dir_ni->mrec->sequence_number)); in ntfs_link_i()
2250 if (ntfs_index_add_filename(dir_ni, fn, MK_MREF(ni->mft_no, in ntfs_link_i()
2261 if (ntfs_index_remove(dir_ni, ni, fn, fn_len)) in ntfs_link_i()
2281 int ntfs_link(ntfs_inode *ni, ntfs_inode *dir_ni, const ntfschar *name, in ntfs_link() argument
2284 return (ntfs_link_i(ni, dir_ni, name, name_len, FILE_NAME_POSIX)); in ntfs_link()
2300 ntfs_inode *dir_ni = (ntfs_inode*)NULL; in ntfs_dir_parent_inode() local
2318 dir_ni = ntfs_inode_open(ni->vol, MREF(inum)); in ntfs_dir_parent_inode()
2323 return (dir_ni); in ntfs_dir_parent_inode()
2455 int ntfs_get_ntfs_dos_name(ntfs_inode *ni, ntfs_inode *dir_ni, in ntfs_get_ntfs_dos_name() argument
2464 dnum = dir_ni->mft_no; in ntfs_get_ntfs_dos_name()
2501 static int set_namespace(ntfs_inode *ni, ntfs_inode *dir_ni, in set_namespace() argument
2524 == dir_ni->mft_no) in set_namespace()
2530 icx = ntfs_index_ctx_get(dir_ni, NTFS_INDEX_I30, 4); in set_namespace()
2575 static int set_dos_name(ntfs_inode *ni, ntfs_inode *dir_ni, in set_dos_name() argument
2592 dnum = dir_ni->mft_no; in set_dos_name()
2604 oldnametype = set_namespace(ni, dir_ni, deletename, in set_dos_name()
2607 if (set_namespace(ni, dir_ni, longname, longlen, in set_dos_name()
2610 (const char*)NULL, ni, dir_ni, in set_dos_name()
2619 if (!done && (set_namespace(ni, dir_ni, in set_dos_name()
2624 ntfs_inode_update_times(dir_ni, NTFS_UPDATE_MCTIME); in set_dos_name()
2625 if (ntfs_inode_close_in_dir(ni,dir_ni) && !res) in set_dos_name()
2627 if (ntfs_inode_close(dir_ni) && !res) in set_dos_name()
2631 if (!ntfs_link_i(ni, dir_ni, shortname, shortlen, in set_dos_name()
2637 if (!ntfs_delete(vol, (char*)NULL, ni, dir_ni, in set_dos_name()
2640 dir_ni = ntfs_inode_open(vol, dnum); in set_dos_name()
2641 if (dir_ni) { in set_dos_name()
2644 if (!ntfs_link_i(ni, dir_ni, in set_dos_name()
2649 dir_ni) in set_dos_name()
2653 if (ntfs_inode_close(dir_ni) && !res) in set_dos_name()
2658 ntfs_inode_close_in_dir(ni,dir_ni); in set_dos_name()
2659 ntfs_inode_close(dir_ni); in set_dos_name()
2676 int ntfs_set_ntfs_dos_name(ntfs_inode *ni, ntfs_inode *dir_ni, in ntfs_set_ntfs_dos_name() argument
2706 ntfs_inode_close_in_dir(ni,dir_ni); in ntfs_set_ntfs_dos_name()
2707 ntfs_inode_close(dir_ni); in ntfs_set_ntfs_dos_name()
2711 dnum = dir_ni->mft_no; in ntfs_set_ntfs_dos_name()
2729 res = set_dos_name(ni, dir_ni, in ntfs_set_ntfs_dos_name()
2740 res = set_dos_name(ni, dir_ni, in ntfs_set_ntfs_dos_name()
2756 ntfs_inode_close_in_dir(ni,dir_ni); in ntfs_set_ntfs_dos_name()
2757 ntfs_inode_close(dir_ni); in ntfs_set_ntfs_dos_name()
2766 int ntfs_remove_ntfs_dos_name(ntfs_inode *ni, ntfs_inode *dir_ni) in ntfs_remove_ntfs_dos_name() argument
2780 dnum = dir_ni->mft_no; in ntfs_remove_ntfs_dos_name()
2786 oldnametype = set_namespace(ni,dir_ni,longname,longlen, in ntfs_remove_ntfs_dos_name()
2795 set_namespace(ni,dir_ni,longname,longlen, in ntfs_remove_ntfs_dos_name()
2801 if (set_namespace(ni,dir_ni,shortname,shortlen, in ntfs_remove_ntfs_dos_name()
2805 dir_ni, shortname, in ntfs_remove_ntfs_dos_name()
2833 ntfs_inode_close_in_dir(ni,dir_ni); in ntfs_remove_ntfs_dos_name()
2834 ntfs_inode_close(dir_ni); in ntfs_remove_ntfs_dos_name()