From: Alan Huang <mmpgouride@gmail.com>
To: kent.overstreet@linux.dev
Cc: linux-bcachefs@vger.kernel.org, Alan Huang <mmpgouride@gmail.com>
Subject: [PATCH] bcachefs: Fix inconsistent req->ec
Date: Sun, 4 May 2025 04:03:42 +0800 [thread overview]
Message-ID: <20250503200342.251303-1-mmpgouride@gmail.com> (raw)
There is req->ec = erasure_code above.
Signed-off-by: Alan Huang <mmpgouride@gmail.com>
---
fs/bcachefs/alloc_foreground.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/bcachefs/alloc_foreground.c b/fs/bcachefs/alloc_foreground.c
index a0f92daa44cf..c17c5733526d 100644
--- a/fs/bcachefs/alloc_foreground.c
+++ b/fs/bcachefs/alloc_foreground.c
@@ -1255,6 +1255,9 @@ int bch2_alloc_sectors_start_trans(struct btree_trans *trans,
if (unlikely(ret))
return ret;
+ if (!IS_ENABLED(CONFIG_BCACHEFS_ERASURE_CODING))
+ erasure_code = false;
+
req->nr_replicas = nr_replicas;
req->target = target;
req->ec = erasure_code;
@@ -1262,9 +1265,6 @@ int bch2_alloc_sectors_start_trans(struct btree_trans *trans,
req->flags = flags;
req->devs_have = devs_have;
- if (!IS_ENABLED(CONFIG_BCACHEFS_ERASURE_CODING))
- erasure_code = false;
-
BUG_ON(!nr_replicas || !nr_replicas_required);
retry:
req->ptrs.nr = 0;
--
2.48.1
next reply other threads:[~2025-05-03 20:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-03 20:03 Alan Huang [this message]
2025-05-03 20:08 ` [PATCH] bcachefs: Fix inconsistent req->ec Kent Overstreet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250503200342.251303-1-mmpgouride@gmail.com \
--to=mmpgouride@gmail.com \
--cc=kent.overstreet@linux.dev \
--cc=linux-bcachefs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox