cctools
disk_alloc.h
1 /*
2 Copyright (C) 2022 The University of Notre Dame
3 This software is distributed under the GNU General Public License.
4 See the file COPYING for details.
5 */
6 
7 #include <stdint.h>
8 #ifndef DISK_ALLOC_H
9 #define DISK_ALLOC_H
10 
11 /* The disk_alloc_create function instantiates
12  * a virtual device and creates a file system
13  * generated at the user defined location with
14  * a maximum capacity given by the user defined
15  * size.
16  * @param loc: Location for disk allocation.
17  * @param size: The size to set the file
18  * system's capacity (in KB).
19  * @return: Return 0 on success, else -1.
20  */
21 int disk_alloc_create(char *loc, char *fs, int64_t size);
22 
23 /* The disk_alloc_delete functions deletes
24  * a file system at the user defined location.
25  * @param loc: Location of the disk allocation
26  * to be deleted.
27  * @return: Return 0 on success, else -1.
28  */
29 int disk_alloc_delete(char *loc);
30 #endif