[patch] allow seeking in linear files

Jindrich Makovicka makovick at kmlinux.fjfi.cvut.cz
Tue Jan 24 12:58:16 UTC 2006


On 1/23/06, Pavel Tsekov <ptsekov at gmx.net> wrote:
> Hello Jindrich,
>
> I see you have submitted this patch several time by now - the first one
> appears to be from May 2003. Hopefully it will get into CVS this time...
>
> So now to the patch - first I'd like to comment the last hunk of your patch:
>
> > -                 n_read_total, ctx->progress_bytes);
> > +                 n_read_total + ctx->do_reget, ctx->progress_bytes);
>
> > -                 file_progress_show (ctx, n_read_total, file_size);
> > +                 file_progress_show (ctx, n_read_total + ctx->do_reget,
> > file_size);
>
> I think it would be better if you substract 'ctx->do_reget' from the last
> argument (the total) instead of adding it to the second argument (the number
> of bytes read so far).  This way the user won't see the progress bar
> semi-filled right after the start of the copy operation . What do you think
> ?

I chose this variant intentionally, as it is common eg. in the
download managers - the user can immediately see that the download
operation actually resumes, and it does not start from the very
beginning.

> I also reviewed the first part of the patch and it seems ok but I need some
> more time to understand if it does the "right thing" O_LINEAR-wise. I'll try
> to comment ASAP.

Thanks.

--
Jindrich Makovicka



More information about the mc-devel mailing list