In mounted WIM images, the disk usage provided for each file (st_blocks)
is now the compressed size rather than the uncompressed size.
+ The performance of NTFS-3g capture mode has been slightly improved.
+
Version 1.8.0:
Improved the LZX compressor. It is now 15-20% faster than before and
provides a slightly better compression ratio.
return tstrcmp(blob1->file_on_disk, blob2->file_on_disk);
#ifdef WITH_NTFS_3G
case BLOB_IN_NTFS_VOLUME:
- return cmp_u64(blob1->ntfs_loc->mft_no, blob2->ntfs_loc->mft_no);
+ return cmp_u64(blob1->ntfs_loc->sort_key, blob2->ntfs_loc->sort_key);
#endif
default:
/* No additional sorting order defined for this resource
}
}
+/* When sorting blobs located in NTFS volumes for sequential reading, we sort
+ * first by starting LCN of the attribute if available, otherwise no sort order
+ * is defined. This usually results in better sequential access to the volume.
+ */
+static int
+set_attr_sort_key(ntfs_inode *ni, struct ntfs_location *loc)
+{
+ ntfs_attr *na;
+ runlist_element *rl;
+
+ na = open_ntfs_attr(ni, loc);
+ if (!na)
+ return WIMLIB_ERR_NTFS_3G;
+
+ rl = ntfs_attr_find_vcn(na, 0);
+ if (rl && rl->lcn != LCN_HOLE)
+ loc->sort_key = rl->lcn;
+ else
+ loc->sort_key = 0;
+
+ ntfs_attr_close(na);
+ return 0;
+}
+
/* Save information about an NTFS attribute (stream) to a WIM inode. */
static int
scan_ntfs_attr(struct wim_inode *inode,
blob->ntfs_loc->attr_name_nchars = name_nchars;
}
+ ret = set_attr_sort_key(ni, blob->ntfs_loc);
+ if (ret)
+ goto out_cleanup;
+
if (unlikely(type == AT_REPARSE_POINT)) {
if (blob->size < REPARSE_DATA_OFFSET) {
ERROR("Reparse data of \"%s\" "