Lines Matching refs:dir_ni
82 * @dir_ni: ntfs inode of the directory in which to search for the name
86 * Look for an inode with name @uname in the directory with inode @dir_ni.
105 u64 ntfs_inode_lookup_by_name(ntfs_inode *dir_ni, const ntfschar *uname,
111 ntfs_volume *vol = dir_ni->vol;
124 if (!dir_ni || !dir_ni->mrec || !uname || uname_len <= 0) {
129 ctx = ntfs_attr_get_search_ctx(dir_ni, NULL);
137 "%lld", (unsigned long long)dir_ni->mft_no);
165 "\n", (unsigned long long)dir_ni->mft_no);
177 "\n", (unsigned long long)dir_ni->mft_no);
236 ia_na = ntfs_attr_open(dir_ni, AT_INDEX_ALLOCATION, NTFS_INDEX_I30, 4);
239 (unsigned long long)dir_ni->mft_no);
287 (unsigned long long)dir_ni->mft_no,
297 (long long)vcn, (unsigned long long)dir_ni->mft_no);
318 (unsigned long long)dir_ni->mft_no);
332 "\n", (unsigned long long)dir_ni->mft_no);
381 (unsigned long long)dir_ni->mft_no);
390 "0x%llx.\n", (unsigned long long)dir_ni->mft_no);
566 * @dir_ni: ntfs inode of current directory
578 static int ntfs_filldir(ntfs_inode *dir_ni, s64 *pos, u8 ivcn_bits,
591 dir_ni->vol->mft_record_size;
675 * @dir_ni: ntfs inode of current directory
689 int ntfs_readdir(ntfs_inode *dir_ni, s64 *pos,
706 if (!dir_ni || !pos || !filldir) {
711 if (!(dir_ni->mrec->flags & MFT_RECORD_IS_DIRECTORY)) {
716 vol = dir_ni->vol;
719 (unsigned long long)dir_ni->mft_no, (long long)*pos);
722 ia_na = ntfs_attr_open(dir_ni, AT_INDEX_ALLOCATION, NTFS_INDEX_I30, 4);
727 (unsigned long long)dir_ni->mft_no);
743 MK_MREF(dir_ni->mft_no,
744 le16_to_cpu(dir_ni->mrec->sequence_number)),
753 parent_mref = ntfs_mft_get_parent_ref(dir_ni);
766 ctx = ntfs_attr_get_search_ctx(dir_ni, NULL);
776 "%lld", (unsigned long long)dir_ni->mft_no);
838 rc = ntfs_filldir(dir_ni, pos, index_vcn_size_bits,
866 bmp_na = ntfs_attr_open(dir_ni, AT_BITMAP, NTFS_INDEX_I30, 4);
939 (unsigned long long)dir_ni->mft_no);
947 (unsigned long long)dir_ni->mft_no,
957 (unsigned long long)dir_ni->mft_no);
977 "%lld.\n", (unsigned long long)dir_ni->mft_no);
994 rc = ntfs_filldir(dir_ni, pos, index_vcn_size_bits,
1032 * @dir_ni: ntfs inode for directory in which create new object
1061 static ntfs_inode *__ntfs_create(ntfs_inode *dir_ni,
1074 if (!dir_ni || !name || !name_len) {
1080 if (dir_ni->flags & FILE_ATTR_REPARSE_POINT) {
1085 ni = ntfs_mft_record_alloc(dir_ni->vol, NULL);
1220 fn->parent_directory = MK_LE_MREF(dir_ni->mft_no,
1221 le16_to_cpu(dir_ni->mrec->sequence_number));
1242 if (ntfs_index_add_filename(dir_ni, fn, MK_MREF(ni->mft_no,
1290 ntfs_inode *ntfs_create(ntfs_inode *dir_ni, ntfschar *name, u8 name_len,
1298 return __ntfs_create(dir_ni, name, name_len, type, 0, NULL, 0);
1301 ntfs_inode *ntfs_create_device(ntfs_inode *dir_ni, ntfschar *name, u8 name_len,
1308 return __ntfs_create(dir_ni, name, name_len, type, dev, NULL, 0);
1311 ntfs_inode *ntfs_create_symlink(ntfs_inode *dir_ni, ntfschar *name, u8 name_len,
1319 return __ntfs_create(dir_ni, name, name_len, S_IFLNK, 0,
1377 * @dir_ni: ntfs inode for directory in which delete object
1386 int ntfs_delete(ntfs_inode *ni, ntfs_inode *dir_ni, ntfschar *name, u8 name_len)
1396 if (!ni || !dir_ni || !name || !name_len) {
1403 if (dir_ni->nr_extents == -1)
1404 dir_ni = dir_ni->base_ni;
1443 if (dir_ni->mft_no != MREF_LE(fn->parent_directory)) {
1446 (long long unsigned)dir_ni->mft_no,
1484 if (ntfs_index_remove(dir_ni, fn, le32_to_cpu(actx->attr->value_length)))
1551 ntfs_inode_update_times(dir_ni, NTFS_UPDATE_MCTIME);
1555 if (ntfs_inode_close(dir_ni) && !err)
1574 * @dir_ni: ntfs inode for directory in which new link should be placed
1586 int ntfs_link(ntfs_inode *ni, ntfs_inode *dir_ni, ntfschar *name, u8 name_len)
1593 if (!ni || !dir_ni || !name || !name_len ||
1594 ni->mft_no == dir_ni->mft_no) {
1612 fn->parent_directory = MK_LE_MREF(dir_ni->mft_no,
1613 le16_to_cpu(dir_ni->mrec->sequence_number));
1627 if (ntfs_index_add_filename(dir_ni, fn, MK_MREF(ni->mft_no,
1638 if (ntfs_index_remove(dir_ni, fn, fn_len))