Kaperstone / mogilefs

Automatically exported from code.google.com/p/mogilefs
0 stars 0 forks source link

Device.pm: mb_free() count empty device as missing #43

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. try to upload file into mogilefs with all devices empty.

What is the expected output? What do you see instead?
leads to 'no_devices' error.
(Mogfs error: no_devices No devices found to store file)

What version of the product are you using? On what operating system?
mogilefs-server v2.53

Please provide any additional information below.
---------------------
in MogileFS/Device.pm:
sub mb_free {
    my $self = shift;
    return $self->{mb_total} - $self->{mb_used}
        if $self->{mb_total} && $self->{mb_used}; # $self->{mb_used} could be zero
}

Original issue reported on code.google.com by git.u...@gmail.com on 18 Oct 2011 at 12:19

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the patch! That looks correct to me, and passes tests.

Original comment by dorma...@rydia.net on 29 Oct 2011 at 12:07