Douglas Paul wrote on 1/11/21 3:21 PM:
Hello,
I noticed in the documentation (and confirmed with some random pages of
MS documentation) that reparse points are not supposed to be supported
when there are extended attributes.
Not exactly : what the documentation says is that reparse points
and EA's are incompatible. They are both supposed to be returned
in dwReserved0 by FindFirstFile()... However Microsoft does not
respect this anymore, as you can see in your post of ntfsinfo
for 'AppxManifest.xml'
Anyway, the issue is that named streams are used both for
extended attributes and for the WOF compressed data. Historically
EA's were designed for OS/2 extended attributes, and their
limitations were dissuasive for representing Linux extended
attributes, so named streams are used instead. This was consistent
with Microsoft Office using named streams for a similar purpose.
This doesn't seem to be true anymore, at least for files that use
'WofCompressedData' and also come from a package.
Should there be any danger to remove the check for EAs when setting
reparse data, or maybe it should only be done for 'small' reparse tags?
The issue is actually telling which named streams are extended
attributes and which ones are not. And having a generic way to
do so to avoid having to maintain a sort of black list.
I noticed this when trying to manipulate files with reparse data to
properly copy them. What I was doing was removing the reparse data, so
symlinks could be copied correctly with the correct type (file or
directory), and the reapply it after. For WofCompressed files, I planned
to copy the data using the "streams_interface=windows" option because
sometimes the data is too large to pass with xattr. However, this failed
because after the reparse attribute was removed, it could not be put
back.
It would be useful you explain your use case. The WofCompressed files
are Windows system files which you cannot backup and restore as if
they were plain files. A system partition is best copied as a whole.
You are unlikely to have user files being WofCompressed.
Note : when using "streams_interface=windows" you should not use
xattr, you can read and write the raw attribute by appending a
colon and the name of the stream to the file name (for instance :
AppxManifest.xml:WofCompressedData), and you have a big limit on
the stream size.
Here is an example of some files I found. They all seem to have the
0x40000 attribute. Sometimes the EA points to a package name.
This is interesting. Maybe 0x40000 (whose purpose I do not know)
can be used to tell whether a file is a Windows system file which
is not eligible for Linux extended attributes.
ntfs-3g does not use the EA's at all. Microsoft probably use them
in the update process, so better not to interfere. Consequently they
are probably not eligible for extended attributes either (but checking
for EA presence would be heavy for this purpose).
[...]
Jean-Pierre
_______________________________________________
ntfs-3g-devel mailing list
ntfs-3g-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel