Opened 11 months ago

#3300 new bug

Move Download Folder triggers recheck even if the new folder is the same as the old one

Reported by: hfuss Owned by:
Priority: minor Milestone: needs verified
Component: Core Version: 2.0.3
Keywords: Cc:

Description

I'm not sure if the recheck on move download folder is intentional, but I can kind of understand why it may be desirable since move operations typically complete when they're committed to filesystem cache, not disk. If that's the intention though, writes may still not be committed to disk for the reads related to the recheck.

I haven't actually looked at the deluge code for this, but am assuming it's using os.rename?

  • If the location is the same, do nothing (deluge 1.3 behavior)
  • If the files aren't actually moving (same physical device), don't run recheck. This is just a couple of inode updates, so should be pretty safe. (deluge 1.3 behavior)
  • When moving to a new location, unless there's a Python function that already does this, you may want to do the move yourself so that you can fsync. In that case, the recheck should not be necessary. Opening the fd after the move and running fsync may also work, but I'm not sure (it may only try to flush the writes you've done since opening the descriptor rather than all dirty blocks for the file)

Change History (0)

Note: See TracTickets for help on using tickets.