Hi,
To do the cluster relocations for fragmented volumes, ntfsresize's
cluster accounting moved from low level functions to middle level ones
and caught a libntfs problem: ntfs_attrs_walk (ntfs_attr_lookup)
doesn't enumerate attribute list attributes. Below is a patch. Fix
supposes AT_STANDARD_INFORMATION always present for a valid MFT record
if an AT_ATTRIBUTE_LIST is present. This should be always true (if not
ntfsresize catches it). All my testcases pass again.
Szaka
--- libntfs/attrib.c 15 Dec 2002 13:02:00 -0000 1.4
+++ libntfs/attrib.c 18 Dec 2002 10:13:24 -0000
@@ -1743,7 +1743,10 @@
base_ni = ctx->base_ntfs_ino;
else
base_ni = ctx->ntfs_ino;
- if (!base_ni || !NInoAttrList(base_ni) || type == AT_ATTRIBUTE_LIST)
+ /* FIXME: clean up *attr_find mess[y condition] */
+ if (!base_ni || !NInoAttrList(base_ni) || type == AT_ATTRIBUTE_LIST ||
+ (NInoAttrList(base_ni) && !type &&
+ ctx->attr->type == AT_STANDARD_INFORMATION))
return ntfs_attr_find(type, name, name_len, ic, val, val_len,
ctx);
return ntfs_external_attr_find(type, name, name_len, ic, lowest_vcn,
|