platform/upstream/udisks2.git
11 years agoAdd udisks_ata_identify_get_word() utility function
David Zeuthen [Mon, 5 Nov 2012 18:29:14 +0000 (13:29 -0500)]
Add udisks_ata_identify_get_word() utility function

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd logging statements so it's possible to pin-point probing time
David Zeuthen [Thu, 25 Oct 2012 23:15:31 +0000 (19:15 -0400)]
Add logging statements so it's possible to pin-point probing time

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUDisksLinuxDevice: Don't include the parent_instance member in the docs
David Zeuthen [Thu, 25 Oct 2012 15:33:20 +0000 (11:33 -0400)]
UDisksLinuxDevice: Don't include the parent_instance member in the docs

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoForgot to add files
David Zeuthen [Wed, 24 Oct 2012 18:54:28 +0000 (14:54 -0400)]
Forgot to add files

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoIntroduce UDisksLinuxDevice as a replacement for GUdevDevice
David Zeuthen [Wed, 24 Oct 2012 17:40:38 +0000 (13:40 -0400)]
Introduce UDisksLinuxDevice as a replacement for GUdevDevice

This is essentially a GUdevDevice but with extra information such as
the probed ATA IDENTIFY data and, in the future, anything else we
might need.

The big idea here is that we want to depend _less_ on udev for
peripheral things that doesn't make sense to store in the udev
database, such as the properties in [1]. The win here is

 a. We can simplify ata_id somewhat - it still needs to extract serial
    numbers, WWNs etc. (because those are needed for symlinks in the
    /dev/disk/by-* hierarchy) but it does not need to extract and
    print what is in e.g. [1].

 b. If we need information in udisks from e.g. the ATA IDENTIFY data
    we don't need to add it to ata_id (or scsi_id or whatever), then
    wait for a systemd release and then instruct distributors to
    properly handle the dependency - instead, we can just access the
    IDENTIFY data ourselves. Much simpler and less error prone.

Since probing is synchronous, we create a thread for this and whenever
there's an uevent we push a new request onto a work queue. The probing
thread will handle incoming requests sequentially (in the future we
could have a pool of worker threads and run things in parallel) and
pop the results back to the main thread, also sequentially.

The only probing we have right now is for IDENTIFY DEVICE and IDENTIFY
PACKET DEVICE for ATA disks. We can add more in the future.

Note that this patch doesn't actually achieve b. yet - upcoming
patches will move from reading udev properties (such as looking at the
value of ID_ATA_FEATURE_SET_PM) to extracting this from the IDENTIFY
data itself.

[1] :
 # udevadm info -q all -n /dev/sda|grep ID_ATA_
 E: ID_ATA_DOWNLOAD_MICROCODE=1
 E: ID_ATA_FEATURE_SET_HPA=1
 E: ID_ATA_FEATURE_SET_HPA_ENABLED=1
 E: ID_ATA_FEATURE_SET_PM=1
 E: ID_ATA_FEATURE_SET_PM_ENABLED=1
 E: ID_ATA_FEATURE_SET_SECURITY=1
 E: ID_ATA_FEATURE_SET_SECURITY_ENABLED=0
 E: ID_ATA_FEATURE_SET_SECURITY_ENHANCED_ERASE_UNIT_MIN=2
 E: ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=2
 E: ID_ATA_FEATURE_SET_SECURITY_FROZEN=1
 E: ID_ATA_FEATURE_SET_SMART=1
 E: ID_ATA_FEATURE_SET_SMART_ENABLED=1
 E: ID_ATA_ROTATION_RATE_RPM=0
 E: ID_ATA_SATA=1
 E: ID_ATA_SATA_SIGNAL_RATE_GEN1=1
 E: ID_ATA_SATA_SIGNAL_RATE_GEN2=1
 E: ID_ATA_WRITE_CACHE=1
 E: ID_ATA_WRITE_CACHE_ENABLED=1

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFactor out ATA routines
David Zeuthen [Tue, 23 Oct 2012 18:25:13 +0000 (14:25 -0400)]
Factor out ATA routines

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUse the right device file UDisksObjectInfo.one_liner for a partition of a drive
David Zeuthen [Wed, 17 Oct 2012 16:20:08 +0000 (12:20 -0400)]
Use the right device file UDisksObjectInfo.one_liner for a partition of a drive

