platform/upstream/udisks2.git
14 years agoDrop obsolete rule for suspended LVM devices
Michael Biebl [Tue, 9 Mar 2010 13:12:20 +0000 (14:12 +0100)]
Drop obsolete rule for suspended LVM devices

udisks-dm-export does not set UDISKS_DM_{STATE,NAME} any more, and recent LVM
versions check and flag private devices themselves, so just drop our own rules
for that.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
14 years agoDrop obsolete rules for private LVM devices
Michael Biebl [Tue, 9 Mar 2010 12:59:40 +0000 (13:59 +0100)]
Drop obsolete rules for private LVM devices

udisks-dm-export does not set UDISKS_DM_{UUID,NAME} any more, and recent LVM
versions check and flag private devices themselves, so just drop our own rules
for that.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
14 years agoRespect DM_UDEV_DISABLE_DISK_RULES_FLAG from current LVM
Michael Biebl [Tue, 9 Mar 2010 12:55:54 +0000 (13:55 +0100)]
Respect DM_UDEV_DISABLE_DISK_RULES_FLAG from current LVM

14 years agoInclude udisks-tcp-bridge.xml in dist tarball
Michael Biebl [Fri, 5 Mar 2010 07:23:30 +0000 (08:23 +0100)]
Include udisks-tcp-bridge.xml in dist tarball

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
14 years agoInclude profile.h in dist tarball
Michael Biebl [Fri, 5 Mar 2010 07:19:54 +0000 (08:19 +0100)]
Include profile.h in dist tarball

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
14 years agoUpdate .gitignore files
Martin Pitt [Wed, 3 Mar 2010 21:48:50 +0000 (22:48 +0100)]
Update .gitignore files

14 years agofix compiler warnings
Martin Pitt [Wed, 3 Mar 2010 21:23:47 +0000 (22:23 +0100)]
fix compiler warnings

Fix a couple of unchecked function call results, and a strict pointer aliasing
violation, which resulted in compiler warnings.

14 years agoin maintainer mode, build with -Werror
Martin Pitt [Wed, 3 Mar 2010 21:06:09 +0000 (22:06 +0100)]
in maintainer mode, build with -Werror

With --enable-maintainer-mode, or with --enable-strict, build with -Werror.

14 years agoInitialize variable before use
David Zeuthen [Wed, 3 Mar 2010 21:12:47 +0000 (16:12 -0500)]
Initialize variable before use

14 years agoBug 26725 — add profiling
Martin Pitt [Wed, 3 Mar 2010 20:20:00 +0000 (21:20 +0100)]
Bug 26725 — add profiling

Add a PROFILE() macro (src/profile.h) which, when building with
--enable-profiling, adds fake access() calls as trace points for startup speed
profiling.

http://people.gnome.org/~federico/news-2006-03.html#login-time-2 describes how
to use strace and turn its output into a nice graph:

  # strace -tttfo /tmp/trace src/udisks-daemon
  [...]
  $ plot-timeline.py -o /tmp/trace.png /tmp/trace

Instrument the most important/complex methods in daemon.c and device.c, and
main().

14 years agoBug 26822 — Fix benchmarking for large files
Daniele Napolitano [Tue, 2 Mar 2010 07:18:47 +0000 (08:18 +0100)]
Bug 26822 — Fix benchmarking for large files

Use lseek64() instead of lseek() in job-drive-benchmark.c (as in the rest of
the code), to also work with large devices.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
14 years agofix media detection of CD-ROMs
Martin Pitt [Mon, 1 Mar 2010 12:36:49 +0000 (13:36 +0100)]
fix media detection of CD-ROMs

