platform/upstream/udisks2.git
14 years agoFirst cut at device-mapper multipath support
David Zeuthen [Fri, 22 Jan 2010 18:29:09 +0000 (13:29 -0500)]
First cut at device-mapper multipath support

14 years agoSpeed up DeviceKit device probing on really slow devices
Linus Torvalds [Tue, 19 Jan 2010 19:41:45 +0000 (11:41 -0800)]
Speed up DeviceKit device probing on really slow devices

My wife has a embroidery machine that acts as a USB memory stick when
plugged into a computer through its USB port. It has a truly stunning read
speed of 15kB/s (yes, really), and it turns out that both udev and
DeviceKit react very badly to devices that are slow, because they read too
much data off it.

udev - through blkid - ended up reading closer to two hundred kB off the
device in order to check all possible filesystems. DeviceKit is much
better, and only does a single 512-byte read to figure out the DOS
partitioning sceme.

However, unluckily, both udev and DeviceKit end up triggering read-ahead
on the device. The kernel decides that if you start reading from the
beginning (and the partition info is at the start), you're likely going to
continue reading. Which is a reasonable assumption in general, but isn't
true for odd things like "read just the partition table".

So even though DeviceKit only does a 512-byte read, read-ahead will turn
it into a 16kB device access, and you get timing behavior like this:

time /lib/udev/devkit-disks-part-id /dev/sdc

real 0m1.043s
user 0m0.004s
sys 0m0.008s

which basically delays figuring out what to do with the newly plugged in
hardware by a second (blkid took 13+ seconds for both the full device and
the partition it contained, so DeviceKit is positively wonderful in
comparison ;).

Making part-id just ask for no read-ahead (by saying that the access
patterns are random) ends up helping performance noticeably. Recompiling
part-id with this patch results in:

time ./src/probers/udisks-part-id /dev/sdc

real 0m0.276s
user 0m0.005s
sys 0m0.007s

because the kernel will now only read 4kB off the disk (4kB is the caching
granularity, so you'll never see an actual 512-byte read without doing
special odd things).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: David Zeuthen <davidz@redhat.com>
14 years agoUse the PV UUID in LinuxLvm2VGRemovePV() to identify the PV
David Zeuthen [Tue, 19 Jan 2010 18:35:57 +0000 (13:35 -0500)]
Use the PV UUID in LinuxLvm2VGRemovePV() to identify the PV

... instead of the object path. This is to make it possible (albeit
not yet supported in vgreduce(8)) to remove a non-existant PV - say,
the disk with the PV was destroyed.

14 years agoAdd methods for adding/removing PVs to a VG
David Zeuthen [Wed, 13 Jan 2010 22:48:17 +0000 (17:48 -0500)]
Add methods for adding/removing PVs to a VG

14 years agoMinor update to LVM2 PV export routines
David Zeuthen [Wed, 13 Jan 2010 20:46:27 +0000 (15:46 -0500)]
Minor update to LVM2 PV export routines

14 years agoAdd a method to create LVM2 Logical Volumes
David Zeuthen [Tue, 12 Jan 2010 21:03:13 +0000 (16:03 -0500)]
Add a method to create LVM2 Logical Volumes

14 years agoAdd method to remove/delete a LVM LV
David Zeuthen [Tue, 12 Jan 2010 15:13:52 +0000 (10:13 -0500)]
Add method to remove/delete a LVM LV

14 years agoAdd methods for setting LVM2 VG and LV names
David Zeuthen [Tue, 12 Jan 2010 12:43:36 +0000 (07:43 -0500)]
Add methods for setting LVM2 VG and LV names

14 years agoGet the LVM LV UUIDs from sysfs to avoid using liblvm2 in the dm prober
David Zeuthen [Tue, 12 Jan 2010 10:56:33 +0000 (05:56 -0500)]
Get the LVM LV UUIDs from sysfs to avoid using liblvm2 in the dm prober

14 years agoFix typo in udev rule for udisks-lvm-pv-export
David Zeuthen [Tue, 12 Jan 2010 10:55:29 +0000 (05:55 -0500)]
Fix typo in udev rule for udisks-lvm-pv-export

This typo made the export program run for each and every block device
- only run it for LVM2 PVs.

14 years agoFirst cut at LVM2 support
David Zeuthen [Mon, 11 Jan 2010 22:57:35 +0000 (17:57 -0500)]
First cut at LVM2 support

14 years agoUse SUBSYSTEMS whenever using ATTRS
David Zeuthen [Thu, 10 Dec 2009 22:07:07 +0000 (17:07 -0500)]
Use SUBSYSTEMS whenever using ATTRS

This speeds up udev rules processing considerably.

Signed-off-by: David Zeuthen <davidz@redhat.com>
14 years agoAdd media type udev rule for SD card reader in MacbookPro5,4
David Zeuthen [Thu, 10 Dec 2009 14:25:00 +0000 (09:25 -0500)]
Add media type udev rule for SD card reader in MacbookPro5,4

Signed-off-by: David Zeuthen <davidz@redhat.com>
14 years agoUpdate NEWS
David Zeuthen [Tue, 8 Dec 2009 16:56:08 +0000 (11:56 -0500)]
Update NEWS

We're not doing a release just yet (more ABI changes are planned - and
we need to do them before committing to ABI stability for the 1.0.x
series to avoid opening 1.1.x too early) but it might be nice to
incrementally add items to this file as we are reworking the ABI and
API.

14 years agoAdd a man page for udisks-tcp-bridge(1)
David Zeuthen [Mon, 7 Dec 2009 18:50:41 +0000 (13:50 -0500)]
Add a man page for udisks-tcp-bridge(1)

It's nice for sysadmins to have this when they see processes like this
running.

14 years agoInstall udisks-tcp-bridge in /usr/bin
David Zeuthen [Mon, 7 Dec 2009 18:49:54 +0000 (13:49 -0500)]
Install udisks-tcp-bridge in /usr/bin

This way it will be in $PATH and clients such as gnome-disk-utility
won't have to hardcode /usr/lib/udisks/udisks-tcp-bridge.

14 years agoMake Avahi announce a service of type _udisks-ssh._tcp for us
David Zeuthen [Sun, 6 Dec 2009 20:14:52 +0000 (15:14 -0500)]
Make Avahi announce a service of type _udisks-ssh._tcp for us

14 years agoTake a secret from the client via stdin and use this to authorize ourselves
David Zeuthen [Sat, 5 Dec 2009 20:11:16 +0000 (15:11 -0500)]
Take a secret from the client via stdin and use this to authorize ourselves

14 years agoInstall udisks-tcp-bridge in $prefix/lib/udisks
David Zeuthen [Sat, 5 Dec 2009 19:03:39 +0000 (14:03 -0500)]
Install udisks-tcp-bridge in $prefix/lib/udisks

It's important that vendors install this in the same location -
clients will need this location for ssh connections.

14 years agoMake udisks-tcp-bridge connect to a DBusServer, not be a DBusServer
David Zeuthen [Sat, 5 Dec 2009 18:56:38 +0000 (13:56 -0500)]
Make udisks-tcp-bridge connect to a DBusServer, not be a DBusServer

14 years agoExport connector type on Port objects
David Zeuthen [Fri, 4 Dec 2009 21:03:56 +0000 (16:03 -0500)]
Export connector type on Port objects

Also add a quirk for my CardBus based eSATA controller.

14 years agoFix up SATA/PATA detection slightly
David Zeuthen [Fri, 4 Dec 2009 21:03:27 +0000 (16:03 -0500)]
Fix up SATA/PATA detection slightly

14 years agoBug 24606 — Add support for ReiserFS
Michael Biebl [Fri, 6 Nov 2009 01:23:20 +0000 (02:23 +0100)]
Bug 24606 — Add support for ReiserFS

Signed-off-by: David Zeuthen <davidz@redhat.com>
14 years agoAvoid multiple inconsistent checks for adapter fabric type
David Zeuthen [Fri, 4 Dec 2009 12:18:35 +0000 (07:18 -0500)]
Avoid multiple inconsistent checks for adapter fabric type

Instead, just make port.c rely on the fabric type detected in
adapter.c. This fixes a bug on VirtualBox when the SATA adapter only
has one port.

Signed-off-by: David Zeuthen <davidz@redhat.com>
14 years agoRemove debugging spew
David Zeuthen [Fri, 4 Dec 2009 12:09:43 +0000 (07:09 -0500)]
Remove debugging spew

Signed-off-by: David Zeuthen <davidz@redhat.com>
14 years agoHandle ATA controllers with only one port
David Zeuthen [Fri, 4 Dec 2009 12:07:08 +0000 (07:07 -0500)]
Handle ATA controllers with only one port

This happens on e.g. VirtualBox SATA controllers - just check the
driver name before anything else.

Signed-off-by: David Zeuthen <davidz@redhat.com>
14 years agoBug 24999 — Hide Compaq recovery partition type 0x12
Martin Pitt [Mon, 9 Nov 2009 14:00:50 +0000 (15:00 +0100)]
Bug 24999 — Hide Compaq recovery partition type 0x12

