Question on btrfs filesystem defragment args
Liu Bo created test 284 for xfstests to exercise btrfs defragmentation.
One test sends an argument including "-s -1" meaning "start at negative one"
That's failing today, because parse_size now rejects negative numbers. (that might be something to fix on its own, since length = (u64)-1 might imply the whole file, per kernel comments).
But has "start at -1" ever had an expected meaning? That doesn't make sense to me, but the test does it:
+echo "a single file | start < 0 && 0 < len < file size | off" +_rundefrag 1 2 1
...
+_btrfs_online_defrag()
+{
+ str=""
+ if [ "$2" = "2" ];then
+ str="$str -s -1 -l $((filesize / 2)) "
and expects a silent result:
...
+a single file | default | on +a single file | start < 0 && 0 < len < file size | off +a single file | start > file size && 0 < len < file size | off
...
What was this test intended to do when it was written?
Thanks,
-Eric