Opened 14 years ago

Last modified 4 years ago

#7014 assigned bug

usb_disk: invalid empty space size when creating MBR on new usb drive (120GB)

Reported by: kallisti5 Owned by: nobody
Priority: normal Milestone: R1
Component: System/Kernel Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

creating a new Intel partition map over a root file system with BFS results in a "unhandled ioctl 10102" and invalid data in DriveSetup.

see screenshots for examples and attached syslog

Attachments (3)

screenshot1.png (13.5 KB ) - added by kallisti5 14 years ago.
drive before Intel Partition Map
screenshot2.png (33.3 KB ) - added by kallisti5 14 years ago.
driver after Intel partition map
syslog-usbhd.txt (3.9 KB ) - added by kallisti5 14 years ago.
syslog

Download all attachments as: .zip

Change History (8)

comment:1 by anevilyak, 14 years ago

Component: Drivers/DiskDrivers/USB
Owner: changed from marcusoverhagen to mmlr
Version: R1/alpha2R1/Development

by kallisti5, 14 years ago

Attachment: screenshot1.png added

drive before Intel Partition Map

by kallisti5, 14 years ago

Attachment: screenshot2.png added

driver after Intel partition map

comment:2 by kallisti5, 14 years ago

this failure situation can be reproduced by (sdd is your usb drive)

on a linux system...

sudo dd if=haiku-nightly.image of=/dev/sdd

Then trying to make an Intel partition map on the drive as per the screenshots above

by kallisti5, 14 years ago

Attachment: syslog-usbhd.txt added

syslog

comment:3 by kallisti5, 14 years ago

this might be due to the TODO at haiku/src/add-ons/kernel/partitioning_systems/intel/write_support.cpp:987

// TODO: The partition is not supposed to be locked here!

Maybe as it is the raw device is a BFS partition it is locked? The code that writes the actual MBR section is pretty straight forward and doesn't care what in in the first 512 bytes of the drive.

comment:4 by mmlr, 14 years ago

Component: Drivers/USBSystem/Kernel
Owner: changed from mmlr to nobody
Status: newassigned

The ioctl translates to B_RAW_DEVICE_COMMAND and most probably has nothing to do with the event at hand. It is usually triggered by the TOC reading done by the cdda fs. The problem should happen regardless if you do that on a USB device nor not. As you already suggested it might be a locking problem or another disk device manger problem.

comment:5 by pulkomandy, 4 years ago

Summary: usb_disk: unhandled ioctl 10102 when creating MBR on new usb drive (120GB)usb_disk: invalid empty space size when creating MBR on new usb drive (120GB)
Note: See TracTickets for help on using tickets.