mbox series

[0/2] Break down the MTP write operation

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

Message

Bandan Das Nov. 15, 2018, 10:01 p.m. UTC
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 (2):
  usb-mtp: Reallocate buffer in multiples of MTP_WRITE_BUF_SZ
  usb-mtp: breakup MTP write into smaller chunks

 hw/usb/dev-mtp.c | 153 +++++++++++++++++++++++++++++++++++--------------------
 1 file changed, 99 insertions(+), 54 deletions(-)

Comments

Gerd Hoffmann Jan. 8, 2019, 11:59 a.m. UTC | #1
Hi,

> 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.

Doesn't apply to master, please rebase.

thanks,
  Gerd