From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (unknown [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 5C4F28015B for ; Mon, 14 Sep 2026 10:41:30 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 68EAeDiW029567; Mon, 14 Sep 2026 13:40:14 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 68EAeDiW029567 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="LX9V/+Bj" Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 68EAeCm0029563 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Mon, 14 Sep 2026 13:40:13 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 68EAeCm0029563 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-486e8fb7d75so910823f8f.0 for ; Mon, 14 Sep 2026 03:40:13 -0700 (PDT) X-Gm-Message-State: AFuF++ktgYP7uHLESsOx4j8Y0bqOa95oznESaOYv7yYj6ZQwdA4VCUy+ HqRscWsDi9YMU2XOU/g172rf0DxiCaSbbLZ4o9t/PA4jC9lXD01xAxHH3oZo9mkSfVlgFZ3ZdJA xfGwozwcJ46FZbfk4Ee4SGdnKxVVBr86oQBtwZv/3ZCyLPnFAroFxcQ== X-Gm-Gg: AYBFou3q6RrQPsQJhR02eweGYN8CSrBEKU9NmcEklDi62Z4up5bUa6VOo1j5gIfQpAS ZUQ6uawZ9M4jsG4VWq+kQxKEcuSGiWzh52IVjFSeYygL2M55PA9K8ukOGg+DUs76YHX/RmtfQSq NMZKckGCCmCSIlw43mf9KwLP9KQ/3SljOd4EpoC9C0SySjUttz/VaOrBcroWdGQpn3gSOxCGTaH OeBWK5/km8EUp+rFWLt7zD6j37Bws8de8e4gGk/umFNoGDk0+v9qgX1ZjfK6JNumyXFeI1nA9Yx YYKsanIPyYaAKMnYHRC+ZytRbUFm/8XVejYZDFhDEhiBPEIAeVi4rvAu6QB01I+kyhaJhsfUMbP g/R0JLPBOcLu8m68= X-Received: by 2002:a05:6000:2685:b0:484:4880:449d with SMTP id ffacd0b85a97d-48702aceed7mr2666823f8f.3.1789382412712; Mon, 14 Sep 2026 03:40:12 -0700 (PDT) X-Received: by 2002:a05:6000:2685:b0:484:4880:449d with SMTP id ffacd0b85a97d-48702aceed7mr2666782f8f.3.1789382412240; Mon, 14 Sep 2026 03:40:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1789382412; cv=none; d=google.com; s=arc-20260327; b=GX63rE0/zlnISlZtjy/gBX8V8UYerl5+fGt60pxqPjy8uyp1HSg+eevS7n2PlTH9VE v7WkBqaNVLGd6Ln8P2RxUJis3qMpLoefrfil7LgxWk4qbc7uRKtivnZwMec6KBx802ag QI4WcQq5kvxl6f4kCKM/jpyLYPi5x0k1NGevaMnnOcxyk3ZdzRTVuTNqp2Vl+i3dcP+2 amGTLvzKpc1taB4+HdFQWyO7LWAaV+tS7jD4nSgE+OtN/Gi1moFAmp0/AN5QzZloFMDW 4MGHKWQCkua/9EBpodu6eKnIw6cZwkvKeg8RTLY1m/FeJijOCo2Q0o7b13KoXUozNGWZ 5SxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=0wh4a6n0gyoYeseoZaP9s0uJmveIkzivLwv/bMHUhb0=; fh=CyEa5k0km+zUBGOSzDGfbole2hTjTZicm1CHqnc8J2I=; b=IHrqiRWkIn+KkRPY3aKj7aYe05/vOjNVOHKmnVcmrXhHskiwqyh6x6BRqUa+dAgG+B uFGLx7O6qzOx8nIha7LHy4XBvZtGWbbr+z8TEcEs9QnSs06GOIUIle58IfSl3Cmeudha /ATUx9WjI3hZHZXKQbm5oYqBpYN3Y4pE6xDoUF83hnpWSlIIVtz7RJOVkfsjuVO9lzDW sJeRAm31KIhKrJh89cYOlnRchEas8LdQm13OrxSrHyq7Zo9jSVwxIRQwUzIcdzbpJcO5 Zxh9vQk0cpcjRUXnyviiVINwxT1ZZTj6S0o+ZfvHes7B8BuLJbXoGrqmeviH+olMZJSN dD7A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b="LX9V/+Bj"; spf=pass (google.com: domain of kui.liu@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=kui.liu@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id ffacd0b85a97d-487022cc77dsi2811097f8f.318.2026.09.14.03.40.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2026 03:40:12 -0700 (PDT) Received-SPF: pass (google.com: domain of kui.liu@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b="LX9V/+Bj"; spf=pass (google.com: domain of kui.liu@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=kui.liu@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=0wh4a6n0gyoYeseoZaP9s0uJmveIkzivLwv/bMHUhb0=; b=LX9V/+Bjhd8V A3FgHKF6Uv7K1QG/XcJkqTt/RLP630kvvt35jGBnORLt6ZqbQd7GNV5dxM/OEHhtUjjorJVs36xv8 BpSEigHhRtMPiiOhGMdLwWq/aXU1/+V/Rhp3/1ji78eA0keCExFin+CnsZmf5EKvm8SlnqMSXfRuQ IYsBVmo+GoskLg4+D1F3XvARN/LQzXVfpRcnU4Ks9+LuWP2hLDZjKTeAmdRJff5pwuJa0r1GsxWhK VoT6fp8LdF0IQBJKwac428z7eX5NUW7xZM7E2VICuecw5+Y1XJ9Qdctb8uAvja6sro4lHfY1wHC6e bklWay44q9LCVhSwMj9nig==; Received: from ch-vpn.virtuozzo.com ([130.117.225.6] helo=localhost.localdomain) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1x643v-00GSUa-1p; Mon, 14 Sep 2026 12:40:03 +0200 From: Liu Kui To: devel@openvz.org Date: Mon, 14 Sep 2026 18:40:02 +0800 Message-ID: <20260914104002.53475-1-kui.liu@virtuozzo.com> X-Mailer: git-send-email 2.50.1 MIME-Version: 1.0 X-OZ-Fwd: true Cc: azaitsev@virtuozzo.com, Liu Kui Subject: [Devel] [PATCH VZ10] fs/fuse kio: fix RPC response drop for large messages sent over RDMA X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org When a large message is sent via RDMA READ, it is completed with rio_msg_sent() - which moves the request onto the RPC pending queue where the response lookup can find it - only after both the RDMA_READ_REQ TX completion and the peer's RDMA_READ_ACK have been observed. However these two events are independent and not ordered: the ACK, and even the response to the request, can arrive before the local TX completion is polled. When that happens, the response finds no matching request on the RPC pending queue and is dropped, stalling the request until the RPC timeout logic kicks in. Fix it by completing the message in rio_handle_rx_read_ack() as soon as the RDMA_READ_ACK arrives. Messages in a single RX queue are guaranteed to be delivered in order, so the ACK is always processed before the response, and the request is therefore on the RPC pending queue by the time its response arrives. This is also what the comment in rio_submit() has promised all along. The tx buffer is still recycled only after both events have been seen. A TX send failure is handled by the connection abort logic as before. The same applies to an error status carried in the RDMA_READ_ACK: since the request msg has already been added to the rpc's pending queue, the rio abort triggers an rpc abort, which completes the msg with the same PCS_ERR_NET_ABORT error as before. https://virtuozzo.atlassian.net/browse/VSTOR-141673 Signed-off-by: Liu Kui --- fs/fuse/kio/pcs/pcs_rdma_io.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/fs/fuse/kio/pcs/pcs_rdma_io.c b/fs/fuse/kio/pcs/pcs_rdma_io.c index 1c464e0e60f3..14beab8fda8c 100644 --- a/fs/fuse/kio/pcs/pcs_rdma_io.c +++ b/fs/fuse/kio/pcs/pcs_rdma_io.c @@ -797,7 +797,6 @@ static inline void rio_kick_write_queue(struct pcs_rdmaio *rio) static void rio_handle_tx(struct pcs_rdmaio *rio, struct rio_tx *tx, int ok) { - struct pcs_msg *msg = tx->msg; u64 xid = tx->xid; /* override remote success if we already aborted */ @@ -825,13 +824,6 @@ static void rio_handle_tx(struct pcs_rdmaio *rio, struct rio_tx *tx, int ok) default: BUG(); } - - if (msg) { - if (!ok) - pcs_set_local_error(&msg->error, PCS_ERR_NET_ABORT); - - rio_msg_sent(rio, NULL, msg, 1); - } } /* @@ -931,6 +923,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); list_del(&tx->list); rio_handle_tx(rio, tx, !rack->status); return 0; -- 2.50.1 (Apple Git-155) _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel