Re: [PATCH 1/3] iomap: use SECTOR_SIZE instead of 512 in iomap_page

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

 




On 12/18/18 12:19 PM, Darrick J. Wong wrote:
> On Tue, Dec 18, 2018 at 07:06:17PM +0100, Christoph Hellwig wrote:
>> On Mon, Dec 17, 2018 at 05:45:10PM -0600, Eric Sandeen wrote:
>>> Then we should hard code "512" in iomap_page_create I guess.  Just need
>>> consistency.
>>
>> Fine with me.
> 
> Please don't just hardcode 512 here.  AFAICT the usage in iomap.c seems
> to be "minimum expected fs block size" so that the iop's uptodate bitmap
> is sized to handle the worst case blocks-per-page.
> 
> Can we please have a "#define IOMAP_MIN_FS_BLOCKSIZE SECTOR_SIZE" to
> capture the intent behind the 512?  Or, if you don't want to require all
> includers of iomap.h to also have to include blkdev.h, define it to 512
> and have a BUILD_BUG_ON somewhere so that we don't leave a subtle bug if
> we ever change SECTOR_SIZE?

Right, seems like something needs to tie this into the rest of reality
and not just blaze past it if we somehow ever encounter a block size
< 512.

-Eric



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux