#2639 closed bug (fixed)
unable to mount ext3 partition with usb_disk
Reported by: | emitrax | Owned by: | axeld |
---|---|---|---|
Priority: | high | Milestone: | R1/alpha1 |
Component: | System/Kernel | Version: | R1/pre-alpha1 |
Keywords: | Cc: | greg.gd@… | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
Here is what I get when I try to mount my usb stick.
usb_disk: unhandled ioctl 22 usb_disk: unhandled ioctl 23 usb_disk: unhandled ioctl 13 usb_disk: unhandled ioctl 22 usb_disk: unhandled ioctl 23 file_cache: read pages failed: Is a directory
Attachments (3)
Change History (16)
follow-up: 2 comment:1 by , 16 years ago
comment:2 by , 16 years ago
Replying to mmlr:
Any more details on that? What kind of device is it? Did it work previously? What filesystem do you try to mount?
I can turn debug output on if there is one. It definitely used to work. It's an ext3 partition and it is detected during scanning. It's a normal usb stick.
I guess the ioctl's are for the device icons which are not implemented in usb_disk, they shouldn't be fatal at all though. Some days ago it was reported to me by aldeck on IRC that mounting did work, but the filesystem was empty after that. That's a regression with FAT it seems though and not related to usb_disk, as the device can be accessed correctly still.
About the ioctls I thought that too, but I thought they could be the cause.
When I mount it from the tracker, no icons appear on the desktop, but an "unnamed volume" entry is added to the root directory. Although an ls of it result in "Is a directory" error.
comment:3 by , 16 years ago
usb_disk: open(disk/usb/0/0/raw) usb_disk: opening raw device disk/usb/0/0/raw for disk/usb/0/0/raw usb_disk: unhandled ioctl 22 usb_disk: unhandled ioctl 23 usb_disk: close() usb_disk: free() usb_disk: open(disk/usb/0/0/raw) usb_disk: opening raw device disk/usb/0/0/raw for disk/usb/0/0/raw usb_disk: unhandled ioctl 13 usb_disk: close() usb_disk: free() usb_disk: open(disk/usb/0/0/raw) usb_disk: opening raw device disk/usb/0/0/raw for disk/usb/0/0/raw usb_disk: unhandled ioctl 22 usb_disk: unhandled ioctl 23 usb_disk: close() usb_disk: free() usb_disk: B_GET_MEDIA_STATUS: 0x00000000 usb_disk: B_GET_MEDIA_STATUS: 0x00000000 usb_disk: open(disk/usb/0/0/0) usb_disk: opening raw device disk/usb/0/0/raw for disk/usb/0/0/0 usb_disk: read(32768, 1024) usb_disk: read successful with 1024 bytes usb_disk: B_GET_GEOMETRY: 3963904 sectors at 512 bytes per sector usb_disk: read(35840, 4096) usb_disk: read successful with 4096 bytes usb_disk: read(539648, 4096) usb_disk: read successful with 4096 bytes file_cache: read pages failed: Is a directory file_cache: read pages failed: Is a directory usb_disk: B_GET_MEDIA_STATUS: 0x00000000 Last message repeated 4 times.
follow-up: 5 comment:4 by , 16 years ago
So it looks like it's not a usb_disk problem. Reads seem to work fine from a device standpoint of view. You can verify that by using DiskProbe to directly read from the device. If that works, it must be some upper layer that fails, as usb_disk solely provides the raw I/O.
You should try to find the exact location where this "Is a directory" comes from by tracking it from where the file cache output is generated.
comment:5 by , 16 years ago
Replying to mmlr:
So it looks like it's not a usb_disk problem. Reads seem to work fine from a device standpoint of view. You can verify that by using DiskProbe to directly read from the device. If that works, it must be some upper layer that fails, as usb_disk solely provides the raw I/O.
Yep, disk probes works.
You should try to find the exact location where this "Is a directory" comes from by tracking it from where the file cache output is generated.
I'll try that. Thanks.
comment:6 by , 16 years ago
Yep, have had problems with a FAT usb disk since a few (~hundreds) revisions. The disk was mountable, but the content was empty, after unmounting i couldn't mount it again.
It has even regressed a little more since a few revisions, now clicking on the disk icon makes it disapear and unmount immediately. After that the disk isn't available for mounting. See the attached serial log.
by , 16 years ago
Attachment: | haiku_usbdisk_bug.txt added |
---|
Serial log of a mount + click to see the content
comment:7 by , 16 years ago
Component: | - General → File Systems/ext2 |
---|---|
Summary: | [usb_disk]: unable to mount → unable to mount ext3 partition with usb_disk |
Actually, it does mount another stick with a fat partition. The one that does not mount has an ext3 partition, which, IIRC, did mount previously.
comment:8 by , 16 years ago
My Fat stick does mount, but appears empty. Same ioctl output in syslog. Latest revision.
comment:10 by , 16 years ago
Component: | File Systems/ext2 → System/Kernel |
---|---|
Milestone: | R1 → R1/alpha1 |
Priority: | normal → high |
comment:11 by , 16 years ago
I've still got the problem with my fat usb disk (can't try ext3 right now). I guess it's a different bug then? I've got the same syslog as in my previous comment. Note for mmlr: Diskprobe shows only like 60 bytes of repetitive pattern and the rest is filled with zeroes. I can't access further blocks.
comment:12 by , 16 years ago
Should probably be moved to another ticket, but here is a quick update, as Axel asked:
It's a bit old in my memory now, but it seems it has evolved a bit. I can go to kdl quite easily just trying to mount and browse FAT usb disks ('read only' works apparently). I retried with my own build, build factory, several real hardware and vmwares, several sticks. I remember tryin freshly formated sticks too, but didn't have time to retry right now.
See the two atached syslogs, the first didn't kdl but did show the behaviour described in comment 6. The second went to kdl (easily reproducible).
A sure thing is that it worked like a charm :) on all my test machines and vm's with hrev26655 (i tested that one for a week and used usbdisks a lot).
by , 16 years ago
Attachment: | haiku-serial-port.txt added |
---|
by , 16 years ago
Attachment: | haiku-serial-port2.txt added |
---|
comment:13 by , 16 years ago
Cc: | added |
---|
Any more details on that? What kind of device is it? Did it work previously? What filesystem do you try to mount?
I guess the ioctl's are for the device icons which are not implemented in usb_disk, they shouldn't be fatal at all though. Some days ago it was reported to me by aldeck on IRC that mounting did work, but the filesystem was empty after that. That's a regression with FAT it seems though and not related to usb_disk, as the device can be accessed correctly still.