|
Packit Service |
310c69 |
/*
|
|
Packit Service |
310c69 |
* Copyright (c) 2020 Red Hat, Inc.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* This program is free software; you can redistribute it and/or
|
|
Packit Service |
310c69 |
* modify it under the terms of the GNU General Public License
|
|
Packit Service |
310c69 |
* as published by the Free Software Foundation; either version 2
|
|
Packit Service |
310c69 |
* of the License, or (at your option) any later version.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* This program is distributed in the hope that it will be useful,
|
|
Packit Service |
310c69 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
310c69 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit Service |
310c69 |
* GNU General Public License for more details.
|
|
Packit Service |
310c69 |
*
|
|
Packit Service |
310c69 |
* You should have received a copy of the GNU General Public License
|
|
Packit Service |
310c69 |
* along with this program; if not, write to the Free Software
|
|
Packit Service |
310c69 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
Packit Service |
310c69 |
* 02110-1301, USA.
|
|
Packit Service |
310c69 |
*/
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
#include "dedupeIndex.h"
|
|
Packit Service |
310c69 |
#include "logger.h"
|
|
Packit Service |
310c69 |
#include "poolSysfs.h"
|
|
Packit Service |
310c69 |
#include "statistics.h"
|
|
Packit Service |
310c69 |
#include "statusProcfs.h"
|
|
Packit Service |
310c69 |
#include "threadDevice.h"
|
|
Packit Service |
310c69 |
#include "vdo.h"
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
typedef struct poolStatsAttribute {
|
|
Packit Service |
310c69 |
struct attribute attr;
|
|
Packit Service |
310c69 |
ssize_t (*show)(KernelLayer *layer, char *buf);
|
|
Packit Service |
310c69 |
} PoolStatsAttribute;
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static ssize_t poolStatsAttrShow(struct kobject *kobj,
|
|
Packit Service |
310c69 |
struct attribute *attr,
|
|
Packit Service |
310c69 |
char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
PoolStatsAttribute *poolStatsAttr = container_of(attr, PoolStatsAttribute,
|
|
Packit Service |
310c69 |
attr);
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
if (poolStatsAttr->show == NULL) {
|
|
Packit Service |
310c69 |
return -EINVAL;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
KernelLayer *layer = container_of(kobj, KernelLayer, statsDirectory);
|
|
Packit Service |
310c69 |
return poolStatsAttr->show(layer, buf);
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
struct sysfs_ops poolStatsSysfsOps = {
|
|
Packit Service |
310c69 |
.show = poolStatsAttrShow,
|
|
Packit Service |
310c69 |
.store = NULL,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of blocks used for data */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsDataBlocksUsedShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.dataBlocksUsed);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsDataBlocksUsedAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "data_blocks_used", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsDataBlocksUsedShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of blocks used for VDO metadata */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsOverheadBlocksUsedShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.overheadBlocksUsed);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsOverheadBlocksUsedAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "overhead_blocks_used", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsOverheadBlocksUsedShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of logical blocks that are currently mapped to physical blocks */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsLogicalBlocksUsedShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.logicalBlocksUsed);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsLogicalBlocksUsedAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "logical_blocks_used", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsLogicalBlocksUsedShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of physical blocks */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsPhysicalBlocksShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.physicalBlocks);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsPhysicalBlocksAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "physical_blocks", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsPhysicalBlocksShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of logical blocks */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsLogicalBlocksShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.logicalBlocks);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsLogicalBlocksAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "logical_blocks", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsLogicalBlocksShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Size of the block map page cache, in bytes */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapCacheSizeShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.blockMapCacheSize);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapCacheSizeAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_cache_size", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapCacheSizeShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** String describing the active write policy of the VDO */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsWritePolicyShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%s\n", layer->vdoStatsStorage.writePolicy);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsWritePolicyAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "write_policy", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsWritePolicyShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** The physical block size */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockSizeShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.blockSize);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockSizeAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_size", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockSizeShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of times the VDO has successfully recovered */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsCompleteRecoveriesShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.completeRecoveries);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsCompleteRecoveriesAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "complete_recoveries", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsCompleteRecoveriesShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of times the VDO has recovered from read-only mode */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsReadOnlyRecoveriesShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.readOnlyRecoveries);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsReadOnlyRecoveriesAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "read_only_recoveries", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsReadOnlyRecoveriesShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** String describing the operating mode of the VDO */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsModeShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%s\n", layer->vdoStatsStorage.mode);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsModeAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "mode", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsModeShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Whether the VDO is in recovery mode */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsInRecoveryModeShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%d\n", layer->vdoStatsStorage.inRecoveryMode);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsInRecoveryModeAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "in_recovery_mode", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsInRecoveryModeShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** What percentage of recovery mode work has been completed */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsRecoveryPercentageShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%u\n", layer->vdoStatsStorage.recoveryPercentage);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsRecoveryPercentageAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "recovery_percentage", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsRecoveryPercentageShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of compressed data items written since startup */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsPackerCompressedFragmentsWrittenShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.packer.compressedFragmentsWritten);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsPackerCompressedFragmentsWrittenAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "packer_compressed_fragments_written", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsPackerCompressedFragmentsWrittenShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of blocks containing compressed items written since startup */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsPackerCompressedBlocksWrittenShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.packer.compressedBlocksWritten);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsPackerCompressedBlocksWrittenAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "packer_compressed_blocks_written", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsPackerCompressedBlocksWrittenShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of VIOs that are pending in the packer */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsPackerCompressedFragmentsInPackerShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.packer.compressedFragmentsInPacker);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsPackerCompressedFragmentsInPackerAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "packer_compressed_fragments_in_packer", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsPackerCompressedFragmentsInPackerShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** The total number of slabs from which blocks may be allocated */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsAllocatorSlabCountShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.allocator.slabCount);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsAllocatorSlabCountAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "allocator_slab_count", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsAllocatorSlabCountShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** The total number of slabs from which blocks have ever been allocated */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsAllocatorSlabsOpenedShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.allocator.slabsOpened);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsAllocatorSlabsOpenedAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "allocator_slabs_opened", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsAllocatorSlabsOpenedShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** The number of times since loading that a slab has been re-opened */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsAllocatorSlabsReopenedShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.allocator.slabsReopened);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsAllocatorSlabsReopenedAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "allocator_slabs_reopened", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsAllocatorSlabsReopenedShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of times the on-disk journal was full */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsJournalDiskFullShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.journal.diskFull);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsJournalDiskFullAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "journal_disk_full", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsJournalDiskFullShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of times the recovery journal requested slab journal commits. */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsJournalSlabJournalCommitsRequestedShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.journal.slabJournalCommitsRequested);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsJournalSlabJournalCommitsRequestedAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "journal_slab_journal_commits_requested", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsJournalSlabJournalCommitsRequestedShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** The total number of items on which processing has started */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsJournalEntriesStartedShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.journal.entries.started);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsJournalEntriesStartedAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "journal_entries_started", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsJournalEntriesStartedShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** The total number of items for which a write operation has been issued */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsJournalEntriesWrittenShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.journal.entries.written);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsJournalEntriesWrittenAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "journal_entries_written", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsJournalEntriesWrittenShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** The total number of items for which a write operation has completed */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsJournalEntriesCommittedShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.journal.entries.committed);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsJournalEntriesCommittedAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "journal_entries_committed", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsJournalEntriesCommittedShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** The total number of items on which processing has started */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsJournalBlocksStartedShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.journal.blocks.started);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsJournalBlocksStartedAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "journal_blocks_started", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsJournalBlocksStartedShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** The total number of items for which a write operation has been issued */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsJournalBlocksWrittenShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.journal.blocks.written);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsJournalBlocksWrittenAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "journal_blocks_written", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsJournalBlocksWrittenShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** The total number of items for which a write operation has completed */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsJournalBlocksCommittedShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.journal.blocks.committed);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsJournalBlocksCommittedAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "journal_blocks_committed", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsJournalBlocksCommittedShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of times the on-disk journal was full */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsSlabJournalDiskFullCountShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.slabJournal.diskFullCount);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsSlabJournalDiskFullCountAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "slab_journal_disk_full_count", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsSlabJournalDiskFullCountShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of times an entry was added over the flush threshold */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsSlabJournalFlushCountShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.slabJournal.flushCount);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsSlabJournalFlushCountAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "slab_journal_flush_count", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsSlabJournalFlushCountShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of times an entry was added over the block threshold */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsSlabJournalBlockedCountShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.slabJournal.blockedCount);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsSlabJournalBlockedCountAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "slab_journal_blocked_count", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsSlabJournalBlockedCountShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of times a tail block was written */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsSlabJournalBlocksWrittenShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.slabJournal.blocksWritten);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsSlabJournalBlocksWrittenAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "slab_journal_blocks_written", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsSlabJournalBlocksWrittenShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of times we had to wait for the tail to write */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsSlabJournalTailBusyCountShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.slabJournal.tailBusyCount);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsSlabJournalTailBusyCountAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "slab_journal_tail_busy_count", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsSlabJournalTailBusyCountShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of blocks written */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsSlabSummaryBlocksWrittenShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.slabSummary.blocksWritten);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsSlabSummaryBlocksWrittenAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "slab_summary_blocks_written", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsSlabSummaryBlocksWrittenShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of reference blocks written */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsRefCountsBlocksWrittenShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.refCounts.blocksWritten);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsRefCountsBlocksWrittenAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "ref_counts_blocks_written", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsRefCountsBlocksWrittenShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of dirty (resident) pages */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapDirtyPagesShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%" PRIu32 "\n", layer->vdoStatsStorage.blockMap.dirtyPages);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapDirtyPagesAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_dirty_pages", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapDirtyPagesShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of clean (resident) pages */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapCleanPagesShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%" PRIu32 "\n", layer->vdoStatsStorage.blockMap.cleanPages);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapCleanPagesAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_clean_pages", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapCleanPagesShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of free pages */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapFreePagesShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%" PRIu32 "\n", layer->vdoStatsStorage.blockMap.freePages);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapFreePagesAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_free_pages", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapFreePagesShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of pages in failed state */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapFailedPagesShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%" PRIu32 "\n", layer->vdoStatsStorage.blockMap.failedPages);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapFailedPagesAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_failed_pages", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapFailedPagesShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of pages incoming */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapIncomingPagesShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%" PRIu32 "\n", layer->vdoStatsStorage.blockMap.incomingPages);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapIncomingPagesAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_incoming_pages", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapIncomingPagesShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of pages outgoing */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapOutgoingPagesShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%" PRIu32 "\n", layer->vdoStatsStorage.blockMap.outgoingPages);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapOutgoingPagesAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_outgoing_pages", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapOutgoingPagesShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** how many times free page not avail */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapCachePressureShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%" PRIu32 "\n", layer->vdoStatsStorage.blockMap.cachePressure);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapCachePressureAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_cache_pressure", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapCachePressureShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of getVDOPageAsync() for read */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapReadCountShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.blockMap.readCount);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapReadCountAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_read_count", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapReadCountShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number or getVDOPageAsync() for write */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapWriteCountShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.blockMap.writeCount);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapWriteCountAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_write_count", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapWriteCountShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of times pages failed to read */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapFailedReadsShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.blockMap.failedReads);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapFailedReadsAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_failed_reads", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapFailedReadsShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of times pages failed to write */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapFailedWritesShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.blockMap.failedWrites);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapFailedWritesAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_failed_writes", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapFailedWritesShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of gets that are reclaimed */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapReclaimedShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.blockMap.reclaimed);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapReclaimedAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_reclaimed", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapReclaimedShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of gets for outgoing pages */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapReadOutgoingShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.blockMap.readOutgoing);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapReadOutgoingAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_read_outgoing", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapReadOutgoingShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of gets that were already there */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapFoundInCacheShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.blockMap.foundInCache);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapFoundInCacheAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_found_in_cache", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapFoundInCacheShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of gets requiring discard */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapDiscardRequiredShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.blockMap.discardRequired);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapDiscardRequiredAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_discard_required", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapDiscardRequiredShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of gets enqueued for their page */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapWaitForPageShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.blockMap.waitForPage);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapWaitForPageAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_wait_for_page", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapWaitForPageShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of gets that have to fetch */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapFetchRequiredShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.blockMap.fetchRequired);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapFetchRequiredAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_fetch_required", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapFetchRequiredShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of page fetches */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapPagesLoadedShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.blockMap.pagesLoaded);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapPagesLoadedAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_pages_loaded", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapPagesLoadedShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of page saves */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapPagesSavedShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.blockMap.pagesSaved);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapPagesSavedAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_pages_saved", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapPagesSavedShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** the number of flushes issued */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBlockMapFlushCountShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.blockMap.flushCount);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBlockMapFlushCountAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "block_map_flush_count", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBlockMapFlushCountShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of times the UDS advice proved correct */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsHashLockDedupeAdviceValidShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.hashLock.dedupeAdviceValid);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsHashLockDedupeAdviceValidAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "hash_lock_dedupe_advice_valid", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsHashLockDedupeAdviceValidShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of times the UDS advice proved incorrect */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsHashLockDedupeAdviceStaleShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.hashLock.dedupeAdviceStale);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsHashLockDedupeAdviceStaleAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "hash_lock_dedupe_advice_stale", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsHashLockDedupeAdviceStaleShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of writes with the same data as another in-flight write */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsHashLockConcurrentDataMatchesShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.hashLock.concurrentDataMatches);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsHashLockConcurrentDataMatchesAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "hash_lock_concurrent_data_matches", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsHashLockConcurrentDataMatchesShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of writes whose hash collided with an in-flight write */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsHashLockConcurrentHashCollisionsShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.hashLock.concurrentHashCollisions);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsHashLockConcurrentHashCollisionsAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "hash_lock_concurrent_hash_collisions", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsHashLockConcurrentHashCollisionsShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of times VDO got an invalid dedupe advice PBN from UDS */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsErrorsInvalidAdvicePBNCountShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.errors.invalidAdvicePBNCount);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsErrorsInvalidAdvicePBNCountAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "errors_invalid_advicePBNCount", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsErrorsInvalidAdvicePBNCountShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of times a VIO completed with a VDO_NO_SPACE error */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsErrorsNoSpaceErrorCountShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.errors.noSpaceErrorCount);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsErrorsNoSpaceErrorCountAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "errors_no_space_error_count", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsErrorsNoSpaceErrorCountShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** number of times a VIO completed with a VDO_READ_ONLY error */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsErrorsReadOnlyErrorCountShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKVDOStatistics(&layer->kvdo, &layer->vdoStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->vdoStatsStorage.errors.readOnlyErrorCount);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsErrorsReadOnlyErrorCountAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "errors_read_only_error_count", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsErrorsReadOnlyErrorCountShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** The VDO instance */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsInstanceShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%" PRIu32 "\n", layer->kernelStatsStorage.instance);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsInstanceAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "instance", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsInstanceShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Current number of active VIOs */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsCurrentVIOsInProgressShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%" PRIu32 "\n", layer->kernelStatsStorage.currentVIOsInProgress);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsCurrentVIOsInProgressAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "currentVIOs_in_progress", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsCurrentVIOsInProgressShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Maximum number of active VIOs */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsMaxVIOsShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%" PRIu32 "\n", layer->kernelStatsStorage.maxVIOs);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsMaxVIOsAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "maxVIOs", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsMaxVIOsShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of times the UDS index was too slow in responding */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsDedupeAdviceTimeoutsShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.dedupeAdviceTimeouts);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsDedupeAdviceTimeoutsAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "dedupe_advice_timeouts", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsDedupeAdviceTimeoutsShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of flush requests submitted to the storage device */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsFlushOutShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.flushOut);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsFlushOutAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "flush_out", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsFlushOutShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Logical block size */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsLogicalBlockSizeShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.logicalBlockSize);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsLogicalBlockSizeAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "logical_block_size", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsLogicalBlockSizeShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of not REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosInReadShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosIn.read);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosInReadAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_in_read", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosInReadShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosInWriteShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosIn.write);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosInWriteAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_in_write", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosInWriteShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_DISCARD bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosInDiscardShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosIn.discard);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosInDiscardAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_in_discard", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosInDiscardShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FLUSH bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosInFlushShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosIn.flush);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosInFlushAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_in_flush", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosInFlushShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FUA bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosInFuaShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosIn.fua);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosInFuaAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_in_fua", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosInFuaShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of not REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosInPartialReadShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosInPartial.read);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosInPartialReadAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_in_partial_read", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosInPartialReadShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosInPartialWriteShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosInPartial.write);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosInPartialWriteAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_in_partial_write", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosInPartialWriteShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_DISCARD bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosInPartialDiscardShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosInPartial.discard);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosInPartialDiscardAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_in_partial_discard", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosInPartialDiscardShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FLUSH bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosInPartialFlushShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosInPartial.flush);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosInPartialFlushAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_in_partial_flush", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosInPartialFlushShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FUA bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosInPartialFuaShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosInPartial.fua);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosInPartialFuaAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_in_partial_fua", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosInPartialFuaShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of not REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosOutReadShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosOut.read);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosOutReadAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_out_read", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosOutReadShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosOutWriteShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosOut.write);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosOutWriteAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_out_write", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosOutWriteShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_DISCARD bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosOutDiscardShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosOut.discard);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosOutDiscardAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_out_discard", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosOutDiscardShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FLUSH bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosOutFlushShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosOut.flush);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosOutFlushAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_out_flush", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosOutFlushShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FUA bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosOutFuaShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosOut.fua);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosOutFuaAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_out_fua", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosOutFuaShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of not REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosMetaReadShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosMeta.read);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosMetaReadAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_meta_read", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosMetaReadShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosMetaWriteShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosMeta.write);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosMetaWriteAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_meta_write", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosMetaWriteShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_DISCARD bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosMetaDiscardShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosMeta.discard);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosMetaDiscardAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_meta_discard", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosMetaDiscardShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FLUSH bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosMetaFlushShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosMeta.flush);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosMetaFlushAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_meta_flush", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosMetaFlushShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FUA bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosMetaFuaShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosMeta.fua);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosMetaFuaAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_meta_fua", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosMetaFuaShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of not REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosJournalReadShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosJournal.read);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosJournalReadAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_journal_read", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosJournalReadShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosJournalWriteShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosJournal.write);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosJournalWriteAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_journal_write", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosJournalWriteShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_DISCARD bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosJournalDiscardShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosJournal.discard);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosJournalDiscardAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_journal_discard", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosJournalDiscardShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FLUSH bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosJournalFlushShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosJournal.flush);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosJournalFlushAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_journal_flush", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosJournalFlushShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FUA bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosJournalFuaShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosJournal.fua);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosJournalFuaAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_journal_fua", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosJournalFuaShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of not REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosPageCacheReadShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosPageCache.read);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosPageCacheReadAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_page_cache_read", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosPageCacheReadShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosPageCacheWriteShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosPageCache.write);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosPageCacheWriteAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_page_cache_write", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosPageCacheWriteShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_DISCARD bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosPageCacheDiscardShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosPageCache.discard);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosPageCacheDiscardAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_page_cache_discard", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosPageCacheDiscardShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FLUSH bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosPageCacheFlushShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosPageCache.flush);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosPageCacheFlushAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_page_cache_flush", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosPageCacheFlushShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FUA bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosPageCacheFuaShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosPageCache.fua);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosPageCacheFuaAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_page_cache_fua", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosPageCacheFuaShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of not REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosOutCompletedReadShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosOutCompleted.read);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosOutCompletedReadAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_out_completed_read", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosOutCompletedReadShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosOutCompletedWriteShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosOutCompleted.write);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosOutCompletedWriteAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_out_completed_write", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosOutCompletedWriteShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_DISCARD bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosOutCompletedDiscardShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosOutCompleted.discard);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosOutCompletedDiscardAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_out_completed_discard", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosOutCompletedDiscardShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FLUSH bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosOutCompletedFlushShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosOutCompleted.flush);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosOutCompletedFlushAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_out_completed_flush", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosOutCompletedFlushShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FUA bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosOutCompletedFuaShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosOutCompleted.fua);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosOutCompletedFuaAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_out_completed_fua", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosOutCompletedFuaShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of not REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosMetaCompletedReadShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosMetaCompleted.read);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosMetaCompletedReadAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_meta_completed_read", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosMetaCompletedReadShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosMetaCompletedWriteShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosMetaCompleted.write);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosMetaCompletedWriteAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_meta_completed_write", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosMetaCompletedWriteShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_DISCARD bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosMetaCompletedDiscardShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosMetaCompleted.discard);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosMetaCompletedDiscardAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_meta_completed_discard", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosMetaCompletedDiscardShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FLUSH bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosMetaCompletedFlushShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosMetaCompleted.flush);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosMetaCompletedFlushAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_meta_completed_flush", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosMetaCompletedFlushShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FUA bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosMetaCompletedFuaShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosMetaCompleted.fua);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosMetaCompletedFuaAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_meta_completed_fua", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosMetaCompletedFuaShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of not REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosJournalCompletedReadShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosJournalCompleted.read);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosJournalCompletedReadAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_journal_completed_read", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosJournalCompletedReadShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosJournalCompletedWriteShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosJournalCompleted.write);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosJournalCompletedWriteAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_journal_completed_write", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosJournalCompletedWriteShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_DISCARD bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosJournalCompletedDiscardShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosJournalCompleted.discard);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosJournalCompletedDiscardAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_journal_completed_discard", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosJournalCompletedDiscardShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FLUSH bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosJournalCompletedFlushShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosJournalCompleted.flush);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosJournalCompletedFlushAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_journal_completed_flush", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosJournalCompletedFlushShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FUA bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosJournalCompletedFuaShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosJournalCompleted.fua);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosJournalCompletedFuaAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_journal_completed_fua", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosJournalCompletedFuaShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of not REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosPageCacheCompletedReadShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosPageCacheCompleted.read);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosPageCacheCompletedReadAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_page_cache_completed_read", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosPageCacheCompletedReadShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosPageCacheCompletedWriteShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosPageCacheCompleted.write);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosPageCacheCompletedWriteAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_page_cache_completed_write", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosPageCacheCompletedWriteShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_DISCARD bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosPageCacheCompletedDiscardShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosPageCacheCompleted.discard);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosPageCacheCompletedDiscardAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_page_cache_completed_discard", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosPageCacheCompletedDiscardShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FLUSH bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosPageCacheCompletedFlushShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosPageCacheCompleted.flush);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosPageCacheCompletedFlushAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_page_cache_completed_flush", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosPageCacheCompletedFlushShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FUA bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosPageCacheCompletedFuaShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosPageCacheCompleted.fua);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosPageCacheCompletedFuaAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_page_cache_completed_fua", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosPageCacheCompletedFuaShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of not REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosAcknowledgedReadShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosAcknowledged.read);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosAcknowledgedReadAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_acknowledged_read", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosAcknowledgedReadShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosAcknowledgedWriteShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosAcknowledged.write);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosAcknowledgedWriteAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_acknowledged_write", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosAcknowledgedWriteShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_DISCARD bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosAcknowledgedDiscardShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosAcknowledged.discard);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosAcknowledgedDiscardAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_acknowledged_discard", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosAcknowledgedDiscardShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FLUSH bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosAcknowledgedFlushShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosAcknowledged.flush);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosAcknowledgedFlushAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_acknowledged_flush", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosAcknowledgedFlushShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FUA bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosAcknowledgedFuaShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosAcknowledged.fua);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosAcknowledgedFuaAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_acknowledged_fua", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosAcknowledgedFuaShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of not REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosAcknowledgedPartialReadShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosAcknowledgedPartial.read);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosAcknowledgedPartialReadAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_acknowledged_partial_read", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosAcknowledgedPartialReadShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosAcknowledgedPartialWriteShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosAcknowledgedPartial.write);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosAcknowledgedPartialWriteAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_acknowledged_partial_write", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosAcknowledgedPartialWriteShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_DISCARD bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosAcknowledgedPartialDiscardShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosAcknowledgedPartial.discard);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosAcknowledgedPartialDiscardAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_acknowledged_partial_discard", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosAcknowledgedPartialDiscardShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FLUSH bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosAcknowledgedPartialFlushShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosAcknowledgedPartial.flush);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosAcknowledgedPartialFlushAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_acknowledged_partial_flush", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosAcknowledgedPartialFlushShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FUA bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosAcknowledgedPartialFuaShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosAcknowledgedPartial.fua);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosAcknowledgedPartialFuaAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_acknowledged_partial_fua", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosAcknowledgedPartialFuaShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of not REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosInProgressReadShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosInProgress.read);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosInProgressReadAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_in_progress_read", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosInProgressReadShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_WRITE bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosInProgressWriteShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosInProgress.write);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosInProgressWriteAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_in_progress_write", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosInProgressWriteShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_DISCARD bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosInProgressDiscardShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosInProgress.discard);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosInProgressDiscardAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_in_progress_discard", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosInProgressDiscardShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FLUSH bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosInProgressFlushShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosInProgress.flush);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosInProgressFlushAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_in_progress_flush", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosInProgressFlushShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of REQ_FUA bios */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsBiosInProgressFuaShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.biosInProgress.fua);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsBiosInProgressFuaAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "bios_in_progress_fua", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsBiosInProgressFuaShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Tracked bytes currently allocated. */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsMemoryUsageBytesUsedShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.memoryUsage.bytesUsed);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsMemoryUsageBytesUsedAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "memory_usage_bytes_used", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsMemoryUsageBytesUsedShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Maximum tracked bytes allocated. */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsMemoryUsagePeakBytesUsedShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.memoryUsage.peakBytesUsed);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsMemoryUsagePeakBytesUsedAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "memory_usage_peak_bytes_used", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsMemoryUsagePeakBytesUsedShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of chunk names stored in the index */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsIndexEntriesIndexedShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.index.entriesIndexed);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsIndexEntriesIndexedAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "index_entries_indexed", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsIndexEntriesIndexedShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of post calls that found an existing entry */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsIndexPostsFoundShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.index.postsFound);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsIndexPostsFoundAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "index_posts_found", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsIndexPostsFoundShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of post calls that added a new entry */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsIndexPostsNotFoundShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.index.postsNotFound);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsIndexPostsNotFoundAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "index_posts_not_found", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsIndexPostsNotFoundShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of query calls that found an existing entry */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsIndexQueriesFoundShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.index.queriesFound);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsIndexQueriesFoundAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "index_queries_found", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsIndexQueriesFoundShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of query calls that added a new entry */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsIndexQueriesNotFoundShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.index.queriesNotFound);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsIndexQueriesNotFoundAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "index_queries_not_found", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsIndexQueriesNotFoundShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of update calls that found an existing entry */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsIndexUpdatesFoundShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.index.updatesFound);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsIndexUpdatesFoundAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "index_updates_found", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsIndexUpdatesFoundShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Number of update calls that added a new entry */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsIndexUpdatesNotFoundShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%llu\n", layer->kernelStatsStorage.index.updatesNotFound);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsIndexUpdatesNotFoundAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "index_updates_not_found", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsIndexUpdatesNotFoundShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Current number of dedupe queries that are in flight */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsIndexCurrDedupeQueriesShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%" PRIu32 "\n", layer->kernelStatsStorage.index.currDedupeQueries);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsIndexCurrDedupeQueriesAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "index_curr_dedupe_queries", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsIndexCurrDedupeQueriesShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
/**********************************************************************/
|
|
Packit Service |
310c69 |
/** Maximum number of dedupe queries that have been in flight */
|
|
Packit Service |
310c69 |
static ssize_t poolStatsIndexMaxDedupeQueriesShow(KernelLayer *layer, char *buf)
|
|
Packit Service |
310c69 |
{
|
|
Packit Service |
310c69 |
ssize_t retval;
|
|
Packit Service |
310c69 |
mutex_lock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
getKernelStats(layer, &layer->kernelStatsStorage);
|
|
Packit Service |
310c69 |
retval = sprintf(buf, "%" PRIu32 "\n", layer->kernelStatsStorage.index.maxDedupeQueries);
|
|
Packit Service |
310c69 |
mutex_unlock(&layer->statsMutex);
|
|
Packit Service |
310c69 |
return retval;
|
|
Packit Service |
310c69 |
}
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
static PoolStatsAttribute poolStatsIndexMaxDedupeQueriesAttr = {
|
|
Packit Service |
310c69 |
.attr = { .name = "index_max_dedupe_queries", .mode = 0444, },
|
|
Packit Service |
310c69 |
.show = poolStatsIndexMaxDedupeQueriesShow,
|
|
Packit Service |
310c69 |
};
|
|
Packit Service |
310c69 |
|
|
Packit Service |
310c69 |
struct attribute *poolStatsAttrs[] = {
|
|
Packit Service |
310c69 |
&poolStatsDataBlocksUsedAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsOverheadBlocksUsedAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsLogicalBlocksUsedAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsPhysicalBlocksAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsLogicalBlocksAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapCacheSizeAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsWritePolicyAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockSizeAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsCompleteRecoveriesAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsReadOnlyRecoveriesAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsModeAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsInRecoveryModeAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsRecoveryPercentageAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsPackerCompressedFragmentsWrittenAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsPackerCompressedBlocksWrittenAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsPackerCompressedFragmentsInPackerAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsAllocatorSlabCountAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsAllocatorSlabsOpenedAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsAllocatorSlabsReopenedAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsJournalDiskFullAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsJournalSlabJournalCommitsRequestedAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsJournalEntriesStartedAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsJournalEntriesWrittenAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsJournalEntriesCommittedAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsJournalBlocksStartedAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsJournalBlocksWrittenAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsJournalBlocksCommittedAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsSlabJournalDiskFullCountAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsSlabJournalFlushCountAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsSlabJournalBlockedCountAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsSlabJournalBlocksWrittenAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsSlabJournalTailBusyCountAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsSlabSummaryBlocksWrittenAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsRefCountsBlocksWrittenAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapDirtyPagesAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapCleanPagesAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapFreePagesAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapFailedPagesAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapIncomingPagesAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapOutgoingPagesAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapCachePressureAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapReadCountAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapWriteCountAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapFailedReadsAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapFailedWritesAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapReclaimedAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapReadOutgoingAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapFoundInCacheAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapDiscardRequiredAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapWaitForPageAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapFetchRequiredAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapPagesLoadedAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapPagesSavedAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBlockMapFlushCountAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsHashLockDedupeAdviceValidAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsHashLockDedupeAdviceStaleAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsHashLockConcurrentDataMatchesAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsHashLockConcurrentHashCollisionsAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsErrorsInvalidAdvicePBNCountAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsErrorsNoSpaceErrorCountAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsErrorsReadOnlyErrorCountAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsInstanceAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsCurrentVIOsInProgressAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsMaxVIOsAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsDedupeAdviceTimeoutsAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsFlushOutAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsLogicalBlockSizeAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosInReadAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosInWriteAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosInDiscardAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosInFlushAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosInFuaAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosInPartialReadAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosInPartialWriteAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosInPartialDiscardAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosInPartialFlushAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosInPartialFuaAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosOutReadAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosOutWriteAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosOutDiscardAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosOutFlushAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosOutFuaAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosMetaReadAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosMetaWriteAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosMetaDiscardAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosMetaFlushAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosMetaFuaAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosJournalReadAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosJournalWriteAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosJournalDiscardAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosJournalFlushAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosJournalFuaAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosPageCacheReadAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosPageCacheWriteAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosPageCacheDiscardAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosPageCacheFlushAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosPageCacheFuaAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosOutCompletedReadAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosOutCompletedWriteAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosOutCompletedDiscardAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosOutCompletedFlushAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosOutCompletedFuaAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosMetaCompletedReadAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosMetaCompletedWriteAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosMetaCompletedDiscardAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosMetaCompletedFlushAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosMetaCompletedFuaAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosJournalCompletedReadAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosJournalCompletedWriteAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosJournalCompletedDiscardAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosJournalCompletedFlushAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosJournalCompletedFuaAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosPageCacheCompletedReadAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosPageCacheCompletedWriteAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosPageCacheCompletedDiscardAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosPageCacheCompletedFlushAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosPageCacheCompletedFuaAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosAcknowledgedReadAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosAcknowledgedWriteAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosAcknowledgedDiscardAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosAcknowledgedFlushAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosAcknowledgedFuaAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosAcknowledgedPartialReadAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosAcknowledgedPartialWriteAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosAcknowledgedPartialDiscardAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosAcknowledgedPartialFlushAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosAcknowledgedPartialFuaAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosInProgressReadAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosInProgressWriteAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosInProgressDiscardAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosInProgressFlushAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsBiosInProgressFuaAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsMemoryUsageBytesUsedAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsMemoryUsagePeakBytesUsedAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsIndexEntriesIndexedAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsIndexPostsFoundAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsIndexPostsNotFoundAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsIndexQueriesFoundAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsIndexQueriesNotFoundAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsIndexUpdatesFoundAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsIndexUpdatesNotFoundAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsIndexCurrDedupeQueriesAttr.attr,
|
|
Packit Service |
310c69 |
&poolStatsIndexMaxDedupeQueriesAttr.attr,
|
|
Packit Service |
310c69 |
NULL,
|
|
Packit Service |
310c69 |
};
|