E.g. use /dev/sdb1, not /dev/sdb

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoDon't count /dev/md* devices with bogus UUIDs as MD-RAID arrays
David Zeuthen [Tue, 16 Oct 2012 15:50:55 +0000 (11:50 -0400)]
Don't count /dev/md* devices with bogus UUIDs as MD-RAID arrays

For example, if you use the FAULTY personality there is no UUID and we
shouldn't present the device as a RAID array as it really isn't one.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoNuke debug spew
David Zeuthen [Tue, 16 Oct 2012 15:44:04 +0000 (11:44 -0400)]
Nuke debug spew

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUDisksObjectInfo: add one_liner field
David Zeuthen [Tue, 16 Oct 2012 15:41:21 +0000 (11:41 -0400)]
UDisksObjectInfo: add one_liner field

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoOnly use #pragma GCC diagnostic on GCC >= 4.6
David Zeuthen [Sat, 13 Oct 2012 09:58:48 +0000 (05:58 -0400)]
Only use #pragma GCC diagnostic on GCC >= 4.6

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

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd support for option 'no-block' in the Block.Format() method
David Zeuthen [Sat, 13 Oct 2012 09:36:56 +0000 (05:36 -0400)]
Add support for option 'no-block' in the Block.Format() method

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoRevert "Serialize authorization checks"
David Zeuthen [Sat, 13 Oct 2012 09:15:40 +0000 (05:15 -0400)]
Revert "Serialize authorization checks"

Turns out this is not really a good idea - for example, consider two
users on different seats - if one is slow to authenticate, the other
one will suffer.

This reverts commit cc373db17ac448a6c088f6497a90fe288e560c21.

11 years agoSerialize authorization checks
David Zeuthen [Fri, 12 Oct 2012 21:39:21 +0000 (17:39 -0400)]
Serialize authorization checks

This is useful for e.g. applications that offer UI on multiple disks
at the same time. Without the serialization up to N authentication
dialogs for the same action can be shown.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAlways pass MD devices of the form /dev/mdNNN when assembling RAID arrays
David Zeuthen [Fri, 12 Oct 2012 15:21:10 +0000 (11:21 -0400)]
Always pass MD devices of the form /dev/mdNNN when assembling RAID arrays

This is to be consistent with array creation.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd Manager.MDRaidCreate() method for RAID Array creation
David Zeuthen [Fri, 12 Oct 2012 13:48:49 +0000 (09:48 -0400)]
Add Manager.MDRaidCreate() method for RAID Array creation

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUDisksClient: Add reference to Job:Operation to get_job_description() docs
David Zeuthen [Fri, 12 Oct 2012 13:48:18 +0000 (09:48 -0400)]
UDisksClient: Add reference to Job:Operation to get_job_description() docs

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd missing known jobs for MD-RAID to Job:Description docs
David Zeuthen [Fri, 12 Oct 2012 13:47:02 +0000 (09:47 -0400)]
Add missing known jobs for MD-RAID to Job:Description docs

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd missing known jobs for ATA Secure erase to Job:Description docs
David Zeuthen [Fri, 12 Oct 2012 13:44:53 +0000 (09:44 -0400)]
Add missing known jobs for ATA Secure erase to Job:Description docs

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd translations for eu, fa, hr and sq from Transifix
David Zeuthen [Thu, 4 Oct 2012 20:20:31 +0000 (16:20 -0400)]
Add translations for eu, fa, hr and sq from Transifix

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate POTFILES.in with new source files
David Zeuthen [Thu, 4 Oct 2012 20:18:44 +0000 (16:18 -0400)]
Update POTFILES.in with new source files

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoRemove fa_IR translation
David Zeuthen [Thu, 4 Oct 2012 20:17:08 +0000 (16:17 -0400)]
Remove fa_IR translation

