From: Stefan Fritsch <sf@sfritsch.de>
To: grub-devel@gnu.org
Subject: gzio/http problem (was: [PATCH] Rewrite and fix grub_bufio_read())
Date: Thu, 28 Apr 2016 23:30:11 +0200 [thread overview]
Message-ID: <16066843.M6gESN7E00@k> (raw)
In-Reply-To: <alpine.DEB.2.11.1604282129550.23497@eru.sfritsch.de>
On Thursday 28 April 2016 21:52:27, Stefan Fritsch wrote:
> You are right, I was misreading the second part of the code with
> the direct read. Now I wonder why the patch helped with our
> problem. I will do some more debugging.
The real problem seems to be that http sometimes (depending on network
timing?) returns short reads but gzio does not check how many bytes
have actually been read. The looping in my patch for grub_bufio_read()
fixed this by never returning a short read.
I guess two things should be fixed: gzio should check the return value
of grub_file_read(), and (assuming that other code depends on there
not being short reads, too) http should be fixed. Or maybe
grub_file_read() should get a loop that ensures that there are no
short reads?
next prev parent reply other threads:[~2016-04-28 21:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-28 11:11 [PATCH] Rewrite and fix grub_bufio_read() Stefan Fritsch
2016-04-28 17:49 ` Andrei Borzenkov
2016-04-28 19:52 ` Stefan Fritsch
2016-04-28 21:30 ` Stefan Fritsch [this message]
2016-04-28 21:54 ` gzio/http problem (was: [PATCH] Rewrite and fix grub_bufio_read()) Vladimir 'phcoder' Serbinenko
2016-04-29 4:08 ` gzio/http problem Andrei Borzenkov
2016-04-29 21:00 ` Stefan Fritsch
2016-04-30 6:21 ` Andrei Borzenkov
2016-04-29 3:50 ` [PATCH] Rewrite and fix grub_bufio_read() Andrei Borzenkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16066843.M6gESN7E00@k \
--to=sf@sfritsch.de \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).