[Qemu-devel] [PATCH v4 0/3] Break down the MTP write operation

Bandan Das posted 3 patches 5 years, 2 months ago
Test checkpatch passed
Test docker-mingw@fedora passed
Test asan passed
Test docker-clang@ubuntu passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190129131908.27924-1-bsd@redhat.com
Maintainers: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/dev-mtp.c | 167 +++++++++++++++++++++++++++++------------------
1 file changed, 103 insertions(+), 64 deletions(-)
[Qemu-devel] [PATCH v4 0/3] Break down the MTP write operation
Posted by Bandan Das 5 years, 2 months ago
v4:
  Used KiB for MTP_WRITE_BUF_SZ (1/3)
  Add back the Suggested-by tag (3/3)
v3:
  Added patch 3/3
v2:
  Rebased on top of master and retested

For larger files, not only do we keep reallocating to increase the mtp buffer
size, the write also happens in one go. This does two things:

Write to file upto a certain data size we have received so far and second,
reuse the buffer again instead of reallocating to a larger buffer size.

Tested with different file sizes on a Linux guest.

Bandan Das (3):
  usb-mtp: Reallocate buffer in multiples of MTP_WRITE_BUF_SZ
  usb-mtp: breakup MTP write into smaller chunks
  usb-mtp: replace the homebrew write with qemu_write_full

 hw/usb/dev-mtp.c | 167 +++++++++++++++++++++++++++++------------------
 1 file changed, 103 insertions(+), 64 deletions(-)

-- 
2.19.2