Lines Matching full:vi

32  * @vi:		vfs inode which to test
36 * inode @vi for equality with the ntfs attribute @data.
46 int ntfs_test_inode(struct inode *vi, void *data) in ntfs_test_inode() argument
51 if (vi->i_ino != na->mft_no) in ntfs_test_inode()
53 ni = NTFS_I(vi); in ntfs_test_inode()
54 /* If !NInoAttr(ni), @vi is a normal file or directory inode. */ in ntfs_test_inode()
75 * @vi: vfs inode to initialize
76 * @data: data which to initialize @vi to
78 * Initialize the vfs inode @vi with the values from the ntfs attribute @data in
91 static int ntfs_init_locked_inode(struct inode *vi, void *data) in ntfs_init_locked_inode() argument
94 ntfs_inode *ni = NTFS_I(vi); in ntfs_init_locked_inode()
96 vi->i_ino = na->mft_no; in ntfs_init_locked_inode()
136 static int ntfs_read_locked_inode(struct inode *vi);
137 static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi);
139 struct inode *vi);
159 struct inode *vi; in ntfs_iget() local
168 vi = iget5_locked(sb, mft_no, ntfs_test_inode, in ntfs_iget()
170 if (unlikely(!vi)) in ntfs_iget()
176 if (vi->i_state & I_NEW) { in ntfs_iget()
177 err = ntfs_read_locked_inode(vi); in ntfs_iget()
178 unlock_new_inode(vi); in ntfs_iget()
185 iput(vi); in ntfs_iget()
186 vi = ERR_PTR(err); in ntfs_iget()
188 return vi; in ntfs_iget()
217 struct inode *vi; in ntfs_attr_iget() local
229 vi = iget5_locked(base_vi->i_sb, na.mft_no, ntfs_test_inode, in ntfs_attr_iget()
231 if (unlikely(!vi)) in ntfs_attr_iget()
237 if (vi->i_state & I_NEW) { in ntfs_attr_iget()
238 err = ntfs_read_locked_attr_inode(base_vi, vi); in ntfs_attr_iget()
239 unlock_new_inode(vi); in ntfs_attr_iget()
247 iput(vi); in ntfs_attr_iget()
248 vi = ERR_PTR(err); in ntfs_attr_iget()
250 return vi; in ntfs_attr_iget()
275 struct inode *vi; in ntfs_index_iget() local
284 vi = iget5_locked(base_vi->i_sb, na.mft_no, ntfs_test_inode, in ntfs_index_iget()
286 if (unlikely(!vi)) in ntfs_index_iget()
292 if (vi->i_state & I_NEW) { in ntfs_index_iget()
293 err = ntfs_read_locked_index_inode(base_vi, vi); in ntfs_index_iget()
294 unlock_new_inode(vi); in ntfs_index_iget()
302 iput(vi); in ntfs_index_iget()
303 vi = ERR_PTR(err); in ntfs_index_iget()
305 return vi; in ntfs_index_iget()
500 * @vi: inode to read
503 * described by @vi into memory from the device.
505 * The only fields in @vi that we need to/can look at when the function is
510 * for reading and sets up the necessary @vi fields as well as initializing
524 static int ntfs_read_locked_inode(struct inode *vi) in ntfs_read_locked_inode() argument
526 ntfs_volume *vol = NTFS_SB(vi->i_sb); in ntfs_read_locked_inode()
535 ntfs_debug("Entering for i_ino 0x%lx.", vi->i_ino); in ntfs_read_locked_inode()
538 vi->i_uid = vol->uid; in ntfs_read_locked_inode()
539 vi->i_gid = vol->gid; in ntfs_read_locked_inode()
540 vi->i_mode = 0; in ntfs_read_locked_inode()
543 * Initialize the ntfs specific part of @vi special casing in ntfs_read_locked_inode()
546 if (vi->i_ino != FILE_MFT) in ntfs_read_locked_inode()
547 ntfs_init_big_inode(vi); in ntfs_read_locked_inode()
548 ni = NTFS_I(vi); in ntfs_read_locked_inode()
562 ntfs_error(vi->i_sb, "Inode is not in use!"); in ntfs_read_locked_inode()
566 ntfs_error(vi->i_sb, "Inode is an extent inode!"); in ntfs_read_locked_inode()
571 vi->i_generation = ni->seq_no = le16_to_cpu(m->sequence_number); in ntfs_read_locked_inode()
582 set_nlink(vi, le16_to_cpu(m->link_count)); in ntfs_read_locked_inode()
591 vi->i_mode |= S_IRWXUGO; in ntfs_read_locked_inode()
593 if (IS_RDONLY(vi)) in ntfs_read_locked_inode()
594 vi->i_mode &= ~S_IWUGO; in ntfs_read_locked_inode()
596 vi->i_mode |= S_IFDIR; in ntfs_read_locked_inode()
601 vi->i_mode &= ~vol->dmask; in ntfs_read_locked_inode()
603 if (vi->i_nlink > 1) in ntfs_read_locked_inode()
604 set_nlink(vi, 1); in ntfs_read_locked_inode()
606 vi->i_mode |= S_IFREG; in ntfs_read_locked_inode()
608 vi->i_mode &= ~vol->fmask; in ntfs_read_locked_inode()
625 ntfs_error(vi->i_sb, "$STANDARD_INFORMATION attribute " in ntfs_read_locked_inode()
635 ntfs_error(vi->i_sb, "Corrupt standard information attribute in inode."); in ntfs_read_locked_inode()
641 /* Transfer information from the standard information into vi. */ in ntfs_read_locked_inode()
651 vi->i_mtime = ntfs2utc(si->last_data_change_time); in ntfs_read_locked_inode()
657 inode_set_ctime_to_ts(vi, ntfs2utc(si->last_mft_change_time)); in ntfs_read_locked_inode()
662 vi->i_atime = ntfs2utc(si->last_access_time); in ntfs_read_locked_inode()
669 ntfs_error(vi->i_sb, "Failed to lookup attribute list " in ntfs_read_locked_inode()
674 if (vi->i_ino == FILE_MFT) in ntfs_read_locked_inode()
676 ntfs_debug("Attribute list found in inode 0x%lx.", vi->i_ino); in ntfs_read_locked_inode()
680 ntfs_error(vi->i_sb, "Attribute list attribute is " in ntfs_read_locked_inode()
687 ntfs_error(vi->i_sb, "Non-resident attribute " in ntfs_read_locked_inode()
692 ntfs_warning(vi->i_sb, "Resident attribute list " in ntfs_read_locked_inode()
699 vi->i_ino); in ntfs_read_locked_inode()
705 ntfs_error(vi->i_sb, "Not enough memory to allocate " in ntfs_read_locked_inode()
713 ntfs_error(vi->i_sb, "Attribute list has non " in ntfs_read_locked_inode()
726 ntfs_error(vi->i_sb, "Mapping pairs " in ntfs_read_locked_inode()
735 ntfs_error(vi->i_sb, "Failed to load " in ntfs_read_locked_inode()
744 ntfs_error(vi->i_sb, "Corrupt attribute list " in ntfs_read_locked_inode()
760 if (S_ISDIR(vi->i_mode)) { in ntfs_read_locked_inode()
775 ntfs_error(vi->i_sb, "$INDEX_ROOT attribute " in ntfs_read_locked_inode()
804 ntfs_error(vi->i_sb, "Found encrypted and " in ntfs_read_locked_inode()
816 ntfs_error(vi->i_sb, "$INDEX_ROOT attribute is " in ntfs_read_locked_inode()
823 ntfs_error(vi->i_sb, "Directory index is corrupt."); in ntfs_read_locked_inode()
827 ntfs_error(vi->i_sb, "Indexed attribute is not " in ntfs_read_locked_inode()
832 ntfs_error(vi->i_sb, "Index collation rule is not " in ntfs_read_locked_inode()
840 ntfs_error(vi->i_sb, "Index block size (%u) is not a " in ntfs_read_locked_inode()
846 ntfs_error(vi->i_sb, "Index block size (%u) > " in ntfs_read_locked_inode()
855 ntfs_error(vi->i_sb, "Index block size (%u) < " in ntfs_read_locked_inode()
882 vi->i_size = ni->initialized_size = in ntfs_read_locked_inode()
898 ntfs_error(vi->i_sb, "$INDEX_ALLOCATION " in ntfs_read_locked_inode()
902 ntfs_error(vi->i_sb, "Failed to lookup " in ntfs_read_locked_inode()
909 ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute " in ntfs_read_locked_inode()
926 ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute " in ntfs_read_locked_inode()
931 ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute " in ntfs_read_locked_inode()
936 ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute " in ntfs_read_locked_inode()
941 ntfs_error(vi->i_sb, "First extent of " in ntfs_read_locked_inode()
946 vi->i_size = sle64_to_cpu(a->data.non_resident.data_size); in ntfs_read_locked_inode()
960 bvi = ntfs_attr_iget(vi, AT_BITMAP, I30, 4); in ntfs_read_locked_inode()
962 ntfs_error(vi->i_sb, "Failed to get bitmap attribute."); in ntfs_read_locked_inode()
969 ntfs_error(vi->i_sb, "$BITMAP attribute is compressed " in ntfs_read_locked_inode()
975 if ((bvi_size << 3) < (vi->i_size >> in ntfs_read_locked_inode()
977 ntfs_error(vi->i_sb, "Index bitmap too small (0x%llx) " in ntfs_read_locked_inode()
979 bvi_size << 3, vi->i_size); in ntfs_read_locked_inode()
986 vi->i_op = &ntfs_dir_inode_ops; in ntfs_read_locked_inode()
987 vi->i_fop = &ntfs_dir_ops; in ntfs_read_locked_inode()
988 vi->i_mapping->a_ops = &ntfs_mst_aops; in ntfs_read_locked_inode()
1001 vi->i_size = ni->initialized_size = in ntfs_read_locked_inode()
1004 ntfs_error(vi->i_sb, "Failed to lookup $DATA " in ntfs_read_locked_inode()
1012 if (vi->i_ino == FILE_Secure) in ntfs_read_locked_inode()
1027 ntfs_error(vi->i_sb, "$DATA attribute is missing."); in ntfs_read_locked_inode()
1036 ntfs_error(vi->i_sb, "Found " in ntfs_read_locked_inode()
1047 ntfs_error(vi->i_sb, "Found unknown " in ntfs_read_locked_inode()
1058 ntfs_error(vi->i_sb, "Found encrypted and " in ntfs_read_locked_inode()
1069 ntfs_error(vi->i_sb, "Found " in ntfs_read_locked_inode()
1104 ntfs_error(vi->i_sb, "First extent of $DATA " in ntfs_read_locked_inode()
1109 vi->i_size = sle64_to_cpu( in ntfs_read_locked_inode()
1116 vi->i_size = ni->initialized_size = le32_to_cpu( in ntfs_read_locked_inode()
1121 if (vi->i_size > ni->allocated_size) { in ntfs_read_locked_inode()
1122 ntfs_error(vi->i_sb, "Resident data attribute " in ntfs_read_locked_inode()
1135 vi->i_op = &ntfs_file_inode_ops; in ntfs_read_locked_inode()
1136 vi->i_fop = &ntfs_file_ops; in ntfs_read_locked_inode()
1137 vi->i_mapping->a_ops = &ntfs_normal_aops; in ntfs_read_locked_inode()
1139 vi->i_mapping->a_ops = &ntfs_mst_aops; in ntfs_read_locked_inode()
1141 vi->i_mapping->a_ops = &ntfs_compressed_aops; in ntfs_read_locked_inode()
1154 if (S_ISREG(vi->i_mode) && (NInoCompressed(ni) || NInoSparse(ni))) in ntfs_read_locked_inode()
1155 vi->i_blocks = ni->itype.compressed.size >> 9; in ntfs_read_locked_inode()
1157 vi->i_blocks = ni->allocated_size >> 9; in ntfs_read_locked_inode()
1171 "inode 0x%lx as bad. Run chkdsk.", err, vi->i_ino); in ntfs_read_locked_inode()
1172 make_bad_inode(vi); in ntfs_read_locked_inode()
1181 * @vi: attribute inode to read
1184 * attribute inode described by @vi into memory from the base mft record
1188 * reading and looks up the attribute described by @vi before setting up the
1189 * necessary fields in @vi as well as initializing the ntfs inode.
1200 static int ntfs_read_locked_attr_inode(struct inode *base_vi, struct inode *vi) in ntfs_read_locked_attr_inode() argument
1202 ntfs_volume *vol = NTFS_SB(vi->i_sb); in ntfs_read_locked_attr_inode()
1209 ntfs_debug("Entering for i_ino 0x%lx.", vi->i_ino); in ntfs_read_locked_attr_inode()
1211 ntfs_init_big_inode(vi); in ntfs_read_locked_attr_inode()
1213 ni = NTFS_I(vi); in ntfs_read_locked_attr_inode()
1217 vi->i_uid = base_vi->i_uid; in ntfs_read_locked_attr_inode()
1218 vi->i_gid = base_vi->i_gid; in ntfs_read_locked_attr_inode()
1219 set_nlink(vi, base_vi->i_nlink); in ntfs_read_locked_attr_inode()
1220 vi->i_mtime = base_vi->i_mtime; in ntfs_read_locked_attr_inode()
1221 inode_set_ctime_to_ts(vi, inode_get_ctime(base_vi)); in ntfs_read_locked_attr_inode()
1222 vi->i_atime = base_vi->i_atime; in ntfs_read_locked_attr_inode()
1223 vi->i_generation = ni->seq_no = base_ni->seq_no; in ntfs_read_locked_attr_inode()
1226 vi->i_mode = base_vi->i_mode & ~S_IFMT; in ntfs_read_locked_attr_inode()
1249 ntfs_error(vi->i_sb, "Found compressed " in ntfs_read_locked_attr_inode()
1258 ntfs_error(vi->i_sb, "Found compressed " in ntfs_read_locked_attr_inode()
1267 ntfs_error(vi->i_sb, "Found unknown " in ntfs_read_locked_attr_inode()
1277 ntfs_error(vi->i_sb, "Found mst protected attribute " in ntfs_read_locked_attr_inode()
1290 ntfs_error(vi->i_sb, "Found encrypted and compressed " in ntfs_read_locked_attr_inode()
1299 ntfs_error(vi->i_sb, "Found mst protected attribute " in ntfs_read_locked_attr_inode()
1307 ntfs_error(vi->i_sb, "Found encrypted non-data " in ntfs_read_locked_attr_inode()
1322 ntfs_error(vi->i_sb, "Found mst protected attribute " in ntfs_read_locked_attr_inode()
1328 vi->i_size = ni->initialized_size = le32_to_cpu( in ntfs_read_locked_attr_inode()
1332 if (vi->i_size > ni->allocated_size) { in ntfs_read_locked_attr_inode()
1333 ntfs_error(vi->i_sb, "Resident attribute is corrupt " in ntfs_read_locked_attr_inode()
1353 ntfs_error(vi->i_sb, "Found non-standard " in ntfs_read_locked_attr_inode()
1381 ntfs_error(vi->i_sb, "First extent of attribute has " in ntfs_read_locked_attr_inode()
1385 vi->i_size = sle64_to_cpu(a->data.non_resident.data_size); in ntfs_read_locked_attr_inode()
1391 vi->i_mapping->a_ops = &ntfs_normal_aops; in ntfs_read_locked_attr_inode()
1393 vi->i_mapping->a_ops = &ntfs_mst_aops; in ntfs_read_locked_attr_inode()
1395 vi->i_mapping->a_ops = &ntfs_compressed_aops; in ntfs_read_locked_attr_inode()
1397 vi->i_blocks = ni->itype.compressed.size >> 9; in ntfs_read_locked_attr_inode()
1399 vi->i_blocks = ni->allocated_size >> 9; in ntfs_read_locked_attr_inode()
1424 "Run chkdsk.", err, vi->i_ino, ni->type, ni->name_len, in ntfs_read_locked_attr_inode()
1426 make_bad_inode(vi); in ntfs_read_locked_attr_inode()
1435 * @vi: index inode to read
1438 * index inode described by @vi into memory from the base mft record described
1442 * reading and looks up the attributes relating to the index described by @vi
1443 * before setting up the necessary fields in @vi as well as initializing the
1465 static int ntfs_read_locked_index_inode(struct inode *base_vi, struct inode *vi) in ntfs_read_locked_index_inode() argument
1468 ntfs_volume *vol = NTFS_SB(vi->i_sb); in ntfs_read_locked_index_inode()
1478 ntfs_debug("Entering for i_ino 0x%lx.", vi->i_ino); in ntfs_read_locked_index_inode()
1479 ntfs_init_big_inode(vi); in ntfs_read_locked_index_inode()
1480 ni = NTFS_I(vi); in ntfs_read_locked_index_inode()
1483 vi->i_uid = base_vi->i_uid; in ntfs_read_locked_index_inode()
1484 vi->i_gid = base_vi->i_gid; in ntfs_read_locked_index_inode()
1485 set_nlink(vi, base_vi->i_nlink); in ntfs_read_locked_index_inode()
1486 vi->i_mtime = base_vi->i_mtime; in ntfs_read_locked_index_inode()
1487 inode_set_ctime_to_ts(vi, inode_get_ctime(base_vi)); in ntfs_read_locked_index_inode()
1488 vi->i_atime = base_vi->i_atime; in ntfs_read_locked_index_inode()
1489 vi->i_generation = ni->seq_no = base_ni->seq_no; in ntfs_read_locked_index_inode()
1491 vi->i_mode = base_vi->i_mode & ~S_IFMT; in ntfs_read_locked_index_inode()
1508 ntfs_error(vi->i_sb, "$INDEX_ROOT attribute is " in ntfs_read_locked_index_inode()
1531 ntfs_error(vi->i_sb, "Found compressed/encrypted/sparse index " in ntfs_read_locked_index_inode()
1538 ntfs_error(vi->i_sb, "$INDEX_ROOT attribute is corrupt."); in ntfs_read_locked_index_inode()
1543 ntfs_error(vi->i_sb, "Index is corrupt."); in ntfs_read_locked_index_inode()
1547 ntfs_error(vi->i_sb, "Index type is not 0 (type is 0x%x).", in ntfs_read_locked_index_inode()
1556 ntfs_error(vi->i_sb, "Index block size (%u) is not a power of " in ntfs_read_locked_index_inode()
1561 ntfs_error(vi->i_sb, "Index block size (%u) > PAGE_SIZE " in ntfs_read_locked_index_inode()
1568 ntfs_error(vi->i_sb, "Index block size (%u) < NTFS_BLOCK_SIZE " in ntfs_read_locked_index_inode()
1586 vi->i_size = ni->initialized_size = ni->allocated_size = 0; in ntfs_read_locked_index_inode()
1601 ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute is " in ntfs_read_locked_index_inode()
1605 ntfs_error(vi->i_sb, "Failed to lookup " in ntfs_read_locked_index_inode()
1611 ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute is " in ntfs_read_locked_index_inode()
1626 ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute is " in ntfs_read_locked_index_inode()
1631 ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute is sparse."); in ntfs_read_locked_index_inode()
1635 ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute is " in ntfs_read_locked_index_inode()
1640 ntfs_error(vi->i_sb, "First extent of $INDEX_ALLOCATION " in ntfs_read_locked_index_inode()
1644 vi->i_size = sle64_to_cpu(a->data.non_resident.data_size); in ntfs_read_locked_index_inode()
1659 ntfs_error(vi->i_sb, "Failed to get bitmap attribute."); in ntfs_read_locked_index_inode()
1666 ntfs_error(vi->i_sb, "$BITMAP attribute is compressed and/or " in ntfs_read_locked_index_inode()
1672 if ((bvi_size << 3) < (vi->i_size >> ni->itype.index.block_size_bits)) { in ntfs_read_locked_index_inode()
1673 ntfs_error(vi->i_sb, "Index bitmap too small (0x%llx) for " in ntfs_read_locked_index_inode()
1675 vi->i_size); in ntfs_read_locked_index_inode()
1681 vi->i_mapping->a_ops = &ntfs_mst_aops; in ntfs_read_locked_index_inode()
1682 vi->i_blocks = ni->allocated_size >> 9; in ntfs_read_locked_index_inode()
1703 ntfs_error(vi->i_sb, "Failed with error code %i while reading index " in ntfs_read_locked_index_inode()
1704 "inode (mft_no 0x%lx, name_len %i.", err, vi->i_ino, in ntfs_read_locked_index_inode()
1706 make_bad_inode(vi); in ntfs_read_locked_index_inode()
1723 * @vi: inode to read
1747 int ntfs_read_inode_mount(struct inode *vi) in ntfs_read_inode_mount() argument
1751 struct super_block *sb = vi->i_sb; in ntfs_read_inode_mount()
1763 /* Initialize the ntfs specific part of @vi. */ in ntfs_read_inode_mount()
1764 ntfs_init_big_inode(vi); in ntfs_read_inode_mount()
1766 ni = NTFS_I(vi); in ntfs_read_inode_mount()
1783 vol->mft_ino = vi; in ntfs_read_inode_mount()
1840 vi->i_generation = ni->seq_no = le16_to_cpu(m->sequence_number); in ntfs_read_inode_mount()
1843 vi->i_mapping->a_ops = &ntfs_mst_aops; in ntfs_read_inode_mount()
1986 if (MREF_LE(al_entry->mft_reference) != vi->i_ino) { in ntfs_read_inode_mount()
2064 vi->i_size = sle64_to_cpu( in ntfs_read_inode_mount()
2074 if ((vi->i_size >> vol->mft_record_size_bits) >= in ntfs_read_inode_mount()
2098 ntfs_read_locked_inode(vi); in ntfs_read_inode_mount()
2099 if (is_bad_inode(vi)) { in ntfs_read_inode_mount()
2117 vi->i_uid = GLOBAL_ROOT_UID; in ntfs_read_inode_mount()
2118 vi->i_gid = GLOBAL_ROOT_GID; in ntfs_read_inode_mount()
2120 vi->i_mode = S_IFREG; in ntfs_read_inode_mount()
2122 vi->i_op = &ntfs_empty_inode_ops; in ntfs_read_inode_mount()
2123 vi->i_fop = &ntfs_empty_file_ops; in ntfs_read_inode_mount()
2181 make_bad_inode(vi); in ntfs_read_inode_mount()
2239 * @vi: vfs inode pending annihilation
2247 void ntfs_evict_big_inode(struct inode *vi) in ntfs_evict_big_inode() argument
2249 ntfs_inode *ni = NTFS_I(vi); in ntfs_evict_big_inode()
2251 truncate_inode_pages_final(&vi->i_data); in ntfs_evict_big_inode()
2252 clear_inode(vi); in ntfs_evict_big_inode()
2256 bool was_bad = (is_bad_inode(vi)); in ntfs_evict_big_inode()
2259 ntfs_commit_inode(vi); in ntfs_evict_big_inode()
2261 if (!was_bad && (is_bad_inode(vi) || NInoDirty(ni))) { in ntfs_evict_big_inode()
2262 ntfs_error(vi->i_sb, "Failed to commit dirty inode " in ntfs_evict_big_inode()
2263 "0x%lx. Losing data!", vi->i_ino); in ntfs_evict_big_inode()
2339 * @vi: inode for which the i_size was changed
2345 * The kernel guarantees that @vi is a regular file (S_ISREG() is true) and
2348 * This implies for us that @vi is a file inode rather than a directory, index,
2349 * or attribute inode as well as that @vi is a base inode.
2355 int ntfs_truncate(struct inode *vi) in ntfs_truncate() argument
2360 ntfs_inode *base_ni, *ni = NTFS_I(vi); in ntfs_truncate()
2368 ntfs_debug("Entering for inode 0x%lx.", vi->i_ino); in ntfs_truncate()
2370 BUG_ON(S_ISDIR(vi->i_mode)); in ntfs_truncate()
2386 ntfs_error(vi->i_sb, "Failed to map mft record for inode 0x%lx " in ntfs_truncate()
2387 "(error code %d).%s", vi->i_ino, err, te); in ntfs_truncate()
2394 ntfs_error(vi->i_sb, "Failed to allocate a search context for " in ntfs_truncate()
2396 vi->i_ino, te); in ntfs_truncate()
2404 ntfs_error(vi->i_sb, "Open attribute is missing from " in ntfs_truncate()
2406 "Run chkdsk.%s", vi->i_ino, te); in ntfs_truncate()
2409 ntfs_error(vi->i_sb, "Failed to lookup attribute in " in ntfs_truncate()
2411 vi->i_ino, err, te); in ntfs_truncate()
2419 new_size = i_size_read(vi); in ntfs_truncate()
2464 vi->i_ino, in ntfs_truncate()
2473 vi->i_ino, in ntfs_truncate()
2478 i_size_write(vi, old_size); in ntfs_truncate()
2483 ntfs_warning(vi->i_sb, "Changes in inode size are not " in ntfs_truncate()
2565 "with error code %i.", vi->i_ino, in ntfs_truncate()
2626 vi->i_ino, in ntfs_truncate()
2730 "code %i.%s", vi->i_ino, in ntfs_truncate()
2753 vi->i_ino, (unsigned)le32_to_cpu(ni->type), in ntfs_truncate()
2771 vi->i_blocks = ni->itype.compressed.size >> 9; in ntfs_truncate()
2774 vi->i_blocks = new_alloc_size >> 9; in ntfs_truncate()
2833 i_size_write(vi, old_size); in ntfs_truncate()
2849 i_size_write(vi, old_size); in ntfs_truncate()
2855 * @vi: inode for which the i_size was changed
2862 void ntfs_truncate_vfs(struct inode *vi) { in ntfs_truncate_vfs() argument
2863 ntfs_truncate(vi); in ntfs_truncate_vfs()
2885 struct inode *vi = d_inode(dentry); in ntfs_setattr() local
2894 ntfs_warning(vi->i_sb, "Changes in user/group/mode are not " in ntfs_setattr()
2900 if (attr->ia_size != i_size_read(vi)) { in ntfs_setattr()
2901 ntfs_inode *ni = NTFS_I(vi); in ntfs_setattr()
2907 ntfs_warning(vi->i_sb, "Changes in inode size " in ntfs_setattr()
2914 truncate_setsize(vi, attr->ia_size); in ntfs_setattr()
2915 ntfs_truncate_vfs(vi); in ntfs_setattr()
2928 vi->i_atime = attr->ia_atime; in ntfs_setattr()
2930 vi->i_mtime = attr->ia_mtime; in ntfs_setattr()
2932 inode_set_ctime_to_ts(vi, attr->ia_ctime); in ntfs_setattr()
2933 mark_inode_dirty(vi); in ntfs_setattr()
2940 * @vi: inode to write out
2956 int __ntfs_write_inode(struct inode *vi, int sync) in __ntfs_write_inode() argument
2959 ntfs_inode *ni = NTFS_I(vi); in __ntfs_write_inode()
2967 vi->i_ino); in __ntfs_write_inode()
2999 nt = utc2ntfs(vi->i_mtime); in __ntfs_write_inode()
3002 "new = 0x%llx", vi->i_ino, (long long) in __ntfs_write_inode()
3008 nt = utc2ntfs(inode_get_ctime(vi)); in __ntfs_write_inode()
3011 "new = 0x%llx", vi->i_ino, (long long) in __ntfs_write_inode()
3017 nt = utc2ntfs(vi->i_atime); in __ntfs_write_inode()
3020 "new = 0x%llx", vi->i_ino, in __ntfs_write_inode()
3090 ntfs_warning(vi->i_sb, "Not enough memory to write inode. " in __ntfs_write_inode()
3093 mark_inode_dirty(vi); in __ntfs_write_inode()
3095 ntfs_error(vi->i_sb, "Failed (error %i): Run chkdsk.", -err); in __ntfs_write_inode()