overlayfs + ubifs: power cut results in "failed to create directory /overlay/work/work (errno: 17); mounting read-only"

Rafał Miłecki zajec5 at gmail.com
Tue Sep 6 08:53:08 PDT 2016


On 6 September 2016 at 14:56, Rafał Miłecki <zajec5 at gmail.com> wrote:
> On 6 September 2016 at 14:50, Miklos Szeredi <miklos at szeredi.hu> wrote:
>> On Tue, Sep 6, 2016 at 1:59 PM, Richard Weinberger <richard at nod.at> wrote:
>>> overlayfs does not issue a recursive rm on workdir, AFAICT you are supposed to cleanup
>>> workdir yourself before mounting.
>>> Miklos?
>>
>> Fixed in 4.8-rc5 by
>>
>> eea2fb4851e9 ("ovl: proper cleanup of workdir")
>>
>> I think it's better if kernel does the cleanup, but if it's easier to
>> upgrade userspace, then that's a valid workaround.
>
> Oh, this should solve my problem! It seems it didn't git stable
> kernels yet, but I can backport it on my own for now.

I tried backporting it to 4.4, but it appears it won't be that
trivial. Your patch ("ovl: proper cleanup of workdir") uses e.g.
inode_lock_nested which is available in 4.5+. Commit that added this
function: 5955102c9984f ("wrappers for ->i_mutex access") wasn't
marked for stable, so I guess your patch won't go into 4.4 at all.

I don't expect any magic solution for this, just saying, leaving a
note for reference.

-- 
Rafał



More information about the linux-mtd mailing list