Blame source/vdo/kernel/statusProcfs.h

Packit Service 75d76b
/*
Packit Service 75d76b
 * Copyright (c) 2020 Red Hat, Inc.
Packit Service 75d76b
 *
Packit Service 75d76b
 * This program is free software; you can redistribute it and/or
Packit Service 75d76b
 * modify it under the terms of the GNU General Public License
Packit Service 75d76b
 * as published by the Free Software Foundation; either version 2
Packit Service 75d76b
 * of the License, or (at your option) any later version.
Packit Service 75d76b
 * 
Packit Service 75d76b
 * This program is distributed in the hope that it will be useful,
Packit Service 75d76b
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 75d76b
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service 75d76b
 * GNU General Public License for more details.
Packit Service 75d76b
 * 
Packit Service 75d76b
 * You should have received a copy of the GNU General Public License
Packit Service 75d76b
 * along with this program; if not, write to the Free Software
Packit Service 75d76b
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
Packit Service 75d76b
 * 02110-1301, USA. 
Packit Service 75d76b
 *
Packit Service 75d76b
 * $Id: //eng/vdo-releases/aluminum/src/c++/vdo/kernel/statusProcfs.h#1 $
Packit Service 75d76b
 *
Packit Service 75d76b
 */
Packit Service 75d76b
Packit Service 75d76b
#ifndef STATUS_PROC_H
Packit Service 75d76b
#define STATUS_PROC_H
Packit Service 75d76b
Packit Service 75d76b
#include <linux/proc_fs.h>
Packit Service 75d76b
#include <linux/seq_file.h>
Packit Service 75d76b
#include "kernelLayer.h"
Packit Service 75d76b
Packit Service 75d76b
/**
Packit Service 75d76b
 * Initializes the /proc/vdo directory. Should be called once when the
Packit Service 75d76b
 * module is loaded.
Packit Service 75d76b
 *
Packit Service 75d76b
 * @return 0 on success, nonzero on failure
Packit Service 75d76b
 */
Packit Service 75d76b
int vdoInitProcfs(void);
Packit Service 75d76b
Packit Service 75d76b
/**
Packit Service 75d76b
 * Destroys the /proc/vdo directory. Should be called once when the
Packit Service 75d76b
 * module is unloaded.
Packit Service 75d76b
 */
Packit Service 75d76b
void vdoDestroyProcfs(void);
Packit Service 75d76b
Packit Service 75d76b
/**
Packit Service 75d76b
 * Creates a subdirectory in the /proc/vdo filesystem for a particular
Packit Service 75d76b
 * vdo.
Packit Service 75d76b
 *
Packit Service 75d76b
 * @param layer    the kernel layer
Packit Service 75d76b
 * @param name     the subdirectory name
Packit Service 75d76b
 * @param private  pointer to private storage for procfs data
Packit Service 75d76b
 *
Packit Service 75d76b
 * @return 0 on success, nonzero on failure
Packit Service 75d76b
 */
Packit Service 75d76b
int vdoCreateProcfsEntry(KernelLayer *layer, const char *name, void **private);
Packit Service 75d76b
Packit Service 75d76b
/**
Packit Service 75d76b
 * Destroys a subdirectory in the /proc/vdo filesystem for a
Packit Service 75d76b
 * particular vdo.
Packit Service 75d76b
 *
Packit Service 75d76b
 * @param name     the subdirectory name
Packit Service 75d76b
 * @param private  private storage for procfs data
Packit Service 75d76b
 */
Packit Service 75d76b
void vdoDestroyProcfsEntry(const char *name, void *private);
Packit Service 75d76b
Packit Service 75d76b
/**
Packit Service 75d76b
 * Retrieves the current kernel statistics.
Packit Service 75d76b
 *
Packit Service 75d76b
 * @param layer    the kernel layer
Packit Service 75d76b
 * @param stats    pointer to the structure to fill in
Packit Service 75d76b
 */
Packit Service 75d76b
void getKernelStats(KernelLayer *layer, KernelStatistics *stats);
Packit Service 75d76b
Packit Service 75d76b
#endif  /* STATUS_PROC_H */