• Chao Yu's avatar
    f2fs: ro: don't start discard thread for readonly image · a217f187
    Chao Yu authored
    [ 9299.893835] F2FS-fs (vdd): Allow to mount readonly mode only
    mount: /mnt/f2fs: WARNING: source write-protected, mounted read-only.
    root@qemu:/ ps -ef|grep f2fs
    root          94       2  0 03:46 ?        00:00:00 [kworker/u17:0-f2fs_post_read_wq]
    root        6282       2  0 06:21 ?        00:00:00 [f2fs_discard-253:48]
    
    There will be no deletion in readonly image, let's skip starting
    discard thread to save system resources.
    Signed-off-by: default avatarChao Yu <chao@kernel.org>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    a217f187
segment.c 140 KB