http://www.win.tue.nl/~aeb/partitions/partition_types-1.html lists MBR type
0x12 as "configuration/rescue", used by Compaq, IBM, Intel, and NCR.

https://bugs.launchpad.net/bugs/451304

Signed-off-by: David Zeuthen <davidz@redhat.com>
14 years agoAdd experimental bridging program for providing D-Bus access over TCP/IP
David Zeuthen [Thu, 3 Dec 2009 00:07:09 +0000 (19:07 -0500)]
Add experimental bridging program for providing D-Bus access over TCP/IP

The idea is that this

 # ./udisks-tcp-bridge -p 1000

will listen on port 1000 of all network interfaces. Another host can
then access the udisks daemon via D-Bus' TCP/IP transport. See
gnome-disk-utility master for a an experimental --address option that
uses this.

Since Palimpsest use D-Bus 100% to obtain information and export
operations, everything just works. See

 http://people.freedesktop.org/~david/gdu-palimpsest-remote-connection.png

for an example.

This feature needs a lot of thought and some work - for example,
authentication and encryption is needed. And we need to figure out how
this should work with polkit as well - the only reason it works now is
that the bridging process runs as uid 0. And then there's firewalls to
consider and pierce through. All this is not insurmountable, it's just
work.

For now udisks-tcp-bridge is not installed via 'make install' - it is
considered an experimental feature for now - and will probably remain
so for some time.

14 years agoBug 24772 — Allow simulated SMART data on non-SMART devices
Martin Pitt [Wed, 28 Oct 2009 10:57:46 +0000 (11:57 +0100)]
Bug 24772 — Allow simulated SMART data on non-SMART devices

DriveAtaSmartRefreshData(): Defer the "device supports SMART" test until after
evaluating the "simulate" option, and set DriveAtaSmartIsAvailable property
when simulate is given. With this, SMART data blobs can be used with non-SMART
or virtual devices, too.

Signed-off-by: David Zeuthen <davidz@redhat.com>
14 years agoBug 25009 — ignore Western Digital SmartWare partitions
Martin Pitt [Tue, 10 Nov 2009 11:22:45 +0000 (12:22 +0100)]
Bug 25009 — ignore Western Digital SmartWare partitions

The SmartWare Virtual CD partition on these drives is useless in Linux. It
includes Windows/Mac utilities only, and is not usable space.

https://launchpad.net/bugs/474790

Signed-off-by: David Zeuthen <davidz@redhat.com>
14 years agoUpdate udev property names in the udisks(7) man page
David Zeuthen [Tue, 1 Dec 2009 21:37:56 +0000 (16:37 -0500)]
Update udev property names in the udisks(7) man page

14 years agoUpdate bug tracker address
David Zeuthen [Tue, 1 Dec 2009 21:36:55 +0000 (16:36 -0500)]
Update bug tracker address

14 years agoUpdate HACKING, README and COPYING files
David Zeuthen [Tue, 1 Dec 2009 20:46:15 +0000 (15:46 -0500)]
Update HACKING, README and COPYING files

14 years agoRename to udisks - nuke remaining references to Device-disks
David Zeuthen [Tue, 1 Dec 2009 19:52:18 +0000 (14:52 -0500)]
Rename to udisks - nuke remaining references to Device-disks

Still need to update HACKING and README but the only remaining
references seem to be these

 $ git clean -d -x -f

 $ grep devkit `find data doc po policy src tools`
 doc/man/udisks7.xml:      devkit-devel mailing list,
 doc/man/udisks7.xml:      see <ulink url="http://lists.freedesktop.org/mailman/listinfo/devkit-devel"/>.
 doc/TODO:   - devkit-disk-device.c is way too long right now

 $ grep DeviceKit `find data doc po policy src tools`
 doc/TODO-ISCSI: c) Some thoughts on how to integrate iSCSI into DeviceKit-disks,
 doc/TODO-ISCSI:Teaching DeviceKit-disks / Palimpsest / GNOME about iSCSI devices
 doc/TODO-ISCSI:DeviceKit-disks changes:
 doc/TODO-ISCSI:   the org.freedesktop.DeviceKit.Disks interface add
 doc/TODO-ISCSI:   method on DeviceKit-disks to probe a portal for targets.
 doc/TODO: - DeviceKit 003

 $ grep devicekit `find data doc po policy src tools`

Now to port gnome-disk-utility to use udisks instead of DKD...

