[Devel] [PATCH RK hci-7.4 1/2] fs/fuse kio: keep pcs_rdma_io.c line numbers stable in the RK

no-reply at sashiko.virtuozzo.com no-reply at sashiko.virtuozzo.com
Thu Oct 22 23:40:11 MSK 2026


Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] fuse kio: #line directives skew __LINE__ and debug line info in pcs_rdma_io.c
--

commit 09b1a08eb3317faf9482b38abadd97a11ab747d0
Author: Denis V. Lunev <den at openvz.org>

fs/fuse kio: keep pcs_rdma_io.c line numbers stable in the RK

This patch adds two #line directives to pcs_rdma_io.c. They make the
lines below rio_handle_rx_read_ack() keep the line numbers of the base
kernel. The aim is that kpatch-build does not treat pcs_rdma_create()
and the RDMA event handlers as changed, because TRACE() embeds __LINE__.

Link: https://virtuozzo.atlassian.net/browse/VSTOR-151314

> diff --git a/fs/fuse/kio/pcs/pcs_rdma_io.c b/fs/fuse/kio/pcs/pcs_rdma_io.c
> --- a/fs/fuse/kio/pcs/pcs_rdma_io.c
> +++ b/fs/fuse/kio/pcs/pcs_rdma_io.c

[ ... ]

> @@ -831,6 +831,7 @@ static void rio_handle_tx(struct pcs_rdmaio *rio, struct rio_tx *tx, int ok)
>  			BUG();
>  	}
>  }
> +#line 836
>  
>  /*
>   * rio wire header is already stripped, buf points to payload data (pcs_rpc hdr)

[Severity: Low]
This isn't a bug, but can the source say why this directive is here?

The #line 836 after rio_handle_tx() makes the logical line numbers differ
from the physical ones. Everything up to the second directive is numbered
one higher than its physical line. Nothing in the file explains this. A
later reader will see __LINE__, BUG() and WARN locations, compiler
diagnostics and addr2line output that don't match the source.

[ ... ]

> @@ -938,6 +939,7 @@ static int rio_handle_rx_read_ack(struct pcs_rdmaio *rio,
>  
>  	return PCS_ERR_NET_ABORT;
>  }
> +#line 941
>  
>  /*
>   * When we see RX coming from the wire very first time, flag "pended" is

[Severity: Low]
Is this skew limited to the kpatch build?

The directives are unconditional, so every build of the file is affected.
After #line 941, logical numbering is two lower than physical for the rest
of the file. That covers the TRACE() users in pcs_rdma_create() and the
RDMA event handlers, plus the BUG() and WARN sites there.

There is no other #line directive under fs/fuse, so there is no in-tree
precedent for this. The follow-up patch "fs/fuse kio: repoint RDMA
handlers and restrack names on RK load" doesn't remove them.

Could a comment be added next to each directive giving the reason? For
example, it could say that the numbers are pinned to the base kernel so
that kpatch-build doesn't pick up the functions below.

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/cover.1792700354.git.den@openvz.org?part=1



More information about the Devel mailing list