This language code is invalid. Also removed from the udisks transifex instance.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd publish-docs-master target
David Zeuthen [Thu, 4 Oct 2012 19:56:23 +0000 (15:56 -0400)]
Add publish-docs-master target

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate gtk-doc types file
David Zeuthen [Wed, 3 Oct 2012 15:45:07 +0000 (11:45 -0400)]
Update gtk-doc types file

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoInclude docs for MD-RAID implementation details
David Zeuthen [Wed, 3 Oct 2012 15:44:51 +0000 (11:44 -0400)]
Include docs for MD-RAID implementation details

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate gtk-doc sections
David Zeuthen [Wed, 3 Oct 2012 15:32:33 +0000 (11:32 -0400)]
Update gtk-doc sections

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd indexes of deprecated and new-in-2.1 symbols
David Zeuthen [Wed, 3 Oct 2012 14:34:10 +0000 (10:34 -0400)]
Add indexes of deprecated and new-in-2.1 symbols

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoRe-include udisks_client_get_drive_info() in API docs
David Zeuthen [Wed, 3 Oct 2012 14:33:36 +0000 (10:33 -0400)]
Re-include udisks_client_get_drive_info() in API docs

Otherwise we can't tell people that it's deprecated.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUse Deprecated and Since annotations to mark deprecated and new API for 2.1
David Zeuthen [Wed, 3 Oct 2012 14:32:48 +0000 (10:32 -0400)]
Use Deprecated and Since annotations to mark deprecated and new API for 2.1

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUse @since annotations to mark new D-Bus API available 2.1
David Zeuthen [Wed, 3 Oct 2012 14:32:15 +0000 (10:32 -0400)]
Use @since annotations to mark new D-Bus API available 2.1

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMerge branch 'master' into wip/mdraid
David Zeuthen [Wed, 3 Oct 2012 14:12:14 +0000 (10:12 -0400)]
Merge branch 'master' into wip/mdraid

