Lines Matching refs:data

745 	list_for_each_safe(item, tmp, &file->data) { /* List of data streams */
746 struct data *d = list_entry(item, struct data, list);
747 ntfs_log_debug("Freeing data stream '%s'.\n", d->name ?
975 * A file may have more than one data stream. All files will have an unnamed
976 * data stream which contains the file's data. Some Windows applications store
979 * The streams that are found are put in data objects and added to a linked
980 * list of data streams in the file object.
990 struct data *data;
1000 data = calloc(1, sizeof(*data));
1001 if (!data) {
1008 data->resident = !rec->non_resident;
1009 data->compressed = (rec->flags & ATTR_IS_COMPRESSED) ? 1 : 0;
1010 data->encrypted = (rec->flags & ATTR_IS_ENCRYPTED) ? 1 : 0;
1013 data->uname = (ntfschar *)((char *)rec +
1015 data->uname_len = rec->name_length;
1017 if (ntfs_ucstombs(data->uname, data->uname_len,
1018 &data->name, 0) < 0) {
1024 if (data->resident) {
1025 data->size_data = le32_to_cpu(rec->u.res.value_length);
1026 data->data = (char*)rec +
1029 data->size_alloc = sle64_to_cpu(rec->u.nonres.allocated_size);
1030 data->size_data = sle64_to_cpu(rec->u.nonres.data_size);
1031 data->size_init = sle64_to_cpu(rec->u.nonres.initialized_size);
1032 data->size_vcn = sle64_to_cpu(rec->u.nonres.highest_vcn) + 1;
1035 data->runlist = ntfs_mapping_pairs_decompress(vol, rec, NULL);
1036 if (!data->runlist) {
1037 ntfs_log_debug("Couldn't decompress the data runs.\n");
1040 file->max_size = max(file->max_size, data->size_data);
1041 file->max_size = max(file->max_size, data->size_init);
1043 list_add_tail(&data->list, &file->data);
1048 ntfs_log_debug("File has %d data streams.\n", count);
1079 INIT_LIST_HEAD(&file->data);
1128 ntfs_log_error("ERROR: Couldn't get data streams.\n");
1141 * recovery. The data may have still been overwritten by a another file which
1147 * fragmented) then only the data in this segment will be used for the
1160 struct data *data;
1174 if (list_empty(&file->data)) {
1175 ntfs_log_verbose("File has no data streams.\n");
1179 list_for_each(pos, &file->data) {
1180 data = list_entry(pos, struct data, list);
1184 if (data->encrypted) {
1190 if (data->compressed) {
1196 if (data->resident) {
1200 data->percent = 100;
1204 rl = data->runlist;
1206 ntfs_log_verbose("File has no runlist, hence no data."
1213 "data.\n");
1256 data->percent = (clusters_free * 100) /
1259 percent = max(percent, data->percent);
1335 ntfs_log_quiet("Size data: %lld\n", f->size_data);
1352 list_for_each(item, &file->data) {
1353 struct data *d = list_entry(item, struct data, list);
1365 ntfs_log_quiet("Size data: %lld\n", d->size_data);
1430 list_for_each(item, &file->data) {
1431 struct data *d = list_entry(item, struct data, list);
1500 * write_data - Write out a block of data
1503 * @bufsize: Amount of data to write
1505 * Write a block of data to a file descriptor.
1508 * 0 Success, all the data was written
1634 * Read an MFT Record and try an recover any data associated with it. Some of
1638 * Each data stream will be recovered and saved to a file. The file's name will
1640 * Any named data stream will be saved as filename:streamname.
1645 * N.B. We cannot tell if someone has overwritten some of the data since the
1649 * 1 Success, the data was recovered
1707 ntfs_log_quiet("File has no recoverable data.\n");
1711 if (list_empty(&file->data)) {
1712 ntfs_log_quiet("File has no data. There is nothing to recover.\n");
1716 list_for_each(item, &file->data) {
1717 struct data *d = list_entry(item, struct data, list);
1732 ntfs_log_verbose("File has resident data.\n");
1733 if (write_data(fd, d->data, d->size_data) < d->size_data) {
1746 ntfs_log_verbose("File has no runlist, hence no data.\n");
1751 ntfs_log_verbose("File has an empty runlist, hence no data.\n");
1838 * IF opts.truncate is set AND data stream currently being recovered is
1839 * non-resident AND data stream has no holes (100% recoverability) AND
1840 * 0 <= (data->size_alloc - data->size_data) <= vol->cluster_size AND
1841 * cluster_count * vol->cluster_size == data->size_alloc THEN file
1842 * currently being written is truncated to data->size_data bytes before
1884 * determine how much of the data lies in unused disk space.