On 21 Jun 2018, at 5:22, David Sterba wrote:

On Thu, Jun 21, 2018 at 09:45:00AM +0300, Nikolay Borisov wrote:
The v0 compat code was introduced in commit 5d4f98a28c7d
("Btrfs: Mixed back reference  (FORWARD ROLLING FORMAT CHANGE)") 9
years ago, which was merged in 2.6.31. This means that the code is
there to support filesystems which are _VERY_ old and if you are using btrfs on such an old kernel, you have much bigger problems. This coupled with the fact that no one is likely testing/maintining this code likely
means it has bugs lurking. All things considered I think 43 kernel
releases later it's high time this remnant of the past got removed.

Ack. Given the age of the format and nearly zero chance of such
filesystem to be still in use it should be ok to remove it directly and
not add some sort of warning when such filesystem is found.

Agreed, it seems very unlikely to me that we have happy v0 users.


This patch removes all code wrapped in #ifdefs but leaves the BUG_ONs in case
we have a v0 with no support intact as a sort of safety-net.

I think there should be some verbose way to report what happened and
possibly do proper error handling and go to read-only eventually.
The type of checks for v0 do not seem to be something that could be done
at mount time.

Yeah, with the code we have right now, it's really obvious the BUG()s are for V0 extents. With all the ifdefs removed its much less clear. I'd swap them out for a transaction abort with a message about the v0 extents.

Also, there's at least one ASSERT() left over in a #else, which I would also turn into a more explicit abort or at least comment.

-chris
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to