[Libguestfs] [PATCH libguestfs 0/3] daemon: Fix various commands which break on NTFS-3g compressed files.

Pino Toscano ptoscano at redhat.com
Fri Mar 13 14:01:00 UTC 2020


On Thursday, 12 March 2020 15:44:45 CET Richard W.M. Jones wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1811539
> 
> Commands including virt-diff which read extended attributes will
> sometimes fail on NTFS filesystems that are using system compressed.
> The reason is complex, see comment 5 of the bug linked above.
> 
> This patch filters out the troublesome xattr.  For justification, see
> the comment I added in patch 3.

The idea is fine, however I'm slightly concerned about the increased
memory usage due to the split + filtering done.

Now that I took a look at the code again (wow, last time I touched it
was more than 5 years ago), an alternative approach could be:
- refactor do_internal_lxattrlist to use _listxattrs
- edit/replace in-place the buffer to-be-returned by _listxattrs
  filtering out the names we do not want
This way the rest of the existing code needs almost no changes.

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20200313/d0ae88a8/attachment.sig>


More information about the Libguestfs mailing list