platform/upstream/udisks2.git
12 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>
12 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.

12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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

12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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.

12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 years agoSet Block:PreferredDevice to /dev/md/$MD_NAME, if available
David Zeuthen [Wed, 12 Sep 2012 16:37:23 +0000 (12:37 -0400)]
Set Block:PreferredDevice to /dev/md/$MD_NAME, if available

It's much better to present /dev/md/my-raid than /dev/md127.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoDon't error out with "error stopping" if failing to start a RAID array
David Zeuthen [Wed, 12 Sep 2012 16:27:31 +0000 (12:27 -0400)]
Don't error out with "error stopping" if failing to start a RAID array

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoAdd Start()/Stop() methods to MDRaid D-Bus interface
David Zeuthen [Tue, 11 Sep 2012 16:56:42 +0000 (12:56 -0400)]
Add Start()/Stop() methods to MDRaid D-Bus interface

This makes it possible to start/stop RAID arrays

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

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agointegration-test: Skip r/o mount checks for XFS and reiserfs
Martin Pitt [Mon, 10 Sep 2012 13:50:10 +0000 (15:50 +0200)]
integration-test: Skip r/o mount checks for XFS and reiserfs

These are known-broken right now, and there is no workaround. See

  https://github.com/karelzak/util-linux/issues/17
  https://github.com/karelzak/util-linux/issues/18

12 years agoProperly initialize variables
David Zeuthen [Sat, 8 Sep 2012 21:01:13 +0000 (17:01 -0400)]
Properly initialize variables

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoAdd MDRaid:SyncAction and MDRaid:Degraded properties
David Zeuthen [Fri, 7 Sep 2012 20:51:18 +0000 (16:51 -0400)]
Add MDRaid:SyncAction and MDRaid:Degraded properties

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoAdd MDRaid:Size property and utility to get member, raid block devices
David Zeuthen [Fri, 7 Sep 2012 17:59:34 +0000 (13:59 -0400)]
Add MDRaid:Size property and utility to get member, raid block devices

Also remove the MDRaid:Runnning property as this can be inferred from
the array state property that we are going to add shortly.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoEnable large file support
Martin Pitt [Fri, 7 Sep 2012 15:06:51 +0000 (17:06 +0200)]
Enable large file support

Without this, on 32 bit platforms you get a warning and syslog entry like

[WARNING]: Error statting /swapfile: Value too large for defined data type [udisksmountmonitor.c:554, udisks_mount_monitor_get_swaps()]

when you have a /swapfile which is bigger than 2 GB.

https://launchpad.net/bugs/1039022

12 years agointegration-test: Fix start_daemon() for restarts
Martin Pitt [Fri, 7 Sep 2012 06:47:08 +0000 (08:47 +0200)]
integration-test: Fix start_daemon() for restarts

klass.manager is already initialized when we are restarting; ensure we properly
wait for the daemon to start up.

12 years agointegration-tests: Check handling of existing mount points
Martin Pitt [Fri, 7 Sep 2012 05:52:51 +0000 (07:52 +0200)]
integration-tests: Check handling of existing mount points

udisks tracks its mounts in /run/udisks2/mounted-fs, so udisks generated mount
points should be reused across daemon restarts, but manually created mount
points should not be.

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

12 years agointegration-test: Split out and fix daemon startup
Martin Pitt [Fri, 7 Sep 2012 05:50:26 +0000 (07:50 +0200)]
integration-test: Split out and fix daemon startup

Split out start_daemon() and stop_daemon() into separate class methods, so that
tests can check properties that should persist across daemon restarts.

Also fix the startup to add --replace, to ensure that we are really talking to
the udisksd launched by the test suite, not to an already existing one running
in the system.