btrfs: props: keep compressing inodes with legacy compression property values
Older kernels matched btrfs.compression values by algorithm name prefix
only, both in the property validator and in prop_compression_apply(),
so values such as "zstd:banana", "zstd:", "zstd:3x", "zstdgarbage", or
anything longer than BTRFS_COMPRESS_PROP_MAX_LEN were accepted, stored
verbatim, and compressed with the named algorithm. Such values are
still found on existing filesystems.
Since per-inode compression levels were added, prop_compression_apply()
parses the value strictly and rejects these with -EINVAL. The property is
loaded with the inode, and inode_prop_iterator() only warns about a
failed apply, so these inodes silently stop compressing, with a warning
every time the inode is loaded.
Keep compressing them as older kernels did: in prop_compression_apply(),
match the algorithm by name prefix again, and treat a level suffix that
does not parse, or a value too long to hold a valid level, as an
unspecified level (prop_compress_level = 0). The compression paths then
pick the level as for a value with no level at all: the mount option's
level if the mount option uses the same algorithm, otherwise the
algorithm's default level.
setxattr still goes through prop_compression_validate(), which keeps
rejecting these values, so only values that are already stored take this
path.