All drive statuses must be set only in data transfer session and read/write threads
It is hard to tell when the drive is changing it's status because we don't have the strict rules for using setDriveStatus()
. Most the statuses are set in DataTransferSession
, read and write tape threads. Effectively, they use the wrappers around OStoreDB::RetrieveMount::setDriveStatus()
, but there are more methods like OStoreDB::RetrieveMount::complete()
and OStoreDB::TapeMountDecisionInfo::createRetrieveMount()
that "silently" change the drive status.
Therefore when we call, for example, m_reporter.reportEndOfSession
we can't clearly tell that somewhere along it's execution the drive will unconditionally be brought UP.
Solution would be setting the drive statuses only in DataTransferSession
, TapeWriteSingleThread
, TapeReadSingleThread
and DiskWriteThreadPool
using reportDriveStatus()
.