11 years agoStart writing NEWS for 2.0.90
David Zeuthen [Wed, 3 Oct 2012 14:06:13 +0000 (10:06 -0400)]
Start writing NEWS for 2.0.90

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoBump version to 2.0.90
David Zeuthen [Wed, 3 Oct 2012 14:05:59 +0000 (10:05 -0400)]
Bump version to 2.0.90

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoExplain post-release actions in HACKING
David Zeuthen [Wed, 3 Oct 2012 14:03:15 +0000 (10:03 -0400)]
Explain post-release actions in HACKING

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoDocument the release process
David Zeuthen [Wed, 3 Oct 2012 13:52:30 +0000 (09:52 -0400)]
Document the release process

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate my email address
David Zeuthen [Wed, 3 Oct 2012 13:33:10 +0000 (09:33 -0400)]
Update my email address

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoPost-release version bump to 2.0.1
David Zeuthen [Tue, 2 Oct 2012 19:32:54 +0000 (15:32 -0400)]
Post-release version bump to 2.0.1

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate NEWS for release
David Zeuthen [Tue, 2 Oct 2012 19:29:52 +0000 (15:29 -0400)]
Update NEWS for release

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate translations from Transifex
David Zeuthen [Tue, 2 Oct 2012 18:03:37 +0000 (14:03 -0400)]
Update translations from Transifex

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd docs for udisks_linux_drive_ata_secure_erase_sync()
David Zeuthen [Tue, 2 Oct 2012 17:58:01 +0000 (13:58 -0400)]
Add docs for udisks_linux_drive_ata_secure_erase_sync()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd docs for udisks_linux_drive_ata_apply_configuration()
David Zeuthen [Tue, 2 Oct 2012 17:50:37 +0000 (13:50 -0400)]
Add docs for udisks_linux_drive_ata_apply_configuration()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoRemove udisks_daemon_util_on_other_seat() from sections.txt
David Zeuthen [Tue, 2 Oct 2012 17:46:25 +0000 (13:46 -0400)]
Remove udisks_daemon_util_on_other_seat() from sections.txt

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix docs for udisks_daemon_util_file_set_contents()
David Zeuthen [Tue, 2 Oct 2012 17:45:39 +0000 (13:45 -0400)]
Fix docs for udisks_daemon_util_file_set_contents()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix docs for udisks_daemon_launch_threaded_job()
David Zeuthen [Tue, 2 Oct 2012 17:44:52 +0000 (13:44 -0400)]
Fix docs for udisks_daemon_launch_threaded_job()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix docs for udisks_daemon_launch_spawned_job_sync()
David Zeuthen [Tue, 2 Oct 2012 17:44:26 +0000 (13:44 -0400)]
Fix docs for udisks_daemon_launch_spawned_job_sync()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix docs for udisks_daemon_launch_spawned_job()
David Zeuthen [Tue, 2 Oct 2012 17:44:09 +0000 (13:44 -0400)]
Fix docs for udisks_daemon_launch_spawned_job()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix docs for udisks_daemon_launch_simple_job()
David Zeuthen [Tue, 2 Oct 2012 17:43:44 +0000 (13:43 -0400)]
Fix docs for udisks_daemon_launch_simple_job()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd docs for udisks_base_job_set_auto_estimate()
David Zeuthen [Tue, 2 Oct 2012 17:40:32 +0000 (13:40 -0400)]
Add docs for udisks_base_job_set_auto_estimate()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd docs for udisks_base_job_get_auto_estimate()
David Zeuthen [Tue, 2 Oct 2012 17:40:12 +0000 (13:40 -0400)]
Add docs for udisks_base_job_get_auto_estimate()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix up docs for udisks_daemon_util_file_set_contents()
David Zeuthen [Tue, 2 Oct 2012 17:37:54 +0000 (13:37 -0400)]
Fix up docs for udisks_daemon_util_file_set_contents()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix docs for udisks_daemon_util_on_same_seat()
David Zeuthen [Tue, 2 Oct 2012 17:35:47 +0000 (13:35 -0400)]
Fix docs for udisks_daemon_util_on_same_seat()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agodocs: use CDATA for email addresses to avoid them being mangled
David Zeuthen [Tue, 2 Oct 2012 17:29:01 +0000 (13:29 -0400)]
docs: use CDATA for email addresses to avoid them being mangled

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agodocs: add some more meta information to the man pages (version, source, manual)
David Zeuthen [Tue, 2 Oct 2012 17:16:46 +0000 (13:16 -0400)]
docs: add some more meta information to the man pages (version, source, manual)

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agodocs: Document udisksctl(1)'s status command
David Zeuthen [Tue, 2 Oct 2012 17:01:06 +0000 (13:01 -0400)]
docs: Document udisksctl(1)'s status command

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agodocs: Document udisksctl(1)'s info command
David Zeuthen [Tue, 2 Oct 2012 16:58:15 +0000 (12:58 -0400)]
docs: Document udisksctl(1)'s info command

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agodocs: update man page dates to "October 2012"
David Zeuthen [Tue, 2 Oct 2012 16:53:47 +0000 (12:53 -0400)]
docs: update man page dates to "October 2012"

In the future we shall update it only in minor releases .0,
e.g. 2.0.0, 2.2.0, 2.4.0 and so on.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agodocs: Link to http://www.freedesktop.org/wiki/Software/dbus in udisks(8)
David Zeuthen [Tue, 2 Oct 2012 16:40:23 +0000 (12:40 -0400)]
docs: Link to freedesktop.org/wiki/Software/dbus in udisks(8)

... so it's 100% clear what "system message bus" means.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agodocs: Remove "(available online here)" comment in udisks(8) man page
David Zeuthen [Tue, 2 Oct 2012 16:36:44 +0000 (12:36 -0400)]
docs: Remove "(available online here)" comment in udisks(8) man page

We don't do that for other chapters.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agodocs: only reference hdparm(8) at the end of the paragraph
David Zeuthen [Tue, 2 Oct 2012 15:38:10 +0000 (11:38 -0400)]
docs: only reference hdparm(8) at the end of the paragraph

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoBump version number to 2.0.0
David Zeuthen [Fri, 28 Sep 2012 19:05:53 +0000 (15:05 -0400)]
Bump version number to 2.0.0

This is not the release (at least NEWS needs to be updated) but pretty
close. Basically only need to e.g. check that nothing breaks by going
from 1.99.0 to 2.0.0

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoDon't require that users define UDISKS_API_IS_SUBJECT_TO_CHANGE
David Zeuthen [Fri, 28 Sep 2012 19:03:04 +0000 (15:03 -0400)]
Don't require that users define UDISKS_API_IS_SUBJECT_TO_CHANGE

We're very close to the 2.0 release (two-point-oh!) so nuke this.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMove bash completion script into /usr/share/bash-completion/completions
David Zeuthen [Fri, 28 Sep 2012 17:58:04 +0000 (13:58 -0400)]
Move bash completion script into /usr/share/bash-completion/completions

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix glaringly wrong documentation for Filesystem.Mount()
David Zeuthen [Fri, 28 Sep 2012 14:53:25 +0000 (10:53 -0400)]
Fix glaringly wrong documentation for Filesystem.Mount()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMention the right file when complaing about /proc/swaps
David Zeuthen [Thu, 27 Sep 2012 17:16:31 +0000 (13:16 -0400)]
Mention the right file when complaing about /proc/swaps

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMake it work without requiring the kernel to be CONFIG_SWAP=y
David Zeuthen [Thu, 27 Sep 2012 17:14:15 +0000 (13:14 -0400)]
Make it work without requiring the kernel to be CONFIG_SWAP=y

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

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoDon't complain about missing /etc/fstab file
David Zeuthen [Thu, 27 Sep 2012 17:05:08 +0000 (13:05 -0400)]
Don't complain about missing /etc/fstab file

It's not inconceivable that this file is missing so don't loudly
complain about it.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoDon't complain about missing /etc/crypttab file
David Zeuthen [Thu, 27 Sep 2012 17:00:57 +0000 (13:00 -0400)]
Don't complain about missing /etc/crypttab file

Some systems don't have it at all - notably F18 doesn't have if unless
you use encrypted root. Also make the file monitor pick up when the
file is deleted. This was reported in bug 53147:

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

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoOnly do the isohybrid hack for the first partition
David Zeuthen [Wed, 26 Sep 2012 16:04:59 +0000 (12:04 -0400)]
Only do the isohybrid hack for the first partition

Otherwise we end up showing two partitions and that is unwanted. See

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

for details.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix same seat detection if built with systemd, but not booted with it
Vincent Untz [Tue, 25 Sep 2012 08:55:31 +0000 (10:55 +0200)]
Fix same seat detection if built with systemd, but not booted with it

If we haven't booted with systemd, then we can only assume it's always
the same seat.

Based on patch by Takashi Iwai <tiwai@suse.com>.

https://bugzilla.novell.com/show_bug.cgi?id=769570
https://bugs.freedesktop.org/show_bug.cgi?id=55309

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoConsistently refer to MD-RAID as "Linux RAID" in user-visible strings
David Zeuthen [Fri, 21 Sep 2012 15:53:16 +0000 (11:53 -0400)]
Consistently refer to MD-RAID as "Linux RAID" in user-visible strings

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoSet MDRaid:ChunkSize for raid0 but not for raid1
David Zeuthen [Thu, 20 Sep 2012 21:03:37 +0000 (17:03 -0400)]
Set MDRaid:ChunkSize for raid0 but not for raid1

It so happens that redundancy != striped - for example raid0 has the
former, but not the latter and raid1 is the other way around. And
raid4, raid5, raid6 and raid10 has both properties.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoNuke debug spew
David Zeuthen [Thu, 20 Sep 2012 17:23:28 +0000 (13:23 -0400)]
Nuke debug spew

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoHandle nested arrays
David Zeuthen [Thu, 20 Sep 2012 17:13:23 +0000 (13:13 -0400)]
Handle nested arrays

