zbd's header file
More...
#include <libzbd/zbd.h>
#include "device.h"
Go to the source code of this file.
zbd's header file
- Author
- Gijun Oh
- Version
- 0.2
- Date
- 2021-10-09
◆ zone_close()
int zone_close |
( |
struct device * |
dev | ) |
|
close the zoned block device
- Parameters
-
dev | pointer of the device structure |
- Returns
- 0 for success, negative number for fail
◆ zone_device_exit()
int zone_device_exit |
( |
struct device * |
dev | ) |
|
deallocate the device module
- Parameters
-
dev | pointer of the device structure |
- Returns
- 0 for success, negative value for fail
◆ zone_device_init()
int zone_device_init |
( |
struct device * |
dev, |
|
|
uint64_t |
flags |
|
) |
| |
initialize the device module
- Parameters
-
dev | pointer of the device structure |
flags | flags for ramdisk and device |
- Returns
- 0 for sucess, negative value for fail
◆ zone_erase()
erase the segment to the zoned block device
- Parameters
-
dev | pointer of the device structre |
request | pointer of the user request |
- Returns
- 0 for success, negative number for fail
◆ zone_get_zone_number()
◆ zone_open()
int zone_open |
( |
struct device * |
dev, |
|
|
const char * |
name, |
|
|
int |
flags |
|
) |
| |
open the zoned block deivce file
- Parameters
-
dev | pointer of the device structure |
name | zoned block device's device filename |
flags | open flags for ramdisk |
- Returns
- 0 for success, negative number for fail
◆ zone_read()
read to the zoned block device
- Parameters
-
dev | pointer of the device structre |
request | pointer of the user request |
- Returns
- the number of bytes to read, negative number for fail
◆ zone_write()
write to the zoned block device
- Parameters
-
dev | pointer of the device structre |
request | pointer of the user request |
- Returns
- the number of bytes to write, negative number for fail