platform/upstream/udisks2.git
16 years agorefresh SMART data on startup and every 30 minutes
David Zeuthen [Sat, 3 May 2008 22:21:39 +0000 (18:21 -0400)]
refresh SMART data on startup and every 30 minutes

16 years agodon't run DriveSmartRefreshData as a job
David Zeuthen [Sat, 3 May 2008 21:43:24 +0000 (17:43 -0400)]
don't run DriveSmartRefreshData as a job

We also want to run this from the daemon every 30 minutes or so.

16 years agorework how SMART is done; express it in properties and export attributes
David Zeuthen [Sat, 3 May 2008 21:16:09 +0000 (17:16 -0400)]
rework how SMART is done; express it in properties and export attributes

Also add some test files from the smartmontools project and provide a
new simulate= option. This is very useful for testing clients
consuming this data. See test/smart/README for details.

16 years agorip out the inhibit code from the daemon
David Zeuthen [Mon, 28 Apr 2008 22:59:40 +0000 (18:59 -0400)]
rip out the inhibit code from the daemon

In the future we want the daemon around so it can continously monitor
RAID and SMART. Need to figure out if we need to start it at boot
time.

16 years agoadd some more docs
David Zeuthen [Mon, 28 Apr 2008 18:52:16 +0000 (14:52 -0400)]
add some more docs

16 years agorename some methods so the API is easier to read
David Zeuthen [Mon, 28 Apr 2008 03:57:54 +0000 (23:57 -0400)]
rename some methods so the API is easier to read

16 years agowork more on the D-Bus docs
David Zeuthen [Mon, 28 Apr 2008 00:22:20 +0000 (20:22 -0400)]
work more on the D-Bus docs

16 years agoadd some polish to the D-Bus documentation
David Zeuthen [Sun, 27 Apr 2008 18:50:26 +0000 (14:50 -0400)]
add some polish to the D-Bus documentation

16 years agofinish port to new DeviceKit
David Zeuthen [Sun, 27 Apr 2008 18:49:46 +0000 (14:49 -0400)]
finish port to new DeviceKit

16 years agoproperly document the D-Bus interfaces
David Zeuthen [Sat, 26 Apr 2008 01:15:31 +0000 (21:15 -0400)]
properly document the D-Bus interfaces

16 years agoport to new DeviceKit interface
David Zeuthen [Fri, 25 Apr 2008 18:00:38 +0000 (14:00 -0400)]
port to new DeviceKit interface

This still needs a bit of work...

16 years agoMerge branch 'master' of ssh://david@people.freedesktop.org/~/DeviceKit-disks
David Zeuthen [Thu, 10 Apr 2008 03:47:04 +0000 (23:47 -0400)]
Merge branch 'master' of ssh://david@people.freedesktop.org/~/DeviceKit-disks

16 years agoavoid gvfs for now
David Zeuthen [Thu, 10 Apr 2008 03:46:31 +0000 (23:46 -0400)]
avoid gvfs for now

see http://bugzilla.gnome.org/show_bug.cgi?id=526454

16 years agoclear fs signatures if we detect a partition table
David Zeuthen [Wed, 9 Apr 2008 05:32:07 +0000 (01:32 -0400)]
clear fs signatures if we detect a partition table

This is one reason we need to get partition table scanning into
vol_id. This is to fix a case where there's an old RAID signature for
a whole disk RAID component.

16 years agofix warnings on x86_64
David Zeuthen [Wed, 9 Apr 2008 05:10:31 +0000 (01:10 -0400)]
fix warnings on x86_64

16 years agoadd a 'last_self_test_result' return value to the RetrieveSmartData() method
David Zeuthen [Sun, 6 Apr 2008 07:26:31 +0000 (03:26 -0400)]
add a 'last_self_test_result' return value to the RetrieveSmartData() method

16 years agofix 'make distcheck'
David Zeuthen [Sat, 5 Apr 2008 04:09:52 +0000 (00:09 -0400)]
fix 'make distcheck'

16 years agowork some more on linux-md software RAID
David Zeuthen [Sat, 5 Apr 2008 03:07:23 +0000 (23:07 -0400)]
work some more on linux-md software RAID

Sorry for the big patch.

16 years agoadd methods to assemble and stop linux md raid arrays
David Zeuthen [Mon, 31 Mar 2008 19:12:23 +0000 (15:12 -0400)]
add methods to assemble and stop linux md raid arrays

