Message ID | 20241016112912.63542-7-anuj20.g@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v4,01/11] block: define set of integrity flags to be inherited by cloned bip | expand |
On Wed, Oct 16, 2024 at 04:59:07PM +0530, Anuj Gupta wrote: > Add flags to describe checks for integrity meta buffer. These flags are > specified by application as io_uring meta_flags, added in the next patch. These are now blkdev uapis, but io_uring ones even if currently only the block file operations implement them. I do plan to support these through file systems eventually.
On Thu, Oct 17, 2024 at 10:00:15AM +0200, Christoph Hellwig wrote: > On Wed, Oct 16, 2024 at 04:59:07PM +0530, Anuj Gupta wrote: > > Add flags to describe checks for integrity meta buffer. These flags are > > specified by application as io_uring meta_flags, added in the next patch. > > These are now blkdev uapis, but io_uring ones even if currently only > the block file operations implement them. I do plan to support these > through file systems eventually. Are these flags placed correctly here or you see that they should be moved somewhere else? > >
On Thu, Oct 17, 2024 at 04:15:02PM +0530, Anuj Gupta wrote: > On Thu, Oct 17, 2024 at 10:00:15AM +0200, Christoph Hellwig wrote: > > On Wed, Oct 16, 2024 at 04:59:07PM +0530, Anuj Gupta wrote: > > > Add flags to describe checks for integrity meta buffer. These flags are > > > specified by application as io_uring meta_flags, added in the next patch. > > > > These are now blkdev uapis, but io_uring ones even if currently only > > the block file operations implement them. I do plan to support these > > through file systems eventually. > > Are these flags placed correctly here or you see that they should be > moved somewhere else? They are not as they aren't blkdev apis. They are generic for io_uring, or maybe even VFS-wide.
On Thu, Oct 17, 2024 at 5:31 PM Christoph Hellwig <hch@lst.de> wrote: > > On Thu, Oct 17, 2024 at 04:15:02PM +0530, Anuj Gupta wrote: > > On Thu, Oct 17, 2024 at 10:00:15AM +0200, Christoph Hellwig wrote: > > > On Wed, Oct 16, 2024 at 04:59:07PM +0530, Anuj Gupta wrote: > > > > Add flags to describe checks for integrity meta buffer. These flags are > > > > specified by application as io_uring meta_flags, added in the next patch. > > > > > > These are now blkdev uapis, but io_uring ones even if currently only > > > the block file operations implement them. I do plan to support these > > > through file systems eventually. > > > > Are these flags placed correctly here or you see that they should be > > moved somewhere else? > > They are not as they aren't blkdev apis. They are generic for io_uring, > or maybe even VFS-wide. > The last iteration of this series added these flags as io-uring flags [1]. Based on feedback received [2], I moved it here in this version. Should I move them back to io-uring? [1] https://lore.kernel.org/linux-block/20240823103811.2421-7-anuj20.g@samsung.com/ [2] https://lore.kernel.org/linux-block/20240824083358.GE8805@lst.de/
On Thu, Oct 17, 2024 at 06:29:32PM +0530, Anuj gupta wrote: > The last iteration of this series added these flags as io-uring flags [1]. > Based on feedback received [2], I moved it here in this version. > Should I move them back to io-uring? Maybe I misread the patch back then, but IIRC at that point the flag was also used on the bio and not just in the uapi? As of this series it is used in the uapi, and in the block layer. Based on that uapi/linux/fs.h might be the best place.
diff --git a/include/uapi/linux/blkdev.h b/include/uapi/linux/blkdev.h index 66373cd1a83a..d606f8b9c0a0 100644 --- a/include/uapi/linux/blkdev.h +++ b/include/uapi/linux/blkdev.h @@ -11,4 +11,15 @@ */ #define BLOCK_URING_CMD_DISCARD _IO(0x12, 0) +/* + * flags for integrity meta + */ +#define BLK_INTEGRITY_CHK_GUARD (1U << 0) /* enforce guard check */ +#define BLK_INTEGRITY_CHK_APPTAG (1U << 1) /* enforce app tag check */ +#define BLK_INTEGRITY_CHK_REFTAG (1U << 2) /* enforce ref tag check */ + +#define BLK_INTEGRITY_VALID_FLAGS (BLK_INTEGRITY_CHK_GUARD |\ + BLK_INTEGRITY_CHK_APPTAG |\ + BLK_INTEGRITY_CHK_REFTAG) + #endif
Add flags to describe checks for integrity meta buffer. These flags are specified by application as io_uring meta_flags, added in the next patch. Signed-off-by: Anuj Gupta <anuj20.g@samsung.com> --- include/uapi/linux/blkdev.h | 11 +++++++++++ 1 file changed, 11 insertions(+)