All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anuj Gupta <anuj20.g@samsung.com>
To: Pavel Begunkov <asml.silence@gmail.com>
Cc: axboe@kernel.dk, hch@lst.de, kbusch@kernel.org,
	martin.petersen@oracle.com, anuj1072538@gmail.com,
	brauner@kernel.org, jack@suse.cz, viro@zeniv.linux.org.uk,
	io-uring@vger.kernel.org, linux-nvme@lists.infradead.org,
	linux-block@vger.kernel.org, gost.dev@samsung.com,
	linux-scsi@vger.kernel.org, vishak.g@samsung.com,
	linux-fsdevel@vger.kernel.org,
	Kanchan Joshi <joshi.k@samsung.com>
Subject: Re: [PATCH v10 06/10] io_uring: introduce attributes for read/write and PI support
Date: Tue, 26 Nov 2024 19:24:23 +0530	[thread overview]
Message-ID: <20241126135423.GB22537@green245> (raw)
In-Reply-To: <2cbbe4eb-6969-499e-87b5-02d19f53258f@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 877 bytes --]

On Tue, Nov 26, 2024 at 01:01:03PM +0000, Pavel Begunkov wrote:
> On 11/25/24 07:06, Anuj Gupta wrote:
> ...
> > +	/* type specific struct here */
> > +	struct io_uring_attr_pi	pi;
> > +};
> 
> This also looks PI specific but with a generic name. Or are
> attribute structures are supposed to be unionised?

Yes, attribute structures would be unionised here. This is done so that
"attr_type" always remains at the top. When there are multiple attributes
this structure would look something like this:

/* attribute information along with type */
struct io_uring_attr {
	enum io_uring_attr_type attr_type;
	/* type specific struct here */
	union {
		struct io_uring_attr_pi	pi;
		struct io_uring_attr_x	x;
		struct io_uring_attr_y	y;
	};
};

And then on the application side for sending attribute x, one would do:

io_uring_attr attr;
attr.type = TYPE_X;
prepare_attr(&attr.x);

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  parent reply	other threads:[~2024-11-26 15:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20241125071431epcas5p3a3d9633606d2f0b46de2c144bb7f3711@epcas5p3.samsung.com>
2024-11-25  7:06 ` [PATCH v10 00/10] Read/Write with meta/integrity Anuj Gupta
2024-11-25  7:06   ` [PATCH v10 01/10] block: define set of integrity flags to be inherited by cloned bip Anuj Gupta
2024-11-25  7:06   ` [PATCH v10 02/10] block: copy back bounce buffer to user-space correctly in case of split Anuj Gupta
2024-11-25  7:06   ` [PATCH v10 03/10] block: modify bio_integrity_map_user to accept iov_iter as argument Anuj Gupta
2024-11-25  7:06   ` [PATCH v10 04/10] fs, iov_iter: define meta io descriptor Anuj Gupta
2024-11-25  7:06   ` [PATCH v10 05/10] fs: introduce IOCB_HAS_METADATA for metadata Anuj Gupta
2024-11-25  7:06   ` [PATCH v10 06/10] io_uring: introduce attributes for read/write and PI support Anuj Gupta
2024-11-25 14:58     ` Pavel Begunkov
2024-11-26 10:40       ` Anuj Gupta
2024-11-26 12:53         ` Pavel Begunkov
2024-11-26 13:01     ` Pavel Begunkov
2024-11-26 13:04       ` Pavel Begunkov
2024-11-26 13:54       ` Anuj Gupta [this message]
2024-11-26 15:45         ` Pavel Begunkov
2024-11-26 16:23           ` Anuj gupta
2024-11-27 10:35             ` Pavel Begunkov
2024-11-27  9:46           ` Anuj Gupta
2024-11-27 11:24             ` Pavel Begunkov
2024-11-25  7:06   ` [PATCH v10 07/10] block: introduce BIP_CHECK_GUARD/REFTAG/APPTAG bip_flags Anuj Gupta
2024-11-25  7:06   ` [PATCH v10 08/10] nvme: add support for passing on the application tag Anuj Gupta
2024-11-25  7:06   ` [PATCH v10 09/10] scsi: add support for user-meta interface Anuj Gupta
2024-11-25  7:06   ` [PATCH v10 10/10] block: add support to pass user meta buffer Anuj Gupta

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=20241126135423.GB22537@green245 \
    --to=anuj20.g@samsung.com \
    --cc=anuj1072538@gmail.com \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=gost.dev@samsung.com \
    --cc=hch@lst.de \
    --cc=io-uring@vger.kernel.org \
    --cc=jack@suse.cz \
    --cc=joshi.k@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=vishak.g@samsung.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.