Flash Translation Layer  1.0
Functions
page-write.c File Reference

write logic for page ftl More...

#include "include/module.h"
#include "include/page.h"
#include "include/device.h"
#include "include/log.h"
#include "include/bits.h"
#include <pthread.h>
#include <assert.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <glib.h>
Include dependency graph for page-write.c:

Functions

static void page_ftl_invalidate (struct page_ftl *pgftl, size_t lpn)
 invalidate a segment that including to the given LPN More...
 
static void page_ftl_write_end_rq (struct device_request *request)
 write's end request function More...
 
static ssize_t page_ftl_read_for_overwrite (struct page_ftl *pgftl, size_t lpn, void *buffer)
 read sequence for overwrite More...
 
void page_ftl_write_update_metadata (struct page_ftl *pgftl, struct device_request *request)
 
ssize_t page_ftl_write (struct page_ftl *pgftl, struct device_request *request)
 the core logic for writing the request to the device. More...
 

Detailed Description

write logic for page ftl

Author
Gijun Oh
Version
0.2
Date
2021-09-22

Function Documentation

◆ page_ftl_invalidate()

static void page_ftl_invalidate ( struct page_ftl pgftl,
size_t  lpn 
)
static

invalidate a segment that including to the given LPN

Parameters
pgftlpointer of the page FTL structure
lpnlogical page address to invalidate

< segment information update

< global information update

Here is the call graph for this function:

◆ page_ftl_read_for_overwrite()

static ssize_t page_ftl_read_for_overwrite ( struct page_ftl pgftl,
size_t  lpn,
void *  buffer 
)
static

read sequence for overwrite

Parameters
pgftlpointer of the page FTL
lpnlogical page address which wants to overwrite
buffera pointer to a buffer containing the result of the read
Returns
reading data size. a negative number means fail to read
Note
NAND-based storage doesn't allow to do overwrite. Therefore, you must use the out-of-place update. So this logic is necessary.
Here is the call graph for this function:

◆ page_ftl_write()

ssize_t page_ftl_write ( struct page_ftl pgftl,
struct device_request request 
)

the core logic for writing the request to the device.

Parameters
pgftlpointer of the page FTL structure
requestuser's request pointer
Returns
writing data size. a negative number means fail to write.

< global data retrieve

Here is the call graph for this function:

◆ page_ftl_write_end_rq()

static void page_ftl_write_end_rq ( struct device_request request)
static

write's end request function

Parameters
requestthe request which is submitted before
Here is the call graph for this function:

◆ page_ftl_write_update_metadata()

void page_ftl_write_update_metadata ( struct page_ftl pgftl,
struct device_request request 
)

< global information update

Here is the call graph for this function: