On 5/21/19 9:37 PM, Dan Williams wrote:
On Tue, May 21, 2019 at 2:51 AM Aneesh Kumar K.V
<aneesh.kumar@xxxxxxxxxxxxx> wrote:
....
Something like the below (Not tested). I am not sure what we will init the page_size
for minor version < 3. This will mark the namespace disabled if the
PAGE_SIZE and sizeof(struct page) doesn't match with the values used
during namespace create.
Yes, this is on the right track.
I would special-case page_size == 0 as 4096 and page_struct_size == 0
as 64. If either of those is non-zero then the info-block version
needs to be revved and it needs to be crafted to make older kernels
fail to parse it.
page_size = SZ_4K implies we fail to enable namesepaces created on ppc64
till now. We do work fine with page_size = PAGE_SIZE. It is a few error
check and pfn_sb->npfns that got wrong values. We do reserve the correct
space for the required pfns even when we recorded wrong pfn_sb->npfs.
There was an earlier attempt to implement minimum info-block versions here:
https://lore.kernel.org/lkml/155000670159.348031.17631616775326330606.stgit@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
...but that was dropped in favor of the the "sub-section" patches.
Ok i will pick that too.
-aneesh