<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/overlayfs/util.c, branch linux-4.13.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.13.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.13.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-10-12T09:56:15Z</updated>
<entry>
<title>ovl: fix missing unlock_rename() in ovl_do_copy_up()</title>
<updated>2017-10-12T09:56:15Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2017-09-25T13:39:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1135139af4bff1f5a42a22cea1f28423184ca76d'/>
<id>urn:sha1:1135139af4bff1f5a42a22cea1f28423184ca76d</id>
<content type='text'>
commit 5820dc0888d302ac05f8b91ffdf7e4e53b4fbf53 upstream.

Use the ovl_lock_rename_workdir() helper which requires
unlock_rename() only on lock success.

Fixes: ("fd210b7d67ee ovl: move copy up lock out")
Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ovl: fix dput() of ERR_PTR in ovl_cleanup_index()</title>
<updated>2017-10-12T09:56:15Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2017-09-24T14:36:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a58388ca12212a818d80df1dddf8fca37c5552a7'/>
<id>urn:sha1:a58388ca12212a818d80df1dddf8fca37c5552a7</id>
<content type='text'>
commit 9f4ec904dbd4eb1a2db10d5e7dc16eae386fe64d upstream.

Fixes: caf70cb2ba5d ("ovl: cleanup orphan index entries")
Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ovl: fix xattr get and set with selinux</title>
<updated>2017-07-20T09:08:21Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2017-07-20T09:08:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1d88f183734c0d916428911df006e645a6162cab'/>
<id>urn:sha1:1d88f183734c0d916428911df006e645a6162cab</id>
<content type='text'>
inode_doinit_with_dentry() in SELinux wants to read the upper inode's xattr
to get security label, and ovl_xattr_get() calls ovl_dentry_real(), which
depends on dentry-&gt;d_inode, but d_inode is null and not initialized yet at
this point resulting in an Oops.

Fix by getting the upperdentry info from the inode directly in this case.

Reported-by: Eryu Guan &lt;eguan@redhat.com&gt;
Fixes: 09d8b586731b ("ovl: move __upperdentry to ovl_inode")
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>ovl: cleanup orphan index entries</title>
<updated>2017-07-04T20:03:19Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2017-06-21T10:46:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=caf70cb2ba5dff85ea90f494a30075af92df13b0'/>
<id>urn:sha1:caf70cb2ba5dff85ea90f494a30075af92df13b0</id>
<content type='text'>
index entry should live only as long as there are upper or lower
hardlinks.

Cleanup orphan index entries on mount and when dropping the last
overlay inode nlink.

When about to cleanup or link up to orphan index and the index inode
nlink &gt; 1, admit that something went wrong and adjust overlay nlink
to index inode nlink - 1 to prevent it from dropping below zero.
This could happen when adding lower hardlinks underneath a mounted
overlay and then trying to unlink them.

Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>ovl: persistent overlay inode nlink for indexed inodes</title>
<updated>2017-07-04T20:03:19Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2017-06-20T12:35:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5f8415d6b87ecb4ebf1bbd02c538694ebb7fb57c'/>
<id>urn:sha1:5f8415d6b87ecb4ebf1bbd02c538694ebb7fb57c</id>
<content type='text'>
With inodes index enabled, an overlay inode nlink counts the union of upper
and non-covered lower hardlinks. During the lifetime of a non-pure upper
inode, the following nlink modifying operations can happen:

1. Lower hardlink copy up
2. Upper hardlink created, unlinked or renamed over
3. Lower hardlink whiteout or renamed over

For the first, copy up case, the union nlink does not change, whether the
operation succeeds or fails, but the upper inode nlink may change.
Therefore, before copy up, we store the union nlink value relative to the
lower inode nlink in the index inode xattr trusted.overlay.nlink.

For the second, upper hardlink case, the union nlink should be incremented
or decremented IFF the operation succeeds, aligned with nlink change of the
upper inode. Therefore, before link/unlink/rename, we store the union nlink
value relative to the upper inode nlink in the index inode.

For the last, lower cover up case, we simplify things by preceding the
whiteout or cover up with copy up. This makes sure that there is an index
upper inode where the nlink xattr can be stored before the copied up upper
entry is unlink.

Return the overlay inode nlinks for indexed upper inodes on stat(2).

Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>ovl: implement index dir copy up</title>
<updated>2017-07-04T20:03:19Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2017-06-20T12:25:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=59be09712ab98a3060f13e31343c7abb9bc4583d'/>
<id>urn:sha1:59be09712ab98a3060f13e31343c7abb9bc4583d</id>
<content type='text'>
Implement a copy up method for non-dir objects using index dir to
prevent breaking lower hardlinks on copy up.

This method requires that the inodes index dir feature was enabled and
that all underlying fs support file handle encoding/decoding.

On the first lower hardlink copy up, upper file is created in index dir,
named after the hex representation of the lower origin inode file handle.
On the second lower hardlink copy up, upper file is found in index dir,
by the same lower handle key.
On either case, the upper indexed inode is then linked to the copy up
upper path.

The index entry remains linked for future lower hardlink copy up and for
lower to upper inode map, that is needed for exporting overlayfs to NFS.

Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>ovl: add flag for upper in ovl_entry</title>
<updated>2017-07-04T20:03:18Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2017-07-04T20:03:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=55acc6618259c8ff0a400a131f0f4b613e96010a'/>
<id>urn:sha1:55acc6618259c8ff0a400a131f0f4b613e96010a</id>
<content type='text'>
For rename, we need to ensure that an upper alias exists for hard links
before attempting the operation.  Introduce a flag in ovl_entry to track
the state of the upper alias.

Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>ovl: defer upper dir lock to tempfile link</title>
<updated>2017-07-04T20:03:18Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2017-05-15T22:26:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=15932c415b3ed20bd1c1e05d071b4ad498656280'/>
<id>urn:sha1:15932c415b3ed20bd1c1e05d071b4ad498656280</id>
<content type='text'>
On copy up of regular file using an O_TMPFILE, lock upper dir only
before linking the tempfile in place.

Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>ovl: hash overlay non-dir inodes by copy up origin</title>
<updated>2017-07-04T20:03:17Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2017-07-04T20:03:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b9ac5c274b8c9d642567022c0e319bca4db31956'/>
<id>urn:sha1:b9ac5c274b8c9d642567022c0e319bca4db31956</id>
<content type='text'>
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
<entry>
<title>ovl: introduce the inodes index dir feature</title>
<updated>2017-07-04T20:03:17Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2017-06-21T12:28:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=02bcd1577400b0b2eab806ccb9f72d6b5ec7bcca'/>
<id>urn:sha1:02bcd1577400b0b2eab806ccb9f72d6b5ec7bcca</id>
<content type='text'>
Create the index dir on mount. The index dir will contain hardlinks to
upper inodes, named after the hex representation of their origin lower
inodes.

The index dir is going to be used to prevent breaking lower hardlinks
on copy up and to implement overlayfs NFS export.

Because the feature is not fully backward compat, enabling the feature
is opt-in by config/module/mount option.

Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@redhat.com&gt;
</content>
</entry>
</feed>
