* [Devel] [PATCH hci-8.1 v2] fs/fuse kio: drop the done parameter of rio_msg_sent()
@ 2026-09-29 17:38 Konstantin Khorenko
2026-09-29 17:40 ` no-reply
2026-09-29 17:41 ` Konstantin Khorenko
0 siblings, 2 replies; 3+ messages in thread
From: Konstantin Khorenko @ 2026-09-29 17:38 UTC (permalink / raw)
To: Liu Kui; +Cc: devel
The tx and done parameters are mutually exclusive:
* done == 1 ignores tx
* done == 0 requires it
Let tx == NULL mean the message is complete instead. This also stops
rio_submit() from passing an uninitialized tx on the PCS_MSG_ABORTED
path (harmless, the done branch never read it).
https://virtuozzo.atlassian.net/browse/VSTOR-141673
Feature: vStorage
Suggested-by: Liu Kui <kui.liu@virtuozzo.com>
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
Changes in v2:
- droppped: fs/fuse kio: unlink the tx before completing its msg on RDMA_READ_ACK
- Link to v1: http://lore.virtuozzo.com/20260928-prep-kh-vstor-141673-kio-read-ack-order-v1-1-6069e78cac95@virtuozzo.com
---
fs/fuse/kio/pcs/pcs_rdma_io.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/fs/fuse/kio/pcs/pcs_rdma_io.c b/fs/fuse/kio/pcs/pcs_rdma_io.c
index 2001297010a64..59a3c1286363d 100644
--- a/fs/fuse/kio/pcs/pcs_rdma_io.c
+++ b/fs/fuse/kio/pcs/pcs_rdma_io.c
@@ -151,9 +151,10 @@ static struct pcs_msg *rio_dequeue_reserved_msg(struct pcs_rdmaio *rio)
return msg;
}
-static void rio_msg_sent(struct pcs_rdmaio *rio, struct rio_tx *tx, struct pcs_msg *msg, int done)
+/* tx == NULL means the message is complete, no tx tracks it anymore */
+static void rio_msg_sent(struct pcs_rdmaio *rio, struct rio_tx *tx, struct pcs_msg *msg)
{
- if (done) {
+ if (!tx) {
clear_and_wake_up_bit(PCS_MSG_BUSY, &msg->flags);
pcs_msg_sent(msg);
msg->done(msg);
@@ -630,7 +631,7 @@ static int rio_submit(struct pcs_rdmaio *rio, struct pcs_msg *msg, int type, u64
if (unlikely(test_bit(PCS_MSG_ABORTED, &msg->flags))) {
pcs_set_local_error(&msg->error, PCS_ERR_CANCEL_REQUEST);
- rio_msg_sent(rio, tx, msg, 1);
+ rio_msg_sent(rio, NULL, msg);
return 0;
}
}
@@ -725,7 +726,7 @@ static int rio_submit(struct pcs_rdmaio *rio, struct pcs_msg *msg, int type, u64
* in a single RX queue are guaranteed to come in order, there
* is no race in this case.
*/
- rio_msg_sent(rio, tx, msg, rb == NULL);
+ rio_msg_sent(rio, rb ? tx : NULL, msg);
}
return 0;
@@ -928,7 +929,7 @@ static int rio_handle_rx_read_ack(struct pcs_rdmaio *rio,
list_for_each_entry(tx, &rio->active_txs, list)
if (tx->xid == rack->xid) {
- rio_msg_sent(rio, NULL, tx->msg, 1);
+ rio_msg_sent(rio, NULL, tx->msg);
tx->msg = NULL;
list_del(&tx->list);
rio_handle_tx(rio, tx, !rack->status);
@@ -1428,7 +1429,7 @@ static void rio_cleanup(struct pcs_rdmaio *rio)
BUG_ON(!msg);
rio_put_tx(rio->dev, tx);
pcs_set_local_error(&msg->error, rio->rio_error);
- rio_msg_sent(rio, NULL, msg, 1);
+ rio_msg_sent(rio, NULL, msg);
}
}
---
base-commit: 0679f0d70523972eec3a0643565521d93e26eb9c
change-id: 20260928-prep-kh-vstor-141673-kio-read-ack-order-9fc2b40d4077
Best regards,
--
Konstantin Khorenko <khorenko@virtuozzo.com>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Devel] [PATCH hci-8.1 v2] fs/fuse kio: drop the done parameter of rio_msg_sent()
2026-09-29 17:38 [Devel] [PATCH hci-8.1 v2] fs/fuse kio: drop the done parameter of rio_msg_sent() Konstantin Khorenko
@ 2026-09-29 17:40 ` no-reply
2026-09-29 17:41 ` Konstantin Khorenko
1 sibling, 0 replies; 3+ messages in thread
From: no-reply @ 2026-09-29 17:40 UTC (permalink / raw)
To: Konstantin Khorenko, Liu Kui; +Cc: devel
> The tx and done parameters are mutually exclusive:
> * done == 1 ignores tx
> * done == 0 requires it
>
> Let tx == NULL mean the message is complete instead. This also stops
> rio_submit() from passing an uninitialized tx on the PCS_MSG_ABORTED
> path (harmless, the done branch never read it).
>
> https://virtuozzo.atlassian.net/browse/VSTOR-141673
>
> Feature: vStorage
> Suggested-by: Liu Kui <kui.liu@virtuozzo.com>
> Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20260929-prep-kh-vstor-141673-kio-read-ack-order-v2-1-bf05c0d2da51@virtuozzo.com?part=1
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Devel] [PATCH hci-8.1 v2] fs/fuse kio: drop the done parameter of rio_msg_sent()
2026-09-29 17:38 [Devel] [PATCH hci-8.1 v2] fs/fuse kio: drop the done parameter of rio_msg_sent() Konstantin Khorenko
2026-09-29 17:40 ` no-reply
@ 2026-09-29 17:41 ` Konstantin Khorenko
1 sibling, 0 replies; 3+ messages in thread
From: Konstantin Khorenko @ 2026-09-29 17:41 UTC (permalink / raw)
To: Liu Kui, Konstantin Khorenko; +Cc: devel
On Tue, 29 Sep 2026 19:38:14 +0200, Konstantin Khorenko wrote:
> fs/fuse kio: drop the done parameter of rio_msg_sent()
Applied to branch-rh10-6.12.0-211.52.1.22.x.vz10-ovz, will be released in rh10-6.12.0-211.52.1.22.5.vz10, thanks!
[1/1] fs/fuse kio: drop the done parameter of rio_msg_sent()
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/296f7eb6cd71
--
Konstantin Khorenko <khorenko@virtuozzo.com>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-29 17:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-29 17:38 [Devel] [PATCH hci-8.1 v2] fs/fuse kio: drop the done parameter of rio_msg_sent() Konstantin Khorenko
2026-09-29 17:40 ` no-reply
2026-09-29 17:41 ` Konstantin Khorenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox