iouringfs

package
v0.0.0-...-a3e5887 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: Apache-2.0, MIT Imports: 16 Imported by: 2

Documentation

Overview

Package iouringfs provides a filesystem implementation for IO_URING basing it on anonfs. Currently, we don't support neither IOPOLL nor SQPOLL modes. Thus, user needs to set up IO_URING first with io_uring_setup(2) syscall and then issue submission request using io_uring_enter(2).

Another important note, as of now, we don't support deferred CQE. In other words, the size of the backlogged set of CQE is zero. Whenever, completion queue ring buffer is full, we drop the subsequent completion queue entries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, vfsObj *vfs.VirtualFilesystem, entries uint32, params *linux.IOUringParams) (*vfs.FileDescription, error)

New creates a new iouring fd.

Types

type FileDescription

type FileDescription struct {
	vfs.FileDescriptionDefaultImpl
	vfs.DentryMetadataFileDescriptionImpl
	vfs.NoLockFD
	// contains filtered or unexported fields
}

FileDescription implements vfs.FileDescriptionImpl for file-based IO_URING. It is based on io_rings struct. See io_uring/io_uring.c.

+stateify savable

func (*FileDescription) ConfigureMMap

func (fd *FileDescription) ConfigureMMap(ctx context.Context, opts *memmap.MMapOpts) error

ConfigureMMap implements vfs.FileDescriptionImpl.ConfigureMMap.

func (*FileDescription) ProcessSubmission

func (fd *FileDescription) ProcessSubmission(t *kernel.Task, sqe *linux.IOUringSqe, flags uint32) *linux.IOUringCqe

ProcessSubmission processes a single submission request.

func (*FileDescription) ProcessSubmissions

func (fd *FileDescription) ProcessSubmissions(t *kernel.Task, toSubmit uint32, minComplete uint32, flags uint32) (int, error)

ProcessSubmissions processes the submission queue. Concurrent calls to ProcessSubmissions serialize, yielding task goroutines with Task.Block since processing can take a long time.

func (*FileDescription) Release

func (fd *FileDescription) Release(ctx context.Context)

Release implements vfs.FileDescriptionImpl.Release.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL