initrd: apply a preen mode 2 about f2fs.fsck 34/262734/1 accepted/tizen/6.5/unified/20211028.114718 accepted/tizen/unified/20210819.224401 submit/tizen/20210819.031929 submit/tizen_6.5/20211028.162501 tizen_6.5.m2_release
authorJaehoon Chung <jh80.chung@samsung.com>
Thu, 19 Aug 2021 02:14:02 +0000 (11:14 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Thu, 19 Aug 2021 02:25:41 +0000 (11:25 +0900)
Apply a preen mode 2 about f2fs.fsck.
When f2fs file is created in lower kernel than v4.19, i_gc_failure is
initialized to 0x1. In Tizen Build System, user image is always set to
1 because of using old kernel.

[FIX] (fsck_chk_inode_blk:1071)  --> Regular: 0x31 reset i_gc_failures from 0x1 to 0x00

Preen mode 2 is for skipping this behavior about old kernel.
https://lore.kernel.org/patchwork/patch/1017743/

The first booting time will be reduced.

Change-Id: I23825d9ff1f49c6b3cf9db9513f53f3854fcdee0
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
scripts/init.sh

index 79594a634be0975ffe939bf8f75df1bd545b453a..70a55f512b7654f490eaa3dfc66cca7e4789cb80 100755 (executable)
@@ -224,10 +224,10 @@ function process_userfs()
     then
         if [ "$NEED_RESIZEFS" = "1" ]
         then
-            /sbin/fsck.f2fs -y $USERFS
+            /sbin/fsck.f2fs -p 2 -y $USERFS
             /sbin/resize.f2fs $USERFS
         fi
-        /sbin/fsck.f2fs -y $USERFS
+        /sbin/fsck.f2fs -p 2 -y $USERFS
     else
         if [ "$NEED_RESIZEFS" = "1" ]
         then