Re: [PATCH RFC] fuse: add generic file store
From: Peng Tao <hidden>
Date: 2021-06-08 12:41:51
On Tue, Jun 8, 2021 at 6:50 PM Enrico Weigelt, metux IT consult [off-list ref] wrote:
On 08.06.21 04:58, Peng Tao wrote:quoted
quoted
oh, this could be quite what I'm currently intending do implement (just considered 9p instead of fuse as it looks simpler to me): I'd like the server being able to directly send an already opened fd to the client (in response to it calling open()), quite like we can send fd's via unix sockets. The primary use case of that is sending already prepared fd's (eg. an active network connection, locked-down file fd, a device that the client can't open himself, etc). Is that what you're working on ?If the server and client run on the same kernel, then yes, the current RFC supports your use case as well, E.g., 1. the server opens a file, saves the FD to the kernel, and passes the IDR to the client. 2. the client retrieves the FD from the kernel Does it match your use case?Seems that's exactly what I'm looking for :) Could you perhaps give a little example code how it looks in userland ?
The initial RFC mail in the thread has a userspace example code. Does it make sense to you? Cheers, Tao -- Into Sth. Rich & Strange