ubifs+overlayfs

Richard Weinberger richard.weinberger at gmail.com
Sun Feb 21 06:27:18 PST 2016


Cc'ing linux-mtd.

On Sat, Feb 20, 2016 at 1:02 AM, Pushpal Sidhu <psidhu at gateworks.com> wrote:
> It seems that overlayfs requires RENAME_WHITEOUT and RENAME_EXCHANGE.
> However, these two flags aren't currently supported in ubifs (or
> anything other than ext4, f2fs, and xfs). This causes any atomic
> renames to fail (e.g. using 'mv' command).

Hmm, right. I always thought overlayfs does checks at mount time.
But apparently I was wrong.
Thanks for pointing this out.

> I'm currently trying to implement these flags, but I'm having some
> issues as I'm pretty vanilla when it comes to implementation details
> on ubifs. I'm taking inspiration from patches [1] and [2], but I'm
> kind of coming up short. Is there anyone currently working on this? If
> not, I would certainly appreciate any advice for implementing these
> features.

Not to my knowledge. But you can use my O_TMPFILE patch as start.
See linux-mtd mailinglist.
If you have questions, just ask.
As using overlayfs is common on embedded stuff we definitely need that on UBIFS.
Just in case I'm putting that also on my todo list.

> What I'm doing: I'm attempting to create a 'whiteout' object from
> within the ubifs_rename function. However, I noticed that it calls
> ubifs_jnl_rename, which is where I believe I should try to implement
> this. I haven't touched RENAME_EXCHANGE yet.
>
> [1] https://dev.openwrt.org/browser/trunk/target/linux/generic/patches-4.4/110-jffs2-use-.rename2-and-add-RENAME_WHITEOUT-support.patch
> [2] https://dev.openwrt.org/browser/trunk/target/linux/generic/patches-4.4/111-jffs2-add-RENAME_EXCHANGE-support.patch

Hmm, these patches seem wrong to me.
Unless I'm very mistaken it looks like every whiteout creates an busy
orphaned inode.

-- 
Thanks,
//richard



More information about the linux-mtd mailing list