14 years agoReindent source code to adhere to the GNU-style
David Zeuthen [Tue, 1 Dec 2009 19:29:37 +0000 (14:29 -0500)]
Reindent source code to adhere to the GNU-style

First I used the Eclipse indent tool. Then I ran c-indent-<something>
in Emacs. Finally, I fixed a couple of things up manually.

14 years agoUpdate/add mode lines to all source files
David Zeuthen [Tue, 1 Dec 2009 17:16:26 +0000 (12:16 -0500)]
Update/add mode lines to all source files

Specifically we're going to switch to the GNU-style for indentation
and not use tabs

 -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-

Now to reindent all the code...

14 years agoRename to udisks - rename source files and symbols
David Zeuthen [Tue, 1 Dec 2009 17:05:24 +0000 (12:05 -0500)]
Rename to udisks - rename source files and symbols

14 years agoRename to udisks - move helpers and probers to separate subdirs
David Zeuthen [Tue, 1 Dec 2009 16:36:39 +0000 (11:36 -0500)]
Rename to udisks - move helpers and probers to separate subdirs

14 years agoRename to udisks - udev property names
David Zeuthen [Tue, 1 Dec 2009 16:22:25 +0000 (11:22 -0500)]
Rename to udisks - udev property names

14 years agoRename from DeviceKit-disks to udisks, part 1
David Zeuthen [Tue, 1 Dec 2009 16:12:49 +0000 (11:12 -0500)]
Rename from DeviceKit-disks to udisks, part 1

14 years agoBug 25043 — Crashes with atasmart.c:2701: sk_disk_set_blob: Assertion `blob' failed.
Martin Pitt [Wed, 11 Nov 2009 22:14:55 +0000 (23:14 +0100)]
Bug 25043 — Crashes with atasmart.c:2701: sk_disk_set_blob: Assertion `blob' failed.

This fixes a crash if devkit-disks-helper-ata-smart-collect returns just a
single character on stdout. It is not understood yet under which conditions
that happens, but DK-disks should handle this gracefully.

Also add debug logging to show the actual output, so that later on we can fix
the root cause.

https://launchpad.net/bugs/419663

Signed-off-by: David Zeuthen <davidz@redhat.com>
14 years agoBug 25034 — PartitionModify() for GUID partitions does not work
Martin Pitt [Wed, 11 Nov 2009 16:28:26 +0000 (17:28 +0100)]
Bug 25034 — PartitionModify() for GUID partitions does not work

Use the official ped_partition_set_flag() libparted API for setting partition
flags instead of poking it into libparted's internal data structure (which
worked for MBR, but not for GPT).

Signed-off-by: David Zeuthen <davidz@redhat.com>
14 years agoFix typos in udev rules
David Zeuthen [Tue, 1 Dec 2009 05:28:16 +0000 (00:28 -0500)]
Fix typos in udev rules

Signed-off-by: David Zeuthen <davidz@redhat.com>
14 years agoForgot to add prober for SAS expanders
David Zeuthen [Mon, 30 Nov 2009 04:28:29 +0000 (23:28 -0500)]
Forgot to add prober for SAS expanders

14 years agoAdd support for SAS expanders
David Zeuthen [Mon, 30 Nov 2009 04:25:59 +0000 (23:25 -0500)]
Add support for SAS expanders

14 years agoExport Port objects for SAS PHYs on the HBA
David Zeuthen [Sun, 29 Nov 2009 21:26:45 +0000 (16:26 -0500)]
Export Port objects for SAS PHYs on the HBA

PHYs on SAS expanders to follow...

14 years agoChange Device::DrivePort (of type 'o') to Device::DrivePorts (of type 'ao')
David Zeuthen [Sun, 29 Nov 2009 20:41:17 +0000 (15:41 -0500)]
Change Device::DrivePort (of type 'o') to Device::DrivePorts (of type 'ao')

Technically a disk can be connected to more than one port so allow
this in the API.

14 years agoFor SAS, report number of PHYs for the NumPorts property on Adapter
David Zeuthen [Sun, 29 Nov 2009 18:46:06 +0000 (13:46 -0500)]
For SAS, report number of PHYs for the NumPorts property on Adapter

The plan is that each Port object will have more details -
e.g. whether the SAS port is a wide-port (4 PHYs) and so on.

14 years agoExport Fabric and NumPorts for ATA
David Zeuthen [Sun, 29 Nov 2009 18:16:06 +0000 (13:16 -0500)]
Export Fabric and NumPorts for ATA

14 years agoFix doc fallout from the Controller -> Adapter rename
David Zeuthen [Sat, 28 Nov 2009 19:10:42 +0000 (14:10 -0500)]
Fix doc fallout from the Controller -> Adapter rename

