|
Flash Translation Layer
1.0
|
garbage collection logic for page ftl More...
#include <glib.h>#include <stdint.h>#include <stdlib.h>#include <string.h>#include <errno.h>#include "include/page.h"#include "include/log.h"#include "include/bits.h"
Functions | |
| gint | page_ftl_gc_list_cmp (gconstpointer a, gconstpointer b) |
| page ftl gc list compare function More... | |
| static void | page_ftl_erase_end_rq (struct device_request *request) |
| erase's end request function More... | |
| static struct page_ftl_segment * | page_ftl_pick_gc_target (struct page_ftl *pgftl) |
| the function which chooses the appropriate garbage collection target. More... | |
| static int | page_ftl_segment_erase (struct page_ftl *pgftl, struct device_address paddr) |
| erase the garbage collection target segment More... | |
| static ssize_t | page_ftl_read_valid_page (struct page_ftl *pgftl, size_t lpn, char **__buffer) |
| read the valid pages from the garbage collection target segment More... | |
| static ssize_t | page_ftl_write_valid_page (struct page_ftl *pgftl, size_t lpn, char *buffer) |
| write valid page to the other segment. More... | |
| static int | page_ftl_valid_page_copy (struct page_ftl *pgftl, struct page_ftl_segment *segment) |
| core logic of the valid page copy More... | |
| int | page_ftl_do_gc (struct page_ftl *pgftl) |
| core logic of the garbage collection More... | |
garbage collection logic for page ftl
| int page_ftl_do_gc | ( | struct page_ftl * | pgftl | ) |
core logic of the garbage collection
| pgftl | pointer of the page FTL structure |

|
static |
erase's end request function
| request | the request which is submitted before |

| gint page_ftl_gc_list_cmp | ( | gconstpointer | a, |
| gconstpointer | b | ||
| ) |
page ftl gc list compare function
| a | compare target 1 |
| b | compare target 2 |
|
static |
the function which chooses the appropriate garbage collection target.
| pgftl | pointer of the page FTL structure |

|
static |
read the valid pages from the garbage collection target segment
| pgftl | pointer of the page FTL structure |
| lpn | read position which contains the logical page number |
| __buffer | buffer pointer's address which dynamically allocated by this function |

|
static |
erase the garbage collection target segment
| pgftl | pointer of the page FTL structure |
| paddr | the address containing the segment number which wants to erase |

|
static |
core logic of the valid page copy
| pgftl | pointer of the page FTL structure |
| segment | segment which wants to copy the valid pages |

|
static |
write valid page to the other segment.
| pgftl | pointer of the page FTL structure |
| lpn | write position which contains the logical page number |
| buffer | buffer pointer containing the valid page |

1.8.13