History log of /haiku/headers/private/kernel/disk_device_manager/KDiskDevice.h
Revision Date Author Comments
# b74a0983 12-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Got rid of the duplicated functionalities provided by RWLocker.cpp, and
Locker.cpp.
* The services are now using recursive_locks, and rw_locks instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33548 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a365e1cf 11-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Bryce Groff, some changes by myself:
* devfs:
- devfs_[un]publish_partition(): They no longer get the partition path as
parameter, but rather the device path and the partition name.
- Added devfs_rename_partition(), which renames an already published
partition node.
* KPartition/KDiskDevice:
- Replaced the fPublished flag by fPublishedName, the name under which the
partition is published. This simplifies UnpublishDevice() and makes it
practically infallible.
- Added GetFileName(), which only returns the partition's file name.
Simplified GetPath() by using it.
- When a partition is added/removed the subsequent sibling partitions get a
new index. Now we also rename their published device nodes (and those of
their descendents). When something goes wrong we unpublish the concerned
partition's device to be on the safe side. Would be a shame to accidentally
format the wrong partition, eh? :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31520 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 73339925 12-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

On a media change, the KDiskDevice must do a bit more than it did:
* it now updates the partition data,
* the flags,
* and the disk geometry - and that now allows the session add-on to actually
detect a newly inserted CD.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22918 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 88ef4111 12-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* Added an UninitializeMedia() method to KDiskDevice that also resets the
device geometry.
* If SetTo() reports no media, and GetGeometry() fails, the device geometry
is now reset as well.
* KDiskDeviceManager::_ScanPartition() no longer unmarks the partition busy;
this is now done by the caller, and done independently from the outcome of
_ScanPartition(). This also fixes the problem that devices with no media
were never marked unbusy (and thus were ignored subsequently).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22912 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8354dac7 01-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Folded KPhysicalPartition into KPartition. Removed the notion of shadow
partitions from the disk device manager.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22800 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e544dd59 19-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

* Fixed a possible dead lock between the kernel daemon and the DDM; the media
status checker now only tries to lock the manager, it won't wait anymore.
* Added MediaChanged() and UpdateMediaStatusIfNeeded() methods to KDiskDevice.
* KDiskDeviceManager::_CheckMediaStatus() now uses these new methods; it should
no longer detect removed media more than once :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22621 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 80474417 17-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

The disk device manager now periodically checks for media changes - all it does
is dump its findings, but it's an (untested) start.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22598 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c277ab01 26-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Make the compiler happy. Shadowing super class methods with different signature is a very annoying C++ feature.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11069 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1b5f6266 27-Oct-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

