g2p / bedup

Btrfs deduplication
http://pypi.python.org/pypi/bedup
GNU General Public License v2.0
322 stars 50 forks source link

OSError: [Errno 5] Input/output error while deduplicating #30

Closed mgorny closed 9 years ago

mgorny commented 11 years ago
$ bedup dedup --size-cutoff 1 --defrag
Not scanning <pomiot>, generation is still 19607
Scanning volume / generations from 105344 to 105352, with size cutoff 1
00.11 Scanned 1249 retained 3
Deduplicating filesystem <pomiot>
54.31 Size group 153/604 (452) sampled 13371 hashed 27 freed 0
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.3/bedup", line 9, in <module>
    load_entry_point('bedup==0.9.0', 'console_scripts', 'bedup')()
  File "/usr/lib64/python3.3/site-packages/bedup/__main__.py", line 487, in script_main
    sys.exit(main(sys.argv))
  File "/usr/lib64/python3.3/site-packages/bedup/__main__.py", line 476, in main
    return args.action(args)
  File "/usr/lib64/python3.3/site-packages/bedup/__main__.py", line 195, in vol_cmd
    dedup_tracked(sess, volset, tt, defrag=args.defrag)
  File "/usr/lib64/python3.3/site-packages/bedup/tracking.py", line 406, in dedup_tracked
    dedup_tracked1(ds, comm1)
  File "/usr/lib64/python3.3/site-packages/bedup/tracking.py", line 478, in dedup_tracked1
    by_mh[mini_hash_from_file(inode, rfile)].append(inode)
  File "/usr/lib64/python3.3/site-packages/bedup/hashing.py", line 30, in mini_hash_from_file
    return adler32(rfile.read(4096)) & 0xffffffff
OSError: [Errno 5] Input/output error

I think it would be better if bedup tried a little better not to let the exceptions pass like this and instead at least listed the failing inode.