Use ID_CDROM_MEDIA property for media detection in update_info(), not
ID_CDROM_MEDIA_STATE. The latter is not set by udev's cdrom_id for pure CD-ROM
media (since it's sometimes wrong), and we are already using ID_CDROM_MEDIA in
our udev rules, so let's be consistent here.

This was exposed by commit c8d02e0, which previously shadowed this bug.

14 years agoInclude stdout in mkfs error output
David Zeuthen [Sat, 27 Feb 2010 16:59:56 +0000 (11:59 -0500)]
Include stdout in mkfs error output

This is to help expose this bug

 mke2fs insists on user interaction even if stdin is not a tty and -F is passed
 https://bugzilla.redhat.com/show_bug.cgi?id=569021

14 years agoBug 24424 - Move UDISKS_MEDIA_AVAILABLE out of the part table prober
David Zeuthen [Thu, 25 Feb 2010 22:19:51 +0000 (17:19 -0500)]
Bug 24424 - Move UDISKS_MEDIA_AVAILABLE out of the part table prober

This change (magically) makes floppy disks work in GNOME. Woot.

14 years agoWe're using the UDISKS_ prefix, not DKD_
David Zeuthen [Thu, 25 Feb 2010 17:28:40 +0000 (12:28 -0500)]
We're using the UDISKS_ prefix, not DKD_

Also pointed out in

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

14 years agoAdd a --disable-remote-access option
David Zeuthen [Wed, 24 Feb 2010 16:36:21 +0000 (11:36 -0500)]
Add a --disable-remote-access option

Certain Enterprise Linux vendors might not want to support the udisks
1.0.x ABI for seven years.

14 years agoUpdate detach helper for current sysfs interface
David Zeuthen [Tue, 23 Feb 2010 21:48:33 +0000 (16:48 -0500)]
Update detach helper for current sysfs interface

Writing 'suspend' to power/level doesn't seem to work these days
(worked in F12 but broken in F13). Also use the new remove/ sysfs
attribute.

14 years agoImprove debug output and support for the detach helper
David Zeuthen [Tue, 23 Feb 2010 20:56:12 +0000 (15:56 -0500)]
Improve debug output and support for the detach helper

This allows easily invoking the tool from a shell, like this

 $ sudo /usr/libexec/udisks-helper-drive-detach /dev/sdb
 Detaching device: /dev/sdb
 SYNCHRONIZE CACHE: FAILED: No such file or directory
 (Continuing despite SYNCHRONIZE CACHE failure.)
 STOP UNIT: OK
 Unbind USB interface driver: OK
 Suspend USB Device: OK
 $ echo $?
 0

14 years agoUse DM_NAME instead of DM_UUID when determining partition number
David Zeuthen [Tue, 23 Feb 2010 17:31:07 +0000 (12:31 -0500)]
Use DM_NAME instead of DM_UUID when determining partition number

Gah, looks like DM_UUID is not always set for partitions on multipath
devices. Let's hope it's the case for DM_NAME.

14 years agotestsuite: Fix LVM tests
Martin Pitt [Wed, 17 Feb 2010 11:29:37 +0000 (12:29 +0100)]
testsuite: Fix LVM tests

Turns out that current LVM versions/rules do create by-id symlinks for RAID
mirror images, on purpose. So do not fail on them, just check that they do not
have a real IdUsage/IdUuid.

14 years agoUpdate for new liblvm2app library
David Zeuthen [Tue, 16 Feb 2010 19:24:27 +0000 (14:24 -0500)]
Update for new liblvm2app library

Several things changed in liblvm2app

 - sizes are now reported in bytes instead of sectors
 - a couple of new functions were added

You will need lvm2 version 2.02.61 or later (on Fedora Rawhide, this
is available as lvm2-2.02.61-1.fc13.x86_64). Unfortunately the liblvm2
pc version number is stuck at 2.1 so we can't require this version in
configure.in. I've asked the LVM team to fix that.

14 years agoAdd doc/udisks-overrides.txt so 'make dist' works
David Zeuthen [Mon, 15 Feb 2010 23:28:42 +0000 (18:28 -0500)]
Add doc/udisks-overrides.txt so 'make dist' works

Hmm, need to investigate later why this is needed.

14 years agoFix compiler warning
David Zeuthen [Mon, 15 Feb 2010 22:51:15 +0000 (17:51 -0500)]
Fix compiler warning

14 years agoExport alignment offset for a partition
David Zeuthen [Mon, 15 Feb 2010 20:15:42 +0000 (15:15 -0500)]
Export alignment offset for a partition

14 years agoRework partition table probing
David Zeuthen [Mon, 15 Feb 2010 19:53:54 +0000 (14:53 -0500)]
Rework partition table probing

In particular, always respect UDISKS_PARTITION_* and
UDISKS_PARTITION_TABLE_* udev properties.

Also, temporarily, use g_getenv() to retrieve properties in
udisks-part-id. It seems like libudev doesn't return properties
correctly in some cases involving dm-multipath. Will need to
investigate.

14 years agoAdd support for "disable polling" udev property
Martin Pitt [Mon, 15 Feb 2010 16:02:30 +0000 (17:02 +0100)]
Add support for "disable polling" udev property

Do not poll a device which has UDISKS_DISABLE_POLLING set. Some known-broken
CD-ROM drives cause a lot of CPU activity when being polled, so allow admins to
suppress polling with a local udev rule like

  SUBSYSTEM=="block", ENV{ID_VENDOR}=="Optiarc*", ENV{ID_MODEL}=="*AD-7640S*", \
      ENV{UDISKS_DISABLE_POLLING}="1"

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

14 years agoMake sure udisks-helper-mdadm-expand is included in the dist tarball
Michael Biebl [Fri, 12 Feb 2010 11:12:27 +0000 (12:12 +0100)]
Make sure udisks-helper-mdadm-expand is included in the dist tarball

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
14 years agotestsuite: check --localstatedir configuration
Martin Pitt [Thu, 11 Feb 2010 10:23:12 +0000 (11:23 +0100)]
testsuite: check --localstatedir configuration

If the local build tree is not built with a sensible --localstatedir, i. e.
${localstatedir}/{run,lib}/udisks/ does not exist, the test suite is doomed to
fail and requires lots of manual cleanup.

Detect this situation and fail early with a sensible error message. This will
also cause the test suite to not really run on a mere "distcheck" without
configure arguments.

14 years agoRobustify evaluation of DM_SUSPEND
Martin Pitt [Wed, 10 Feb 2010 20:57:32 +0000 (21:57 +0100)]
Robustify evaluation of DM_SUSPEND

If a DM device does not have DM_SUSPEND at all, do not consider it suspended.

14 years agoBug 24446 — automake integration of test suite
Martin Pitt [Fri, 4 Dec 2009 14:56:47 +0000 (15:56 +0100)]
Bug 24446 — automake integration of test suite

This ensures that the test script is shipped with the distribution tarball, and
the tests are run during "make check" through sudo.

14 years agoBug 24446 — Add a test suite
Martin Pitt [Wed, 10 Feb 2010 18:56:40 +0000 (19:56 +0100)]
Bug 24446 — Add a test suite

Add a test suite which checks operations on a fake device (currently a RAID-0
md built from a RAM disk).  This is useful for regression and system/distro
integration testing, since it will only succeed if working versions of
cryptsetup, udev rules, etc. are installed.

Current coverage:
 - tests local build tree or system binaries, depending from where it is run
 - udisks --show-info
 - create/relabel/mount/unmount/fsck/open files/take ownership for supported
file systems (ext[234], minix, xfs, ntfs, vfat, swap), with both command line
tools (and udisks detection) as well as udisks D-Bus interface
 - LUKS create/teardown/mount/unmount/change password
 - Partition create/flags/modify/delete for MBR and GPT (APM tests are present,
but disabled)
 - SMART status/real HD/simulate
 - LVM single LV/single LV with RAID-1
 - Manager functionality: Enumerate*, FindDeviceBy*, Inhibition

14 years agoBug 24446 — Add --helper-dir option
Martin Pitt [Wed, 10 Feb 2010 18:39:44 +0000 (19:39 +0100)]
Bug 24446 — Add --helper-dir option

Add daemon option --helper-dir to specify helper directory. This is useful for
running the daemon from the local build tree for testing (--helper-dir
src/helpers).

Remove explicit PACKAGE_LIBEXEC_DIR from job invocations, since job_new()
already searches $PATH and the daemon sets $PATH to a known-good value. So
--helper-dir only prepends the custom directory to $PATH.

14 years agoSupport building without lvm2app
Martin Pitt [Wed, 10 Feb 2010 18:21:05 +0000 (19:21 +0100)]
Support building without lvm2app

14 years agoAdd LinuxMdExpand method and rename LinuxMdAddComponent to LinuxMdAddSpare
David Zeuthen [Fri, 5 Feb 2010 21:56:11 +0000 (16:56 -0500)]
Add LinuxMdExpand method and rename LinuxMdAddComponent to LinuxMdAddSpare

14 years agoWhen creating a LV, ensure that it is part of PV metadata until returning
David Zeuthen [Thu, 4 Feb 2010 19:18:47 +0000 (14:18 -0500)]
When creating a LV, ensure that it is part of PV metadata until returning

This is important in gnome-disk-utility where we only displays LVs
that are part of PV metadata.

14 years agoMake sure all devices are returned, even when handling change events
David Zeuthen [Thu, 4 Feb 2010 19:15:53 +0000 (14:15 -0500)]
Make sure all devices are returned, even when handling change events

We actually remove the device from map_native_path_to_device during a
change event. This means that the device being handled in e.g. update_info()
isn't part of what daemon_local_get_all_devices() returns.

14 years agoExport multipath parameters as a textual string
David Zeuthen [Tue, 26 Jan 2010 22:50:43 +0000 (17:50 -0500)]
Export multipath parameters as a textual string

The string itself is defined here

http://christophe.varoqui.free.fr/refbook.html

We could play games like decoding the string daemon side and export a
complicated object model but it's much easier to pint that to the
client.

14 years agoCopy identifying data from multipath components onto the multipath device
David Zeuthen [Tue, 26 Jan 2010 19:22:34 +0000 (14:22 -0500)]
Copy identifying data from multipath components onto the multipath device

14 years agoDon't copy data from each path into the virtual multipath device
David Zeuthen [Tue, 26 Jan 2010 19:06:29 +0000 (14:06 -0500)]
Don't copy data from each path into the virtual multipath device

We punt this responsibility to the client.

14 years agoRequire both SERIAL and WWN to be non-empty when matching up similar drives
David Zeuthen [Tue, 26 Jan 2010 18:11:14 +0000 (13:11 -0500)]
Require both SERIAL and WWN to be non-empty when matching up similar drives

The previous behavior was to require either-or. Unfortunately this
easily matched N-in-one card readers which wasn't optimal.

14 years agoAdd udev rules for detecting some common USB card readers
David Zeuthen [Tue, 26 Jan 2010 17:55:18 +0000 (12:55 -0500)]
Add udev rules for detecting some common USB card readers

Should probably port everything from

 /usr/share/hal/fdi/information/10freedesktop/10-usb-card-readers.fdi

some day.

14 years agoTighten up checks for detecting kpartx partitions for dm-multipath
David Zeuthen [Tue, 26 Jan 2010 13:54:36 +0000 (08:54 -0500)]
Tighten up checks for detecting kpartx partitions for dm-multipath

We inadvertenly tagged any linear mapping - ensure the source that we
map for is really a dm-multipath device.

14 years agoMake sure to fsync(2) the main block device when scrubbing signatures
David Zeuthen [Tue, 26 Jan 2010 13:47:50 +0000 (08:47 -0500)]
Make sure to fsync(2) the main block device when scrubbing signatures

14 years agoAdd a DriveSimilarDevices property
David Zeuthen [Fri, 22 Jan 2010 22:50:32 +0000 (17:50 -0500)]
Add a DriveSimilarDevices property

This property can help clients figure out if multipath isn't set up.

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