Re: [PATCH v2 00/10] clean up SECTOR related macros and sectors/pages conversions

2020-05-14 Thread Leizhen (ThunderTown)
Hi, all: It seems no one take care about these patches. But I think patch 1 is need. And the main discussion points of others is whether we should add sectors_to_npage()/npage_to_sectors() or keep PAGE_SECTORS_SHIFT. And which marco name do we prefer: PAGE_SECTORS vs SECTORS_PER_PAGE, PAGE_SEC

[PATCH v2 00/10] clean up SECTOR related macros and sectors/pages conversions

2020-05-07 Thread Zhen Lei
v1 --> v2: As Matthew Wilcox's suggestion, add sectors_to_npage()/npage_to_sectors() helpers to eliminate SECTORS_PER_PAGE_SHIFT, because it's quite hard to read. In further, I also eliminated PAGE_SECTORS_SHIFT. I tried to eliminate all magic number "9" and "512", but it's too many, maybe no one