mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 16:37:21 -06:00
Split the OS cache settings into Disk IO read/write modes
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
This commit is contained in:
@@ -121,6 +121,13 @@ namespace BitTorrent
|
||||
};
|
||||
Q_ENUM_NS(ChokingAlgorithm)
|
||||
|
||||
enum class DiskIOReadMode : int
|
||||
{
|
||||
DisableOSCache = 0,
|
||||
EnableOSCache = 1
|
||||
};
|
||||
Q_ENUM_NS(DiskIOReadMode)
|
||||
|
||||
enum class DiskIOType : int
|
||||
{
|
||||
Default = 0,
|
||||
@@ -129,6 +136,16 @@ namespace BitTorrent
|
||||
};
|
||||
Q_ENUM_NS(DiskIOType)
|
||||
|
||||
enum class DiskIOWriteMode : int
|
||||
{
|
||||
DisableOSCache = 0,
|
||||
EnableOSCache = 1,
|
||||
#ifdef QBT_USES_LIBTORRENT2
|
||||
WriteThrough = 2
|
||||
#endif
|
||||
};
|
||||
Q_ENUM_NS(DiskIOWriteMode)
|
||||
|
||||
enum class MixedModeAlgorithm : int
|
||||
{
|
||||
TCP = 0,
|
||||
@@ -359,8 +376,10 @@ namespace BitTorrent
|
||||
void setDiskQueueSize(qint64 size);
|
||||
DiskIOType diskIOType() const;
|
||||
void setDiskIOType(DiskIOType type);
|
||||
bool useOSCache() const;
|
||||
void setUseOSCache(bool use);
|
||||
DiskIOReadMode diskIOReadMode() const;
|
||||
void setDiskIOReadMode(DiskIOReadMode mode);
|
||||
DiskIOWriteMode diskIOWriteMode() const;
|
||||
void setDiskIOWriteMode(DiskIOWriteMode mode);
|
||||
bool isCoalesceReadWriteEnabled() const;
|
||||
void setCoalesceReadWriteEnabled(bool enabled);
|
||||
bool usePieceExtentAffinity() const;
|
||||
@@ -687,7 +706,8 @@ namespace BitTorrent
|
||||
CachedSettingValue<int> m_diskCacheTTL;
|
||||
CachedSettingValue<qint64> m_diskQueueSize;
|
||||
CachedSettingValue<DiskIOType> m_diskIOType;
|
||||
CachedSettingValue<bool> m_useOSCache;
|
||||
CachedSettingValue<DiskIOReadMode> m_diskIOReadMode;
|
||||
CachedSettingValue<DiskIOWriteMode> m_diskIOWriteMode;
|
||||
CachedSettingValue<bool> m_coalesceReadWriteEnabled;
|
||||
CachedSettingValue<bool> m_usePieceExtentAffinity;
|
||||
CachedSettingValue<bool> m_isSuggestMode;
|
||||
|
||||
Reference in New Issue
Block a user