g2p / bedup

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

IOError: [Errno 21] Is a directory: '<fdopen>' #19

Closed kakra closed 11 years ago

kakra commented 11 years ago

After pulling your fixes for #18 I now get this backtrace and it still cannot finish...

Deduplicating filesystem <system>
01.16 Size group 9/205 sampled 19 hashed 4 freed 0
Traceback (most recent call last):
  File "bin/bedup", line 9, in <module>
    load_entry_point('bedup==0.0.8', 'console_scripts', 'bedup')()
  File "/home/kakra/.local/lib64/python2.7/site-packages/bedup-0.0.8-py2.7-linux-x86_64.egg/bedup/__main__.py", line 483, in script_main
    sys.exit(main(sys.argv))
  File "/home/kakra/.local/lib64/python2.7/site-packages/bedup-0.0.8-py2.7-linux-x86_64.egg/bedup/__main__.py", line 472, in main
    return args.action(args)
  File "/home/kakra/.local/lib64/python2.7/site-packages/bedup-0.0.8-py2.7-linux-x86_64.egg/bedup/__main__.py", line 198, in vol_cmd
    dedup_tracked(sess, volset, tt, defrag=args.defrag)
  File "/home/kakra/.local/lib64/python2.7/site-packages/bedup-0.0.8-py2.7-linux-x86_64.egg/bedup/tracking.py", line 381, in dedup_tracked
    dedup_tracked1(sess, tt, ofile_reserved, query, fs, defrag)
  File "/home/kakra/.local/lib64/python2.7/site-packages/bedup-0.0.8-py2.7-linux-x86_64.egg/bedup/tracking.py", line 439, in dedup_tracked1
    with open_by_inode(inode, sess, query) as rfile:
  File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/home/kakra/.local/lib64/python2.7/site-packages/bedup-0.0.8-py2.7-linux-x86_64.egg/bedup/tracking.py", line 402, in open_by_inode
    rfile = fopenat(inode.vol.live.fd, pathb)
  File "/home/kakra/.local/lib64/python2.7/site-packages/bedup-0.0.8-py2.7-linux-x86_64.egg/bedup/platform/openat.py", line 49, in fopenat
    return os.fdopen(openat(base_fd, path, os.O_RDONLY), 'rb')
IOError: [Errno 21] Is a directory: '<fdopen>'
g2p commented 11 years ago

Try this last commit. There's more inode churn on your end, possibly because you use inode_cache.

kakra commented 11 years ago

Indeed, I'm using inode_cache... I will try your commit later. Thanks for investigating.

kakra commented 11 years ago

With the commit applied, it finished the process this time. Thanks.