Flash Translation Layer
1.0
|
interface for page ftl More...
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include "include/log.h"
#include "include/page.h"
#include "include/device.h"
Functions | |
static int | page_ftl_open_interface (struct flash_device *flash, const char *name, int flags) |
open the page flash translation layer based device More... | |
static ssize_t | page_ftl_write_interface (struct flash_device *flash, void *buffer, size_t count, off_t offset) |
write the page flash translation layer based device More... | |
static ssize_t | page_ftl_read_interface (struct flash_device *flash, void *buffer, size_t count, off_t offset) |
read the page flash translation layer based device More... | |
static int | page_ftl_close_interface (struct flash_device *flash) |
close the page flash translation layer based device More... | |
static int | page_ftl_ioctl_interface (struct flash_device *flash, unsigned int request,...) |
additional commands support interface More... | |
int | page_ftl_module_init (struct flash_device *flash, uint64_t flags) |
initialize the page flash translation layer module More... | |
int | page_ftl_module_exit (struct flash_device *flash) |
free resources in the page flash translation layer module More... | |
Variables | |
const struct flash_operations | __page_fops |
implementation of the flash_operations More... | |
interface for page ftl
|
static |
close the page flash translation layer based device
flash | pointer of the flash device information |
|
static |
additional commands support interface
flash | pointer of the flash device information |
request | ioctl's request identifier |
... | additional parameters |
int page_ftl_module_exit | ( | struct flash_device * | flash | ) |
free resources in the page flash translation layer module
flash | pointer of the flash device information |
int page_ftl_module_init | ( | struct flash_device * | flash, |
uint64_t | flags | ||
) |
initialize the page flash translation layer module
flash | pointer of the flash device information |
flags | flags for flash and submodule |
|
static |
open the page flash translation layer based device
flash | pointer of the flash device information |
name | file's name |
|
static |
read the page flash translation layer based device
flash | pointer of the flash device information |
buffer | pointer of the data buffer |
count | size of the buffer (bytes) |
offset | size of the offset (bytes) |
check the pointer validity
allocate the request
submit the request
|
static |
write the page flash translation layer based device
flash | pointer of the flash device information |
buffer | pointer of the data buffer |
count | size of the buffer (bytes) |
offset | size of the offset (bytes) |
check the pointer validity
allocate the request
submit the request
const struct flash_operations __page_fops |
implementation of the flash_operations