On Mon, 18 Feb 2019 at 18:31, Rafał Miłecki rafal@milecki.pl wrote:
On 2019-02-18 13:30, Amit Pundir wrote:
From: Rafał Miłecki rafal@milecki.pl
commit 1186af457cc186c5ed01708da71b1ffbdf0a2638 upstream.
When allocating a new partition mtd subsystem runs internal tests in the allocate_partition(). They may result in modifying specified flags (e.g. dropping some /features/ like write access).
Those constraints don't have to be necessary true for subpartitions. It may happen parent partition isn't block aligned (effectively disabling write access) while subpartition may fit blocks nicely. In such case all checks should be run again (starting with original flags value).
Signed-off-by: Rafał Miłecki rafal@milecki.pl Signed-off-by: Boris Brezillon boris.brezillon@bootlin.com Signed-off-by: Amit Pundir amit.pundir@linaro.org
I understand that it doesn't exactly fit into Stable rules but I didn't want to assume anything, so sending it up for review. Cherry-picked from lede tree https://git.lede-project.org/?p=source.git and build tested on v4.14.97 and v4.19.19 for ARCH=arm/arm64 defconfig.
This was a pre-requirement for some later-added *feature*. I see to reason to pick this one for stable. We won't be picking that feature (whatever it was), so what's the point?
Thank you for the review. I knew I was missing something. I sent it out of curiosity based on commit log, which talks about re-running all checks as a fix for internal tests likely dropping write access to new partition. And I didn't read it is a pre-requisite for later-added feature. I'm sure lede/openwrt would have picked/backported the whole feature, but as you mentioned it doesn't make sense for Stable. Thank you again for the feedback.
Regards, Amit Pundir