Re: [PATCHSET v2 0/6] Support selectable file descriptors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jens,

> One of the fabled features with chains has long been the desire to
> support things like:
> 
> <open fileX><read from fileX><close fileX>
> 
> in a single chain. This currently doesn't work, since the read/close
> depends on what file descriptor we get on open.
> 
> The original attempt at solving this provided a means to pass
> descriptors between chains in a link, this version takes a different
> route. Based on Josh's support for O_SPECIFIC_FD, we can instead control
> what fd value we're going to get out of open (or accept). With that in
> place, we don't need to do any magic to make this work. The above chain
> then becomes:
> 
> <open fileX with fd Y><read from fd Y><close fd Y>
> 
> which is a lot more useful, and allows any sort of weird chains without
> needing to nest "last open" file descriptors.

I like that approach, however I'm wondering if this able to be used by
libraries as it requires coordination of fd values within the whole
process. I don't think this would be a reason to block that feature,
but it might be good to be added to the manpages.

As future addition I'd like to get support for something similar
but for io_uring fixed file slots. That could also be used by libraries
using a private ring fd.

metze

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux