Page 1 of 1

Files locked while seeding

Posted: Sun Feb 24, 2013 12:02 pm
by jkaberg
Im unable to move/rename files locked by deluge(/libtorrent?), main reason I want to do this is im processing hardlinked files (linked to the seeded ones) on a different location thuss not alterering the "orginal" but a "copy" of it thuss enableing me to both to seed and manage my content using the same diskspace

Is there any possibility to disable this behaviour? Using hardlinkes saves me roughly 50% of used diskspace, so its a big gain

PS: Windows 8

Re: Files locked while seeding

Posted: Tue Mar 05, 2013 3:44 am
by FeMaster
While I have no idea what it is you are trying to accomplish, I have found that if you need to temporarily access the files, you "pause" the seed. The files in question are then no longer locked and can be accessed without removing them from Deluge. Just un-pause them when you are finished, and they will start seeding again.

Not sure if this will help you out or not, but worth a try.

Re: Files locked while seeding

Posted: Sat Jan 14, 2017 10:21 am
by romprod
Ditto, I've just experienced this same issue.

I've hard linked files that I can't rename/move etc because Deluge locks the files. I'm not sure if this is expected behavior with hard linked files and I need to set something in Deluge to not lock files.

Re: Files locked while seeding

Posted: Sun Jan 15, 2017 12:13 am
by arvid
As far as I can tell, windows has at least two ways of "locking" files.

1. When you open a file, you can specify share flags, where you can deny other processes from reading or writing to the file while it's open.
2. explicitly lock a range of a file with FileLockEx().

libtorrent, by default, prevents other processes from writing to files held open by it, i.e. (1). The main reason for this is to prevent corruption. It seems media players are especially keen on updating id3 tags. libtorrent does not use (2).

It sounds like windows stores these flags in the inode, so any link to the same node presumably is subject to the same restrictions, hence the hard links being restricted in unintuitive ways.

You can disable this behavior in libtorrent by setting "lock_files" to false in the settings.

Re: Files locked while seeding

Posted: Sun Jan 15, 2017 12:46 am
by Cas
Thanks Arvid, you will need ltconfig plugin to change that setting, although it does default to off.