Re: [PATCH 1/2] zonefs: fix zone report size in __zonefs_io_error()

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

 



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




[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