]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Drop bcachefs-add-error-code-to-defer-option-parsing.patch
authorSasha Levin <sashal@kernel.org>
Sun, 8 Sep 2024 13:31:02 +0000 (09:31 -0400)
committerSasha Levin <sashal@kernel.org>
Sun, 8 Sep 2024 13:31:02 +0000 (09:31 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-6.10/bcachefs-add-error-code-to-defer-option-parsing.patch [deleted file]
queue-6.10/series

diff --git a/queue-6.10/bcachefs-add-error-code-to-defer-option-parsing.patch b/queue-6.10/bcachefs-add-error-code-to-defer-option-parsing.patch
deleted file mode 100644 (file)
index ae334ff..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-From 572188eea6c777b8db4cfc15fab6e7fe6ebe206a Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 27 May 2024 22:36:10 -0600
-Subject: bcachefs: Add error code to defer option parsing
-
-From: Thomas Bertschinger <tahbertschinger@gmail.com>
-
-[ Upstream commit 1c12d1caf8d627d8b791f4dc25af2522dac7cd10 ]
-
-This introduces a new error code, option_needs_open_fs, which is used to
-indicate that an attempt was made to parse a mount option prior to
-opening a filesystem, when that mount option requires an open filesystem
-in order to be validated.
-
-Returning this error results in bch2_parse_one_mount_opt() saving that
-option for later parsing, after the filesystem is opened.
-
-Signed-off-by: Thomas Bertschinger <tahbertschinger@gmail.com>
-Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-Stable-dep-of: e3e694094091 ("bcachefs: Revert lockless buffered IO path")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- fs/bcachefs/disk_groups.c |  2 +-
- fs/bcachefs/errcode.h     |  3 ++-
- fs/bcachefs/opts.c        | 15 +++++++++++++++
- 3 files changed, 18 insertions(+), 2 deletions(-)
-
-diff --git a/fs/bcachefs/disk_groups.c b/fs/bcachefs/disk_groups.c
-index 521a86df5e52..5df8de0b8c02 100644
---- a/fs/bcachefs/disk_groups.c
-+++ b/fs/bcachefs/disk_groups.c
-@@ -511,7 +511,7 @@ int bch2_opt_target_parse(struct bch_fs *c, const char *val, u64 *res,
-               return -EINVAL;
-       if (!c)
--              return 0;
-+              return -BCH_ERR_option_needs_open_fs;
-       if (!strlen(val) || !strcmp(val, "none")) {
-               *res = 0;
-diff --git a/fs/bcachefs/errcode.h b/fs/bcachefs/errcode.h
-index 58612abf7927..a268af3e52bf 100644
---- a/fs/bcachefs/errcode.h
-+++ b/fs/bcachefs/errcode.h
-@@ -257,7 +257,8 @@
-       x(BCH_ERR_nopromote,            nopromote_no_writes)                    \
-       x(BCH_ERR_nopromote,            nopromote_enomem)                       \
-       x(0,                            need_inode_lock)                        \
--      x(0,                            invalid_snapshot_node)
-+      x(0,                            invalid_snapshot_node)                  \
-+      x(0,                            option_needs_open_fs)
- enum bch_errcode {
-       BCH_ERR_START           = 2048,
-diff --git a/fs/bcachefs/opts.c b/fs/bcachefs/opts.c
-index e794706276cf..e10fc1da71b1 100644
---- a/fs/bcachefs/opts.c
-+++ b/fs/bcachefs/opts.c
-@@ -378,6 +378,10 @@ int bch2_opt_parse(struct bch_fs *c,
-               break;
-       case BCH_OPT_FN:
-               ret = opt->fn.parse(c, val, res, err);
-+
-+              if (ret == -BCH_ERR_option_needs_open_fs)
-+                      return ret;
-+
-               if (ret < 0) {
-                       if (err)
-                               prt_printf(err, "%s: parse error",
-@@ -495,6 +499,17 @@ int bch2_parse_one_mount_opt(struct bch_fs *c, struct bch_opts *opts,
-               goto bad_opt;
-       ret = bch2_opt_parse(c, &bch2_opt_table[id], val, &v, &err);
-+      if (ret == -BCH_ERR_option_needs_open_fs && parse_later) {
-+              prt_printf(parse_later, "%s=%s,", name, val);
-+              if (parse_later->allocation_failure) {
-+                      ret = -ENOMEM;
-+                      goto out;
-+              }
-+
-+              ret = 0;
-+              goto out;
-+      }
-+
-       if (ret < 0)
-               goto bad_val;
--- 
-2.43.0
-
index e06fe2da27a89bdff7db340b1786009e07f58724..49b6c4317bc5e98162444286872c0865c139bc5a 100644 (file)
@@ -170,7 +170,6 @@ can-kvaser_pciefd-use-a-single-write-when-releasing-.patch
 bluetooth-qca-if-memdump-doesn-t-work-re-enable-ibs.patch
 bluetooth-hci_sync-introduce-hci_cmd_sync_run-hci_cm.patch
 bluetooth-mgmt-fix-not-generating-command-complete-f.patch
-bcachefs-add-error-code-to-defer-option-parsing.patch
 hwmon-ltc2991-fix-register-bits-defines.patch
 scripts-fix-gfp-translate-after-___gfp_-_bits-conver.patch
 igc-unlock-on-error-in-igc_io_resume.patch