14 years agoRename Controller interface to Adapter
David Zeuthen [Sat, 28 Nov 2009 19:04:20 +0000 (14:04 -0500)]
Rename Controller interface to Adapter

14 years agoAdd support for Port objects
David Zeuthen [Sat, 28 Nov 2009 18:47:52 +0000 (13:47 -0500)]
Add support for Port objects

This commit only includes support for ATA ports. Support for SAS and
FibreChannel will follow.

14 years agoAlso generate D-Bus docs for the Controller interface
David Zeuthen [Fri, 27 Nov 2009 19:29:59 +0000 (14:29 -0500)]
Also generate D-Bus docs for the Controller interface

14 years agoFix type in udev rules for pci-id
David Zeuthen [Fri, 27 Nov 2009 19:27:52 +0000 (14:27 -0500)]
Fix type in udev rules for pci-id

14 years agoInitial stab at exporting storage controllers via D-Bus
David Zeuthen [Fri, 27 Nov 2009 18:09:31 +0000 (13:09 -0500)]
Initial stab at exporting storage controllers via D-Bus

14 years agoGuesstimate the buffer size to use for benchmarking
David Zeuthen [Wed, 25 Nov 2009 21:51:53 +0000 (16:51 -0500)]
Guesstimate the buffer size to use for benchmarking

This gives more precise results and puts an upper bound on time taken
to benchmark (minutes).

14 years agoAbort benchmark on IO errors
David Zeuthen [Wed, 25 Nov 2009 20:52:02 +0000 (15:52 -0500)]
Abort benchmark on IO errors

This happens a lot with DVDs because of "encryption".

14 years agoAdd DriveWwn, DriveRotationalRate and DriveWriteCache properties
David Zeuthen [Wed, 25 Nov 2009 18:00:25 +0000 (13:00 -0500)]
Add DriveWwn, DriveRotationalRate and DriveWriteCache properties

Signed-off-by: David Zeuthen <davidz@redhat.com>
14 years agoAdd a method to benchmark drives
David Zeuthen [Wed, 25 Nov 2009 17:59:12 +0000 (12:59 -0500)]
Add a method to benchmark drives

Signed-off-by: David Zeuthen <davidz@redhat.com>
15 years agoBug 24885 — LVM LVs now have NOPOLICY=0
Martin Pitt [Tue, 3 Nov 2009 20:50:25 +0000 (21:50 +0100)]
Bug 24885 — LVM LVs now have NOPOLICY=0

Commit a95d3 caused the NOPOLICY rules get cut short for LVs. Move the NOPOLICY
check close to the top, since its (1) very cheap, and (2) very generic, i. e.
rules further down might want to tweak it for special cases.

Signed-off-by: David Zeuthen <davidz@redhat.com>
15 years agoUpdate udev rules to cope better with device-mapper
David Zeuthen [Tue, 3 Nov 2009 17:47:33 +0000 (12:47 -0500)]
Update udev rules to cope better with device-mapper

See https://bugzilla.redhat.com/show_bug.cgi?id=528909#c24 for details.

15 years agoPost-release version bump to 010
David Zeuthen [Mon, 2 Nov 2009 21:27:42 +0000 (16:27 -0500)]
Post-release version bump to 010

15 years agoUpdate NEWS for release
David Zeuthen [Mon, 2 Nov 2009 21:13:21 +0000 (16:13 -0500)]
Update NEWS for release

15 years agoDon't use hyphens in param names
David Zeuthen [Mon, 2 Nov 2009 18:57:05 +0000 (13:57 -0500)]
Don't use hyphens in param names

It may upset some tools reading the introspection XML.

15 years agoBug 24718 — Proper handling of missing mkfs.*/fsck.*
Martin Pitt [Wed, 28 Oct 2009 14:30:40 +0000 (15:30 +0100)]
Bug 24718 — Proper handling of missing mkfs.*/fsck.*

Introduce two new errors:
  org.freedesktop.DeviceKit.Disks.Error.FilesystemDriverMissing
  org.freedesktop.DeviceKit.Disks.Error.FilesystemToolsMissing

which are thrown instead of a general Error.Failed when file system tools (such
as mkfs.<type> or xfs_admin) are not installed, or the kernel does not support
the fs type for FilesystemMount().

Note that this does not yet cover a missing cryptsetup.

Signed-off-by: David Zeuthen <davidz@redhat.com>
15 years agoBug 24679 — Support creating minix file systems
Martin Pitt [Sun, 25 Oct 2009 09:32:58 +0000 (10:32 +0100)]
Bug 24679 — Support creating minix file systems

