Re: [PATCH] btrfs: pass checksum type via BTRFS_IOC_FS_INFO ioctl

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

 



On 24/06/2020 14:14, Hans van Kranenburg wrote:
[...]
> Random idea... What if an imaginary me likes building kernels with
> random features from the future (e.g. on top of 4.19LTS), and the next
> feature added is to show the value of the new flapsie field.
> 
> The 'version' will increase, but I decide to not pick the new csum type
> patches because I don't need them, I only pick the new flapsie feature.

Then csum_type will be 0, which is crc32c. But this works by accident.
 
> Now, how does my userspace tooling know that the u16 flapsie field has a
> meaning but the csum_type hasn't?
> 
> ("You shouldn't do that" is also a possible answer...)

While it's a possible answer, I admit your concerns are valid. That can be
handled easier by a flags field.

Thanks,
	Johannes





[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux