Lines Matching full:attribute
3 * NTFS attribute operations.
34 * Extended attribute, reparse point are not expected to be larger than this size.
43 * @ctx: active attribute search context if present or NULL if not
55 * attribute on return as on entry. However, the actual pointers in @ctx may
69 * the attribute has zero allocated size, i.e. there simply is no runlist.
132 * If we already have the attribute extent containing @vcn in
136 * the right attribute extent.
163 * needed attribute extent.
205 * If there is no attribute list, restoring the search context
207 * the caller supplied context. If there is an attribute list,
345 * @ni: ntfs inode of the attribute whose runlist to search
349 * Find the virtual cluster number @vcn in the runlist of the ntfs attribute
353 * If the @vcn is not mapped yet, the attempt is made to map the attribute
495 * @ctx: active attribute search context if present or NULL if not
500 * If the @vcn is not mapped yet, the attempt is made to map the attribute
511 * attribute on return as on entry. However, the actual pointers in @ctx may
599 * ntfs_attr_find - find (next) attribute in mft record
600 * @type: attribute type to find
601 * @name: attribute name to find (optional, i.e. NULL means don't care)
602 * @name_len: attribute name length (only needed if @name present)
604 * @val: attribute value to find (optional, resident attributes only)
605 * @val_len: attribute value length
606 * @ctx: search context with mft record and attribute to search from
613 * attribute of @type, optionally @name and @val.
615 * If the attribute is found, ntfs_attr_find() returns 0 and @ctx->attr will
616 * point to the found attribute.
618 * If the attribute is not found, ntfs_attr_find() returns -ENOENT and
619 * @ctx->attr will point to the attribute before which the attribute being
635 * If @name is not present (NULL), we assume that the unnamed attribute is
638 * Finally, the resident attribute value @val is looked for, if present. If
642 * presence of an attribute list attribute (unless it is the one being searched
643 * for, obviously). If you need to take attribute lists into consideration,
647 * attribute list attribute only. - Note that it is possible that the first
648 * extent is only in the attribute list while the last extent is in the base
652 * Warning: Never use @val when looking for attribute types which can be
670 * attribute following that, if @ctx->is_first is 'true'.
702 "Corrupt attribute name in MFT record %llu\n",
714 * missing, assume we want an unnamed attribute.
717 /* The search failed if the found attribute is named. */
732 * matching attribute.
750 /* Validate attribute's value offset/length */
763 "Too small %#x resident attribute value in MFT record %lld\n",
783 * The names match or @name not present and attribute is
784 * unnamed. If no @val specified, we have found the attribute
798 * If @val collates before the current attribute's
799 * value, there is no matching attribute.
858 "Failed to open an inode for Attribute list, mft = %llu",
866 "Failed to read attribute list, mft = %llu",
885 ntfs_error(base_ni->vol->sb, "Corrupt attribute list, mft = %llu",
893 * ntfs_external_attr_find - find an attribute in the attribute list of an inode
894 * @type: attribute type to find
895 * @name: attribute name to find (optional, i.e. NULL means don't care)
896 * @name_len: attribute name length (only needed if @name present)
899 * @val: attribute value to find (optional, resident attributes only)
900 * @val_len: attribute value length
901 * @ctx: search context with mft record and attribute to search from
906 * Find an attribute by searching the attribute list for the corresponding
907 * attribute list entry. Having found the entry, map the mft record if the
908 * attribute is in a different mft record/inode, ntfs_attr_find() the attribute
916 * After finishing with the attribute/mft record you need to call
920 * If the attribute is found, ntfs_external_attr_find() returns 0 and
921 * @ctx->attr will point to the found attribute. @ctx->mrec will point to the
923 * the attribute list entry for the attribute.
925 * If the attribute is not found, ntfs_external_attr_find() returns -ENOENT and
926 * @ctx->attr will point to the attribute in the base mft record before which
927 * the attribute being searched for would need to be inserted if such an action
929 * @ctx->attr is located and @ctx->al_entry will point to the attribute list
930 * entry of the attribute before which the attribute being searched for would
933 * Thus to insert the not found attribute, one wants to add the attribute to
935 * attribute should be placed in a newly allocated extent mft record. The
936 * attribute list entry for the inserted attribute should be inserted in the
937 * attribute list attribute at @ctx->al_entry.
978 * Iterate over entries in attribute list starting at @ctx->al_entry,
985 * If an enumeration and the first attribute is higher than
986 * the attribute list itself, need to return the attribute list
987 * attribute.
1013 * If this is an enumeration and the attribute list attribute
1015 * attribute list attribute from the base mft record as it is
1016 * not listed in the attribute list itself.
1040 /* Find the attribute list attribute. */
1046 * attribute is returned next time round.
1060 ntfs_error(ctx->ntfs_ino->vol->sb, "Attribute list wasn't found");
1070 /* Catch the end of the attribute list. */
1093 * missing, assume we want an unnamed attribute.
1099 * If !@type we want the attribute represented by this
1100 * attribute list entry.
1117 * matching attribute.
1134 * The names match or @name not present and attribute is
1136 * next attribute list entry still fits @lowest_vcn. Otherwise
1159 "Found stale mft reference in attribute list of base inode 0x%llx.%s",
1200 * mft record containing the attribute represented by the
1205 * attribute in this mft record but this would be less
1207 * the attribute instance numbers for example which become
1208 * important when one plays with attribute lists. Also,
1209 * because a proper match has been found in the attribute list
1239 * attribute list entry and the attribute record, there is
1291 pr_err("Too small resident attribute value in MFT record %lld, type %#x\n",
1303 /* Proceed to the next attribute in the current mft record. */
1323 "Base inode 0x%llx contains corrupt attribute, mft %#llx, type %#x. %s",
1343 * The attribute was not found. Before we return, we want to ensure
1345 * attribute should be inserted in the base mft record. Since we also
1368 * keep enumerating until we get an attribute not found response (or
1369 * another error), otherwise we would keep returning the same attribute
1382 * ntfs_attr_lookup - find an attribute in an ntfs inode
1383 * @type: attribute type to find
1384 * @name: attribute name to find (optional, i.e. NULL means don't care)
1385 * @name_len: attribute name length (only needed if @name present)
1388 * @val: attribute value to find (optional, resident attributes only)
1389 * @val_len: attribute value length
1390 * @ctx: search context with mft record and attribute to search from
1392 * Find an attribute in an ntfs inode. On first search @ctx->ntfs_ino must
1396 * This function transparently handles attribute lists and @ctx is used to
1399 * After finishing with the attribute/mft record you need to call
1405 * When 0, @ctx->attr is the found attribute and it is in mft record
1406 * @ctx->mrec. If an attribute list attribute is present, @ctx->al_entry is
1407 * the attribute list entry of the found attribute.
1409 * When -ENOENT, @ctx->attr is the attribute which collates just after the
1410 * attribute being searched for, i.e. if one wants to add the attribute to the
1411 * mft record this is the correct place to insert it into. If an attribute
1412 * list attribute is present, @ctx->al_entry is the attribute list entry which
1413 * collates just after the attribute list entry of the attribute being searched
1414 * for, i.e. if one wants to add the attribute to the mft record this is the
1415 * correct place to insert its attribute list entry into.
1438 * ntfs_attr_init_search_ctx - initialize an attribute search context
1439 * @ctx: attribute search context to initialize
1443 * Initialize the attribute search context @ctx with @ni and @mrec.
1471 * ntfs_attr_reinit_search_ctx - reinitialize an attribute search context
1472 * @ctx: attribute search context to reinitialize
1474 * Reinitialize the attribute search context @ctx, unmapping an associated
1477 * This is used when a search for a new attribute is being started to reset
1485 /* No attribute list. */
1496 } /* Attribute list. */
1506 * ntfs_attr_get_search_ctx - allocate/initialize a new attribute search context
1510 * Allocate a new attribute search context, initialize it with @ni and @mrec,
1532 * ntfs_attr_put_search_ctx - release an attribute search context
1533 * @ctx: attribute search context to free
1535 * Release the attribute search context @ctx, unmapping an associated extent
1550 * ntfs_attr_find_in_attrdef - find an attribute in the $AttrDef system file
1551 * @vol: ntfs volume to which the attribute belongs
1552 * @type: attribute type which to find
1554 * Search for the attribute definition record corresponding to the attribute
1557 * Return the attribute type definition record if found and NULL if not found.
1570 /* We found the attribute; return it. */
1576 /* Attribute not found. */
1577 ntfs_debug("Attribute type 0x%x not found in $AttrDef.",
1583 * ntfs_attr_size_bounds_check - check a size of an attribute type for validity
1584 * @vol: ntfs volume to which the attribute belongs
1585 * @type: attribute type which to check
1588 * Check whether the @size in bytes is valid for an attribute of @type on the
1605 /* Get the $AttrDef entry for the attribute @type. */
1619 * ntfs_attr_can_be_non_resident - check if an attribute can be non-resident
1620 * @vol: ntfs volume to which the attribute belongs
1621 * @type: attribute type which to check
1623 * Check whether the attribute of @type on the ntfs volume @vol is allowed to
1631 /* Find the attribute definition record in $AttrDef. */
1642 * ntfs_attr_can_be_resident - check if an attribute can be resident
1643 * @vol: ntfs volume to which the attribute belongs
1644 * @type: attribute type which to check
1646 * Check whether the attribute of @type on the ntfs volume @vol is allowed to
1652 * Return 0 if the attribute is allowed to be non-resident and -EPERM if not.
1654 * Warning: In the system file $MFT the attribute $Bitmap must be non-resident
1667 * ntfs_attr_record_resize - resize an attribute record
1668 * @m: mft record containing attribute record
1669 * @a: attribute record to resize
1670 * @new_size: new size in bytes to which to resize the attribute record @a
1672 * Resize the attribute record @a, i.e. the resident part of the attribute, in
1690 /* If the actual attribute length has changed, move things around. */
1719 * ntfs_resident_attr_value_resize - resize the value of a resident attribute
1720 * @m: mft record containing attribute record
1721 * @a: attribute record whose value to resize
1722 * @new_size: new size in bytes to which to resize the attribute value of @a
1724 * Resize the value of the attribute @a in the mft record @m to @new_size bytes.
1732 /* Resize the resident part of the attribute record. */
1737 * The resize succeeded! If we made the attribute value bigger, clear
1744 /* Finally update the length of the attribute value. */
1750 * ntfs_attr_make_non_resident - convert a resident to a non-resident attribute
1751 * @ni: ntfs inode describing the attribute to convert
1752 * @data_size: size of the resident data to copy to the non-resident attribute
1754 * Convert the resident ntfs attribute described by the ntfs inode @ni to a
1757 * @data_size must be equal to the attribute value size. This is needed since
1781 "Trying to make non-resident attribute non-resident. Aborting...\n");
1785 /* Check that the attribute is allowed to be non-resident. */
1789 ntfs_debug("Attribute is not allowed to be non-resident.");
1791 ntfs_debug("Attribute not defined on the NTFS volume!");
1851 /* Start by allocating clusters to hold the attribute value. */
1895 * attribute record.
1900 * attribute value.
1911 /* Backup the attribute flag. */
1913 /* Resize the resident part of the attribute record. */
1919 * Convert the resident part of the attribute record to describe a
1920 * non-resident attribute.
1923 /* Move the attribute name if it exists and update the offset. */
1947 /* Generate the mapping pairs array into the attribute record. */
1956 /* Setup the in-memory attribute structure to be non-resident. */
2006 /* Convert the attribute back into a resident attribute. */
2008 /* Move the attribute name if it exists and update the offset. */
2017 /* Resize the resident part of the attribute record. */
2023 * If the old size is too small, truncate the attribute,
2031 "Failed to undo partial resident to non-resident attribute conversion. Truncating inode 0x%llx, attribute type 0x%x from %i bytes to %i bytes to maintain metadata consistency. THIS MEANS YOU ARE LOSING %i BYTES DATA FROM THIS %s.",
2036 !ni->name_len) ? "FILE" : "ATTRIBUTE");
2049 /* Copy the data from folio back to the attribute value. */
2084 * ntfs_attr_set - fill (a part of) an attribute with a byte
2085 * @ni: ntfs inode describing the attribute to fill
2086 * @ofs: offset inside the attribute at which to start to fill
2088 * @val: the unsigned 8-bit value with which to fill the attribute
2090 * Fill @cnt bytes of the attribute described by the ntfs inode @ni starting at
2091 * byte offset @ofs inside the attribute with the constant byte @val.
2093 * This function is effectively like memset() applied to an ntfs attribute.
2095 * to the ntfs attribute and it marks them dirty after doing the memset().
2166 * ntfs_make_room_for_attr - make room for an attribute inside an mft record
2171 * @pos points to the attribute in front of which we want to make space.
2189 /* The -8 is for the attribute terminator. */
2211 * ntfs_resident_attr_record_add - add resident attribute to inode
2212 * @ni: opened ntfs inode to which MFT record add attribute
2213 * @type: type of the new attribute
2214 * @name: name of the new attribute
2215 * @name_len: name length of the new attribute
2216 * @val: value of the new attribute
2217 * @size: size of new attribute (length of @val, if @val != NULL)
2218 * @flags: flags of the new attribute
2241 ntfs_debug("Attribute can't be resident.\n");
2256 * attribute in @ni->mrec, not any extent inode in case if @ni is base
2262 ntfs_debug("Attribute already present.\n");
2272 /* Make room for attribute. */
2279 ntfs_debug("Failed to make room for attribute.\n");
2319 ntfs_debug("Failed add attribute entry to ATTRIBUTE_LIST.\n");
2332 * ntfs_non_resident_attr_record_add - add extent of non-resident attribute
2333 * @ni: opened ntfs inode to which MFT record add attribute
2334 * @type: type of the new attribute extent
2335 * @name: name of the new attribute extent
2336 * @name_len: name length of the new attribute extent
2337 * @lowest_vcn: lowest vcn of the new attribute extent
2338 * @dataruns_size: dataruns size of the new attribute extent
2339 * @flags: flags of the new attribute extent
2363 pr_err("Attribute can't be non resident\n");
2377 * attribute in @ni->mrec, not any extent inode in case if @ni is base
2383 pr_err("Attribute 0x%x already present\n", type);
2394 /* Make room for attribute. */
2402 pr_err("Failed to make room for attribute\n");
2421 /* If @lowest_vcn == 0, than setup empty attribute. */
2449 * Locate offset from start of the MFT record where new attribute is
2451 * update of attribute list.
2457 pr_err("%s: attribute lookup failed\n", __func__);
2471 * ntfs_attr_record_rm - remove attribute extent
2472 * @ctx: search context describing the attribute which should be removed
2496 /* Remove attribute itself. */
2498 ntfs_debug("Couldn't remove attribute record. Bug or damaged MFT record.\n");
2540 /* Remove attribute list if we don't need it any more. */
2548 ntfs_debug("Couldn't find attribute list. Succeed anyway.\n");
2559 ntfs_debug("Couldn't decompress attribute list runlist. Succeed anyway.\n");
2563 ntfs_debug("Leaking clusters! Run chkdsk. Couldn't free clusters from attribute list runlist.\n");
2566 /* Remove attribute record itself. */
2568 ntfs_debug("Couldn't remove attribute list. Succeed anyway.\n");
2589 * ntfs_attr_add - add attribute to inode
2590 * @ni: opened ntfs inode to which add attribute
2591 * @type: type of the new attribute
2592 * @name: name in unicode of the new attribute
2593 * @name_len: name length in unicode characters of the new attribute
2594 * @val: value of new attribute
2595 * @size: size of the new attribute / length of @val (if specified)
2598 * attribute), for attributes that can become non-resident @val can be NULL
2599 * (eg. DATA attribute). @size can be specified even if @val is NULL, in this
2603 * If inode haven't got enough space to add attribute, add attribute to one of
2605 * allocate new extent and add attribute to it.
2607 * If on one of this steps attribute list is needed but not present, than it is
2609 * @type == AT_ATTRIBUTE_LIST, if you really need to add attribute list call
2635 /* Check the attribute type and the size. */
2658 ntfs_error(sb, "Attribute is too big");
2665 * Determine resident or not will be new attribute. We add 8 to size in
2679 /* Calculate attribute record size. */
2690 * If we have enough free space for the new attribute in the base MFT
2691 * record, then add attribute to it.
2732 /* There is no extent that contain enough space for new attribute. */
2734 /* Add attribute list not present, add it and retry. */
2737 ntfs_error(sb, "Failed to add attribute list");
2754 /* Add resident attribute. */
2761 ntfs_error(sb, "Failed to add resident attribute");
2768 /* Add non resident attribute. */
2773 ntfs_error(sb, "Failed to add non resident attribute");
2781 /* Open new attribute and resize it. */
2785 ntfs_error(sb, "Failed to open just added attribute");
2790 /* Resize and set attribute value. */
2794 ntfs_error(sb, "Failed to initialize just added attribute");
2796 ntfs_error(sb, "Failed to remove just added attribute");
2804 /* Remove just added attribute. */
2809 ntfs_error(sb, "Failed to remove just added attribute #2");
2837 * __ntfs_attr_init - primary initialization of an ntfs attribute structure
2838 * @ni: ntfs attribute inode to initialize
2839 * @ni: ntfs inode with which to initialize the ntfs attribute
2840 * @type: attribute type
2841 * @name: attribute name in little endian Unicode or NULL
2842 * @name_len: length of attribute @name in Unicode characters (if @name given)
2844 * Initialize the ntfs attribute @na with @ni, @type, @name, and @name_len.
2861 * @non_resident: true if attribute is non-resident
2862 * @compressed: true if attribute is compressed
2863 * @encrypted: true if attribute is encrypted
2864 * @sparse: true if attribute is sparse
2865 * @allocated_size: allocated size of the attribute
2866 * @data_size: actual data size of the attribute
2867 * @initialized_size: initialized size of the attribute
2871 * Final initialization for an ntfs attribute.
2909 * ntfs_attr_open - open an ntfs attribute for access
2910 * @ni: open ntfs inode in which the ntfs attribute resides
2911 * @type: attribute type
2912 * @name: attribute name in little endian Unicode or AT_UNNAMED or NULL
2913 * @name_len: length of attribute @name in Unicode characters (if @name given)
2975 * Wipe the flags in case they are not zero for an attribute list
2976 * attribute. Windows does not complain about invalid flags and chkdsk
3011 pr_err("Inode %lld has corrupt attribute flags (0x%x <> 0x%x)\n",
3072 * ntfs_attr_close - free an ntfs attribute structure
3075 * Release all memory associated with the ntfs attribute @na and then release
3088 * ntfs_attr_map_whole_runlist - map the whole runlist of an ntfs attribute
3091 * Map the whole runlist of the ntfs attribute @na. For an attribute made up
3092 * of only one attribute extent this is the same as calling
3093 * ntfs_map_runlist(ni, 0) but for an attribute with multiple extents this
3095 * to the entirety of the disk allocation of an attribute.
3126 /* Map all attribute extents one by one. */
3160 "First extent of inode %llu attribute has non-zero lowest_vcn",
3164 /* Get the last vcn in the attribute. */
3182 ntfs_error(sb, "Inode %llu has corrupt attribute list",
3188 ntfs_error(sb, "Couldn't find attribute for runlist mapping");
3213 * ntfs_attr_record_move_to - move attribute record to target inode
3214 * @ctx: attribute search context describing the attribute record
3215 * @ni: opened ntfs inode to which move attribute record
3240 ntfs_debug("Inode should contain attribute list to use this function.\n");
3244 /* Find place in MFT record where attribute will be moved. */
3254 * attribute in @ni->mrec, not any extent inode in case if @ni is base
3261 ntfs_debug("Attribute of such type, with same name already present in this MFT record.\n");
3266 ntfs_debug("Attribute lookup failed.\n");
3270 /* Make space and move attribute. */
3280 ntfs_debug("Couldn't make space for attribute.\n");
3292 /* Update attribute list. */
3303 * ntfs_attr_record_move_away - move away attribute record from it's mft record
3304 * @ctx: attribute search context describing the attribute record
3341 /* Walk through all extents and try to move attribute to them. */
3374 * Failed to move attribute to one of the current extents, so allocate
3375 * new extent and move attribute to it.
3387 ntfs_error(sb, "Couldn't move attribute to MFT record");
3422 /* Attribute become sparse. */
3425 * Move attribute to another mft record, if attribute is too
3442 ntfs_error(sb, "Failed to move attribute");
3474 /* Attribute no longer sparse. */
3523 * ntfs_attr_update_mapping_pairs - update mapping pairs for ntfs attribute
3558 ntfs_error(sb, "%s: resident attribute", __func__);
3573 /* Fill attribute records with new mapping pairs. */
3661 * Mapping pairs of $ATTRIBUTE_LIST attribute must fit
3669 ntfs_debug("Attribute list is too big. Defragment the volume\n");
3677 /* Add attribute list if it isn't present, and retry. */
3701 ntfs_error(sb, "Failed to resize attribute");
3719 * correct destination, i.e. the attribute record itself.
3737 ntfs_error(sb, "%s: Attribute lookup failed", __func__);
3765 /* Deallocate not used attribute extents and return with success. */
3774 /* Remove unused attribute record. */
3840 /* Add attribute extent to new record. */
3844 ntfs_error(sb, "Could not add attribute extent");
3885 * ntfs_attr_make_resident - convert a non-resident to a resident attribute
3886 * @ni: open ntfs attribute to make resident
3887 * @ctx: ntfs search context describing the attribute
3889 * Convert a non-resident ntfs attribute to a resident one.
3902 /* Should be called for the first extent of the attribute. */
3904 ntfs_debug("Eeek! Should be called for the first extent of the attribute. Aborting...\n");
3910 ntfs_debug("Eeek! Trying to make resident attribute resident. Aborting...\n");
3918 /* Check that the attribute is allowed to be resident. */
3928 /* Work out offsets into and size of the resident attribute. */
3933 /* Sanity check the size before we start modifying the attribute. */
3936 ntfs_debug("Not enough space to make attribute resident\n");
3945 /* Move the attribute name if it exists and update the offset. */
3952 /* Resize the resident part of the attribute record. */
3956 * already checked that attribute fits MFT record).
3958 ntfs_error(ctx->ntfs_ino->vol->sb, "BUG! Failed to resize attribute record. ");
3962 /* Convert the attribute record to describe a resident attribute. */
3982 * the whole run list and thus it doesn't matter that the attribute
4011 * ntfs_non_resident_attr_shrink - shrink a non-resident, open ntfs attribute
4012 * @ni: non-resident ntfs attribute to shrink
4013 * @newsize: new size (in bytes) to which to shrink the attribute
4015 * Reduce the size of a non-resident, open ntfs attribute @na to @newsize bytes.
4037 * Check the attribute type and the corresponding minimum size
4125 /* Get the first attribute record. */
4137 ntfs_debug("Eeek! Lookup of first attribute extent failed. Leaving inconstant metadata.\n");
4152 /* If the attribute now has zero size, make it resident. */
4159 "Failed to make attribute resident. Leaving as is...\n");
4174 * ntfs_non_resident_attr_expand - expand a non-resident, open ntfs attribute
4175 * @ni: non-resident ntfs attribute to expand
4176 * @prealloc_size: preallocation size (in bytes) to which to expand the attribute
4177 * @newsize: new size (in bytes) to which to expand the attribute
4181 * Expand the size of a non-resident, open ntfs attribute @na to @newsize bytes,
4210 * Check the attribute type and the corresponding maximum size
4245 * If we extend $DATA attribute on NTFS 3+ volume, we can add
4304 * Determine first after last LCN of attribute.
4307 * attribute let the cluster allocator choose the
4342 /* Append new clusters to attribute runlist. */
4442 * ntfs_resident_attr_resize - resize a resident, open ntfs attribute
4444 * @newsize: new size (in bytes) to which to resize the attribute
4445 * @prealloc_size: preallocation size (in bytes) to which to resize the attribute
4448 * Change the size of a resident, open ntfs attribute @na to @newsize bytes.
4469 /* Get the attribute record that needs modification. */
4484 * Check the attribute type and the corresponding minimum and maximum
4496 * attribute non-resident if the attribute type supports it. If it is
4500 /* Perform the resize of the attribute record. */
4504 /* Update attribute size everywhere. */
4521 /* Make the attribute non-resident if possible. */
4527 /* Resize non-resident attribute */
4530 ntfs_error(sb, "Failed to make attribute non-resident");
4562 ntfs_error(sb, "Couldn't open attribute");
4580 ntfs_error(sb, "%s: Attribute lookup failed 1", __func__);
4585 * The standard information and attribute list attributes can't be
4602 "Couldn't free space in the MFT record to make attribute list non resident");
4612 * Move the attribute to a new mft record, creating an attribute list
4613 * attribute or modifying it if it is already present.
4616 /* Point search context back to attribute which we need resize. */
4621 ntfs_error(sb, "%s: Attribute lookup failed 2", __func__);
4626 * Check whether attribute is already single in this MFT record.
4627 * 8 added for the attribute terminator.
4632 ntfs_debug("MFT record is filled with one attribute\n");
4636 /* Add attribute list if not present. */
4653 /* Move attribute to it. */
4656 ntfs_error(sb, "Couldn't move attribute to new MFT record");
4738 pr_err("Failed to truncate encrypted attribute\n");
4758 * ntfs_attr_truncate_i - resize an ntfs attribute
4760 * @newsize: new size (in bytes) to which to resize the attribute
4763 * Change the size of an open ntfs attribute @na to @newsize bytes. If the
4764 * attribute is made bigger and the attribute is resident the newly
4765 * "allocated" space is cleared and if the attribute is non-resident the
4792 pr_err("Failed to truncate encrypted attribute\n");
4797 pr_err("Failed to truncate compressed attribute\n");
4813 * Resize an attribute, creating a hole if relevant
4973 * ntfs_attr_rm - remove attribute from ntfs inode
4974 * @ni: opened ntfs attribute to delete
4976 * Remove attribute and all it's extents from ntfs inode. If attribute was non
4977 * resident also free all clusters allocated by attribute.
5014 /* Search for attribute extents and remove them all. */
5025 "Failed to remove attribute extent. Leaving inconstant metadata.\n");
5032 ntfs_error(sb, "Attribute lookup failed. Probably leaving inconstant metadata.\n");
5076 ntfs_error(ni->vol->sb, "Failed to open attribute 0x%02x of inode 0x%llx",
5084 ntfs_error(ni->vol->sb, "Failed to remove attribute 0x%02x of inode 0x%llx",
5091 * ntfs_attr_readall - read the entire data from an ntfs attribute
5092 * @ni: open ntfs inode in which the ntfs attribute resides
5093 * @type: attribute type
5094 * @name: attribute name in little endian Unicode or AT_UNNAMED or NULL
5095 * @name_len: length of attribute @name in Unicode characters (if @name given)
5098 * This function will read the entire content of an ntfs attribute.
5099 * If @name is AT_UNNAMED then look specifically for an unnamed attribute.
5100 * If @name is NULL then the attribute could be either named or not.
5103 * On success a buffer is allocated with the content of the attribute
5128 ntfs_error(sb, "Invalid attribute data size");