[Devel] [PATCH VZ10 v2] fs/fuse kio: fix RPC response drop for large messages sent over RDMA

Konstantin Khorenko khorenko at virtuozzo.com
Tue Sep 15 13:12:29 MSK 2026


> @@ -931,6 +928,8 @@ 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);
> +			tx->msg = NULL;
>  			list_del(&tx->list);
>  			rio_handle_tx(rio, tx, !rack->status);
>  			return 0;

i will apply the current version of the patch right now, but i would suggest to
reorder the code here in a separate patch, something like this:

                        struct pcs_msg *msg = tx->msg;

                        list_del(&tx->list);
                        tx->msg = NULL;
                        rio_msg_sent(rio, NULL, msg, 1);
                        rio_handle_tx(rio, tx, !rack->status);

So you first remove and nullify the tx->msg, and only after that call msg->done().
Yes, right now there is no bug here:
pcs_rdma_next_timeout() is the only reader of the active_txs[0]->msg and is
called under ep->mutex we hold here, but still it's a good practice.

Reviewed-by: Konstantin Khorenko <khorenko at virtuozzo.com>

-- 
Konstantin Khorenko <khorenko at virtuozzo.com>


More information about the Devel mailing list