Signed-off-by: David Zeuthen <davidz@redhat.com>
15 years agoBug 24757 – Simplify helper-change-luks-password
Martin Pitt [Tue, 27 Oct 2009 14:31:33 +0000 (15:31 +0100)]
Bug 24757 – Simplify helper-change-luks-password

Use "set -e" to do the error handling which was previously done manually.

Signed-off-by: David Zeuthen <davidz@redhat.com>
15 years agoBug 24757 — Bashism in luks helper breaks password changing
Martin Pitt [Tue, 27 Oct 2009 14:26:27 +0000 (15:26 +0100)]
Bug 24757 — Bashism in luks helper breaks password changing

Fix bashism in devkit-disks-helper-change-luks-password which broke
LuksChangePassphrase() due to POSIX shell not knowing about "-e".

Signed-off-by: David Zeuthen <davidz@redhat.com>
15 years agoBug 24778 — throw_error() segfaults for daemon-internally called methods
Martin Pitt [Wed, 28 Oct 2009 21:16:09 +0000 (22:16 +0100)]
Bug 24778 — throw_error() segfaults for daemon-internally called methods

Some functions like devkit_disks_device_drive_ata_smart_refresh_data() are used
internally by the daemon, in which case the DBusGMethodInvocation context is
NULL. If these methods throw an error (observed on "daemon is inhibited"), this
NULL context is propagated all the way down to throw_error, which previously
tried to call dbus_g_method_return_error() with a NULL context; there is no
D-Bus method call to terminate, so this caused a segfault.

Change throw_error() to just use g_warning() in this case, so that the error
appears on the daemon's stderr. This makes it generally safe to internally call
D-Bus exported methods.

Signed-off-by: David Zeuthen <davidz@redhat.com>
15 years agoUse BLKPG_ADD_PARTITION when adding a partition
David Zeuthen [Sat, 31 Oct 2009 18:12:15 +0000 (14:12 -0400)]
Use BLKPG_ADD_PARTITION when adding a partition

This is similar to the previous commit. We don't want to rely on
libparted because that won't work if another partition on the main
device is busy.

15 years agoUse BLKPG_DEL_PARTITION when deleting partitions instead of libparted
David Zeuthen [Sat, 31 Oct 2009 16:38:02 +0000 (12:38 -0400)]
Use BLKPG_DEL_PARTITION when deleting partitions instead of libparted

Sadly, libparted gets this wrong since it does the equivalent of
'blockdev --rereadpt' which fails if one or more partitions are busy.

Also disallow deleting an extended partition if logical partitions
exist. We can undo this if we add some code to also do DEL_PARTITION
for the logical partitions (including scrubbing signatures).

15 years agoAlso ignore a device if DM_UDEV_DISABLE_OTHER_RULES_FLAG is set
David Zeuthen [Fri, 30 Oct 2009 17:51:46 +0000 (13:51 -0400)]
Also ignore a device if DM_UDEV_DISABLE_OTHER_RULES_FLAG is set

https://bugzilla.redhat.com/show_bug.cgi?id=528909#c10

15 years agoAdd new LinuxMdComponentPosition property
David Zeuthen [Wed, 28 Oct 2009 17:23:22 +0000 (13:23 -0400)]
Add new LinuxMdComponentPosition property

15 years agoUse unregister facility in dbus-glib 0.82 and misc life-cycle fixes
David Zeuthen [Wed, 28 Oct 2009 02:23:33 +0000 (22:23 -0400)]
Use unregister facility in dbus-glib 0.82 and misc life-cycle fixes

15 years agoPass -F to mkfs.ext[234] to allow creating a filesystem on the whole disk
David Zeuthen [Tue, 27 Oct 2009 16:16:55 +0000 (12:16 -0400)]
Pass -F to mkfs.ext[234] to allow creating a filesystem on the whole disk

15 years agoAllow creating a partition table with same scheme as existing one
David Zeuthen [Mon, 26 Oct 2009 18:34:18 +0000 (14:34 -0400)]
Allow creating a partition table with same scheme as existing one

15 years agoUse 'udevadm settle' instead of 15-second timeout
David Zeuthen [Sun, 25 Oct 2009 00:32:23 +0000 (20:32 -0400)]
Use 'udevadm settle' instead of 15-second timeout

Suggested by Milan Broz <mbroz@redhat.com> in

https://bugzilla.redhat.com/show_bug.cgi?id=530721#c1

