On Fri, Feb 13, 2026 at 05:03:23PM +0800, Brian Song wrote: > > > > On Feb 12, 2026, at 04:56, Stefan Hajnoczi <[email protected]> wrote: > > > > On Sat, Feb 07, 2026 at 08:08:56PM +0800, Brian Song wrote: > >> +typedef struct FuseUringEnt { > >> + /* back pointer */ > >> + FuseUringQueue *rq; > >> + > >> + /* commit id of a fuse request */ > >> + uint64_t req_commit_id; > > [...] > > >> + > >> +/** > >> + * Distribute uring queues across FUSE queues in the round-robin manner. > >> + * This ensures even distribution of kernel uring queues across > >> user-specified > >> + * FUSE queues. > >> + * > >> + * num_uring_queues > num_fuse_queues: Each IOThread manages multiple > >> uring > >> + * queues (multi-queue mapping). > >> + * num_uring_queues < num_fuse_queues: Excess IOThreads remain idle with > >> no > >> + * assigned uring queues. > >> + */ > >> +static void fuse_uring_setup_queues(FuseExport *exp, size_t bufsize) > >> +{ > >> + int num_uring_queues = get_nprocs_conf(); > >> + > >> + exp->num_uring_queues = num_uring_queues; > >> + exp->uring_queues = g_new(FuseUringQueue, num_uring_queues); > >> + > >> + for (int i = 0; i < num_uring_queues; i++) { > >> + FuseUringQueue *rq = &exp->uring_queues[i]; > >> + rq->rqid = i; > >> + rq->ent = g_new(FuseUringEnt, exp->uring_queue_depth); > >> + > >> + for (int j = 0; j < exp->uring_queue_depth; j++) { > >> + FuseUringEnt *ent = &rq->ent[j]; > >> + ent->rq = rq; > >> + ent->req_payload_sz = bufsize - FUSE_BUFFER_HEADER_SIZE; > >> + ent->req_payload = g_malloc0(ent->req_payload_sz); > > > > I don't see a corresponding g_free() in this patch? Exports can be > > deleted at runtime, so this memory must be freed. > > > > ent->req_payload is deleted in fuse_export_delete_uring() in a later patch. > Should we merge patch 5 into this one?
Unless there is a strong reason why the free needs to be deferred to a later, it's safer to include it in the same patch that allocates the memory. It makes code review easier and backporting patches safer (no chance of forgetting to backport the other patch that frees the memory). Stefan
signature.asc
Description: PGP signature
