On 11/2/22 18:28, Johannes Thumshirn wrote: > On 31.10.22 04:00, Damien Le Moal wrote: >> + /* >> + * The only files that have more than one zone are conventional zone >> + * files with aggregated conventional zones, for which the inode zone >> + * size is always larger than the device zone size. >> + */ >> + if (zi->i_zone_size > bdev_zone_sectors(sb->s_bdev)) >> + nr_zones = zi->i_zone_size >> >> + (sbi->s_zone_sectors_shift + SECTOR_SHIFT); >> + > > I wonder if we should also have a check/assertion like this somewhere: > WARN_ON_ONCE(zi->i_zone_size > bdev_zone_sectors(sb->sbdev) && > !sbi->s_features & ZONEFS_F_AGGRCNV) Well, this is set when the inode is created on mount. So we could add the check there, but I do not really see the point since we would be checking exactly what we are doing. So the only chance warn ever showing would be memory corruption, but then we'll likely have bigger problems anyway. No ? > -- Damien Le Moal Western Digital Research