22 Jan, 2013

1 commit


15 Jan, 2013

1 commit

  • As the "status" debugfs entry will be maintained for entire F2FS filesystem
    irrespective of the number of partitions.
    So, we can move the initialization to the init part of the f2fs and destroy will
    be done from exit part. After making changes, for individual partition mount -
    entry creation code will not be executed.

    Signed-off-by: Jianpeng Ma
    Signed-off-by: Namjae Jeon
    Signed-off-by: Amit Sahrawat
    Signed-off-by: Jaegeuk Kim

    Namjae Jeon
     

10 Jan, 2013

1 commit

  • I'd like to revisit the f2fs_gc flow and rewrite as follows.

    1. In practical, the nGC parameter of f2fs_gc is meaningless. So, let's
    remove it.
    2. Background GC marks victim blocks as dirty one at a time.
    3. Foreground GC should do cleaning job until acquiring enough free
    sections. Afterwards, it needs to do checkpoint.

    Signed-off-by: Jaegeuk Kim

    Jaegeuk Kim
     

04 Jan, 2013

2 commits


28 Dec, 2012

1 commit

  • This patch is intended to unify string length declarations and usage.
    There are number of calls to strlen which return size_t object.
    The size of this object depends on compiler if it will be bigger,
    equal or even smaller than an unsigned int

    Signed-off-by: Leon Romanovsky
    Signed-off-by: Jaegeuk Kim

    Leon Romanovsky
     

11 Dec, 2012

6 commits

  • Previously, f2fs didn't track the parent inode number correctly which is stored
    in each f2fs_inode. In the case of the following scenario, a bug can be occured.

    Let's suppose there are one directory, "/b", and two files, "/a" and "/b/a".
    - pino of "/a" is ROOT_INO.
    - pino of "/b/a" is DIR_B_INO.

    Then,
    # sync
    : The inode pages of "/a" and "/b/a" contain the parent inode numbers as
    ROOT_INO and DIR_B_INO respectively.
    # mv /a /b/a
    : The parent inode number of "/a" should be changed to DIR_B_INO, but f2fs
    didn't do that. Ref. f2fs_set_link().

    In order to fix this clearly, I added i_pino in f2fs_inode_info, and whenever
    it needs to be changed like in f2fs_add_link() and f2fs_set_link(), it is
    updated temporarily in f2fs_inode_info.

    And later, f2fs_write_inode() stores the latest information to the inode pages.
    For power-off-recovery, f2fs_sync_file() triggers simply f2fs_write_inode().

    Signed-off-by: Jaegeuk Kim

    Jaegeuk Kim
     
  • Do cleanup more for better code readability.

    - Change the parameter set of f2fs_bio_alloc()
    This function should allocate a bio only since it is not something like
    f2fs_bio_init(). Instead, the caller should initialize the allocated bio.

    - Introduce SECTOR_FROM_BLOCK
    This macro translates a block address to its sector address.

    Signed-off-by: Jaegeuk Kim
    Reviewed-by: Namjae Jeon

    Jaegeuk Kim
     
  • As pointed out by Randy Dunlap, this patch removes all usage of "/**" for comment
    blocks. Instead, just use "/*".

    Signed-off-by: Jaegeuk Kim

    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: Jaegeuk Kim

    Jaegeuk Kim
     
  • Including is not necessary.

    Signed-off-by: Sachin Kamat

    Sachin Kamat
     
  • This adds the following major in-memory structures in f2fs.

    - f2fs_sb_info:
    contains f2fs-specific information, two special inode pointers for node and
    meta address spaces, and orphan inode management.

    - f2fs_inode_info:
    contains vfs_inode and other fs-specific information.

    - f2fs_nm_info:
    contains node manager information such as NAT entry cache, free nid list,
    and NAT page management.

    - f2fs_node_info:
    represents a node as node id, inode number, block address, and its version.

    - f2fs_sm_info:
    contains segment manager information such as SIT entry cache, free segment
    map, current active logs, dirty segment management, and segment utilization.
    The specific structures are sit_info, free_segmap_info, dirty_seglist_info,
    curseg_info.

    In addition, add F2FS_SUPER_MAGIC in magic.h.

    Signed-off-by: Chul Lee
    Signed-off-by: Jaegeuk Kim

    Jaegeuk Kim