<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/overlayfs/util.c, branch linux-6.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-06-19T11:02:01Z</updated>
<entry>
<title>ovl: store enum redirect_mode in config instead of a string</title>
<updated>2023-06-19T11:02:01Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2023-06-17T06:42:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=af5f2396b671c9857b113584d4bd43413b39cfdb'/>
<id>urn:sha1:af5f2396b671c9857b113584d4bd43413b39cfdb</id>
<content type='text'>
Do all the logic to set the mode during mount options parsing and
do not keep the option string around.

Use a constant_table to translate from enum redirect mode to string
in preperation for new mount api option parsing.

The mount option "off" is translated to either "follow" or "nofollow",
depending on the "redirect_always_follow" build/module config, so
in effect, there are only three possible redirect modes.

This results in a minor change to the string that is displayed
in show_options() - when redirect_dir is enabled by default and the user
mounts with the option "redirect_dir=off", instead of displaying the mode
"redirect_dir=off" in show_options(), the displayed mode will be either
"redirect_dir=follow" or "redirect_dir=nofollow", depending on the value
of "redirect_always_follow" build/module config.

The displayed mode reflects the effective mode, so mounting overlayfs
again with the dispalyed redirect_dir option will result with the same
effective and displayed mode.

Signed-off-by: Amir Goldstein &lt;amir73il@gmail.com&gt;
</content>
</entry>
<entry>
<title>ovl: implement lazy lookup of lowerdata in data-only layers</title>
<updated>2023-06-19T11:01:14Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2023-04-27T10:39:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=42dd69ae1af42cf72d167e63a039b8c63653eb7f'/>
<id>urn:sha1:42dd69ae1af42cf72d167e63a039b8c63653eb7f</id>
<content type='text'>
Defer lookup of lowerdata in the data-only layers to first data access
or before copy up.

We perform lowerdata lookup before copy up even if copy up is metadata
only copy up.  We can further optimize this lookup later if needed.

We do best effort lazy lookup of lowerdata for d_real_inode(), because
this interface does not expect errors.  The only current in-tree caller
of d_real_inode() is trace_uprobe and this caller is likely going to be
followed reading from the file, before placing uprobes on offset within
the file, so lowerdata should be available when setting the uprobe.

Tested-by: kernel test robot &lt;oliver.sang@intel.com&gt;
Reviewed-by: Alexander Larsson &lt;alexl@redhat.com&gt;
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: prepare for lazy lookup of lowerdata inode</title>
<updated>2023-06-19T11:01:14Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2023-04-02T18:56:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=416656447864ef0fc2430525499f52a4a370a0ab'/>
<id>urn:sha1:416656447864ef0fc2430525499f52a4a370a0ab</id>
<content type='text'>
Make the code handle the case of numlower &gt; 1 and missing lowerdata
dentry gracefully.

Missing lowerdata dentry is an indication for lazy lookup of lowerdata
and in that case the lowerdata_redirect path is stored in ovl_inode.

Following commits will defer lookup and perform the lazy lookup on
access.

Reviewed-by: Alexander Larsson &lt;alexl@redhat.com&gt;
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: prepare to store lowerdata redirect for lazy lowerdata lookup</title>
<updated>2023-06-19T11:01:14Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2023-04-27T09:21:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b21da920866ad20b5e3119f3b8d2267774b7b0a'/>
<id>urn:sha1:2b21da920866ad20b5e3119f3b8d2267774b7b0a</id>
<content type='text'>
Prepare to allow ovl_lookup() to leave the last entry in a non-dir
lowerstack empty to signify lazy lowerdata lookup.

In this case, ovl_lookup() stores the redirect path from metacopy to
lowerdata in ovl_inode, which is going to be used later to perform the
lazy lowerdata lookup.

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: deduplicate lowerdata and lowerstack[]</title>
<updated>2023-06-19T11:01:13Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2023-04-01T07:29:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ab1eb5ffb7d2a69c9b24083026a63cbdd758d96b'/>
<id>urn:sha1:ab1eb5ffb7d2a69c9b24083026a63cbdd758d96b</id>
<content type='text'>
The ovl_inode contains a copy of lowerdata in lowerstack[], so the
lowerdata inode member can be removed.

Use accessors ovl_lowerdata*() to get the lowerdata whereever the member
was accessed directly.

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: deduplicate lowerpath and lowerstack[]</title>
<updated>2023-06-19T11:01:13Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2023-04-01T07:29:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ac900ed4f253434e099a025fc1da3d04bc741bd3'/>
<id>urn:sha1:ac900ed4f253434e099a025fc1da3d04bc741bd3</id>
<content type='text'>
The ovl_inode contains a copy of lowerpath in lowerstack[0], so the
lowerpath member can be removed.

Use accessor ovl_lowerpath() to get the lowerpath whereever the member
was accessed directly.

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: move ovl_entry into ovl_inode</title>
<updated>2023-06-19T11:01:13Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2023-04-08T09:31:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0af950f57fefabab628f1963af881e6b9bfe7f38'/>
<id>urn:sha1:0af950f57fefabab628f1963af881e6b9bfe7f38</id>
<content type='text'>
The lower stacks of all the ovl inode aliases should be identical
and there is redundant information in ovl_entry and ovl_inode.

Move lowerstack into ovl_inode and keep only the OVL_E_FLAGS
per overlay dentry.

Following patches will deduplicate redundant ovl_inode fields.

Note that for pure upper and negative dentries, OVL_E(dentry) may be
NULL now, so it is imporatnt to use the ovl_numlower() accessor.

Reviewed-by: Alexander Larsson &lt;alexl@redhat.com&gt;
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: factor out ovl_free_entry() and ovl_stack_*() helpers</title>
<updated>2023-06-19T11:01:13Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2023-04-03T17:36:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=163db0da3515d1d32343906a2fb7854492191d19'/>
<id>urn:sha1:163db0da3515d1d32343906a2fb7854492191d19</id>
<content type='text'>
In preparation for moving lowerstack into ovl_inode.

Note that in ovl_lookup() the temp stack dentry refs are now cloned
into the final ovl_lowerstack instead of being transferred, so cleanup
always needs to call ovl_stack_free(stack).

Reviewed-by: Alexander Larsson &lt;alexl@redhat.com&gt;
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: use ovl_numlower() and ovl_lowerstack() accessors</title>
<updated>2023-06-19T11:01:13Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2023-04-03T08:51:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5522c9c7cbd2ab4e886fa1c70896f0bdd483ce0b'/>
<id>urn:sha1:5522c9c7cbd2ab4e886fa1c70896f0bdd483ce0b</id>
<content type='text'>
This helps fortify against dereferencing a NULL ovl_entry,
before we move the ovl_entry reference into ovl_inode.

Reviewed-by: Alexander Larsson &lt;alexl@redhat.com&gt;
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: use OVL_E() and OVL_E_FLAGS() accessors</title>
<updated>2023-06-19T11:01:12Z</updated>
<author>
<name>Amir Goldstein</name>
</author>
<published>2023-03-15T02:31:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a6ff2bc0be179eea72832b5396481a08ccd22d5a'/>
<id>urn:sha1:a6ff2bc0be179eea72832b5396481a08ccd22d5a</id>
<content type='text'>
Instead of open coded instances, because we are about to split
the two apart.

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