On Tue, Feb 18, 2020 at 04:18:52PM -0800, Darrick J. Wong wrote: > IIRC I started reading this last month, and tried to picture what will > happen when we introduce a v4 inode format -- will we have to revert all > of the tests that went from "is di_version == 3" to "if hascrc" in this > patch? Or will we simply be adding more code, e.g. > > if (hascrc(...)) { > /* do v3 stuff */ > } > > if (di_version == 4) { > /* do v4 stuff */ > } > > I think the answer is that the code for a v4 inode format would probably > end up doing that and it's probably ok... Depends on what a v4 inode format would really be. v1 vs v2 was basically a few new fields, and more importantl increasing them and intended to be migrated on an as-needed basis without a reformat. In reality we would not really need a version number for anything but the larger fields, as new fields can just be added without new versions (and we've done that, and in fact done larger fields that way to by splitting them in case of the project id). v3 is different in that it treats things different in logging, but more importantly they require a reformat and thus are file system wide.