15 years agoWork around blkid incorrectly detecting FAT on extended partitions
David Zeuthen [Sat, 24 Oct 2009 21:46:18 +0000 (17:46 -0400)]
Work around blkid incorrectly detecting FAT on extended partitions

This is really a blkid bug but work around it for now by clearing Id*
properties for extended partitions.

15 years agoWhen updating holders/slaves, defer the updates to an idle handler
David Zeuthen [Sat, 24 Oct 2009 21:19:12 +0000 (17:19 -0400)]
When updating holders/slaves, defer the updates to an idle handler

This is needed because sometimes updates may depend on the actual
device just being added.

Specifically, this patch fixes a problem with manually unlocking LUKS
devices, e.g.

 # echo xyz123 | cryptsetup -T 1 luksOpen /dev/sdb1 foobar

Here we get /dev/dm-0 at some point and then we want to update
/dev/sdb1. But the update of /dev/sdb1 depends on the existence of
/dev/dm-0 - specifically update_info_luks() won't set :DeviceIsLuks
and :Luks before /dev/dm-0 really exists.

15 years agoBug 24673 — Support creating swap fs with labels
Martin Pitt [Thu, 22 Oct 2009 21:43:35 +0000 (23:43 +0200)]
Bug 24673 — Support creating swap fs with labels

mkswapfs supports labels just fine, add support for it to FilesystemCreate().

Signed-off-by: David Zeuthen <davidz@redhat.com>
15 years agoPass -T to cryptsetup to handle incorrect passphrases
David Zeuthen [Sat, 24 Oct 2009 14:19:35 +0000 (10:19 -0400)]
Pass -T to cryptsetup to handle incorrect passphrases

Also don't sleep on the error path. Also filed a bug for the
root-problem and included the bug reference in the tirade of why we
need to sleep 15 seconds etc.

https://bugzilla.redhat.com/show_bug.cgi?id=530721

15 years agoVarious device-mapper and cryptsetup fixes
David Zeuthen [Sat, 24 Oct 2009 02:12:22 +0000 (22:12 -0400)]
Various device-mapper and cryptsetup fixes

15 years agoPost-release version bump to 009
David Zeuthen [Fri, 16 Oct 2009 20:51:39 +0000 (16:51 -0400)]
Post-release version bump to 009

15 years agoUpdate NEWS for release
David Zeuthen [Fri, 16 Oct 2009 20:40:18 +0000 (16:40 -0400)]
Update NEWS for release

15 years agoBug 24499 – media players have USB drive icon
Martin Pitt [Tue, 13 Oct 2009 18:15:46 +0000 (20:15 +0200)]
Bug 24499 – media players have USB drive icon

Set "media-player" icon for devices which have ID_MEDIA_PLAYER (as set by
media-player-info).

Signed-off-by: David Zeuthen <davidz@redhat.com>
15 years agoBug 24468 – part-id crashes if drive device node does not exist
Martin Pitt [Mon, 12 Oct 2009 08:37:11 +0000 (10:37 +0200)]
Bug 24468 – part-id crashes if drive device node does not exist

This fixes a corner case crash if a partition device node exists (like
/dev/sda5), but the corresponding drive device node (like /dev/sda) does not.
This should not happen in a running system, but was reported to occur during a
distribution upgrade.

Just handle the situation gracefully with a proper error message instead of
crashing.

http://bugs.freedesktop.org/show_bug.cgi?id=24468

Signed-off-by: David Zeuthen <davidz@redhat.com>
15 years agoBug 24264 – Crash on removing NULL value from hash in device_remove()
David Zeuthen [Fri, 9 Oct 2009 15:12:10 +0000 (11:12 -0400)]
Bug 24264 – Crash on removing NULL value from hash in device_remove()

Properly handle the situtation where we're processing a 'change' event
but the 'remove' event has happened but is still queued up in our own
process. Also handle device file renames and 'move' uevents.

https://bugs.freedesktop.org/show_bug.cgi?id=24264

15 years agoBug 24351 – Firewire hard drive is considered system-internal
Martin Pitt [Tue, 6 Oct 2009 18:54:27 +0000 (20:54 +0200)]
Bug 24351 – Firewire hard drive is considered system-internal

Firewire subsystem is called "ieee1394" in current Linux. Now check for both
"ieee1394" and "firewire". This fixes firewire drives to not be considered
system internal any more.

https://bugs.freedesktop.org/show_bug.cgi?id=24351

Signed-off-by: David Zeuthen <davidz@redhat.com>
15 years agoBug 24343 – Unintended side-effect when calling DriveDetach()
David Zeuthen [Fri, 9 Oct 2009 14:14:55 +0000 (10:14 -0400)]
Bug 24343 – Unintended side-effect when calling DriveDetach()

