D15932: [UDisks2] Power down drive on remove if supported
This revision was automatically updated to reflect the committed changes. bruns marked an inline comment as done. Closed by commit R245:867f53608d3a: [UDisks2] Power down drive on remove if supported (authored by bruns). REPOSITORY R245 Solid CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D15932?vs=42905&id=43162 REVISION DETAIL https://phabricator.kde.org/D15932 AFFECTED FILES src/solid/devices/backends/udisks2/udisksstorageaccess.cpp To: bruns, #frameworks, ngraham, broulik Cc: broulik, kde-frameworks-devel, ngraham, michaelh, bruns
D15932: [UDisks2] Power down drive on remove if supported
broulik accepted this revision. broulik added a comment. Please wait till after Frameworks tagging (due tomorrow) so we can have more test exposure as Solid changes are usually quite delicate REPOSITORY R245 Solid BRANCH udisks2_power_down REVISION DETAIL https://phabricator.kde.org/D15932 To: bruns, #frameworks, ngraham, broulik Cc: broulik, kde-frameworks-devel, ngraham, michaelh, bruns
D15932: [UDisks2] Power down drive on remove if supported
bruns updated this revision to Diff 42905. bruns added a comment. - do not create additional connections on the system bus - avoid disconnecting optical drives, no need to power down REPOSITORY R245 Solid CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D15932?vs=42824&id=42905 BRANCH udisks2_power_down REVISION DETAIL https://phabricator.kde.org/D15932 AFFECTED FILES src/solid/devices/backends/udisks2/udisksstorageaccess.cpp To: bruns, #frameworks, ngraham Cc: broulik, kde-frameworks-devel, ngraham, michaelh, bruns
D15932: [UDisks2] Power down drive on remove if supported
broulik added inline comments. INLINE COMMENTS > udisksstorageaccess.cpp:186 > Device drive(drivePath); > +QDBusConnection c = > QDBusConnection::connectToBus(QDBusConnection::SystemBus, > "Solid::Udisks2::Drive::" + drivePath); > + Why this change? REPOSITORY R245 Solid BRANCH udisks2_power_down REVISION DETAIL https://phabricator.kde.org/D15932 To: bruns, #frameworks, ngraham Cc: broulik, kde-frameworks-devel, ngraham, michaelh, bruns
D15932: [UDisks2] Power down drive on remove if supported
ngraham accepted this revision. ngraham added a comment. This revision is now accepted and ready to land. Works great with the unencrypted and LUKS-unencrypted single- and multi-partition ext4 disks that I tried out. Code change looks sane too. Wonderful work! REPOSITORY R245 Solid BRANCH udisks2_power_down REVISION DETAIL https://phabricator.kde.org/D15932 To: bruns, #frameworks, ngraham Cc: kde-frameworks-devel, ngraham, michaelh, bruns
D15932: [UDisks2] Power down drive on remove if supported
ngraham edited the summary of this revision. REPOSITORY R245 Solid REVISION DETAIL https://phabricator.kde.org/D15932 To: bruns, #frameworks Cc: kde-frameworks-devel, ngraham, michaelh, bruns
D15932: [UDisks2] Power down drive on remove if supported
ngraham edited the summary of this revision. REPOSITORY R245 Solid REVISION DETAIL https://phabricator.kde.org/D15932 To: bruns, #frameworks Cc: kde-frameworks-devel, ngraham, michaelh, bruns
D15932: [UDisks2] Power down drive on remove if supported
bruns created this revision. bruns added a reviewer: Frameworks. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. bruns requested review of this revision. REVISION SUMMARY It is preferable to to do a controlled shutdown prior to disconnecting and eventually cutting of power to the drive. TEST PLAN Connect external drive, select "Savely Remove" from context menu 1. if drive has only on partition, fs is unmounted and drive spins down 2. if drive has multiple partitions: a) first (not last) partition can be unmounted and remounted b) "Remove"ing last partition spins down drive REPOSITORY R245 Solid BRANCH udisks2_power_down REVISION DETAIL https://phabricator.kde.org/D15932 AFFECTED FILES src/solid/devices/backends/udisks2/udisksstorageaccess.cpp To: bruns, #frameworks Cc: kde-frameworks-devel, ngraham, michaelh, bruns