@@ -2898,14 +2898,22 @@ int main(int argc, char *argv[])
char fslabel[BTRFS_LABEL_SIZE];
u64 features;
- if (btrfs_features_allowed_by_sysfs(&features))
+ if (btrfs_features_allowed_by_sysfs(&features)) {
+ fprintf(stderr,
+ "Warning: Failed/Unsupported to obtain feature list from sysfs\n");
+
features = btrfs_features_allowed_by_kernel();
+ if (!features)
+ fprintf(stderr,
+ "Warning: Failed/Unsupported to get running kernel version\n");
+ }
if (features)
features &= BTRFS_MKFS_DEFAULT_FEATURES;
else
features = BTRFS_MKFS_DEFAULT_FEATURES;
+
while(1) {
enum { GETOPT_VAL_NO_PROGRESS = 256 };
static const struct option long_options[] = {
@@ -1367,8 +1367,14 @@ int main(int ac, char **av)
* fails then default to the progs default, which is set as per
* BTRFS_MKFS_DEFAULT_FEATURES
*/
- if (btrfs_features_allowed_by_sysfs(&features))
+ if (btrfs_features_allowed_by_sysfs(&features)) {
+ fprintf(stderr,
+ "Warning: Failed/Unsupported to obtain feature list from sysfs\n");
features = btrfs_features_allowed_by_kernel();
+ if (!features)
+ fprintf(stderr,
+ "Warning: Failed/Unsupported to get running kernel version\n");
+ }
if (features)
features &= BTRFS_MKFS_DEFAULT_FEATURES;
Signed-off-by: Anand Jain <anand.jain@oracle.com> --- btrfs-convert.c | 10 +++++++++- mkfs.c | 8 +++++++- 2 files changed, 16 insertions(+), 2 deletions(-)