mbox series

[v3,0/3] Break down the MTP write operation

Message ID 20190128142410.11584-1-bsd@redhat.com
Headers show
Series Break down the MTP write operation | expand

Message

Bandan Das Jan. 28, 2019, 2:24 p.m. UTC
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 | 166 +++++++++++++++++++++++++++++------------------
 1 file changed, 102 insertions(+), 64 deletions(-)