mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 05:42:46 +01:00
fs, iov_iter: define meta io descriptor
Add flags to describe checks for integrity meta buffer. Also, introduce a new 'uio_meta' structure that upper layer can use to pass the meta/integrity information. Signed-off-by: Kanchan Joshi <[email protected]> Signed-off-by: Anuj Gupta <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
1 parent
fe8f4ca710
commit
10783d0ba0
2 files changed
+18
No files matched your search
@@ -82,6 +82,15 @@ struct iov_iter {
|
||||
};
|
||||
};
|
||||
|
||||
typedef __u16 uio_meta_flags_t;
|
||||
|
||||
struct uio_meta {
|
||||
uio_meta_flags_t flags;
|
||||
u16 app_tag;
|
||||
u64 seed;
|
||||
struct iov_iter iter;
|
||||
};
|
||||
|
||||
static inline const struct iovec *iter_iov(const struct iov_iter *iter)
|
||||
{
|
||||
if (iter->iter_type == ITER_UBUF)
|
||||
|
||||
@@ -40,6 +40,15 @@
|
||||
#define BLOCK_SIZE_BITS 10
|
||||
#define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
|
||||
|
||||
/* flags for integrity meta */
|
||||
#define IO_INTEGRITY_CHK_GUARD (1U << 0) /* enforce guard check */
|
||||
#define IO_INTEGRITY_CHK_REFTAG (1U << 1) /* enforce ref check */
|
||||
#define IO_INTEGRITY_CHK_APPTAG (1U << 2) /* enforce app check */
|
||||
|
||||
#define IO_INTEGRITY_VALID_FLAGS (IO_INTEGRITY_CHK_GUARD | \
|
||||
IO_INTEGRITY_CHK_REFTAG | \
|
||||
IO_INTEGRITY_CHK_APPTAG)
|
||||
|
||||
#define SEEK_SET 0 /* seek relative to beginning of file */
|
||||
#define SEEK_CUR 1 /* seek relative to current file position */
|
||||
#define SEEK_END 2 /* seek relative to end of file */
|
||||
|
||||
Reference in new issue
Block a user