Bug 44080 - Device or resource busy when creating logical partition
Summary: Device or resource busy when creating logical partition
Status: RESOLVED WORKSFORME
Alias: None
Product: udisks
Classification: Unclassified
Component: operations (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-22 14:29 UTC by Marcin Szewczyk
Modified: 2012-09-28 16:20 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Method 1: BLKRRPART instead of BLKPG for extended partitions (2.83 KB, patch)
2011-12-22 14:29 UTC, Marcin Szewczyk
Details | Splinter Review
Method 2: BLKPG_ADD_PARTITION: extended part's size = 1KiB (1.07 KB, patch)
2011-12-22 14:31 UTC, Marcin Szewczyk
Details | Splinter Review

Description Marcin Szewczyk 2011-12-22 14:29:08 UTC
Created attachment 54723 [details] [review]
Method 1: BLKRRPART instead of BLKPG for extended partitions

Package: udisks
Version: 1.0.4-2 (Debian)

When creating a logical partition right after creating the extended one, udisks
(udisks-helper-create-partition) returns with a "Device or resource busy"
error.

Forcing the kernel to reread the partition table right after extended partition
creation or informing the kernel the extended partition is 1KiB long seems to do the trick.

Here is the thread, which led me to the first method:
http://www.fedoraforum.org/forum/showthread.php?t=267085

And here is the source of the second method:
http://ftp.osuosl.org/pub/linux/utils/util-linux/libblkid-docs/libblkid-Partitions-probing.html#blkid-partition-get-size

And a similar bug in Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/gnome-disk-utility/+bug/666038

This bug has been submitted also as:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=652993
Comment 1 Marcin Szewczyk 2011-12-22 14:31:07 UTC
Created attachment 54724 [details] [review]
Method 2: BLKPG_ADD_PARTITION: extended part's size = 1KiB
Comment 2 David Zeuthen (not reading bugmail) 2012-09-28 16:20:49 UTC
Development focus is on udisks 2.0 and I think we do the right thing there otherwise please reopen. Thanks.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.