* Changes to use KPath where possible now.
* Made GetMediaStatus() a bit more robust. If the ioctl fails (e.g. if it
is not implemented as in Thomas' drivers), it gets the device geometry
and does not fail, if the device is not removable.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9546 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5d22fa96 14-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Shadow partition related changes:
* Fixed handling of the deletion (removal) of shadow partitions. Formerly
the shadow partition corresponding to the disk device wasn't removed
properly.
* Added a shadow_id field to the user_partition_data structure which
contains the ID of the shadow partition, if it is one. The id field
will hold the ID of the physical partition.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3974 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 55bf93d8 08-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed handling of partition and device flags and statuses.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3898 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c0455c33 06-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

* More shadow partition support.
* Writing disk device/partition data into userland buffer added.
* Migration of some definitions into <DiskDeviceDefs.h> header.
* Small bug fixes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3882 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a162af3b 04-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Made KPartition abstract and derived two classes, KPhysicalPartition
and KShadowPartition from it. KPhysicalPartition represents a partition
that exists on-disk, while KShadowPartition is a partition edited by the
API user, but not yet written to disk. Related changes in other classes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3851 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b23394f9 24-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

* Implemented what was left to do for KDiskDevice and KPartition
management regarding removal and deletion of objects.
* Fixed the file disk system related stuff. KFileDiskSystem now uses the
virtualdrive driver. The former method was seemed simple and brilliant,
but the B_SET_PARTITION ioctl wouldn't work.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3650 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bdc530c7 22-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Some small adjustments for KFileDiskDevice. Added Dump().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3600 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f7672ebc 13-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

* Made {Publish,Unpublish}Device() virtual and implemented them in
KPartition and as no-ops in KDiskDevice.
* Prefixed partition names with "obos_" to not interfere with R5's
partition names.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3509 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ef9b1b52 12-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented a preliminary disk device scanning in KDiskDeviceManager.
Some changes to KPartition, KDiskDevice, KDiskSystem on this way.
Still missing is KPartition::Publish() and its invocation in
KDiskDeviceManager. Then everything should be in place to start with
porting the scanning parts of our disk system modules.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3486 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 537635f1 10-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented basic parts of KDiskDevice.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3459 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4c212afe 09-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Headers for the disk device manager. Very early state.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3454 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b74a098352bb66534c12aafafff5ce813fbf905b 12-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Got rid of the duplicated functionalities provided by RWLocker.cpp, and
Locker.cpp.
* The services are now using recursive_locks, and rw_locks instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33548 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a365e1cfbb80d7d2ee91e6515fa7090906cd5a4e 11-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Bryce Groff, some changes by myself:
* devfs:
- devfs_[un]publish_partition(): They no longer get the partition path as
parameter, but rather the device path and the partition name.
- Added devfs_rename_partition(), which renames an already published
partition node.
* KPartition/KDiskDevice:
- Replaced the fPublished flag by fPublishedName, the name under which the
partition is published. This simplifies UnpublishDevice() and makes it
practically infallible.
- Added GetFileName(), which only returns the partition's file name.
Simplified GetPath() by using it.
- When a partition is added/removed the subsequent sibling partitions get a
new index. Now we also rename their published device nodes (and those of
their descendents). When something goes wrong we unpublish the concerned
partition's device to be on the safe side. Would be a shame to accidentally
format the wrong partition, eh? :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31520 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7333992516c6e0e1c62c0fce64863392013507cd 12-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

On a media change, the KDiskDevice must do a bit more than it did:
* it now updates the partition data,
* the flags,
* and the disk geometry - and that now allows the session add-on to actually
detect a newly inserted CD.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22918 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 88ef41115466c4ee4900a270ebd5dcdd1be6f730 12-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* Added an UninitializeMedia() method to KDiskDevice that also resets the
device geometry.
* If SetTo() reports no media, and GetGeometry() fails, the device geometry
is now reset as well.
* KDiskDeviceManager::_ScanPartition() no longer unmarks the partition busy;
this is now done by the caller, and done independently from the outcome of
_ScanPartition(). This also fixes the problem that devices with no media
were never marked unbusy (and thus were ignored subsequently).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22912 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8354dac78e2ce5da2e5ee1826c37dbc12cacbd18 01-Nov-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Folded KPhysicalPartition into KPartition. Removed the notion of shadow
partitions from the disk device manager.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22800 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e544dd59154d2d123ec74c778176bdb995ae7f08 19-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

* Fixed a possible dead lock between the kernel daemon and the DDM; the media
status checker now only tries to lock the manager, it won't wait anymore.
* Added MediaChanged() and UpdateMediaStatusIfNeeded() methods to KDiskDevice.
* KDiskDeviceManager::_CheckMediaStatus() now uses these new methods; it should
no longer detect removed media more than once :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22621 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8047441723ec3959627771b4bcfac154fca4a08f 17-Oct-2007 Axel Dörfler <axeld@pinc-software.de>

The disk device manager now periodically checks for media changes - all it does
is dump its findings, but it's an (untested) start.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22598 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c277ab01e6bb0591059753bd3a99d6c43d60cc8d 26-Jan-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Make the compiler happy. Shadowing super class methods with different signature is a very annoying C++ feature.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11069 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1b5f6266337ee805a085153179201e3a88d03907 27-Oct-2004 Ingo Weinhold <ingo_weinhold@gmx.de>

* Changes to use KPath where possible now.
* Made GetMediaStatus() a bit more robust. If the ioctl fails (e.g. if it
is not implemented as in Thomas' drivers), it gets the device geometry
and does not fail, if the device is not removable.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9546 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5d22fa967af0e2e326ad9f431bce17270eb68941 14-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Shadow partition related changes:
* Fixed handling of the deletion (removal) of shadow partitions. Formerly
the shadow partition corresponding to the disk device wasn't removed
properly.
* Added a shadow_id field to the user_partition_data structure which
contains the ID of the shadow partition, if it is one. The id field
will hold the ID of the physical partition.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3974 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 55bf93d80d856554438d0306e208e26c7c338f48 08-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixed handling of partition and device flags and statuses.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3898 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c0455c33b83712dcb67ed48108894077d40fba2c 06-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

* More shadow partition support.
* Writing disk device/partition data into userland buffer added.
* Migration of some definitions into <DiskDeviceDefs.h> header.
* Small bug fixes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3882 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a162af3b0eefe4930a6816c02ec436792cc45bdb 04-Jul-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Made KPartition abstract and derived two classes, KPhysicalPartition
and KShadowPartition from it. KPhysicalPartition represents a partition
that exists on-disk, while KShadowPartition is a partition edited by the
API user, but not yet written to disk. Related changes in other classes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3851 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b23394f957067f7b7da55393b0ea1cd15c1b3728 24-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

* Implemented what was left to do for KDiskDevice and KPartition
management regarding removal and deletion of objects.
* Fixed the file disk system related stuff. KFileDiskSystem now uses the
virtualdrive driver. The former method was seemed simple and brilliant,
but the B_SET_PARTITION ioctl wouldn't work.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3650 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bdc530c737fac207c8409e71eb0201a00910b2b1 22-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Some small adjustments for KFileDiskDevice. Added Dump().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3600 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f7672ebc252dd655a77cfbc2eaed2f408296aa80 13-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

* Made {Publish,Unpublish}Device() virtual and implemented them in
KPartition and as no-ops in KDiskDevice.
* Prefixed partition names with "obos_" to not interfere with R5's
partition names.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3509 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ef9b1b52eeb1a76daf914efb01cb847fdbb48211 12-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented a preliminary disk device scanning in KDiskDeviceManager.
Some changes to KPartition, KDiskDevice, KDiskSystem on this way.
Still missing is KPartition::Publish() and its invocation in
KDiskDeviceManager. Then everything should be in place to start with
porting the scanning parts of our disk system modules.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3486 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 537635f1d1ed87b5272a4407fd972ae969a99d6f 10-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented basic parts of KDiskDevice.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3459 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4c212afefb9c1800bd32243d52a59dcccfecaaa2 09-Jun-2003 Ingo Weinhold <ingo_weinhold@gmx.de>

Headers for the disk device manager. Very early state.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3454 a95241bf-73f2-0310-859d-f6bbb57e9c96