Skip to contentSkip to conversation

254: avoid output mismatch due to space cache

PATCH New Li Zefan 1 participant 1 message Nov 22, 2011 Btrfs file system

lore
Share & tools
lore

Li Zefan

author
#0 lore raw

PATCH v2 1/1 254: avoid output mismatch due to space cache

This reverts commit a0c92a5871082c0aa6a7caae496e67a6e57bb0b6 (disable space cache), as option nospace_cache was newly introduced in linux-3.2, so we'll fail to mount btrfs in older kernels.

As an alternative fix, we just list subvolme names, don't assume what ID numbers those subvolumes will have.

---
 254     |    4 ++--
 254.out |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
254 +2 -2
index 1cd4832..7b74a02 100755
@@ -48,7 +48,7 @@ _supported_os Linux
 _require_scratch
 
 _scratch_mkfs > /dev/null 2>&1
-_scratch_mount -o nospace_cache
+_scratch_mount
 
 # First test basic snapshotting
 echo "Creating file foo in root dir"
@@ -95,7 +95,7 @@ ls $SCRATCH_MNT
 
 # Test listing the subvolumes
 echo "Listing subvolumes"
-btrfs subvolume list $SCRATCH_MNT | _filter_scratch
+btrfs subvolume list $SCRATCH_MNT | awk '{ print $NF }'
 
 # Delete the snapshot
 btrfs subvolume delete $SCRATCH_MNT/snap | _filter_scratch
254.out +2 -2
index 582357a..d4b5346 100644
@@ -31,8 +31,8 @@ List root dir
 snap
 subvol
 Listing subvolumes
-ID 256 top level 5 path snap
-ID 257 top level 5 path subvol
+snap
+subvol
 Delete subvolume 'SCRATCH_MNT/snap'
 List root dir
 subvol
Signature · 6 lines
1.7.3.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs