public inbox for [email protected]
 help / color / mirror / Atom feed
From: Stefan Roesch <[email protected]>
To: <[email protected]>
Cc: <[email protected]>
Subject: [PATCH v1 4/4] liburing: Add man page for io_uring_prep_getdents call
Date: Tue, 23 Nov 2021 10:07:53 -0800	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

Adds the man page for the io_uring_prep_getdents call.

Signed-off-by: Stefan Roesch <[email protected]>
---
 man/io_uring_prep_getdents.3 | 64 ++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 man/io_uring_prep_getdents.3

diff --git a/man/io_uring_prep_getdents.3 b/man/io_uring_prep_getdents.3
new file mode 100644
index 0000000..15279f6
--- /dev/null
+++ b/man/io_uring_prep_getdents.3
@@ -0,0 +1,64 @@
+.\" Copyright (C) 2021 Stefan Roesch <[email protected]>
+.\"
+.\" SPDX-License-Identifier: LGPL-2.0-or-later
+.\"
+.TH io_uring_prep_getdents 3 "November 19, 2021" "liburing-2.1" "liburing Manual"
+.SH NAME
+io_uring_prep_getdents   - prepare getdents64 call
+
+.SH SYNOPSIS
+.nf
+.BR "#include <liburing.h>"
+.PP
+.BI "void io_uring_prep_getdents(struct io_uring_sqe *sqe,"
+.BI "                            int fd,"
+.BI "                            void *buf,"
+.BI "                            unsigned int count,"
+.BI "                            uint64_t offset)"
+
+.SH DESCRIPTION
+.PP
+The io_uring_prep_getdents() prepares a getdents64 request. The submission queue
+entry
+.I sqe
+is setup to use the file descriptor
+.I fd
+to start writing up to
+.I count
+bytes into the buffer
+.I buf
+starting at
+.I offset.
+
+After the getdents call has been prepared it can be submitted with one of the submit
+functions.
+
+.SH RETURN VALUE
+None
+
+.SH EXAMPLE
+A getdents io_uring call can be prepared like in the following code snippet.
+The io_uring_sqe_set_data(3) call is not necessary, but it helps to correlate the
+request with the results.
+
+.BI "void schedule_readdir(struct io_uring_sqe *sqe, struct dir *dir)"
+.fi
+.BI "{"
+.fi
+.BI "   io_uring_prep_getdents(sqe,"
+.fi
+.BI "                          dir->fd,"
+.fi
+.BI "                          dir->buf,"
+.fi
+.BI "                          sizeof(dir->buf),"
+.fi
+.BI "                          dir->off);"
+.fi
+.BI "   io_uring_sqe_set_data(sqe, dir);
+.fi
+.BI "}"
+
+
+.SH SEE ALSO
+.BR io_uring_get_sqe (3), io_uring_sqe_set_data (3), io_uring_submit (3), io_uring_sqe_get_data (3)
-- 
2.30.2


      parent reply	other threads:[~2021-11-23 18:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 18:07 [PATCH v1 0/4] liburing: add getdents64 support Stefan Roesch
2021-11-23 18:07 ` [PATCH v1 1/4] liburing: update io_uring.h header file Stefan Roesch
2021-11-23 18:07 ` [PATCH v1 2/4] liburing: add prepare function for getdents64 Stefan Roesch
2021-11-23 18:07 ` [PATCH v1 3/4] liburing: Add test program for getdents call Stefan Roesch
2021-11-23 18:07 ` Stefan Roesch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox