On 2015-11-23 12:56, David Sterba wrote:
I feel that Christoph's suggestion in the other sub-thread to have it spit out a notice that it disabled something because of the kernel it's running on is worth adding also. We should probably also spit out a warning if the user asks for a feature that isn't supported on the current kernel (but still let them create the filesystem regardless).On Mon, Nov 23, 2015 at 08:56:13PM +0800, Anand Jain wrote:Btrfs-progs is a tool for the btrfs kernel and we hope latest btrfs-progs be compatible w any set of older/newer kernels.So far mkfs.btrfs and btrfs-convert sets the default features, for eg, skinny-metadata even if the running kernel does not supports it, and so the mount fails on the running.So the default behaviour of mkfs will try to best guess the feature set of currently running kernel. I think this is is the most common scenario and justifies the change in default behaviours.
Is the intent to enable stuff that the devs consider stable that's supported by the running kernel, or all the features supported by the running kernel? It's probably best to use the first as the defaults, and then have an option to pull in everything the running kernel supports (possibly name that option something like 'running-all').For the other cases I'd like to introduce some human-readable shortcuts to the --features option. Eg. 'mkfs.btrfs -O compat-3.2' will pick all options supported by the unpatched mainline kernel of version 3.2. This would be present for all version, regardless if there was a change in the options or not. Similarly for convenience, add 'running' that would pick the options from running kernel but will be explicit.
A remaining option should override the 'running' behaviour and pick the latest mkfs options. Naming it 'defaults' sounds a bit ambiguous so the name is yet to be determined.
Maybe something like 'recommended' or 'suggested'?It might also be nice to have an option to tell it to turn on everything the tools support (possibly call that one something like 'max-features'), though this is probably less useful due to the fact that most mkfs features in BTRFS are incompat features.
smime.p7s
Description: S/MIME Cryptographic Signature