This forum has been archived. All content is frozen. Please use KDE Discuss instead.

wrong available disk space count

Tags: None
(comma "," separated)
rommik
Registered Member
Posts
6
Karma
0

wrong available disk space count

Sun Jan 03, 2010 3:27 pm
Hello,

Ktorrent refuses to start any new torrents because it is complaining there is no space available for it.
I'm on freeBSD 7.2 and have seen this with versions 3.3.1 and 3.3.2.

It appears that ktorrent calculates the disk available on the root partition '/', not on the path the file is to be downloaded (my home directory) which may be situated on a different partition where the free space is different (as it is in my case).
I haven't figured out where this '/' path was defined so I would need some help to go farther.

Thank you all for the great piece of software ktorrent is.
George
Moderator
Posts
5421
Karma
1
rommik wrote:Hello,

Ktorrent refuses to start any new torrents because it is complaining there is no space available for it.
I'm on freeBSD 7.2 and have seen this with versions 3.3.1 and 3.3.2.


Are you saving to a partition mounted using gvfs ?
dreinzy
Registered Member
Posts
1
Karma
0
Hi, I'm very much a n00b to ktorrent.
I'm getting the same problem, when I try to download a torrent it tells me I've not enough disk space when I should have about 300Gs. The comp is only a few weeks old, it came with Windows 7 which kept crashing so I put an Ubuntu partition on it, which I use almost solely now.
rommik
Registered Member
Posts
6
Karma
0

Re: wrong available disk space count

Mon Jan 04, 2010 10:13 pm
George wrote:Are you saving to a partition mounted using gvfs ?

No, it's my '/usr' partition which is mounted at boot time. And it's separate from the '/' partition.
George
Moderator
Posts
5421
Karma
1
How much available space is actually shown in the dialog ?
rommik
Registered Member
Posts
6
Karma
0
George wrote:How much available space is actually shown in the dialog ?

The dialog, you mean, when I open a new torrent ?
Yes, the disk space is correct (500 MB).
Sorry, I was not clear enough. The problem is with torrents already in the list, when I try to restart them.
rommik
Registered Member
Posts
6
Karma
0
rommik wrote: The problem is with torrents already in the list, when I try to restart them.

Actually, I can't reproduce the problem with my new torrents. It does work.
George
Moderator
Posts
5421
Karma
1

Re: wrong available disk space count

Sat Jan 09, 2010 11:50 am
Take a look in the log file (~/.kde/share/apps/ktorrent/log) , occasionally you should see something like this:

FreeBytes XX GB
Downloaded YY MB
Remaining ZZ MB


If there is something wrong with the calculation you should get wrong numbers here.
rommik
Registered Member
Posts
6
Karma
0
Here is a sample :
Code: Select all
lun. janv. 11 20:42:57 2010: QM Starting: [Something]
lun. janv. 11 20:42:57 2010: FreeBytes 220.2 MiB
lun. janv. 11 20:42:57 2010: Downloaded 0 B
lun. janv. 11 20:42:57 2010: Remaining 3.7 GiB
lun. janv. 11 20:42:57 2010: QM Starting: [Something else]
lun. janv. 11 20:42:57 2010: FreeBytes 777.5 MiB
lun. janv. 11 20:42:57 2010: Downloaded 0 B
lun. janv. 11 20:42:57 2010: Remaining 158.3 MiB


If I modify the following lines of libbtcore/torrent/torrentcontrol.cpp, it works as expected :
Code: Select all
1517      //calculate free disk space
1518      Uint64 bytes_free = 0;
1519      Out(SYS_GEN|LOG_DEBUG) << "Data dir '" << getDataDir() << "'" << endl;
1520      //if (FreeDiskSpace(getDataDir(),bytes_free))
1521      if (FreeDiskSpace("/usr/home/mik",bytes_free))
1522      {
1523         Out(SYS_GEN|LOG_DEBUG) << "FreeBytesToto " << bytes_free << endl;
1524         Out(SYS_GEN|LOG_DEBUG) << "FreeBytes " << BytesToString(bytes_free) << endl;


And I get the following log (I added some log output at other places) :
Code: Select all
lun. janv. 11 21:05:21 2010: QM Starting: [Something]
lun. janv. 11 21:05:21 2010: Data dir '/'
lun. janv. 11 21:05:21 2010: file /usr/home/mik
lun. janv. 11 21:05:21 2010: FreeBytesToto 714389504
lun. janv. 11 21:05:21 2010: FreeBytes 681.3 MiB
lun. janv. 11 21:05:21 2010: DownloadedToto 0
lun. janv. 11 21:05:21 2010: Downloaded 0 B
lun. janv. 11 21:05:21 2010: RemainingToto 3995955781
lun. janv. 11 21:05:21 2010: Remaining 3.7 GiB
lun. janv. 11 21:05:21 2010: QM Starting: [Something else]
lun. janv. 11 21:05:21 2010: Data dir '/home/mik/'
lun. janv. 11 21:05:21 2010: file /usr/home/mik
lun. janv. 11 21:05:21 2010: FreeBytesToto 714389504
lun. janv. 11 21:05:21 2010: FreeBytes 681.3 MiB
lun. janv. 11 21:05:21 2010: DownloadedToto 96165888
lun. janv. 11 21:05:21 2010: Downloaded 91.7 MiB
lun. janv. 11 21:05:21 2010: RemainingToto 69820812
lun. janv. 11 21:05:21 2010: Remaining 66.6 MiB


And the relevant part of the df command :
Code: Select all
$ df
Filesystem  1K-blocks      Used   Avail Capacity  Mounted on
/dev/ad4s4a    507630    241536  225484    52%    /
/dev/ad4s4f  18641878  16475954  674574    96%    /usr
George
Moderator
Posts
5421
Karma
1
The OUTPUTDIR variable in the stats file of that torrent is wrong.

Right click on a torrent -> open directory -> temporary directory

In that directory you can find the stats file.

The question is how can we get in this situation ? If you open a new torrent is it also wrong ?
rommik
Registered Member
Posts
6
Karma
0
Yes, OUTPUTDIR is set to / in the stats file.

George wrote:If you open a new torrent is it also wrong ?

No, newer torrents are OK.


George wrote:The question is how can we get in this situation ?

I remember I ran out of space at some point.
How does Ktorrent manage in that case (if it's unable to save its internal stuff while quiting) ?
George
Moderator
Posts
5421
Karma
1
I'm not quite sure what would happen in such a situation. It probably depends where exactly it goes wrong when the file is saved.

I'm gonna add some code which recovers the OUTPUTDIR variable if it can't be loaded.


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]