f2fs: add node operations
authorJaegeuk Kim <jaegeuk.kim@samsung.com>
Fri, 2 Nov 2012 08:08:50 +0000 (17:08 +0900)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Tue, 11 Dec 2012 04:43:40 +0000 (13:43 +0900)
commite05df3b115e7308afbca652769b54e4549fcc723
tree8622a461c42f436d46b3877b8c6d67fe4d660586
parent127e670abfa7fa150f6550d620ded930f5bdb4e7
f2fs: add node operations

This adds specific functions to manage NAT pages, a cache for NAT entries, free
nids, direct/indirect node blocks for indexing data, and address space for node
pages.

- The key information of an NAT entry consists of a node id and a block address.

- An NAT page is composed of block addresses covered by a certain range of NAT
  entries, which is maintained by the address space of meta_inode.

- A radix tree structure is used to cache NAT entries. The index for the tree
  is a node id.

- When there is no free nid, F2FS should scan NAT entries to find new one. In
  order to avoid scanning frequently, F2FS manages a list containing a number of
  free nids in memory. Only when free nids in the list are exhausted, scanning
  process, build_free_nids(), is triggered.

- F2FS has direct and indirect node blocks for indexing data. This patch adds
  fuctions related to the node block management such as getting, allocating, and
  truncating node blocks to index data.

- In order to cache node blocks in memory, F2FS has a node_inode with an address
  space for node pages. This patch also adds the address space operations for
  node_inode.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/node.c [new file with mode: 0644]