The AssembleLinuxMdArray() method is on the daemon; part of this patch
extends the job facility to be used when device == NULL.

16 years agoadd support for recognizing md devices
David Zeuthen [Mon, 31 Mar 2008 01:32:08 +0000 (21:32 -0400)]
add support for recognizing md devices

16 years agoadd support for recognizing Linux md components
David Zeuthen [Sun, 30 Mar 2008 23:49:28 +0000 (19:49 -0400)]
add support for recognizing Linux md components

Depends on a patch to udev for making vol_id export some more
information. Sent to Kay for review.

16 years agoimprove md device handling
David Zeuthen [Sun, 30 Mar 2008 22:44:51 +0000 (18:44 -0400)]
improve md device handling

16 years agoalso fail RetrieveSmartData if smartctl returns 0x01
David Zeuthen [Sun, 30 Mar 2008 20:12:49 +0000 (16:12 -0400)]
also fail RetrieveSmartData if smartctl returns 0x01

16 years agotell libparted to poke the kernel on partition table changes
David Zeuthen [Sun, 30 Mar 2008 18:38:29 +0000 (14:38 -0400)]
tell libparted to poke the kernel on partition table changes

16 years agomake the task name depend on the test we're running
David Zeuthen [Sun, 30 Mar 2008 18:38:13 +0000 (14:38 -0400)]
make the task name depend on the test we're running

16 years agofirst stab at S.M.A.R.T. support
David Zeuthen [Sun, 30 Mar 2008 06:43:38 +0000 (02:43 -0400)]
first stab at S.M.A.R.T. support

Yeah, yuck, screenscraping the output of smartctl(8) sucks. But there
is no library. Have to think about how to export more data such as the
attributes. Also needs to make this work with SCSI drives as the
smartctl(8) output depends on whether it's SCSI or ATA (!).

http://people.freedesktop.org/~david/gdu-smart-and-healthy.png
http://people.freedesktop.org/~david/gdu-smart-and-failing.png

16 years agosplit drive-media into two properties (compatibility and current)
David Zeuthen [Sat, 29 Mar 2008 18:38:35 +0000 (14:38 -0400)]
split drive-media into two properties (compatibility and current)

16 years agoadd support for fslabel change, read_only and (partial) linux md raid
David Zeuthen [Sat, 29 Mar 2008 07:42:36 +0000 (03:42 -0400)]
add support for fslabel change, read_only and (partial) linux md raid

16 years agoadd another card reader
David Zeuthen [Thu, 27 Mar 2008 02:13:47 +0000 (22:13 -0400)]
add another card reader

16 years agointroduce a new property 'drive-media' to specify media compatibility
David Zeuthen [Thu, 27 Mar 2008 01:30:35 +0000 (21:30 -0400)]
introduce a new property 'drive-media' to specify media compatibility

Also introduce a few hackish udev rules to set it to something
sane. As the comments in 95-devkit-disks.rules says, this needs to be
revisited.

16 years agoadd new properties drive-connection-interface and drive-connection-speed
David Zeuthen [Wed, 26 Mar 2008 19:20:40 +0000 (15:20 -0400)]
add new properties drive-connection-interface and drive-connection-speed

16 years agoonly tear down crypto cleartext devices set up by ourselves
David Zeuthen [Tue, 25 Mar 2008 18:19:01 +0000 (14:19 -0400)]
only tear down crypto cleartext devices set up by ourselves

16 years agofix a misleading comment
David Zeuthen [Tue, 25 Mar 2008 09:06:52 +0000 (05:06 -0400)]
fix a misleading comment

16 years agotear down crypto devices when a device is unsafely removed
David Zeuthen [Tue, 25 Mar 2008 09:03:50 +0000 (05:03 -0400)]
tear down crypto devices when a device is unsafely removed

Streamline the whole way force removal works. It shouldn't be hard to
add force removal to RAID (e.g. md) and LVM arrays once we get around
to adding support for these.

We still need to check whether the encrypted device was set up by us
before tearing it down. That's for the next patch.

16 years agoforcibly unmount devices mounted by ourselves on unsafe media removal
David Zeuthen [Tue, 25 Mar 2008 07:35:22 +0000 (03:35 -0400)]
forcibly unmount devices mounted by ourselves on unsafe media removal

16 years agomake the fd's used to communicate with childs non blocking
David Zeuthen [Tue, 25 Mar 2008 04:16:52 +0000 (00:16 -0400)]
make the fd's used to communicate with childs non blocking

This fixes a grave bug where the daemon was unresponsive for many many
seconds. Especially during ext3 fs creation. Also read to end for
stderr and stdout when the child terminates. This fixes a long
standing bug where sometimes we didn't get all the data.

We now also pass stdout to the JobCompleted callback. Might come in
handy later.

16 years agomake sure holders/ is properly updated
David Zeuthen [Tue, 25 Mar 2008 02:40:57 +0000 (22:40 -0400)]
make sure holders/ is properly updated

... and remove some debugging spew as well.

16 years agomake libparted poke the kernel when adding/deleting partitions
David Zeuthen [Tue, 25 Mar 2008 01:54:38 +0000 (21:54 -0400)]
make libparted poke the kernel when adding/deleting partitions

Turns out that libparted is already using the right ioctl's mentioned
in commit 6a2a1f2b7cc7b52b277aa9788a3a0bb280227441. So now we can
correctly add/delete partitions even when other partitions on the same
disk are busy.

16 years agoto maintain integrity, use the new is-busy property to refuse service
David Zeuthen [Tue, 25 Mar 2008 00:33:55 +0000 (20:33 -0400)]
to maintain integrity, use the new is-busy property to refuse service

For example, we now throw the .IsBusy exception on CreatePartitionTable()
if one of the existing partitions is busy.

Prior to this patch we'd happily create a new partition table even
though a dm-crypt target were holding one of the partitions. Which
broke in interesting ways when we issued BLKRRPART. This is because
the kernel is rather dumb and BLKRRPART won't work if any of the
partitions are busy.

The solution, I think, involves judicious use of the "add partition"
and "del partition" ioctls to spoonfeed the kernel this information.
Will try and do this next. As an upside, I think the annoying "remove
all partitions, then add them back again" artifact will go away with
this. So maybe it's all good. We'll see.

16 years agointroduce a new property device-is-busy
David Zeuthen [Mon, 24 Mar 2008 23:25:59 +0000 (19:25 -0400)]
introduce a new property device-is-busy

16 years agoadd support for option encrypt= for CreateFilesystem
David Zeuthen [Mon, 24 Mar 2008 05:40:43 +0000 (01:40 -0400)]
add support for option encrypt= for CreateFilesystem

This makes it painfully simple to do UI's like this

http://people.freedesktop.org/~david/gdu-luks-easy.png

16 years agoignore temporary private cryptsetup devices
David Zeuthen [Sun, 23 Mar 2008 23:20:46 +0000 (19:20 -0400)]
ignore temporary private cryptsetup devices

For this to work you'll need HEAD of DeviceKit with this patch

http://gitweb.freedesktop.org/?p=users/david/DeviceKit.git;a=commitdiff;h=3a11b7f9a5fe0efb1918055ec49516b648e45819

16 years agoadd and implement new ChangeSecretForEncrypted method call
David Zeuthen [Sun, 23 Mar 2008 23:03:22 +0000 (19:03 -0400)]
add and implement new ChangeSecretForEncrypted method call

16 years agoupdate the job state before returning value of the the method called
David Zeuthen [Sun, 23 Mar 2008 19:22:02 +0000 (15:22 -0400)]
update the job state before returning value of the the method called

16 years agoadd support for UnlockEncrypted and LockEncrypted methods
David Zeuthen [Sun, 23 Mar 2008 18:10:11 +0000 (14:10 -0400)]
add support for UnlockEncrypted and LockEncrypted methods

On Linux this is using cryptsetup(8).

16 years agoadd support for encrypted block devices
David Zeuthen [Sat, 22 Mar 2008 20:32:39 +0000 (16:32 -0400)]
add support for encrypted block devices

The namespace is abstract and I've implemented this for dm-crypt for
now (not sure what else there is to support on Linux).

This relies on some device-mapper patches, see

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

that needs to go upstream. Next patch will include methods for
locking, unlocking and managing keys.

16 years agobetter way of avoiding detecting a VBR as an MBR
David Zeuthen [Sat, 22 Mar 2008 06:40:22 +0000 (02:40 -0400)]
better way of avoiding detecting a VBR as an MBR

