On Wed, Dec 04, 2024 at 01:24:39PM +0100, Michael Biebl wrote: > > Assume a user has a file system that was created a long time ago using > rev=0. This doesn't necessarily mean that he is using a 30-year old Linux > kernel! > They have made continuous backups of that file system. With this change in > e2fsprogs, creating new backups of that file system will now fail and even > worse, they can no longer restore any existing archives, which I would > consider pretty bad.
Sure, but file systems that old are probably fairly small (since HDD's 30 years were quite small), and a revision 0 file system doesn't support online resizing, they don't have a journal so file system won't survive a power fail or reboot without requiring a fsck (and very likely requiring manual system administrator intervention), etc. Other file systems have deprecated and removed support for obsolete file systems after *ten* years. We've been nicer and about not removing and yanking out kernel support after *30* years. I guess the old saw about no good deed goes unpunished is applicable here. > Patching fsarchiver to use -E revision=0 (or rather try both as I can't > assume I have a new e2fsprogs) could be an option if someone provided a > patch. Are you willing to work on such a patch? The much simpler patch would be to just simply be to remove the -r option altogether. The result is that when you restore the ancient file system, it will no longer be bit-for-bit identical. (But it was never bit-for-bit identical anyway because data blocks don't end up in the same location. fsarchiver also doesn't preserve i_version and i_generation fields, so the resulting file system would have incompatible file system handles.) Note also that if you did an fsarchive backup from two decades ago, and then restored it on a modern system that had a new e2fsprogs that supported some new features, some of those new features might be enabled by default anyway, so the way fsarchiver in practice didn't *always* result in file system features would be 100% unchanged anyway. (In particular, fsarchiver never got updated to account for any ext4 features introduced after e2fsprogs 1.43.0....) As far as assuming whether or not you have a new version of e2fsprogs, it wouldn't be that hard to do in fs_ext2.c, since the code is *already* pulling out the e2fsprogs version number, so it would be simple enough to have it use "-E revision=N" for PROGVER(1,47,2) or later, and "-r N" otherwise. I'll put it on my list, but quite frankly it's not very high priority because to be honest, I think what fsarchiver does is actually a little bit silly. I'm happy to provide a patch that just removes the -r option, or tries to do something very simple with "-E revision=N" based on PROGVER. But I'd probably only do very superficial testing, and as I said, fsarchiver hasn't been updated to deal with more modern versions of e2fsprogs and ext4 *anyway*. - Ted