diff options
| author | Eric Blake | 2016-10-14 20:33:13 +0200 |
|---|---|---|
| committer | Paolo Bonzini | 2016-11-02 09:28:55 +0100 |
| commit | 75368aab9ba27f762acf5a51062c951a1fb1e006 (patch) | |
| tree | 535aa0683531863d92bac42cd654b298866a574c /scripts/modules/module_block.py | |
| parent | nbd: Let client skip portions of server reply (diff) | |
| download | qemu-75368aab9ba27f762acf5a51062c951a1fb1e006.tar.gz qemu-75368aab9ba27f762acf5a51062c951a1fb1e006.tar.xz qemu-75368aab9ba27f762acf5a51062c951a1fb1e006.zip | |
nbd: Less allocation during NBD_OPT_LIST
Since we know that the maximum name we are willing to accept
is small enough to stack-allocate, rework the iteration over
NBD_OPT_LIST responses to reuse a stack buffer rather than
allocating every time. Furthermore, we don't even have to
allocate if we know the server's length doesn't match what
we are searching for.
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1476469998-28592-12-git-send-email-eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts/modules/module_block.py')
0 files changed, 0 insertions, 0 deletions
