On Tue, Jul 30, 2019 at 07:19:04PM +0200, David Sterba wrote: > On Thu, Jul 25, 2019 at 11:33:51AM +0200, Johannes Thumshirn wrote: > > From: David Sterba <dsterba@xxxxxxxx> > > > > Export supported checksum algorithms via sysfs. > > I wonder if we should also export the implementation that would be used. > This could be crross referenced with /proc/crypto, but having it in one > place would be IMHO convenient. Also for the case when the kernel > module is missing. > > Currently the hash names are printed as comma separated values so we'd > need bit something structured: > > crc32c: crc32c-intel > xxhash64: xxhash-generic I thought a bit more about it and it's not quite that easy as I would need to have access to the respective "struct crypto_shash". For the currently used checksum this isn't much of a problem, as I get it via "struct btrfs_fs_info". But this sysfs attribute lists all the checksumming algorithms the current btrfs version is able to use irrespectively of the currently mounted file-systems. So yes I can do it but I think this is for another sysfs attribute which shows the used checksumming algorithm for this FS, not the supported checksumming algorithms. Byte, Johannes -- Johannes Thumshirn SUSE Labs Filesystems jthumshirn@xxxxxxx +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
