1. 11 12月, 2012 2 次提交
    • J
      f2fs: fix endian conversion bugs reported by sparse · 25ca923b
      Jaegeuk Kim 提交于
      This patch should resolve the bugs reported by the sparse tool.
      Initial reports were written by "kbuild test robot" managed by fengguang.wu.
      
      In my local machines, I've tested also by running:
      > make C=2 CF="-D__CHECK_ENDIAN__"
      
      Accordingly, I've found lots of warnings and bugs related to the endian
      conversion. And I've fixed all at this moment.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      25ca923b
    • J
      f2fs: add segment operations · 351df4b2
      Jaegeuk Kim 提交于
      This adds specific functions not only to manage dirty/free segments, SIT pages,
      a cache for SIT entries, and summary entries, but also to allocate free blocks
      and write three types of pages: data, node, and meta.
      
      - F2FS maintains three types of bitmaps in memory, which indicate free, prefree,
        and dirty segments respectively.
      
      - The key information of an SIT entry consists of a segment number, the number
        of valid blocks in the segment, a bitmap to identify there-in valid or invalid
        blocks.
      
      - An SIT page is composed of a certain range of SIT entries, which is maintained
        by the address space of meta_inode.
      
      - To cache SIT entries, a simple array is used. The index for the array is the
        segment number.
      
      - A summary entry for data contains the parent node information. A summary entry
        for node contains its node offset from the inode.
      
      - F2FS manages information about six active logs and those summary entries in
        memory. Whenever one of them is changed, its summary entries are flushed to
        its SIT page maintained by the address space of meta_inode.
      
      - This patch adds a default block allocation function which supports heap-based
        allocation policy.
      
      - This patch adds core functions to write data, node, and meta pages. Since LFS
        basically produces a series of sequential writes, F2FS merges sequential bios
        with a single one as much as possible to reduce the IO scheduling overhead.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      351df4b2