Some laptops like the Dell Mini 10 have builtin SD card readers which
are wired through an internal USB bus. The current behaviour is that
if you click the eject button in nautilus, the card reader device gets
ejected and disconnected, and cannot be reactivated ever, except by a
reboot.

The cause of this is that DK-d's update_info_drive() sets "can_detach"
for all USB devices currently, which causes
devkit-disks-helper-drive-detach to be called on them.

https://bugs.freedesktop.org/show_bug.cgi?id=24343

15 years agoBug 24129 – Please mount vfat disks with shortname=mixed
Martin Pitt [Thu, 8 Oct 2009 18:32:51 +0000 (20:32 +0200)]
Bug 24129 – Please mount vfat disks with shortname=mixed

The previous default, shortname=lower, breaks all-uppercase file names ("touch
FOO" creates "foo"), thus breaks rsync, and Windows compatibility.

The default was changed in the Linux kernel as well, see
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=955234755ce4a2c33cfc558912aa8f2148cc1fc6

https://bugs.freedesktop.org/show_bug.cgi?id=24129

Signed-off-by: David Zeuthen <davidz@redhat.com>
15 years agoBug 24054 – Devickit-disks doesn't support changing ntfs label
David Zeuthen [Fri, 9 Oct 2009 13:58:51 +0000 (09:58 -0400)]
Bug 24054 – Devickit-disks doesn't support changing ntfs label

15 years agoBug 24053 – MMC cards aren't automounted.
Maxim Levitsky [Fri, 9 Oct 2009 12:57:38 +0000 (14:57 +0200)]
Bug 24053 – MMC cards aren't automounted.

Show MMC/MemStick cards by default. The previous whitelist in the
udev rules ignored them.

https://bugs.freedesktop.org/show_bug.cgi?id=24053

Signed-off-by: David Zeuthen <davidz@redhat.com>
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
15 years agoBug 24052 – CDROM eject button is locked while CDROM is mounted
Martin Pitt [Tue, 6 Oct 2009 08:51:09 +0000 (10:51 +0200)]
Bug 24052 – CDROM eject button is locked while CDROM is mounted

Unlike in the hal world, we do not have a daemon polling CD drives for eject
button presses. In order to make hardware tray eject buttons work, unlock the
tray after mounting a CD.

This is pretty much equivalent to yanking out USB sticks, which we already
handle reasonably (detecting disappeared device, force-unmounting).

https://bugs.freedesktop.org/show_bug.cgi?id=24052

Signed-off-by: David Zeuthen <davidz@redhat.com>
15 years agoActually inhibit the daemon when Inhibit() is called
David Zeuthen [Mon, 5 Oct 2009 18:31:22 +0000 (14:31 -0400)]
Actually inhibit the daemon when Inhibit() is called

Guess this was forgotten with the polkit-1 porting effort.

15 years agoPost-release version bump to 008
David Zeuthen [Fri, 18 Sep 2009 22:41:22 +0000 (18:41 -0400)]
Post-release version bump to 008

15 years agoUpdate NEWS for release
David Zeuthen [Fri, 18 Sep 2009 22:37:40 +0000 (18:37 -0400)]
Update NEWS for release

15 years agoBug 23926 – Error creating partition
David Zeuthen [Fri, 18 Sep 2009 22:14:19 +0000 (18:14 -0400)]
Bug 23926 – Error creating partition

When creating a partition we may already have received the uevent for
the new partition. Check for this before waiting for it.

15 years agoBug 23541 – PartitionTableCreate method times out
Evan Dandrea [Fri, 18 Sep 2009 21:46:47 +0000 (17:46 -0400)]
Bug 23541 – PartitionTableCreate method times out

... when 'none' is specified as a parameter.

Signed-off-by: David Zeuthen <davidz@redhat.com>
15 years agoBug 23579 – Must allow DBus Properties interface for g-d-u to work
David Zeuthen [Fri, 18 Sep 2009 20:36:22 +0000 (16:36 -0400)]
Bug 23579 – Must allow DBus Properties interface for g-d-u to work

15 years agoBug 23761 – Some leaks
Matthias Clasen [Fri, 18 Sep 2009 20:32:01 +0000 (16:32 -0400)]
Bug 23761 – Some leaks

g_hash_table_get_values returns a newly-allocated GList. The callers
of devkit_disks_daemon_local_get_all_devices need to free it.

Signed-off-by: David Zeuthen <davidz@redhat.com>