RE: [PATCH v19 1/3] scsi: ufs: Introduce HPB feature

From: Avri Altman
Date: Tue Feb 02 2021 - 02:47:59 EST


Daejun,

> static const struct attribute_group *ufshcd_driver_groups[] = {
> &ufs_sysfs_unit_descriptor_group,
> &ufs_sysfs_lun_attributes_group,
> +#ifdef CONFIG_SCSI_UFS_HPB
> + &ufs_sysfs_hpb_stat_group,
> +#endif
> NULL,
> };
Aren’t you creating a hpb_stats entries for every lun (even wlun)?
This is confusing, even if safe (any non-hpb lun returns NODEV).
Also user-space have no way to know which entry is valid.

Can we group those under ufshpb_lu<lun id> for valid hpb luns only?
Also need to document the stats? Maybe in a separate sysfs-driver-ufs-features?

Thanks,
Avri