summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikle Kolyada <zlogene@gentoo.org>2018-12-03 17:12:19 +0300
committerMikle Kolyada <zlogene@gentoo.org>2018-12-03 17:12:41 +0300
commit76ae45b316e09ec982a1f02d77017efbd5909d40 (patch)
treee0050c44def6f07366859923b74f6b3188a9b71e /sys-fs/f2fs-tools/files
parentdev-python/twisted: Add ~arm keyword wrt bug #661320 (diff)
downloadgentoo-76ae45b316e09ec982a1f02d77017efbd5909d40.tar.gz
gentoo-76ae45b316e09ec982a1f02d77017efbd5909d40.tar.bz2
gentoo-76ae45b316e09ec982a1f02d77017efbd5909d40.zip
sys-fs/f2fs-tools: revbump to fix fsck on boot
Closes: https://bugs.gentoo.org/671786 Signed-off-by: Mikle Kolyada <zlogene@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'sys-fs/f2fs-tools/files')
-rw-r--r--sys-fs/f2fs-tools/files/f2fs-tools-1.12.0-fsck.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/sys-fs/f2fs-tools/files/f2fs-tools-1.12.0-fsck.patch b/sys-fs/f2fs-tools/files/f2fs-tools-1.12.0-fsck.patch
new file mode 100644
index 000000000000..72d86fec465c
--- /dev/null
+++ b/sys-fs/f2fs-tools/files/f2fs-tools-1.12.0-fsck.patch
@@ -0,0 +1,56 @@
+From a6160c3e21f43b89b49802cc4a956d1c4b65ae44 Mon Sep 17 00:00:00 2001
+From: Chao Yu <yuchao0@huawei.com>
+Date: Mon, 26 Nov 2018 18:53:37 +0800
+Subject: fsck.f2fs: allow to fsck readonly image w/ -f option
+
+To keep line with e2fsprogs, let's allow to fsck mounted image as
+readonly w/ -f option.
+
+Reported-by: Perfect Gentleman <perfect007gentleman@gmail.com>
+Signed-off-by: Chao Yu <yuchao0@huawei.com>
+---
+ fsck/main.c | 1 +
+ include/f2fs_fs.h | 1 +
+ lib/libf2fs.c | 2 +-
+ 3 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/fsck/main.c b/fsck/main.c
+index 675c603..bb79f6e 100644
+--- a/fsck/main.c
++++ b/fsck/main.c
+@@ -249,6 +249,7 @@ void f2fs_parse_options(int argc, char *argv[])
+ case 'f':
+ case 'y':
+ c.fix_on = 1;
++ c.force = 1;
+ MSG(0, "Info: Force to fix corruption\n");
+ break;
+ case 'q':
+diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
+index 65cc8fd..6eebb3a 100644
+--- a/include/f2fs_fs.h
++++ b/include/f2fs_fs.h
+@@ -369,6 +369,7 @@ struct f2fs_configuration {
+ void *private;
+ int dry_run;
+ int fix_on;
++ int force;
+ int defset;
+ int bug_on;
+ int alloc_failed;
+diff --git a/lib/libf2fs.c b/lib/libf2fs.c
+index cc335db..498f6c0 100644
+--- a/lib/libf2fs.c
++++ b/lib/libf2fs.c
+@@ -821,7 +821,7 @@ int get_device_info(int i)
+ return -1;
+ }
+
+- if (S_ISBLK(stat_buf->st_mode))
++ if (S_ISBLK(stat_buf->st_mode) && !c.force)
+ fd = open(dev->path, O_RDWR | O_EXCL);
+ else
+ fd = open(dev->path, O_RDWR);
+--
+cgit 1.2-0.3.lf.el7
+