Re: [RFC PATCH] 9p: forbid use of mempool for TFLUSH

From: Kent Overstreet
Date: Wed Jul 13 2022 - 02:39:15 EST

On 7/13/22 00:17, Dominique Martinet wrote:
TFLUSH is called while the thread still holds memory for the
request we're trying to flush, so mempool alloc can deadlock
there. With p9_msg_buf_size() rework the flush allocation is
small so just make it fail if allocation failed; all that does
is potentially leak the request we're flushing until its reply
finally does come.. or if it never does until umount.

Why not just add separate mempools for flushes? We don't have to allocate memory for big payloads so they won't cost much, and then the IO paths will be fully mempool-ified :)