libfuse/python-fuse

linux coreutils checksums do not work with the example xmp.py filesystem when multithreaded

ValHayot opened this issue · 1 comments

Hi, I noticed that using coreutils checksumming tools (e.g. sha256sum, cksum, md5sum) produce different results whenever applied to a large file using the xmp.py example without the -s flag

e.g.

> python xmp.py fusedir/ -o root=$PWD/workdir/
> dd if=/dev/urandom of=fusedir/test.out  iflag=fullblock bs=1M  count=1024
   1024+0 records in
   1024+0 records out
   1073741824 bytes (1.1 GB, 1.0 GiB) copied, 14.9743 s, 71.7 MB/s

> sha256sum fusedir/test.out 
   82dfa4d345cb1f5641ff3f2997f36dbf7b4a39b68004fb46de52b774551fd252    fusedir/test.out

> sha256sum fusedir/test.out 
   824d9cdca0ae94b88bc34bcebf6cff448790f186e409ca45f037d817352fd959  fusedir/test.out

> sha256sum fusedir/test.out 
   f43f60248365157de48bbdda686007263bb01c3a39d4162854416a623934288c fusedir/test.out

> sha256sum fusedir/test.out 
   334cc87cc93f3fa5ae0659f5ff4caff59f7e795e8b9cc0c5cdd46041b8210259  fusedir/test.out

when I compute the sha256sum of the file at its actual location, the sha256sum is static. Passing the -s flag to the filesystem appears to solve this issue.

I see this too, but I unfortunately have virtually no time to investigate it at the moment.