On Mon, Sep 13, 2021 at 05:07:12PM +0200, Kevin Wolf wrote:
> > > if (ret < 0) {
> > > -error_prepend(&local_err, "Failed to send reply: ");
> > > +if (errno != EPIPE) {
> > > +error_prepend(&local_err, "Failed to send reply: ");
> > > +} else {
> > > +
Am 23.07.2021 um 17:49 hat Eric Blake geschrieben:
> On Thu, Jul 22, 2021 at 11:45:52AM +0100, Richard W.M. Jones wrote:
> > $ rm -f /tmp/sock /tmp/pid
> > $ qemu-img create -f qcow2 /tmp/disk.qcow2 1M
> > $ qemu-nbd -t --format=qcow2 --socket=/tmp/sock --pid-file=/tmp/pid
> > /tmp/disk.qcow2 &
>
On Thu, Jul 22, 2021 at 11:45:52AM +0100, Richard W.M. Jones wrote:
> $ rm -f /tmp/sock /tmp/pid
> $ qemu-img create -f qcow2 /tmp/disk.qcow2 1M
> $ qemu-nbd -t --format=qcow2 --socket=/tmp/sock --pid-file=/tmp/pid
> /tmp/disk.qcow2 &
> $ nbdsh -u 'nbd+unix:///?socket=/tmp/sock' -c 'h.get_size()'
$ rm -f /tmp/sock /tmp/pid
$ qemu-img create -f qcow2 /tmp/disk.qcow2 1M
$ qemu-nbd -t --format=qcow2 --socket=/tmp/sock --pid-file=/tmp/pid
/tmp/disk.qcow2 &
$ nbdsh -u 'nbd+unix:///?socket=/tmp/sock' -c 'h.get_size()'
qemu-nbd: Disconnect client, due to: Failed to send reply: Unable to write to
This simple patch suppresses a warning message from qemu-nbd when a
client abruptly disconnects. There is a way to work around this in
the client (by shutting down the connection properly). Nevertheless
the "Broken pipe" error seems unnecessary to me as it does not convey
any useful information a