We actually need mdadm(8) changes for this to work properly otherwise
the MD_* properties end up overwriting each other.

We also have to be careful since a single GUdevDevice instance can be
in two distinct UDisksLinuxMDRaidObject.

http://people.freedesktop.org/~david/gnome-disks-mdraid-20120920-1.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMention that MDRaid:SyncAction is the empty string for arrays w/o redundancy
David Zeuthen [Thu, 20 Sep 2012 17:12:43 +0000 (13:12 -0400)]
Mention that MDRaid:SyncAction is the empty string for arrays w/o redundancy

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUDisksClient: include RAID level in description of RAID Array
David Zeuthen [Thu, 20 Sep 2012 17:11:13 +0000 (13:11 -0400)]
UDisksClient: include RAID level in description of RAID Array

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoSlightly rework UDisksObjectInfo docs
David Zeuthen [Thu, 20 Sep 2012 14:37:05 +0000 (10:37 -0400)]
Slightly rework UDisksObjectInfo docs

Also include the UDisksObject instance in the struct.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoSkip homehost when calcuating @name member in UDisksObjectInfo for MD-RAID
David Zeuthen [Wed, 19 Sep 2012 21:46:05 +0000 (17:46 -0400)]
Skip homehost when calcuating @name member in UDisksObjectInfo for MD-RAID

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoInitialize reference count to 1
David Zeuthen [Wed, 19 Sep 2012 21:44:15 +0000 (17:44 -0400)]
Initialize reference count to 1

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoDeprecate udisks_client_get_drive_info() with udisks_client_get_object_info()
David Zeuthen [Wed, 19 Sep 2012 21:37:18 +0000 (17:37 -0400)]
Deprecate udisks_client_get_drive_info() with udisks_client_get_object_info()

The new function is a bit more abstract, works on more types and
returns a UDisksObjectInfo object. This allows us to add information
in the future.

Also introduce symbolic icons as requested in bug

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

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoRevert "Simplify codepath when removing a RAID disk"
David Zeuthen [Wed, 19 Sep 2012 17:59:00 +0000 (13:59 -0400)]
Revert "Simplify codepath when removing a RAID disk"

Doesn't seem to reliably work - probably an mdadm(8) bug. Revert for
now, make a note to investigate later.

This reverts commit fb3df672113a380f2d7555bf5dcac0814b4a0c80.

11 years agoExport MDRaid:ChunkSize property
David Zeuthen [Wed, 19 Sep 2012 17:58:25 +0000 (13:58 -0400)]
Export MDRaid:ChunkSize property

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd MDRaid:BitmapLocation property
David Zeuthen [Wed, 19 Sep 2012 17:37:09 +0000 (13:37 -0400)]
Add MDRaid:BitmapLocation property

This is useful for the GUI to convey to the user when a bitmap is in
use.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoSimplify codepath when removing a RAID disk
David Zeuthen [Wed, 19 Sep 2012 16:26:59 +0000 (12:26 -0400)]
Simplify codepath when removing a RAID disk

No need for two mdadm(8) invocations, can use --set-faulty and
--remove in the same invocation.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoExpress RAID member state as an array of strings, instead of just a string
David Zeuthen [Wed, 19 Sep 2012 16:21:55 +0000 (12:21 -0400)]
Express RAID member state as an array of strings, instead of just a string

The sysfs file /sys/block/md0/md/dev-sda/state is a comma-separated
list of states, not just one state.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoconfigure.ac: raise gudev dependency
Claudio Saavedra [Wed, 19 Sep 2012 12:51:47 +0000 (15:51 +0300)]
configure.ac: raise gudev dependency

udisks is using g_udev_device_get_usec_since_initialized(), which
was added in gudev 165.

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

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd @start-degraded option to MDRaid.Start()
David Zeuthen [Sat, 15 Sep 2012 17:56:04 +0000 (13:56 -0400)]
Add @start-degraded option to MDRaid.Start()

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd MDRaid.RemoveDevice() method
David Zeuthen [Fri, 14 Sep 2012 20:40:30 +0000 (16:40 -0400)]
Add MDRaid.RemoveDevice() method

