From e02fe191fe56c2c8579b73dffcbf85ac01eb7319 Mon Sep 17 00:00:00 2001 From: sbosse Date: Mon, 14 Oct 2024 23:08:30 +0200 Subject: [PATCH] Mon 14 Oct 23:06:38 CEST 2024 --- kernel/bcache.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 kernel/bcache.h diff --git a/kernel/bcache.h b/kernel/bcache.h new file mode 100644 index 0000000..6f4156c --- /dev/null +++ b/kernel/bcache.h @@ -0,0 +1,25 @@ +/* +Copyright (C) 2015-2019 The University of Notre Dame +This software is distributed under the GNU General Public License. +See the file LICENSE for details. +*/ + +#ifndef BCACHE_H +#define BCACHE_H + +#include "device.h" +#include "kernel/stats.h" + +int bcache_read( struct device *d, char *data, int blocks, int offset ); +int bcache_write( struct device *d, const char *data, int blocks, int offset ); + +int bcache_read_block( struct device *d, char *data, int block ); +int bcache_write_block( struct device *d, const char *data, int block ); + +void bcache_flush_block( struct device *d, int block ); +void bcache_flush_device( struct device *d ); +void bcache_flush_all(); + +void bcache_get_stats( struct bcache_stats *s ); + +#endif