linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Usama Arif <usama.arif@bytedance.com>
To: Jens Axboe <axboe@kernel.dk>,
	io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: fam.zheng@bytedance.com
Subject: Re: [External] Re: [PATCH 0/5] io_uring: add opcodes for current working directory
Date: Tue, 31 May 2022 20:18:51 +0100	[thread overview]
Message-ID: <7a311f7e-a404-4ebe-f90b-af9068bab2fc@bytedance.com> (raw)
In-Reply-To: <da4e94f7-94ce-ad57-ad15-c9117c4fef2d@kernel.dk>



On 31/05/2022 19:58, Jens Axboe wrote:
> On 5/31/22 12:41 PM, Usama Arif wrote:
>> This provides consistency between io_uring and the respective I/O syscall
>> and avoids having the user of liburing specify the cwd in sqe when working
>> with current working directory, for e.g. the user can directly call with
>> IORING_OP_RENAME instead of IORING_OP_RENAMEAT and providing AT_FDCWD in
>> sqe->fd and sqe->len, similar to syscall interface.
>>
>> This is done for rename, unlink, mkdir, symlink and link in this
>> patch-series.
>>
>> The tests for these opcodes in liburing are present at
>> https://github.com/uarif1/liburing/tree/cwd_opcodes. If the patches are
>> acceptable, I am happy to create a PR in above for the tests.
> 
> Can't we just provide prep helpers for them in liburing?
> 

We could add a io_uring_prep_unlink with IORING_OP_UNLINKAT and AT_FDCWD 
in liburing. But i guess adding in kernel adds a more consistent 
interface? and allows to make calls bypassing liburing (although i guess 
people probably don't bypass liburing that much :))

Making the changes in both kernel and liburing provides more of a 
standard interface in my opinion so maybe it looks better. But happy to 
just create a PR in liburing only with prep helpers as you suggested if 
you think that is better?

Thanks!

  reply	other threads:[~2022-05-31 19:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31 18:41 [PATCH 0/5] io_uring: add opcodes for current working directory Usama Arif
2022-05-31 18:41 ` [PATCH 1/5] io_uring: add rename opcode " Usama Arif
2022-05-31 18:41 ` [PATCH 2/5] io_uring: add unlink " Usama Arif
2022-05-31 18:41 ` [PATCH 3/5] io_uring: add mkdir " Usama Arif
2022-05-31 18:41 ` [PATCH 4/5] io_uring: add symlink " Usama Arif
2022-05-31 18:41 ` [PATCH 5/5] io_uring: add link " Usama Arif
2022-05-31 18:58 ` [PATCH 0/5] io_uring: add opcodes " Jens Axboe
2022-05-31 19:18   ` Usama Arif [this message]
2022-05-31 19:22     ` [External] " Jens Axboe
2022-05-31 21:35       ` Usama Arif
2022-06-01  2:57         ` Jens Axboe

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 \
    --in-reply-to=7a311f7e-a404-4ebe-f90b-af9068bab2fc@bytedance.com \
    --to=usama.arif@bytedance.com \
    --cc=axboe@kernel.dk \
    --cc=fam.zheng@bytedance.com \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).