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>
write logic for page ftl
- Author
- Gijun Oh
- Version
- 0.2
- Date
- 2021-09-22
◆ 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
-
pgftl | pointer of the page FTL structure |
lpn | logical page address to invalidate |
< segment information update
< global information update
◆ 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
-
pgftl | pointer of the page FTL |
lpn | logical page address which wants to overwrite |
buffer | a 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.
◆ page_ftl_write()
the core logic for writing the request to the device.
- Parameters
-
pgftl | pointer of the page FTL structure |
request | user's request pointer |
- Returns
- writing data size. a negative number means fail to write.
< global data retrieve
◆ page_ftl_write_end_rq()
write's end request function
- Parameters
-
request | the request which is submitted before |
◆ page_ftl_write_update_metadata()
< global information update