]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.13-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Sep 2021 09:34:13 +0000 (11:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Sep 2021 09:34:13 +0000 (11:34 +0200)
added patches:
f2fs-guarantee-to-write-dirty-data-when-enabling-checkpoint-back.patch
iwlwifi-add-support-for-ax201-in-samsung-galaxy-book-flex2-alpha.patch

queue-5.13/f2fs-guarantee-to-write-dirty-data-when-enabling-checkpoint-back.patch [new file with mode: 0644]
queue-5.13/iwlwifi-add-support-for-ax201-in-samsung-galaxy-book-flex2-alpha.patch [new file with mode: 0644]
queue-5.13/series

diff --git a/queue-5.13/f2fs-guarantee-to-write-dirty-data-when-enabling-checkpoint-back.patch b/queue-5.13/f2fs-guarantee-to-write-dirty-data-when-enabling-checkpoint-back.patch
new file mode 100644 (file)
index 0000000..7228ce5
--- /dev/null
@@ -0,0 +1,64 @@
+From dddd3d65293a52c2c3850c19b1e5115712e534d8 Mon Sep 17 00:00:00 2001
+From: Jaegeuk Kim <jaegeuk@kernel.org>
+Date: Thu, 19 Aug 2021 14:00:57 -0700
+Subject: f2fs: guarantee to write dirty data when enabling checkpoint back
+
+From: Jaegeuk Kim <jaegeuk@kernel.org>
+
+commit dddd3d65293a52c2c3850c19b1e5115712e534d8 upstream.
+
+We must flush all the dirty data when enabling checkpoint back. Let's guarantee
+that first by adding a retry logic on sync_inodes_sb(). In addition to that,
+this patch adds to flush data in fsync when checkpoint is disabled, which can
+mitigate the sync_inodes_sb() failures in advance.
+
+Reviewed-by: Chao Yu <chao@kernel.org>
+Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/f2fs/file.c  |    5 ++---
+ fs/f2fs/super.c |   11 ++++++++++-
+ 2 files changed, 12 insertions(+), 4 deletions(-)
+
+--- a/fs/f2fs/file.c
++++ b/fs/f2fs/file.c
+@@ -263,8 +263,7 @@ static int f2fs_do_sync_file(struct file
+       };
+       unsigned int seq_id = 0;
+-      if (unlikely(f2fs_readonly(inode->i_sb) ||
+-                              is_sbi_flag_set(sbi, SBI_CP_DISABLED)))
++      if (unlikely(f2fs_readonly(inode->i_sb)))
+               return 0;
+       trace_f2fs_sync_file_enter(inode);
+@@ -278,7 +277,7 @@ static int f2fs_do_sync_file(struct file
+       ret = file_write_and_wait_range(file, start, end);
+       clear_inode_flag(inode, FI_NEED_IPU);
+-      if (ret) {
++      if (ret || is_sbi_flag_set(sbi, SBI_CP_DISABLED)) {
+               trace_f2fs_sync_file_exit(inode, cp_reason, datasync, ret);
+               return ret;
+       }
+--- a/fs/f2fs/super.c
++++ b/fs/f2fs/super.c
+@@ -1923,8 +1923,17 @@ restore_flag:
+ static void f2fs_enable_checkpoint(struct f2fs_sb_info *sbi)
+ {
++      int retry = DEFAULT_RETRY_IO_COUNT;
++
+       /* we should flush all the data to keep data consistency */
+-      sync_inodes_sb(sbi->sb);
++      do {
++              sync_inodes_sb(sbi->sb);
++              cond_resched();
++              congestion_wait(BLK_RW_ASYNC, DEFAULT_IO_TIMEOUT);
++      } while (get_pages(sbi, F2FS_DIRTY_DATA) && retry--);
++
++      if (unlikely(retry < 0))
++              f2fs_warn(sbi, "checkpoint=enable has some unwritten data.");
+       down_write(&sbi->gc_lock);
+       f2fs_dirty_to_prefree(sbi);
diff --git a/queue-5.13/iwlwifi-add-support-for-ax201-in-samsung-galaxy-book-flex2-alpha.patch b/queue-5.13/iwlwifi-add-support-for-ax201-in-samsung-galaxy-book-flex2-alpha.patch
new file mode 100644 (file)
index 0000000..771de9a
--- /dev/null
@@ -0,0 +1,32 @@
+From 2f32c147a3816d789722c0bd242a9431332ec3ed Mon Sep 17 00:00:00 2001
+From: "Justin M. Forbes" <jforbes@fedoraproject.org>
+Date: Fri, 2 Jul 2021 17:31:53 -0500
+Subject: iwlwifi Add support for ax201 in Samsung Galaxy Book Flex2 Alpha
+
+From: Justin M. Forbes <jforbes@fedoraproject.org>
+
+commit 2f32c147a3816d789722c0bd242a9431332ec3ed upstream.
+
+The Samsung Galaxy Book Flex2 Alpha uses an ax201 with the ID a0f0/6074.
+This works fine with the existing driver once it knows to claim it.
+Simple patch to add the device.
+
+Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
+Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Link: https://lore.kernel.org/r/20210702223155.1981510-1-jforbes@fedoraproject.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/wireless/intel/iwlwifi/pcie/drv.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
++++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+@@ -556,6 +556,7 @@ static const struct iwl_dev_info iwl_dev
+       IWL_DEV_INFO(0xA0F0, 0x1652, killer1650i_2ax_cfg_qu_b0_hr_b0, NULL),
+       IWL_DEV_INFO(0xA0F0, 0x2074, iwl_ax201_cfg_qu_hr, NULL),
+       IWL_DEV_INFO(0xA0F0, 0x4070, iwl_ax201_cfg_qu_hr, NULL),
++      IWL_DEV_INFO(0xA0F0, 0x6074, iwl_ax201_cfg_qu_hr, NULL),
+       IWL_DEV_INFO(0x02F0, 0x0070, iwl_ax201_cfg_quz_hr, NULL),
+       IWL_DEV_INFO(0x02F0, 0x0074, iwl_ax201_cfg_quz_hr, NULL),
+       IWL_DEV_INFO(0x02F0, 0x6074, iwl_ax201_cfg_quz_hr, NULL),
index 109093fc5db6b836f88202814dc9ac48c091e4cd..d09ac60ce608c83febafec3aceea29006f36886a 100644 (file)
@@ -262,3 +262,5 @@ octeontx2-af-set-proper-errorcode-for-ipv4-checksum-.patch
 ipv4-fix-endianness-issue-in-inet_rtm_getroute_build.patch
 amdgpu-pm-add-extra-info-to-smu-msg-pre-check-failed.patch
 asoc-rt5682-remove-unused-variable-in-rt5682_i2c_remove.patch
+iwlwifi-add-support-for-ax201-in-samsung-galaxy-book-flex2-alpha.patch
+f2fs-guarantee-to-write-dirty-data-when-enabling-checkpoint-back.patch