Lines Matching refs:data

925 	ntfs_list_for_each_safe(item, tmp, &file->data) {
926 /* List of data streams */
927 struct data *d = ntfs_list_entry(item, struct data, list);
928 ntfs_log_debug("Freeing data stream '%s'.\n", d->name ?
1067 * For this to be possible, the data record has to be small (less
1087 * If the data attribute replaced the name attribute,
1088 * the name itself is at offset 0x58 from the data attr.
1252 * A file may have more than one data stream. All files will have an unnamed
1253 * data stream which contains the file's data. Some Windows applications store
1256 * The streams that are found are put in data objects and added to a linked
1257 * list of data streams in the file object.
1267 struct data *data;
1277 data = calloc(1, sizeof(*data));
1278 if (!data) {
1285 data->resident = !rec->non_resident;
1286 data->compressed = (rec->flags & ATTR_IS_COMPRESSED) ? 1 : 0;
1287 data->encrypted = (rec->flags & ATTR_IS_ENCRYPTED) ? 1 : 0;
1290 data->uname = (ntfschar *)((char *)rec +
1292 data->uname_len = rec->name_length;
1294 if (ntfs_ucstombs(data->uname, data->uname_len,
1295 &data->name, 0) < 0) {
1301 if (data->resident) {
1302 data->size_data = le32_to_cpu(rec->value_length);
1303 data->data = (char*)rec +
1306 data->size_alloc = sle64_to_cpu(rec->allocated_size);
1307 data->size_data = sle64_to_cpu(rec->data_size);
1308 data->size_init = sle64_to_cpu(rec->initialized_size);
1309 data->size_vcn = sle64_to_cpu(rec->highest_vcn) + 1;
1312 data->runlist = ntfs_mapping_pairs_decompress(vol, rec, NULL);
1313 if (!data->runlist) {
1314 ntfs_log_debug("Couldn't decompress the data runs.\n");
1317 file->max_size = max(file->max_size, data->size_data);
1318 file->max_size = max(file->max_size, data->size_init);
1320 ntfs_list_add_tail(&data->list, &file->data);
1325 ntfs_log_debug("File has %d data streams.\n", count);
1357 NTFS_INIT_LIST_HEAD(&file->data);
1408 ntfs_log_error("ERROR: Couldn't get data streams.\n");
1423 * recovery. The data may have still been overwritten by a another file which
1429 * fragmented) then only the data in this segment will be used for the
1442 struct data *data;
1456 if (ntfs_list_empty(&file->data)) {
1457 ntfs_log_verbose("File has no data streams.\n");
1461 ntfs_list_for_each(pos, &file->data) {
1462 data = ntfs_list_entry(pos, struct data, list);
1466 if (data->encrypted) {
1472 if (data->compressed) {
1478 if (data->resident) {
1482 data->percent = 100;
1486 rl = data->runlist;
1488 ntfs_log_verbose("File has no runlist, hence no data."
1495 "data.\n");
1538 data->percent = (clusters_free * 100) /
1541 percent = max(percent, data->percent);
1612 ntfs_log_quiet("Size data: %lld\n", f->size_data);
1629 ntfs_list_for_each(item, &file->data) {
1630 struct data *d = ntfs_list_entry(item, struct data, list);
1642 ntfs_log_quiet("Size data: %lld\n", d->size_data);
1707 ntfs_list_for_each(item, &file->data) {
1708 struct data *d = ntfs_list_entry(item, struct data, list);
1782 * write_data - Write out a block of data
1785 * @bufsize: Amount of data to write
1787 * Write a block of data to a file descriptor.
1790 * 0 Success, all the data was written
1949 * Read an MFT Record and try an recover any data associated with it. Some of
1953 * Each data stream will be recovered and saved to a file. The file's name will
1955 * Any named data stream will be saved as filename:streamname.
1960 * N.B. We cannot tell if someone has overwritten some of the data since the
1964 * 1 Success, the data was recovered
2022 ntfs_log_quiet("File has no recoverable data.\n");
2026 if (ntfs_list_empty(&file->data)) {
2027 ntfs_log_quiet("File has no data. There is nothing to recover.\n");
2031 ntfs_list_for_each(item, &file->data) {
2032 struct data *d = ntfs_list_entry(item, struct data, list);
2055 ntfs_log_verbose("File has resident data.\n");
2056 if (write_data(fd, d->data, d->size_data) < d->size_data) {
2069 ntfs_log_verbose("File has no runlist, hence no data.\n");
2074 ntfs_log_verbose("File has an empty runlist, hence no data.\n");
2162 * IF opts.truncate is set AND data stream currently being recovered is
2163 * non-resident AND data stream has no holes (100% recoverability) AND
2164 * 0 <= (data->size_alloc - data->size_data) <= vol->cluster_size AND
2165 * cluster_count * vol->cluster_size == data->size_alloc THEN file
2166 * currently being written is truncated to data->size_data bytes before
2210 * determine how much of the data lies in unused disk space.