I found this test case fails on older kernels such as 5.4.17 as the patches that brought the mount options changes aren't the candidate for the backport because of ABI compliance. So make this test case to check if the newer options such as [1] are supported and tests the mount options along with the expected output in /proc/self/mounts accordingly. [1] mount options changes: new old discard=sync discard rescue=nologreplay nologreplay /proc/self/mounts output changes: new old "" clear_cache Patch 1 improves the debug log provided by the _fail() for the scratch_mount. Patch 2,3,4 fixes discard, nologreplay and clear_cache, respectively and, they are separated into the individual patch to show the diff. These may merge at the time of integration. I am ok. This patchset is on top of Boris's patch [2] [2] [PATCH] btrfs/220: fix clear_cache and inode_cache option tests https://patchwork.kernel.org/project/fstests/patch/409e4c73fefce666d151b043d6b2a0d821f8ef85.1610485406.git.boris@xxxxxx/ Anand Jain (4): rc: debug add _scratch_mount_options to the _scratch_mount btrfs/220: discard=sync support older kernel btrfs/220: nologreplay support older kernel btrfs/220: clear_cache fix for older kernel common/rc | 2 +- tests/btrfs/220 | 59 +++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 48 insertions(+), 13 deletions(-) -- 2.27.0