Lines Matching full:attribute
35 * Compare the ntfs attribute embedded in the ntfs specific part of the vfs
36 * inode @vi for equality with the ntfs attribute @data.
60 /* A fake inode describing an attribute. */ in ntfs_test_inode()
78 * Initialize the vfs inode @vi with the values from the ntfs attribute @data in
192 * ntfs_attr_iget - obtain a struct inode corresponding to an attribute
193 * @base_vi: vfs base inode containing the attribute
194 * @type: attribute type
195 * @name: Unicode name of the attribute (NULL if unnamed)
198 * Obtain the (fake) struct inode corresponding to the attribute specified by
202 * If the attribute inode is in the cache, it is just returned with an
205 * attribute and fill in the inode structure.
210 * Return the struct inode of the attribute inode on success. Check the return
242 * There is no point in keeping bad attribute inodes around. This also in ntfs_attr_iget()
243 * simplifies things in that we never need to check for bad attribute in ntfs_attr_iget()
351 * The attribute runlist lock has separate locking rules from the
421 * @ctx: initialized attribute search context
423 * Search all file name attributes in the inode described by the attribute
459 "attribute. You should run chkdsk."); in ntfs_is_extended_system_file()
483 /* This attribute is ok, but is it in the $Extend directory? */ in ntfs_is_extended_system_file()
611 * Find the standard information attribute in the mft record. At this in ntfs_read_locked_inode()
612 * stage we haven't setup the attribute list stuff yet, so this could in ntfs_read_locked_inode()
623 * attribute. in ntfs_read_locked_inode()
625 ntfs_error(vi->i_sb, "$STANDARD_INFORMATION attribute " in ntfs_read_locked_inode()
631 /* Get the standard information attribute value. */ in ntfs_read_locked_inode()
635 ntfs_error(vi->i_sb, "Corrupt standard information attribute in inode."); in ntfs_read_locked_inode()
664 /* Find the attribute list attribute if present. */ in ntfs_read_locked_inode()
669 ntfs_error(vi->i_sb, "Failed to lookup attribute list " in ntfs_read_locked_inode()
670 "attribute."); 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()
688 "list attribute is encrypted/" in ntfs_read_locked_inode()
692 ntfs_warning(vi->i_sb, "Resident attribute list " in ntfs_read_locked_inode()
693 "attribute in inode 0x%lx is marked " in ntfs_read_locked_inode()
701 /* Now allocate memory for the attribute list. */ in ntfs_read_locked_inode()
706 "buffer for attribute list."); in ntfs_read_locked_inode()
713 ntfs_error(vi->i_sb, "Attribute list has non " in ntfs_read_locked_inode()
730 /* Now load the attribute list. */ in ntfs_read_locked_inode()
736 "attribute list attribute."); in ntfs_read_locked_inode()
744 ntfs_error(vi->i_sb, "Corrupt attribute list " in ntfs_read_locked_inode()
748 /* Now copy the attribute list. */ in ntfs_read_locked_inode()
757 * If an attribute list is present we now have the attribute list value in ntfs_read_locked_inode()
766 /* It is a directory, find index root attribute. */ in ntfs_read_locked_inode()
773 // index root attribute if recovery option is in ntfs_read_locked_inode()
775 ntfs_error(vi->i_sb, "$INDEX_ROOT attribute " in ntfs_read_locked_inode()
783 ntfs_error(vol->sb, "$INDEX_ROOT attribute is not " in ntfs_read_locked_inode()
787 /* Ensure the attribute name is placed before the value. */ in ntfs_read_locked_inode()
790 ntfs_error(vol->sb, "$INDEX_ROOT attribute name is " in ntfs_read_locked_inode()
791 "placed after the attribute value."); in ntfs_read_locked_inode()
805 "compressed attribute."); in ntfs_read_locked_inode()
816 ntfs_error(vi->i_sb, "$INDEX_ROOT attribute is " in ntfs_read_locked_inode()
827 ntfs_error(vi->i_sb, "Indexed attribute is not " in ntfs_read_locked_inode()
874 /* Setup the index allocation attribute, even if not present. */ in ntfs_read_locked_inode()
892 /* Find index allocation attribute. */ in ntfs_read_locked_inode()
899 "attribute is not present but " in ntfs_read_locked_inode()
904 "attribute."); in ntfs_read_locked_inode()
909 ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute " in ntfs_read_locked_inode()
914 * Ensure the attribute name is placed before the mapping pairs in ntfs_read_locked_inode()
920 ntfs_error(vol->sb, "$INDEX_ALLOCATION attribute name " 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()
942 "$INDEX_ALLOCATION attribute has non " in ntfs_read_locked_inode()
959 /* Get the index bitmap attribute inode. */ 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()
982 /* No longer need the bitmap attribute inode. */ in ntfs_read_locked_inode()
993 /* Setup the data attribute, even if not present. */ in ntfs_read_locked_inode()
998 /* Find first extent of the unnamed data attribute. */ in ntfs_read_locked_inode()
1005 "attribute."); in ntfs_read_locked_inode()
1010 * attribute, so we special case it here. in ntfs_read_locked_inode()
1026 // attribute if recovery option is set. in ntfs_read_locked_inode()
1027 ntfs_error(vi->i_sb, "$DATA attribute is missing."); in ntfs_read_locked_inode()
1105 "attribute has non zero " in ntfs_read_locked_inode()
1115 } else { /* Resident attribute. */ in ntfs_read_locked_inode()
1122 ntfs_error(vi->i_sb, "Resident data attribute " in ntfs_read_locked_inode()
1179 * ntfs_read_locked_attr_inode - read an attribute inode from its base 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
1238 /* Find the attribute. */ in ntfs_read_locked_attr_inode()
1251 "attribute. Please report " in ntfs_read_locked_attr_inode()
1259 "attribute but compression is " in ntfs_read_locked_attr_inode()
1277 ntfs_error(vi->i_sb, "Found mst protected attribute " in ntfs_read_locked_attr_inode()
1278 "but the attribute is %s. Please " in ntfs_read_locked_attr_inode()
1299 ntfs_error(vi->i_sb, "Found mst protected attribute " in ntfs_read_locked_attr_inode()
1300 "but the attribute is encrypted. " in ntfs_read_locked_attr_inode()
1308 "attribute."); in ntfs_read_locked_attr_inode()
1314 /* Ensure the attribute name is placed before the value. */ in ntfs_read_locked_attr_inode()
1317 ntfs_error(vol->sb, "Attribute name is placed after " in ntfs_read_locked_attr_inode()
1318 "the attribute value."); in ntfs_read_locked_attr_inode()
1322 ntfs_error(vi->i_sb, "Found mst protected attribute " in ntfs_read_locked_attr_inode()
1323 "but the attribute is resident. " in ntfs_read_locked_attr_inode()
1333 ntfs_error(vi->i_sb, "Resident attribute is corrupt " in ntfs_read_locked_attr_inode()
1340 * Ensure the attribute name is placed before the mapping pairs in ntfs_read_locked_attr_inode()
1346 ntfs_error(vol->sb, "Attribute name is placed after " in ntfs_read_locked_attr_inode()
1381 ntfs_error(vi->i_sb, "First extent of attribute has " in ntfs_read_locked_attr_inode()
1402 * attribute inode. in ntfs_read_locked_attr_inode()
1421 ntfs_error(vol->sb, "Failed with error code %i while reading attribute " in ntfs_read_locked_attr_inode()
1446 * Note, index inodes are essentially attribute inodes (NInoAttr() is true)
1447 * with the attribute type set to AT_INDEX_ALLOCATION. Apart from that, they
1450 * for small indices the index allocation attribute might not actually exist.
1451 * However, the index root attribute always exists but this does not need to
1453 * index. Also, like for directories, we need to have an attribute inode for
1454 * the bitmap attribute corresponding to the index allocation attribute and we
1503 /* Find the index root attribute. */ in ntfs_read_locked_index_inode()
1508 ntfs_error(vi->i_sb, "$INDEX_ROOT attribute is " in ntfs_read_locked_index_inode()
1515 ntfs_error(vol->sb, "$INDEX_ROOT attribute is not resident."); in ntfs_read_locked_index_inode()
1518 /* Ensure the attribute name is placed before the value. */ in ntfs_read_locked_index_inode()
1521 ntfs_error(vol->sb, "$INDEX_ROOT attribute name is placed " in ntfs_read_locked_index_inode()
1522 "after the attribute value."); in ntfs_read_locked_index_inode()
1532 "root attribute."); in ntfs_read_locked_index_inode()
1538 ntfs_error(vi->i_sb, "$INDEX_ROOT attribute is corrupt."); in ntfs_read_locked_index_inode()
1583 /* Check for presence of index allocation attribute. */ in ntfs_read_locked_index_inode()
1595 /* Find index allocation attribute. */ in ntfs_read_locked_index_inode()
1601 ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute is " in ntfs_read_locked_index_inode()
1606 "$INDEX_ALLOCATION attribute."); in ntfs_read_locked_index_inode()
1611 ntfs_error(vi->i_sb, "$INDEX_ALLOCATION attribute is " in ntfs_read_locked_index_inode()
1616 * Ensure the attribute name is placed before the mapping pairs array. in ntfs_read_locked_index_inode()
1621 ntfs_error(vol->sb, "$INDEX_ALLOCATION attribute name 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()
1641 "attribute has non zero lowest_vcn."); in ntfs_read_locked_index_inode()
1656 /* Get the index bitmap attribute inode. */ 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()
1736 * attribute list is actually present in $MFT inode.
1738 * We solve these problems by starting with the $DATA attribute before anything
1768 /* Setup the data attribute. It is special as it is mst protected. */ in ntfs_read_inode_mount()
1800 /* Determine the first block of the $MFT/$DATA attribute. */ in ntfs_read_inode_mount()
1832 /* Sanity check offset to the first attribute */ in ntfs_read_inode_mount()
1834 ntfs_error(sb, "Incorrect mft offset to the first attribute %u in superblock.", in ntfs_read_inode_mount()
1839 /* Need this to sanity check attribute list references to $MFT. */ in ntfs_read_inode_mount()
1851 /* Find the attribute list attribute if present. */ in ntfs_read_inode_mount()
1855 ntfs_error(sb, "Failed to lookup attribute list " in ntfs_read_inode_mount()
1856 "attribute. You should run chkdsk."); in ntfs_read_inode_mount()
1865 ntfs_debug("Attribute list attribute found in $MFT."); in ntfs_read_inode_mount()
1869 ntfs_error(sb, "Attribute list attribute is " in ntfs_read_inode_mount()
1876 ntfs_error(sb, "Non-resident attribute list " in ntfs_read_inode_mount()
1877 "attribute is encrypted/" in ntfs_read_inode_mount()
1881 ntfs_warning(sb, "Resident attribute list attribute " in ntfs_read_inode_mount()
1889 /* Now allocate memory for the attribute list. */ in ntfs_read_inode_mount()
1898 "for attribute list."); in ntfs_read_inode_mount()
1904 ntfs_error(sb, "Attribute list has non zero " in ntfs_read_inode_mount()
1920 /* Now load the attribute list. */ in ntfs_read_inode_mount()
1925 ntfs_error(sb, "Failed to load attribute list " in ntfs_read_inode_mount()
1926 "attribute with error code %i.", in ntfs_read_inode_mount()
1936 ntfs_error(sb, "Corrupt attribute list " in ntfs_read_inode_mount()
1937 "attribute."); in ntfs_read_inode_mount()
1940 /* Now copy the attribute list. */ in ntfs_read_inode_mount()
1946 /* The attribute list is now setup in memory. */ in ntfs_read_inode_mount()
1965 /* Catch the end of the attribute list. */ in ntfs_read_inode_mount()
1979 /* We want an unnamed attribute. */ in ntfs_read_inode_mount()
2008 /* Now load all attribute extents. */ in ntfs_read_inode_mount()
2015 /* Cache the current attribute. */ in ntfs_read_inode_mount()
2054 "attribute has non zero " in ntfs_read_inode_mount()
2059 /* Get the last vcn in the $DATA attribute. */ in ntfs_read_inode_mount()
2137 ntfs_error(sb, "$MFT has corrupt attribute list " in ntfs_read_inode_mount()
2138 "attribute. Run chkdsk."); in ntfs_read_inode_mount()
2143 ntfs_error(sb, "Failed to lookup $MFT/$DATA attribute extent. " in ntfs_read_inode_mount()
2148 ntfs_error(sb, "$MFT/$DATA attribute not found. $MFT is " in ntfs_read_inode_mount()
2175 ntfs_error(sb, "Couldn't find first extent of $DATA attribute in " in ntfs_read_inode_mount()
2176 "attribute list. $MFT is corrupt. Run chkdsk."); in ntfs_read_inode_mount()
2349 * or attribute inode as well as that @vi is a base inode.
2376 * safe to mess with the attribute runlist and sizes. in ntfs_truncate()
2404 ntfs_error(vi->i_sb, "Open attribute is missing from " in ntfs_truncate()
2409 ntfs_error(vi->i_sb, "Failed to lookup attribute in " in ntfs_truncate()
2417 * The i_size of the vfs inode is the new size for the attribute value. in ntfs_truncate()
2420 /* The current size of the attribute value is the old size. */ in ntfs_truncate()
2462 "for its attribute type " in ntfs_truncate()
2471 "attribute type 0x%x. " in ntfs_truncate()
2493 /* Resize the attribute record to best fit the new attribute size. */ in ntfs_truncate()
2505 * necessary data clearing in the attribute record. When the in ntfs_truncate()
2535 /* If the above resize failed, this must be an attribute extension. */ in ntfs_truncate()
2550 * Not enough space in the mft record, try to make the attribute in ntfs_truncate()
2558 * permitted for this attribute type or there not being enough space, in ntfs_truncate()
2562 ntfs_error(vol->sb, "Cannot truncate inode 0x%lx, attribute " in ntfs_truncate()
2564 "resident to non-resident attribute failed " in ntfs_truncate()
2574 "disk for the non-resident attribute value. " in ntfs_truncate()
2577 ntfs_error(vol->sb, "This attribute type may not be " in ntfs_truncate()
2587 * Both the attribute list attribute and the standard information in ntfs_truncate()
2588 * attribute must remain in the base inode. Thus, if this is one of in ntfs_truncate()
2601 // TODO: Attempt to move this attribute to an extent mft record, but in ntfs_truncate()
2602 // only if it is not already the only attribute in an mft record in in ntfs_truncate()
2618 * This attribute has multiple extents. Not yet in ntfs_truncate()
2622 "attribute type 0x%x, because the " in ntfs_truncate()
2623 "attribute is highly fragmented (it " in ntfs_truncate()
2675 * attribute truncate case. To do this, we simply drop in ntfs_truncate()
2711 * longer valid, we cannot resize the attribute record or build the in ntfs_truncate()
2718 "restore attribute search context" : in ntfs_truncate()
2719 "truncate attribute runlist", in ntfs_truncate()
2728 "attribute type 0x%x, because determining the " in ntfs_truncate()
2736 * Shrink the attribute record for the new mapping pairs array. Note, in ntfs_truncate()
2737 * this cannot fail since we are making the attribute smaller thus by in ntfs_truncate()
2744 * Generate the mapping pairs array directly into the attribute record. in ntfs_truncate()
2751 "attribute type 0x%x, because building the " in ntfs_truncate()
2869 * ntfs_setattr - called from notify_change() when an attribute is being changed
2970 * Dirty attribute inodes are written via their real inodes so just in __ntfs_write_inode()
2985 /* Update the access times in the standard information attribute. */ in __ntfs_write_inode()
3028 * If we just modified the standard information attribute we need to in __ntfs_write_inode()