16 years agoRevert "rely on proper change events from the kernel and udev"
David Zeuthen [Sat, 22 Mar 2008 06:30:04 +0000 (02:30 -0400)]
Revert "rely on proper change events from the kernel and udev"

This reverts commit 071b5825390e537bfbc6650582a81c427017a9e6.

16 years agorely on proper change events from the kernel and udev
David Zeuthen [Sat, 22 Mar 2008 06:28:15 +0000 (02:28 -0400)]
rely on proper change events from the kernel and udev

Relies on patched udev rules as mentioned here

http://gitweb.freedesktop.org/?p=users/david/gnome-disk-utility.git;a=commitdiff;h=d4098ad91e73414afdd8b49a8c57b42d31ff7998

16 years agoif creating a fs on the main device, signal kernel to reread partition table
David Zeuthen [Sat, 22 Mar 2008 06:17:47 +0000 (02:17 -0400)]
if creating a fs on the main device, signal kernel to reread partition table

16 years agocheck that incoming data is valid UTF-8
David Zeuthen [Sat, 22 Mar 2008 05:34:30 +0000 (01:34 -0400)]
check that incoming data is valid UTF-8

Otherwise libdbus.so will terminate us and then it's crash city.

16 years agoadd a kludge to avoid detecting vfat on a whole disk as a partition table
David Zeuthen [Sat, 22 Mar 2008 05:33:29 +0000 (01:33 -0400)]
add a kludge to avoid detecting vfat on a whole disk as a partition table

I don't really know how to make a distinction between a MBR and a
VBR. Both have the MSDOS magic at 0x1fe.

16 years agosupport mkswap and mkntfs
David Zeuthen [Sat, 22 Mar 2008 03:26:43 +0000 (23:26 -0400)]
support mkswap and mkntfs

Also add a note that we need to fix usage of g_io_channel_read_line();
it blocks and we don't want the daemon process to block at all.

16 years agofix deleting extended partitions
David Zeuthen [Sat, 22 Mar 2008 03:03:32 +0000 (23:03 -0400)]
fix deleting extended partitions

We need to zero the contents of the partition _after_ it has been
removed from the partitioning table. If we do it before, we overwrite
important metadata in extended partitions.

16 years agorefuse to create a partition table if an enclosed partition is mounted
David Zeuthen [Fri, 21 Mar 2008 23:02:42 +0000 (19:02 -0400)]
refuse to create a partition table if an enclosed partition is mounted

16 years agoimplement CreatePartitionTable method call
David Zeuthen [Fri, 21 Mar 2008 21:56:20 +0000 (17:56 -0400)]
implement CreatePartitionTable method call

16 years agoadd ModifyPartition dbus call
David Zeuthen [Fri, 21 Mar 2008 05:41:23 +0000 (01:41 -0400)]
add ModifyPartition dbus call

16 years agoadd partition deletion and creation
David Zeuthen [Thu, 20 Mar 2008 02:48:52 +0000 (22:48 -0400)]
add partition deletion and creation

16 years agoforgot to add bash completion script
David Zeuthen [Mon, 17 Mar 2008 21:24:53 +0000 (17:24 -0400)]
forgot to add bash completion script

16 years agoadd mkfs support and iterate over how we handle jobs
David Zeuthen [Mon, 17 Mar 2008 20:46:05 +0000 (16:46 -0400)]
add mkfs support and iterate over how we handle jobs

16 years agouse partition size and offset from part_id
David Zeuthen [Fri, 14 Mar 2008 03:43:01 +0000 (23:43 -0400)]
use partition size and offset from part_id

The kernel sets the size of the extended partition to 1kb to be
helpful so people won't run mkswap or mkfs on it (but big enough to
run lilo). Sigh.

16 years agoapparently the kernel exports sizes of 512 byte sectors
David Zeuthen [Fri, 14 Mar 2008 03:20:18 +0000 (23:20 -0400)]
apparently the kernel exports sizes of 512 byte sectors

16 years agofix block size
David Zeuthen [Fri, 14 Mar 2008 03:12:03 +0000 (23:12 -0400)]
fix block size

Apparently block sizes != 512 aren't that exotic. My Apple iPod 80G
uses 2048 byte sectors. Weirdos.

