public inbox for [email protected]
 help / color / mirror / Atom feed
From: Dmitry Kadashev <[email protected]>
To: Jens Axboe <[email protected]>
Cc: Pavel Begunkov <[email protected]>,
	[email protected], Dmitry Kadashev <[email protected]>
Subject: [PATCH liburing v2 07/11] liburing.h: add linkat prep helper
Date: Thu,  3 Jun 2021 12:29:02 +0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

Signed-off-by: Dmitry Kadashev <[email protected]>
---
 src/include/liburing.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/include/liburing.h b/src/include/liburing.h
index e033543..51dc602 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -561,6 +561,15 @@ static inline void io_uring_prep_symlinkat(struct io_uring_sqe *sqe,
 				(uint64_t) (uintptr_t) linkpath);
 }
 
+static inline void io_uring_prep_linkat(struct io_uring_sqe *sqe, int olddfd,
+					const char *oldpath, int newdfd,
+					const char *newpath, int flags)
+{
+	io_uring_prep_rw(IORING_OP_LINKAT, sqe, olddfd, oldpath, newdfd,
+				(uint64_t) (uintptr_t) newpath);
+	sqe->hardlink_flags = flags;
+}
+
 /*
  * Returns number of unconsumed (if SQPOLL) or unsubmitted entries exist in
  * the SQ ring
-- 
2.30.2


  parent reply	other threads:[~2021-06-03  5:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03  5:28 [PATCH liburing v2 00/11] add mkdir, [sym]linkat, mknodat support Dmitry Kadashev
2021-06-03  5:28 ` [PATCH liburing v2 01/11] liburing.h: add mkdirat prep helper Dmitry Kadashev
2021-06-03  5:28 ` [PATCH liburing v2 02/11] Add mkdirat test case Dmitry Kadashev
2021-06-03  5:28 ` [PATCH liburing v2 03/11] io_uring.h: add symlinkat opcode Dmitry Kadashev
2021-06-03  5:28 ` [PATCH liburing v2 04/11] liburing.h: add symlinkat prep helper Dmitry Kadashev
2021-06-03  5:29 ` [PATCH liburing v2 05/11] Add symlinkat test case Dmitry Kadashev
2021-06-03  5:29 ` [PATCH liburing v2 06/11] io_uring.h: add linkat opcode Dmitry Kadashev
2021-06-03  5:29 ` Dmitry Kadashev [this message]
2021-06-03  5:29 ` [PATCH liburing v2 08/11] Add linkat test case Dmitry Kadashev
2021-06-03  5:29 ` [PATCH liburing v2 09/11] io_uring.h: add mknodat opcode Dmitry Kadashev
2021-06-03  5:29 ` [PATCH liburing v2 10/11] liburing.h: add mknodat prep helper Dmitry Kadashev
2021-06-03  5:29 ` [PATCH liburing v2 11/11] Add mknod test case Dmitry Kadashev

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] \
    [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