Re: [PATCH for-next v2 2/2] fs: add ioctl to query protection info capabilities

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Anuj!

> A new structure struct fs_pi_cap is introduced, which contains the
> following fields:

Maybe fs_metadata_cap and then fmd_ as prefix in the struct?

> 2. fpc_interval: the data block interval (in bytes) for which the
> protection information is generated.

The data block interval (in bytes) associated with each unit of
metadata.

> 3. fpc_csum type: type of checksum used.

fmd_guard_tag_type

> 4. fpc_metadata_size: size (in bytes) of the metadata associated with each
> interval.

data block interval, perhaps?

> 6. fpc_tag_size: size (in bytes) of tag information.

fmd_app_tag_size: size (in bytes) of the application tag.

> 7. pi_offset: offset of protection information tuple within the
> metadata.

Yep.

> 8. fpc_ref_tag_size: size in bytes of the reference tag.
> 9. fpc_storage_tag_size: size in bytes of the storage tag.

Also good.

> +	case FS_IOC_GETPICAP:
> +		return blk_get_pi_cap(bdev, argp);

FS_IOC_METADATA_CAP?

> +/* Checksum types for Protection Information */
> +#define FS_PI_CSUM_NONE			0
> +#define FS_PI_CSUM_IP			1
> +#define FS_PI_CSUM_CRC16_T10DIF		2
> +#define FS_PI_CSUM_CRC64_NVME		3

I'll be adding CRC32 support soon. So maybe make CRC64 a "4" so it won't
look weird and unsorted in the uapi.

-- 
Martin K. Petersen




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux