From: Miklos Szeredi <miklos@szeredi.hu>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Richard Weinberger <richard@nod.at>,
"linux-unionfs@vger.kernel.org" <linux-unionfs@vger.kernel.org>,
Artem Bityutskiy <dedekind1@gmail.com>,
Adrian Hunter <adrian.hunter@intel.com>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
LEDE Development List <lede-dev@lists.infradead.org>
Subject: Re: overlayfs + ubifs: power cut results in "failed to create directory /overlay/work/work (errno: 17); mounting read-only"
Date: Wed, 7 Sep 2016 10:28:02 +0200 [thread overview]
Message-ID: <CAJfpegv9EwrZJnAi45ck4Cy+UiPQX1L4ztNjdAn-TzGCJqkk7g@mail.gmail.com> (raw)
In-Reply-To: <CACna6rwSGU6WLZwVnd+x1iOjHOoNmhrBOCcvS-b1KDXs9gVF0Q@mail.gmail.com>
On Tue, Sep 6, 2016 at 5:53 PM, Rafał Miłecki <zajec5@gmail.com> wrote:
> On 6 September 2016 at 14:56, Rafał Miłecki <zajec5@gmail.com> wrote:
>> On 6 September 2016 at 14:50, Miklos Szeredi <miklos@szeredi.hu> wrote:
>>> On Tue, Sep 6, 2016 at 1:59 PM, Richard Weinberger <richard@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.
Conversion is trivial, in fact:
#define inode_lock(inode) mutex_lock(&(inode)->i_mutex)
#define inode_unlock(inode) mutex_unlock(&(inode)->i_mutex)
#define inode_trylock(inode) mutex_trylock(&(inode)->i_mutex)
#define inode_lock_nested(inode, subclass)
mutex_lock_nested(&(inode)->i_mutex, subclass)
And Greg promised to put these defines into -stable for easier
backport experience.
Thanks,
Miklos
prev parent reply other threads:[~2016-09-07 8:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-06 10:46 overlayfs + ubifs: power cut results in "failed to create directory /overlay/work/work (errno: 17); mounting read-only" Rafał Miłecki
2016-09-06 11:59 ` Richard Weinberger
2016-09-06 12:50 ` Miklos Szeredi
2016-09-06 12:56 ` Rafał Miłecki
2016-09-06 15:53 ` Rafał Miłecki
2016-09-07 8:28 ` Miklos Szeredi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJfpegv9EwrZJnAi45ck4Cy+UiPQX1L4ztNjdAn-TzGCJqkk7g@mail.gmail.com \
--to=miklos@szeredi.hu \
--cc=adrian.hunter@intel.com \
--cc=dedekind1@gmail.com \
--cc=lede-dev@lists.infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=richard@nod.at \
--cc=zajec5@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).