16 years agoadd missing bits for a proper Mount() and Unmount() implementation
David Zeuthen [Fri, 14 Mar 2008 00:27:57 +0000 (20:27 -0400)]
add missing bits for a proper Mount() and Unmount() implementation

16 years agofirst stab at implementing Mount() and Unmount()
David Zeuthen [Thu, 13 Mar 2008 07:02:15 +0000 (03:02 -0400)]
first stab at implementing Mount() and Unmount()

It works pretty well; there's a few TODO's left though.

16 years agochange the rate limit from 800 msec to 50 msec
David Zeuthen [Wed, 12 Mar 2008 07:49:05 +0000 (03:49 -0400)]
change the rate limit from 800 msec to 50 msec

This is currently commented out; it depends on a patch for gio that
hopefully will land in 2.16.2.

http://bugzilla.gnome.org/show_bug.cgi?id=521946

16 years agoreport and monitor whether a device is mounted
David Zeuthen [Wed, 12 Mar 2008 07:13:27 +0000 (03:13 -0400)]
report and monitor whether a device is mounted

16 years agorework partition table detection and add some new properties
David Zeuthen [Wed, 12 Mar 2008 05:35:36 +0000 (01:35 -0400)]
rework partition table detection and add some new properties

16 years agoinstall D-Bus introspection data in /usr/share/dbus-1/interfaces
David Zeuthen [Wed, 12 Mar 2008 05:34:57 +0000 (01:34 -0400)]
install D-Bus introspection data in /usr/share/dbus-1/interfaces

16 years agouse libdevkit instead of spawning udevinfo ourselves
David Zeuthen [Sun, 9 Mar 2008 07:07:50 +0000 (03:07 -0400)]
use libdevkit instead of spawning udevinfo ourselves

16 years agowork on the partition detection code and remove the holders/slaves for now
David Zeuthen [Sun, 9 Mar 2008 03:37:30 +0000 (22:37 -0500)]
work on the partition detection code and remove the holders/slaves for now

16 years agoavoid emitting add events on startup
David Zeuthen [Sat, 8 Mar 2008 07:18:26 +0000 (02:18 -0500)]
avoid emitting add events on startup

16 years agomake sure we inhibit shutdown when monitoring from devkit-disks
David Zeuthen [Sat, 8 Mar 2008 07:18:06 +0000 (02:18 -0500)]
make sure we inhibit shutdown when monitoring from devkit-disks

16 years agoadd partition table detection
David Zeuthen [Sat, 8 Mar 2008 06:43:44 +0000 (01:43 -0500)]
add partition table detection

Right now this includes a lame part_id tool that will get called by
udev; this needs to be cleaned up and moved to udev proper (means
avoiding glib etc.).

16 years agodon't include by-label stuff in device-file-by-uid
David Zeuthen [Fri, 7 Mar 2008 20:40:39 +0000 (15:40 -0500)]
don't include by-label stuff in device-file-by-uid

Many devices put the same label on the fs; for example Canon SLR's
normally call it EOS_DIGITAL. So it's not really unique.

16 years agomore work in progress on properties
David Zeuthen [Fri, 7 Mar 2008 20:39:29 +0000 (15:39 -0500)]
more work in progress on properties

16 years agodefine some more properties
David Zeuthen [Thu, 6 Mar 2008 06:52:35 +0000 (01:52 -0500)]
define some more properties

This is definitely work in progress.

16 years agoavoid getters and setter and export information as properties
David Zeuthen [Thu, 6 Mar 2008 06:12:48 +0000 (01:12 -0500)]
avoid getters and setter and export information as properties

16 years agoadd an error/exception for not supported
David Zeuthen [Wed, 5 Mar 2008 08:03:18 +0000 (03:03 -0500)]
add an error/exception for not supported

16 years agofix distcheck
David Zeuthen [Wed, 5 Mar 2008 07:33:36 +0000 (02:33 -0500)]
fix distcheck

16 years agoadd mkinstalldirs
David Zeuthen [Wed, 5 Mar 2008 07:30:39 +0000 (02:30 -0500)]
add mkinstalldirs

16 years agoadd udev rules file
David Zeuthen [Wed, 5 Mar 2008 07:27:32 +0000 (02:27 -0500)]
add udev rules file

16 years agoinitial commit
David Zeuthen [Wed, 5 Mar 2008 07:26:32 +0000 (02:26 -0500)]
initial commit