[Sugar-devel] [PATCH Browse] Cancel a download if space is very tight SL #394

Gonzalo Odiard gonzalo at laptop.org
Tue Sep 11 16:03:10 EDT 2012


On Tue, Sep 11, 2012 at 4:23 PM, Manuel Kaufmann <humitos at gmail.com> wrote:

> On Tue, Sep 11, 2012 at 1:37 PM, Martin Langhoff
> <martin.langhoff at gmail.com> wrote:
> >  - check at the start of the download that it'll fit (with X room to
> spare)
>
> This is done in the new version of the patch that I sent.
>
> >  - make damn sure that we handle ENOSPC if the disk does fill up
>
> I think we can create a new ticket for this feature, and manage it in
> a separate patch. In fact, I have some questions about this and I have
> to research for a while. Now, is the datastore raising that exception
> when the space is not enough or I have to implement it? If it's
> already implemented, how I can catch it?
>
>
I don't think should be another ticket, better have a solution looking at
the different issues.




> I did a "git grep ENOSPC" inside the "sugar-datastore" source code and
> I didn't find anything.
>
>
Can you try almost fill the xo and copy a big file with the journal from a
pendrive?
I remember a big message in the screen when this happen, and will point you
to the code.

Another issue to look is:

The browser is downloading the file in a temporary place and later moving
to the journal or
is creating a object in the journal while downloading?
Is important to know if the control in the journal will work or not.


> On Tue, Sep 11, 2012 at 6:34 PM, Hal Murray <hmurray at megapathdsl.net>
> wrote:
> > martin.langhoff at gmail.com said:
> >> Checking in the progress bar... it's optional. Up to you if you want to
> >> check there _as well_.
> >
> > Sometimes, you don't know at the start how big a download will be.
> >
> > In that case, if you want to stop before filling up the disk, you have to
> > check often-enough during the download.  The progress bar sounds like a
> good
> > place.
>
>
"the progress bar" is not a place :)
The code in the browse downloading the data trigger events used to update
the progress bar.
We can use this events, but does not have sense check with every event,
but maybe for 1, 5MB or so.

Gonzalo


> I'm confused here. Are we going to check this in two different places?
> The first one, when the download process is about to start and every
> time that Browse gets a new chunk of the file. In case that we are
> going to implement this approach, Gonzalo suggested me to check it
> every 5Mb downloaded for example instead of every chunk.
>
> Please, fill a new ticket with this approach if we are going to
> implement this feature.
>
> --
> Kaufmann Manuel
> Blog: http://humitos.wordpress.com/
> Porfolio: http://fotos.mkaufmann.com.ar/
> PyAr: http://www.python.com.ar/
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20120911/a68518d8/attachment.html>


More information about the Sugar-devel mailing list