XFS discards more data than it writes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I find that, with '-o discard', XFS sometimes discards more data than it
writes. This may slow down XFS more on slow-discard SSDs. Also, could
problematic discard implementation lead to data loss?

Setup to reproduce: 
- Linux 4.5.4
- Workload: LevelDB

$ mkfs.xfs  -K -f -s size=4096 -b size=4096 /dev/sdc1
$ mount -o discard /dev/sdc1 /mnt/fsonloop
$ leveldb/db_bench --benchmarks=overwrite --num=3000000 --db=/mnt/fsonloop/leveldb_data0 --threads=1 --use_existing_db=0

I found that XFS discarded ~2.4GB while only wrote ~1.4GB,
by blktrace. (This is not due to the mkfs discarding the
whole disk.)

Some visual https://github.com/junhe/xfs-bug-report/blob/master/xfs-double-discard.png 
Some spaces are discarded twice in this case.

Is it a bug?

Thanks,
Jun


_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux