06 Mar, 2019

1 commit

  • Fix below warning coming because of using mutex lock in atomic context.

    BUG: sleeping function called from invalid context at kernel/locking/mutex.c:98
    in_atomic(): 1, irqs_disabled(): 0, pid: 585, name: sh
    Preemption disabled at: __radix_tree_preload+0x28/0x130
    Call trace:
    dump_backtrace+0x0/0x2b4
    show_stack+0x20/0x28
    dump_stack+0xa8/0xe0
    ___might_sleep+0x144/0x194
    __might_sleep+0x58/0x8c
    mutex_lock+0x2c/0x48
    f2fs_trace_pid+0x88/0x14c
    f2fs_set_node_page_dirty+0xd0/0x184

    Do not use f2fs_radix_tree_insert() to avoid doing cond_resched() with
    spin_lock() acquired.

    Signed-off-by: Sahitya Tummala
    Reviewed-by: Chao Yu
    Signed-off-by: Jaegeuk Kim

    Sahitya Tummala
     

13 Sep, 2018

1 commit


03 Jan, 2018

1 commit

  • As Jia-Ju Bai reported:

    "According to fs/f2fs/trace.c, the kernel module may sleep under a spinlock.
    The function call path is:
    f2fs_trace_pid (acquire the spinlock)
    f2fs_radix_tree_insert
    cond_resched --> may sleep

    I do not find a good way to fix it, so I only report.
    This possible bug is found by my static analysis tool (DSAC) and my code
    review."

    Obviously, it's problemetic to schedule in critical region of spinlock,
    which will cause uninterruptable sleep if there is no waker.

    This patch changes to use mutex lock intead of spinlock to avoid this
    condition.

    Reported-by: Jia-Ju Bai
    Signed-off-by: Chao Yu
    Signed-off-by: Jaegeuk Kim

    Chao Yu
     

25 Mar, 2017

1 commit


22 Mar, 2017

1 commit


08 Jun, 2016

1 commit

  • Separate the op from the rq_flag_bits and have f2fs
    set/get the bio using bio_set_op_attrs/bio_op.

    Signed-off-by: Mike Christie
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Jens Axboe

    Mike Christie
     

23 Feb, 2016

1 commit

  • This patch enables to trace old block address of CoWed page for better
    debugging.

    f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4f0, oldaddr = 0xfe8ab, newaddr = 0xfee90 rw = WRITE_SYNC, type = NODE
    f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4f8, oldaddr = 0xfe8b0, newaddr = 0xfee91 rw = WRITE_SYNC, type = NODE
    f2fs_submit_page_mbio: dev = (1,0), ino = 1, page_index = 0x1d4fa, oldaddr = 0xfe8ae, newaddr = 0xfee92 rw = WRITE_SYNC, type = NODE

    f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x96, oldaddr = 0xf049b, newaddr = 0x2bbe rw = WRITE, type = DATA
    f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x97, oldaddr = 0xf049c, newaddr = 0x2bbf rw = WRITE, type = DATA
    f2fs_submit_page_mbio: dev = (1,0), ino = 134824, page_index = 0x98, oldaddr = 0xf049d, newaddr = 0x2bc0 rw = WRITE, type = DATA

    f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x47, oldaddr = 0xffffffff, newaddr = 0xf2631 rw = WRITE, type = DATA
    f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x48, oldaddr = 0xffffffff, newaddr = 0xf2632 rw = WRITE, type = DATA
    f2fs_submit_page_mbio: dev = (1,0), ino = 135260, page_index = 0x49, oldaddr = 0xffffffff, newaddr = 0xf2633 rw = WRITE, type = DATA

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

    Chao Yu
     

29 May, 2015

1 commit


12 Feb, 2015

1 commit

  • This patch resolves the following warnings.

    include/trace/events/f2fs.h:150:1: warning: expression using sizeof bool
    include/trace/events/f2fs.h:180:1: warning: expression using sizeof bool
    include/trace/events/f2fs.h:990:1: warning: expression using sizeof bool
    include/trace/events/f2fs.h:990:1: warning: expression using sizeof bool
    include/trace/events/f2fs.h:150:1: warning: odd constant _Bool cast (ffffffffffffffff becomes 1)
    include/trace/events/f2fs.h:180:1: warning: odd constant _Bool cast (ffffffffffffffff becomes 1)
    include/trace/events/f2fs.h:990:1: warning: odd constant _Bool cast (ffffffffffffffff becomes 1)
    include/trace/events/f2fs.h:990:1: warning: odd constant _Bool cast (ffffffffffffffff becomes 1)

    fs/f2fs/checkpoint.c:27:19: warning: symbol 'inode_entry_slab' was not declared. Should it be static?
    fs/f2fs/checkpoint.c:577:15: warning: cast to restricted __le32
    fs/f2fs/checkpoint.c:592:15: warning: cast to restricted __le32

    fs/f2fs/trace.c:19:1: warning: symbol 'pids' was not declared. Should it be static?
    fs/f2fs/trace.c:21:21: warning: symbol 'last_io' was not declared. Should it be static?

    Signed-off-by: Jaegeuk Kim

    Jaegeuk Kim
     

10 Jan, 2015

5 commits