[OpenWrt-Devel] Regression in handling power cuts since 3a1e819b4e80 ("ovl: store file handle of lower inode on copy up")
Russell Senior
russell at personaltelco.net
Sun Oct 28 03:09:06 EDT 2018
On Sat, Oct 27, 2018 at 12:33 PM Richard Weinberger <richard at nod.at> wrote:
> Rafał,
>
> Am Montag, 22. Oktober 2018, 17:34:44 CEST schrieb Rafał Miłecki:
> > Then I took a close look at ovl_copy_up_locked() and it seems above
> > info isn't accurate. It seems to me that setxattr() happens between
> > fsync and link. I modified my C app to follow that order (open, write,
> > fsync, setxattr, link) and I can reproduce the problem now!
> >
> > Steps to reproduce the problem:
> > 1) compile tmptest.c
> > 2) tmptest /overlay/upper/foo.txt user.bar baz
> > 3) wait 5 seconds (so ubifs writes to flash)
> > 4) power cut
> > 5) boot again and check content of /overlay/upper/foo.txt
> > 6) in my case content appears to be 00 00 00 00
>
> Just returned from Edinburgh and had a chance to look at the problem.
> The problem is not that no write-back happens, in fact it happens just
> fine.
> But we have a problem upon journal replay if an unlinked file (O_TMPFILE)
> gets relinked in combination with xattrs.
>
> Can you please give the attached patch a try? It is not perfect but if I
> understand the problem correctly it should fix the issues you're facing.
>
Your patch seems to have fixed it for me, sample size = 1.
--
Russell Senior
russell at personaltelco.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20181028/a5185e1f/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list