02 Apr, 2014

2 commits


20 Mar, 2014

1 commit


18 Mar, 2014

4 commits


10 Mar, 2014

1 commit


28 Feb, 2014

1 commit

  • We should de-account dirty counters for page when redirty in ->writepage().

    Wu Fengguang described in 'commit 971767caf632190f77a40b4011c19948232eed75':
    "writeback: fix dirtied pages accounting on redirty
    De-account the accumulative dirty counters on page redirty.

    Page redirties (very common in ext4) will introduce mismatch between
    counters (a) and (b)

    a) NR_DIRTIED, BDI_DIRTIED, tsk->nr_dirtied
    b) NR_WRITTEN, BDI_WRITTEN

    This will introduce systematic errors in balanced_rate and result in
    dirty page position errors (ie. the dirty pages are no longer balanced
    around the global/bdi setpoints)."

    Signed-off-by: Chao Yu
    Signed-off-by: Jaegeuk Kim

    Chao Yu
     

27 Feb, 2014

1 commit


17 Feb, 2014

4 commits


22 Jan, 2014

3 commits


14 Jan, 2014

3 commits


26 Dec, 2013

1 commit

  • Previously, we need to calculate the max orphan num when we try to acquire an
    orphan inode, but it's a stable value since the super block was inited. So
    converting it to a field of f2fs_sb_info and use it directly when needed seems
    a better choose.

    Signed-off-by: Gu Zheng
    Signed-off-by: Jaegeuk Kim

    Gu Zheng
     

23 Dec, 2013

12 commits

  • This patch enhances writing dirty meta pages collectively in background.
    During the file data writes, it'd better avoid to write small dirty meta pages
    frequently.
    So let's give a chance to collect a number of dirty meta pages for a while.

    Signed-off-by: Jaegeuk Kim

    Jaegeuk Kim
     
  • This patch introduces f2fs_io_info to mitigate the complex parameter list.

    struct f2fs_io_info {
    enum page_type type; /* contains DATA/NODE/META/META_FLUSH */
    int rw; /* contains R/RS/W/WS */
    int rw_flag; /* contains REQ_META/REQ_PRIO */
    }

    1. f2fs_write_data_pages
    - DATA
    - WRITE_SYNC is set when wbc->WB_SYNC_ALL.

    2. sync_node_pages
    - NODE
    - WRITE_SYNC all the time

    3. sync_meta_pages
    - META
    - WRITE_SYNC all the time
    - REQ_META | REQ_PRIO all the time

    ** f2fs_submit_merged_bio() handles META_FLUSH.

    4. ra_nat_pages, ra_sit_pages, ra_sum_pages
    - META
    - READ_SYNC

    Cc: Fan Li
    Cc: Changman Lee
    Signed-off-by: Jaegeuk Kim

    Jaegeuk Kim
     
  • This patch adds unlikely() macro into the most of codes.
    The basic rule is to add that when:
    - checking unusual errors,
    - checking page mappings,
    - and the other unlikely conditions.

    Change log from v1:
    - Don't add unlikely for the NULL test and error test: advised by Andi Kleen.

    Cc: Chao Yu
    Cc: Andi Kleen
    Reviewed-by: Chao Yu
    Signed-off-by: Jaegeuk Kim

    Jaegeuk Kim
     
  • As we know, some of our branch condition will rarely be true. So we could add
    'unlikely' to let compiler optimize these code, by this way we could drop
    unneeded 'jump' assemble code to improve performance.

    change log:
    o add *unlikely* as many as possible across the whole source files at once
    suggested by Jaegeuk Kim.

    Suggested-by: Jaegeuk Kim
    Signed-off-by: Chao Yu
    Signed-off-by: Jaegeuk Kim

    Chao Yu
     
  • This patch integrates redundant bio operations on read and write IOs.

    1. Move bio-related codes to the top of data.c.
    2. Replace f2fs_submit_bio with f2fs_submit_merged_bio, which handles read
    bios additionally.
    3. Introduce __submit_merged_bio to submit the merged bio.
    4. Change f2fs_readpage to f2fs_submit_page_bio.
    5. Introduce f2fs_submit_page_mbio to integrate previous submit_read_page and
    submit_write_page.

    Reviewed-by: Gu Zheng
    Reviewed-by: Chao Yu
    Signed-off-by: Jaegeuk Kim

    Jaegeuk Kim
     
  • The recover_orphan_inodes() returns no error all the time, so we don't need to
    check its errors.

    Signed-off-by: Chao Yu
    [Jaegeuk Kim: add description]
    Signed-off-by: Jaegeuk Kim

    Chao Yu
     
  • Because we will write node summaries when do_checkpoint with umount flag,
    our number of max orphan blocks should minus NR_CURSEG_NODE_TYPE additional.

    Signed-off-by: Chao Yu
    Signed-off-by: Shu Tan
    Signed-off-by: Jaegeuk Kim

    Chao Yu
     
  • This patch fixes some bit overflows by the shift operations.

    Dan Carpenter reported potential bugs on bit overflows as follows.

    fs/f2fs/segment.c:910 submit_write_page()
    warn: should 'blk_addr << ((sbi)->log_blocksize - 9)' be a 64 bit type?
    fs/f2fs/checkpoint.c:429 get_valid_checkpoint()
    warn: should '1 << ()' be a 64 bit type?
    fs/f2fs/data.c:408 f2fs_readpage()
    warn: should 'blk_addr << ((sbi)->log_blocksize - 9)' be a 64 bit type?
    fs/f2fs/data.c:457 submit_read_page()
    warn: should 'blk_addr << ((sbi)->log_blocksize - 9)' be a 64 bit type?
    fs/f2fs/data.c:525 get_data_block_ro()
    warn: should 'i << blkbits' be a 64 bit type?

    Bug-Reported-by: Dan Carpenter
    Signed-off-by: Jaegeuk Kim

    Jaegeuk Kim
     
  • Fix a potential out of range issue introduced by commit:
    22fb72225a
    f2fs: simplify write_orphan_inodes for better readable

    Signed-off-by: Gu Zheng
    Signed-off-by: Jaegeuk Kim

    Gu Zheng
     
  • Let's send REQ_META or REQ_PRIO when reading meta area such as NAT/SIT
    etc.

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

    Changman Lee
     
  • Signed-off-by: Gu Zheng
    Signed-off-by: Jaegeuk Kim

    Gu Zheng
     
  • Simplify write_orphan_inodes for better readable. Because we hold the
    orphan_inode_mutex, so it's safe to use list_for_each_entry instead of
    list_for_each_safe.

    Signed-off-by: Gu Zheng
    Signed-off-by: Jaegeuk Kim

    Gu Zheng
     

08 Nov, 2013

1 commit


29 Oct, 2013

1 commit


25 Oct, 2013

3 commits


22 Oct, 2013

1 commit


18 Oct, 2013

1 commit