From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MraLf-0007L1-Ef for qemu-devel@nongnu.org; Sat, 26 Sep 2009 12:42:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MraLZ-0007CB-Mv for qemu-devel@nongnu.org; Sat, 26 Sep 2009 12:42:15 -0400 Received: from [199.232.76.173] (port=47347 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MraLZ-0007C4-Gs for qemu-devel@nongnu.org; Sat, 26 Sep 2009 12:42:09 -0400 Received: from mail-fx0-f214.google.com ([209.85.220.214]:63203) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MraLY-0000Ki-NW for qemu-devel@nongnu.org; Sat, 26 Sep 2009 12:42:09 -0400 Received: by fxm10 with SMTP id 10so2899188fxm.8 for ; Sat, 26 Sep 2009 09:42:06 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1253983134.3374.12.camel@codedot> References: <1253983134.3374.12.camel@codedot> Date: Sat, 26 Sep 2009 19:42:06 +0300 Message-ID: <90edad820909260942w64f183d1wc2ebdc377249c2dd@mail.gmail.com> From: Dmitri Vorobiev Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Problems with USB Mass Storage emulation List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hello, We tried to use an emulated USB Mass Storage device with my QEMU-emulated system (Debian GNU/Linux, MIPS architecture, but the same problem is present also for a similar x86 version). fdisk(1) works fine. However, when formatting is going on or a big file is being copied into the USB-MS partition, some errors occur and the system starts working extremely slowly. There's an example of such a session below. Can someone please help us out with the emulated USB pendrive? Thanks, Dmitri [Creating an image of one gigabyte:] alexo@codedot:~/Projects/uniweb$ qemu-img create flash.raw 1G Formatting 'flash.raw', fmt=3Draw, size=3D1048576 kB [Connecting it as a USB Mass Storage device:] (qemu) usb_add disk:format=3Draw:flash.raw [Partitioning the device and trying to format it:] uniweb:~# fdisk /dev/sda Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x2be81509. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(ri= te) Command (m for help): p Disk /dev/sda: 1073 MB, 1073741824 bytes 34 heads, 61 sectors/track, 1011 cylinders Units =3D cylinders of 2074 * 512 =3D 1061888 bytes Disk identifier: 0x2be81509 =A0 Device Boot =A0 =A0 =A0Start =A0 =A0 =A0 =A0 End =A0 =A0 =A0Blocks =A0 = Id =A0System Command (m for help): n Command action =A0 e =A0 extended =A0 p =A0 primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-1011, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-1011, default 1011): Using default value 1011 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. uniweb:~# mke2fs /dev/sda sda =A0 sda1 uniweb:~# mke2fs /dev/sda1 mke2fs 1.41.3 (12-Oct-2008) Filesystem label=3D OS type: Linux Block size=3D4096 (log=3D2) Fragment size=3D4096 (log=3D2) 65536 inodes, 262094 blocks 13104 blocks (5.00%) reserved for the super user First data block=3D0 Maximum filesystem blocks=3D268435456 8 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: =A0 =A0 =A0 =A032768, 98304, 163840, 229376 Writing inode tables: done Writing superblocks and filesystem accounting information: [After that, in `dmesg':] usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 sd 0:0:0:0: [sda] Unhandled error code sd 0:0:0:0: [sda] Result: hostbyte=3D0x07 driverbyte=3D0x00 sd 0:0:0:0: [sda] CDB: cdb[0]=3D0x2a: 2a 00 00 00 02 55 00 00 80 00 end_request: I/O error, dev sda, sector 597 Buffer I/O error on device sda1, logical block 536 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 537 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 538 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 539 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 540 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 541 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 542 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 543 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 544 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 545 lost page write due to I/O error on sda1 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 sd 0:0:0:0: [sda] Unhandled error code sd 0:0:0:0: [sda] Result: hostbyte=3D0x07 driverbyte=3D0x00 sd 0:0:0:0: [sda] CDB: cdb[0]=3D0x2a: 2a 00 00 00 02 d5 00 00 80 00 end_request: I/O error, dev sda, sector 725 __ratelimit: 118 callbacks suppressed Buffer I/O error on device sda1, logical block 664 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 665 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 666 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 667 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 668 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 669 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 670 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 671 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 672 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 673 lost page write due to I/O error on sda1 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 sd 0:0:0:0: [sda] Unhandled error code sd 0:0:0:0: [sda] Result: hostbyte=3D0x07 driverbyte=3D0x00 sd 0:0:0:0: [sda] CDB: cdb[0]=3D0x2a: 2a 00 00 00 01 c5 00 00 80 00 end_request: I/O error, dev sda, sector 453 __ratelimit: 118 callbacks suppressed Buffer I/O error on device sda1, logical block 392 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 393 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 394 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 395 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 396 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 397 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 398 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 399 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 400 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 401 lost page write due to I/O error on sda1 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 sd 0:0:0:0: [sda] Unhandled error code sd 0:0:0:0: [sda] Result: hostbyte=3D0x07 driverbyte=3D0x00 sd 0:0:0:0: [sda] CDB: cdb[0]=3D0x2a: 2a 00 00 00 02 45 00 00 18 00 end_request: I/O error, dev sda, sector 581 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 sd 0:0:0:0: [sda] Unhandled error code sd 0:0:0:0: [sda] Result: hostbyte=3D0x07 driverbyte=3D0x00 sd 0:0:0:0: [sda] CDB: cdb[0]=3D0x2a: 2a 00 00 00 04 55 00 00 80 00 end_request: I/O error, dev sda, sector 1109 __ratelimit: 142 callbacks suppressed Buffer I/O error on device sda1, logical block 1048 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 1049 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 1050 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 1051 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 1052 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 1053 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 1054 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 1055 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 1056 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 1057 lost page write due to I/O error on sda1 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 sd 0:0:0:0: [sda] Unhandled error code sd 0:0:0:0: [sda] Result: hostbyte=3D0x07 driverbyte=3D0x00 sd 0:0:0:0: [sda] CDB: cdb[0]=3D0x2a: 2a 00 00 10 04 c5 00 00 80 00 end_request: I/O error, dev sda, sector 1049797 __ratelimit: 118 callbacks suppressed Buffer I/O error on device sda1, logical block 1049736 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 1049737 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 1049738 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 1049739 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 1049740 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 1049741 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 1049742 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 1049743 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 1049744 lost page write due to I/O error on sda1 Buffer I/O error on device sda1, logical block 1049745 lost page write due to I/O error on sda1 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 usb 1-2: reset full speed USB device using uhci_hcd and address 2 [Etc. until the formatting is complete (too slowly).]