Skip to content

usb-mtp events support

Bandan Das qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 2 repliesIn review
  2. v34 patches 4 repliesSuperseded
  3. v24 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches14 repliesSuperseded

Changes in v4 from the cover letter

1/4:
Rearrange freeing of objects to avoid use after free
3/4:
Rearrange ifdefs to emit messages only on linux systems and some additional cleanups
No need to use QLIST_FOREACH_SAFE when getting object handles because device emulation is single threaded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4usb-mtp: use a list for keeping track of childrenhw/usb/dev-mtp.c trace-events+41 -160 replies
2/4usb-mtp: free objects on a mtp resethw/usb/dev-mtp.c+1 -00 replies
3/4usb-mtp: Add support for inotify based file monitoringhw/usb/dev-mtp.c trace-events+230 -00 replies
4/4usb-mtp: add support for basic mtp eventshw/usb/dev-mtp.c+27 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [Qemu-devel] [PATCH v4 0/4] usb-mtp events support

This series adds support for mtp events that are piggybacked on top of the Linux provided inotify mechanism. It performs well with some light unit testing in a linux guest. The mtp share is still read only, but now the guest will notice updates to the share as long as the mtp client being used supports it.

v4:
1/4:
Rearrange freeing of objects to avoid use after free
3/4:
Rearrange ifdefs to emit messages only on linux systems and some additional cleanups
No need to use QLIST_FOREACH_SAFE when getting object handles because device emulation is single threaded
v3:
3/4:
Add watch on a dir only when guest requests its contents instead of when the dir is created
Removed some unused trace functions
v2:
1/4: Split up the check in usb_mtp_handle_reset into a new patch
Rerrange the check for a null "o"
2/4:
New patch that handles freeing of objects during a reset
3/4:
Reword comment for DELETE event
Reword comment for CREATE event for directories
Rearrange the inotifyfd reading loop for readability
Check for duplicates when creating a new object
Remove unnecessary enum and replace with mtp event codes Add ifdefs and empty stubs for non linux systems. Ugly but I really wanted to minimize ifdef clutter. The other option is to compile mtp support for linux only but that seems a bit restrictive. Change behavior for "failed events" Instead of bailing out immediately, check if there's still some left that we can process.
4/4: No change

Bandan Das (4):
usb-mtp: use a list for keeping track of children
usb-mtp: free objects on a mtp reset
usb-mtp: Add support for inotify based file monitoring
usb-mtp: add support for basic mtp events

 hw/usb/dev-mtp.c | 308 +++++++++++++++++++++++++++++++++++++++++++++++++++----
 trace-events     |   2 +
 2 files changed, 292 insertions(+), 18 deletions(-)
Signature · 1 line
2.5.0