|
Flash Translation Layer
1.0
|
implementation of the lizbd which is inherited by the device More...
#include <libzbd/zbd.h>#include <fcntl.h>#include <stdio.h>#include <errno.h>#include <glib.h>#include <unistd.h>#include "include/zone.h"#include "include/device.h"#include "include/log.h"
Macros | |
| #define | _GNU_SOURCE |
Functions | |
| int | zone_open (struct device *dev, const char *name, int flags) |
| open the zoned block deivce file More... | |
| static ssize_t | zone_do_rw (int fd, int flag, void *buffer, size_t count, off_t offset) |
| execute the read and write function More... | |
| ssize_t | zone_write (struct device *dev, struct device_request *request) |
| write to the zoned block device More... | |
| ssize_t | zone_read (struct device *dev, struct device_request *request) |
| read to the zoned block device More... | |
| int | zone_erase (struct device *dev, struct device_request *request) |
| erase the segment to the zoned block device More... | |
| int | zone_close (struct device *dev) |
| close the zoned block device More... | |
| int | zone_device_init (struct device *dev, uint64_t flags) |
| initialize the device module More... | |
| int | zone_device_exit (struct device *dev) |
| deallocate the device module More... | |
Variables | |
| struct device_operations | __zone_dops |
| zoned block device operations More... | |
implementation of the lizbd which is inherited by the device
| #define _GNU_SOURCE |
| int zone_close | ( | struct device * | dev | ) |
close the zoned block device
| dev | pointer of the device structure |
| int zone_device_exit | ( | struct device * | dev | ) |
deallocate the device module
| dev | pointer of the device structure |

| int zone_device_init | ( | struct device * | dev, |
| uint64_t | flags | ||
| ) |
initialize the device module
| dev | pointer of the device structure |
| flags | flags for ramdisk and device |

|
static |
execute the read and write function
| fd | the number which contains the file descriptor |
| flag | I/O direction |
| buffer | pointer of the buffer |
| count | the number of byte to read or write |
| offset | position which wants to read or write |
| int zone_erase | ( | struct device * | dev, |
| struct device_request * | request | ||
| ) |
erase the segment to the zoned block device
| dev | pointer of the device structre |
| request | pointer of the user request |
| int zone_open | ( | struct device * | dev, |
| const char * | name, | ||
| int | flags | ||
| ) |
open the zoned block deivce file
| dev | pointer of the device structure |
| name | zoned block device's device filename |
| flags | open flags for ramdisk |

| ssize_t zone_read | ( | struct device * | dev, |
| struct device_request * | request | ||
| ) |
read to the zoned block device
| dev | pointer of the device structre |
| request | pointer of the user request |

| ssize_t zone_write | ( | struct device * | dev, |
| struct device_request * | request | ||
| ) |
write to the zoned block device
| dev | pointer of the device structre |
| request | pointer of the user request |

| struct device_operations __zone_dops |
zoned block device operations
1.8.13