[Qemu-devel] [PATCH v3 00/10] nbd refactoring part 2

Vladimir Sementsov-Ogievskiy posted 10 patches 6 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170707152918.23086-1-vsementsov@virtuozzo.com
Test FreeBSD passed
Test checkpatch passed
Test docker passed
Test s390x passed
Makefile.objs      |   1 +
nbd/client.c       |  82 +++++------
nbd/common.c       |   4 +-
nbd/nbd-internal.h |  19 ---
nbd/server.c       | 398 +++++++++++++++++++++++++++++------------------------
nbd/trace-events   |  58 ++++++++
6 files changed, 312 insertions(+), 250 deletions(-)
create mode 100644 nbd/trace-events
[Qemu-devel] [PATCH v3 00/10] nbd refactoring part 2
Posted by Vladimir Sementsov-Ogievskiy 6 years, 10 months ago
This is last part of "nbd errors and traces refactoring".

Patches 01-10 from "nbd errors and traces refactoring" are already merged.
Patches 11-13 from it are rejected - do not regret them.
So, these series is update of 14-19 patches from "nbd errors and traces
refactoring"

v3:
01: reword commit message
    add Eric's r-b
    s/legal/value/
02: new patch (proposed by Eric)
03: rebased on 02
04,05: add Eric's r-b
06: do not remove extra empty line
    do not add additional var nbd_magic (reuse existent magic)
    use ldq_be_p to reduce memory copying
07,08: new patches
09: new patch, split out 'behavior changing' part of 09, apply most of 
    comments by Eric and Max, some other changes
10: rebased on 08, now more 'mechanical', may be some changes in text 
    messages of traces are left here.


v2:
01: EPIPE not handled
    imporve comments
02: rebased on absence of old patch 13, errors are not saved into
    separate ret variable
    TRACE on fail of sending NBD_REP_ACK reply to NBD_OPT_ABORT
    instead of error propagating and EPIPE handling
03: fix error_prepend
04: just remove this TRACE
05: just trace nbd magic as 64bit number
06: improve commit message
    simplify trace_nbd_receive_negotiate_server_flags - do not trace
    separate flags
    add trace_nbd_opt_abort_reply_failed
    remove tail periods from traces


Vladimir Sementsov-Ogievskiy (10):
  nbd/server: nbd_negotiate: return 1 on NBD_OPT_ABORT
  nbd/server: refactor nbd_negotiate
  nbd/server: use errp instead of LOG
  nbd/server: add errp to nbd_send_reply()
  nbd/common: nbd_tls_handshake: remove extra TRACE
  nbd/client: refactor TRACE of NBD_MAGIC
  nbd/server: fix TRACE in nbd_negotiate_send_rep_len
  nbd/server: rename clientflags var in nbd_negotiate_options
  nbd: refactor tracing
  nbd: use generic trace subsystem instead of TRACE macro

 Makefile.objs      |   1 +
 nbd/client.c       |  82 +++++------
 nbd/common.c       |   4 +-
 nbd/nbd-internal.h |  19 ---
 nbd/server.c       | 398 +++++++++++++++++++++++++++++------------------------
 nbd/trace-events   |  58 ++++++++
 6 files changed, 312 insertions(+), 250 deletions(-)
 create mode 100644 nbd/trace-events

-- 
2.11.1


Re: [Qemu-devel] [PATCH v3 00/10] nbd refactoring part 2
Posted by Paolo Bonzini 6 years, 10 months ago

On 07/07/2017 17:29, Vladimir Sementsov-Ogievskiy wrote:
> This is last part of "nbd errors and traces refactoring".
> 
> Patches 01-10 from "nbd errors and traces refactoring" are already merged.
> Patches 11-13 from it are rejected - do not regret them.
> So, these series is update of 14-19 patches from "nbd errors and traces
> refactoring"

Looks good---Eric, want to send a pull request yourself?

Paolo

> v3:
> 01: reword commit message
>     add Eric's r-b
>     s/legal/value/
> 02: new patch (proposed by Eric)
> 03: rebased on 02
> 04,05: add Eric's r-b
> 06: do not remove extra empty line
>     do not add additional var nbd_magic (reuse existent magic)
>     use ldq_be_p to reduce memory copying
> 07,08: new patches
> 09: new patch, split out 'behavior changing' part of 09, apply most of 
>     comments by Eric and Max, some other changes
> 10: rebased on 08, now more 'mechanical', may be some changes in text 
>     messages of traces are left here.
> 
> 
> v2:
> 01: EPIPE not handled
>     imporve comments
> 02: rebased on absence of old patch 13, errors are not saved into
>     separate ret variable
>     TRACE on fail of sending NBD_REP_ACK reply to NBD_OPT_ABORT
>     instead of error propagating and EPIPE handling
> 03: fix error_prepend
> 04: just remove this TRACE
> 05: just trace nbd magic as 64bit number
> 06: improve commit message
>     simplify trace_nbd_receive_negotiate_server_flags - do not trace
>     separate flags
>     add trace_nbd_opt_abort_reply_failed
>     remove tail periods from traces
> 
> 
> Vladimir Sementsov-Ogievskiy (10):
>   nbd/server: nbd_negotiate: return 1 on NBD_OPT_ABORT
>   nbd/server: refactor nbd_negotiate
>   nbd/server: use errp instead of LOG
>   nbd/server: add errp to nbd_send_reply()
>   nbd/common: nbd_tls_handshake: remove extra TRACE
>   nbd/client: refactor TRACE of NBD_MAGIC
>   nbd/server: fix TRACE in nbd_negotiate_send_rep_len
>   nbd/server: rename clientflags var in nbd_negotiate_options
>   nbd: refactor tracing
>   nbd: use generic trace subsystem instead of TRACE macro
> 
>  Makefile.objs      |   1 +
>  nbd/client.c       |  82 +++++------
>  nbd/common.c       |   4 +-
>  nbd/nbd-internal.h |  19 ---
>  nbd/server.c       | 398 +++++++++++++++++++++++++++++------------------------
>  nbd/trace-events   |  58 ++++++++
>  6 files changed, 312 insertions(+), 250 deletions(-)
>  create mode 100644 nbd/trace-events
> 

Re: [Qemu-devel] [PATCH v3 00/10] nbd refactoring part 2
Posted by Eric Blake 6 years, 10 months ago
On 07/07/2017 11:06 AM, Paolo Bonzini wrote:
> 
> 
> On 07/07/2017 17:29, Vladimir Sementsov-Ogievskiy wrote:
>> This is last part of "nbd errors and traces refactoring".
>>
>> Patches 01-10 from "nbd errors and traces refactoring" are already merged.
>> Patches 11-13 from it are rejected - do not regret them.
>> So, these series is update of 14-19 patches from "nbd errors and traces
>> refactoring"
> 
> Looks good---Eric, want to send a pull request yourself?

Aha - I see where this is going.  I'll submit a patch to MAINTAINERS to
propose myself as the new active maintainer of all things NBD, and then
figure out (off-list, with Paolo's help) how to submit this as my first
PULL request.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org