maharmstone / ntfs2btrfs

GNU General Public License v2.0
683 stars 30 forks source link

Prevent conversions of file systems with unsupported features unless forced to #10

Open boricj opened 3 years ago

boricj commented 3 years ago

There are several pitfalls for the unsuspecting user, without even doing anything tricky:

ntfs2btrfs should abort a conversion if it encounters an unsupported NTFS feature unless the user forces it. Assuming the NTFS file system is still pristine just after converting all inodes, it may be a good place to abort so that the user has a complete list of things to fix before proceeding further.

TheMadHau5 commented 3 years ago

I'd further suggest, for at least compression and encryption, the file could be copied decompressed/decrypted and then that could be converted in place, instead of simply skipping said file. The attributes could also optionally be added in the newly converted btrfs (for compression, and encryption too when it gets added).

maharmstone commented 3 years ago

@boricj - I'm fairly sure there's no ADSes, the size of which depends on the size of the filesystem... The program is a touch misleading, as it gives spurious warnings for the dollar-sign files, which don't get recreated anyway.

And I think you're probably talking about "WofCompressedData", which isn't yet fully understood or documented - basically they're empty files with compressed data as the ADS, and Windows decompresses it when it's first accessed. Out of the box, the only WOF files (I think) are Edge and some of the taskbar icons. The only real compressed files are the ETL log files.

@TheMadHau5 - yes, that's the intention eventually, it's just not done yet.

TheMadHau5 commented 3 years ago

I'd say you're quite accurate on that. The only Wof files I've seen belong to either Edge or to some other obscure part of Windows 10, and all the compressed files I've seen are from logs are well (OneNote mostly).

TheMadHau5 commented 3 years ago

@maharmstone Which would you prefer? In-place decompression or copying? (I have a bit of free time, might write a PR soon) Unfortunately, not much can be done about encryption without an Administrator account, as one would need the key to decrypt.

boricj commented 3 years ago

I don't have the details of the two instances of overly large ADS warnings I've encountered because they've scrolled off of my terminal due to the compressed files warnings, but they seemed to be related to recovery stuff. I'm not sure why they occurred, but I guess ntfs2btrfs hasn't seen much use on +450 GiB file systems because of #9.

Just to be safe, I've started over and I'm using a smaller partition this time. The issue itself is still valid, the utility should at least ask for confirmation if it encounters data that will be lost during the conversion, even if it happens to be harmless in practice.