int ntfs_attr_make_non_resident (ntfs_inode * ni);
Convert the resident ntfs attribute described by the ntfs inode ni to a non-resident one.
Return 0 on success and -errno on error. The following error return codes
-EPERM - The attribute is not allowed to be non-resident. -ENOMEM - Not enough memory. -ENOSPC - Not enough disk space. -EINVAL - Attribute not defined on the volume. -EIO - I/o error or other error. Note that -ENOSPC is also returned in the case that there is not enough space in the mft record to do the conversion. This can happen when the mft record is already very full. The caller is responsible for trying to make space in the mft record and trying again. FIXME: Do we need a separate error return code for this kind of -ENOSPC or is it always worth trying again in case the attribute may then fit in a resident state so no need to make it non-resident at all? Ho-hum... (AIA)
No changes in the attribute list are required to move from a resident to a non-resident attribute.
- The caller must hold i_sem on the inode.