This is used in the "-" button in Disks, see

http://people.freedesktop.org/~david/gnome-disks-mdraid-20120914-2.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoTweak MDRaid:ActiveDevices some more
David Zeuthen [Fri, 14 Sep 2012 17:04:51 +0000 (13:04 -0400)]
Tweak MDRaid:ActiveDevices some more

We need to iterate over md/dev-*, not just md/rd%d, otherwise we miss
spares and failed devices. With this change, Disks can show the user
what really is going on

http://people.freedesktop.org/~david/gnome-disks-mdraid-20120914-1.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoSlightly change how the MDRaid:ActiveDevice property works
David Zeuthen [Fri, 14 Sep 2012 15:03:19 +0000 (11:03 -0400)]
Slightly change how the MDRaid:ActiveDevice property works

It's easier to use from applications if it's an array with a fixed
size.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMake Block:PreferredDevice work for partitions of RAID arrays
David Zeuthen [Thu, 13 Sep 2012 22:58:40 +0000 (18:58 -0400)]
Make Block:PreferredDevice work for partitions of RAID arrays

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUDisksClient: ignore partitions when finding block device for RAID Array
David Zeuthen [Thu, 13 Sep 2012 22:55:42 +0000 (18:55 -0400)]
UDisksClient: ignore partitions when finding block device for RAID Array

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd MDRaid:ActiveDevices property
David Zeuthen [Thu, 13 Sep 2012 22:00:24 +0000 (18:00 -0400)]
Add MDRaid:ActiveDevices property

This property contains a list of the active devices in the array. It
can be used to implement a dialog like the following:

 http://people.freedesktop.org/~david/palimpsest-md-raid-components-on-mp.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMake udisks_daemon_util_resolve_link() work when @name contains slashes
David Zeuthen [Thu, 13 Sep 2012 21:39:55 +0000 (17:39 -0400)]
Make udisks_daemon_util_resolve_link() work when @name contains slashes

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoSkip partitions of MD-RAID devices
David Zeuthen [Thu, 13 Sep 2012 19:57:52 +0000 (15:57 -0400)]
Skip partitions of MD-RAID devices

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAdd MDRaid:SyncCompleted property
David Zeuthen [Thu, 13 Sep 2012 19:26:51 +0000 (15:26 -0400)]
Add MDRaid:SyncCompleted property

We update this by polling every second (on the second) for a subset of
states that are not 'idle'.

http://people.freedesktop.org/~david/gnome-disks-mdraid-20120913-2.png

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFix corner-cases for detecting RAID arrays
David Zeuthen [Thu, 13 Sep 2012 18:24:11 +0000 (14:24 -0400)]
Fix corner-cases for detecting RAID arrays

If the array device was detected before any of the components we would
fail to detect the array. Fix that.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoStrip trailing white-space from md/sync_action sysfs attr
David Zeuthen [Thu, 13 Sep 2012 15:52:05 +0000 (11:52 -0400)]
Strip trailing white-space from md/sync_action sysfs attr

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoAvoid leaking memory when parsing sysfs attributes with integers
David Zeuthen [Wed, 12 Sep 2012 20:42:41 +0000 (16:42 -0400)]
Avoid leaking memory when parsing sysfs attributes with integers

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoWatch for changes on the md/sync_action and md/degraded sysfs files
David Zeuthen [Wed, 12 Sep 2012 20:33:12 +0000 (16:33 -0400)]
Watch for changes on the md/sync_action and md/degraded sysfs files

The md(4) driver does not use the usual uevent 'change' mechanism for
notification - instead it excepts user-space to select(2)-ish on a fd
for the sysfs attribute. Annoying. See

 http://www.kernel.org/doc/Documentation/md.txt

for more details.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoNuke debug spew
David Zeuthen [Wed, 12 Sep 2012 16:40:01 +0000 (12:40 -0400)]
Nuke debug spew

Signed-off-by: David Zeuthen <zeuthen@gmail.com>