Re: [PATCH v3 3/3] mtd: block2mtd: Removes PAGE_MASK as a index to partition size
From: Brian Norris
Date: Tue Feb 24 2015 - 03:40:57 EST
On Tue, Feb 24, 2015 at 09:30:21PM +1300, Felix Fietkau wrote:
> On 2015-02-24 21:27, Brian Norris wrote:
> > On Tue, Feb 24, 2015 at 09:20:31PM +1300, Felix Fietkau wrote:
> >> On 2015-02-24 21:07, Brian Norris wrote:
> >> > OK let's drop this patch from the series. At best, we could just do
> >> > something like this instead:
> >> >
> >> > - dev->mtd.size = dev->blkdev->bd_inode->i_size & PAGE_MASK;
> >> > + dev->mtd.size = dev->blkdev->bd_inode->i_size;
> >> >
> >> > But that's really just an unnecessary change.
> >> If I remember correctly, it was problematic to have a dev->mtd.size
> >> value which is not a multiple of the erase size. I think that was the
> >> reason for patch 3.
> >
> > The what's this for?
> >
> > if ((long)dev->blkdev->bd_inode->i_size % erase_size) {
> > pr_err("erasesize must be a divisor of device size\n");
> > goto err_free_block2mtd;
> > }
> I think we should just trim the mtd size to a multiple of erase size and
> remove this check. It is a bit impractical for many cases.
Well that's not the subject of anything in this series, and this patch
does not stand alone well, so I'm not taking it. Feel free to send a
different patch if you have good reason to.
Brian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/