Kernel: Disable DiskCache sync messages

This commit is contained in:
Bananymous 2023-09-27 14:12:21 +03:00
parent f9b347f9d9
commit feafc57b63
1 changed files with 4 additions and 2 deletions

View File

@ -5,6 +5,8 @@
#include <kernel/Storage/DiskCache.h>
#include <kernel/Storage/StorageDevice.h>
#define DEBUG_SYNC 0
namespace Kernel
{
@ -146,7 +148,7 @@ namespace Kernel
sector_start++;
else
{
dprintln("syncing {}->{}", cache.first_sector + sector_start, cache.first_sector + sector_start + sector_count);
dprintln_if(DEBUG_SYNC, "syncing {}->{}", cache.first_sector + sector_start, cache.first_sector + sector_start + sector_count);
TRY(m_device.write_sectors_impl(cache.first_sector + sector_start, sector_count, m_sync_cache.data() + sector_start * m_sector_size));
sector_start += sector_count + 1;
sector_count = 0;
@ -155,7 +157,7 @@ namespace Kernel
if (sector_count > 0)
{
dprintln("syncing {}->{}", cache.first_sector + sector_start, cache.first_sector + sector_start + sector_count);
dprintln_if(DEBUG_SYNC, "syncing {}->{}", cache.first_sector + sector_start, cache.first_sector + sector_start + sector_count);
TRY(m_device.write_sectors_impl(cache.first_sector + sector_start, sector_count, m_sync_cache.data() + sector_start * m_sector_size));
}