<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/9p, branch linux-5.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-02-08T17:35:09Z</updated>
<entry>
<title>Revert "fs/9p: search open fids first"</title>
<updated>2022-02-08T17:35:09Z</updated>
<author>
<name>Dominique Martinet</name>
</author>
<published>2022-01-29T09:42:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d99d14b169a11a1b7635d81d8139d2e3a75a0ec2'/>
<id>urn:sha1:d99d14b169a11a1b7635d81d8139d2e3a75a0ec2</id>
<content type='text'>
commit 22e424feb6658c5d6789e45121830357809c59cb upstream.

This reverts commit 478ba09edc1f2f2ee27180a06150cb2d1a686f9c.

That commit was meant as a fix for setattrs with by fd (e.g. ftruncate)
to use an open fid instead of the first fid it found on lookup.
The proper fix for that is to use the fid associated with the open file
struct, available in iattr-&gt;ia_file for such operations, and was
actually done just before in 66246641609b ("9p: retrieve fid from file
when file instance exist.")
As such, this commit is no longer required.

Furthermore, changing lookup to return open fids first had unwanted side
effects, as it turns out the protocol forbids the use of open fids for
further walks (e.g. clone_fid) and we broke mounts for some servers
enforcing this rule.

Note this only reverts to the old working behaviour, but it's still
possible for lookup to return open fids if dentry-&gt;d_fsdata is not set,
so more work is needed to make sure we respect this rule in the future,
for example by adding a flag to the lookup functions to only match
certain fid open modes depending on caller requirements.

Link: https://lkml.kernel.org/r/20220130130651.712293-1-asmadeus@codewreck.org
Fixes: 478ba09edc1f ("fs/9p: search open fids first")
Cc: stable@vger.kernel.org # v5.11+
Reported-by: ron minnich &lt;rminnich@gmail.com&gt;
Reported-by: ng@0x80.stream
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>9p: fix enodata when reading growing file</title>
<updated>2022-01-20T08:12:20Z</updated>
<author>
<name>Dominique Martinet</name>
</author>
<published>2022-01-10T11:10:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0b1a05b219fe9da9384139474b8de867ab240cf1'/>
<id>urn:sha1:0b1a05b219fe9da9384139474b8de867ab240cf1</id>
<content type='text'>
commit 19d1c32652bbbf406063025354845fdddbcecd3a upstream.

Reading from a file that was just extended by a write, but the write had
not yet reached the server would return ENODATA as illustrated by this
command:
$ xfs_io -c 'open -ft test' -c 'w 4096 1000' -c 'r 0 1000'
wrote 1000/1000 bytes at offset 4096
1000.000000 bytes, 1 ops; 0.0001 sec (5.610 MiB/sec and 5882.3529 ops/sec)
pread: No data available

Fix this case by having netfs assume zeroes when reads from server come
short like AFS and CEPH do

Link: https://lkml.kernel.org/r/20220110111444.926753-1-asmadeus@codewreck.org
Cc: stable@vger.kernel.org
Fixes: eb497943fa21 ("9p: Convert to using the netfs helper lib to do reads and caching")
Co-authored-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: David Howells &lt;dhowells@redhat.com&gt;
Tested-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>9p: only copy valid iattrs in 9P2000.L setattr implementation</title>
<updated>2022-01-20T08:12:20Z</updated>
<author>
<name>Christian Brauner</name>
</author>
<published>2021-11-29T11:44:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4947e1735a8780843ea47ea65eb994fa82d72a39'/>
<id>urn:sha1:4947e1735a8780843ea47ea65eb994fa82d72a39</id>
<content type='text'>
commit 3cb6ee991496b67ee284c6895a0ba007e2d7bac3 upstream.

The 9P2000.L setattr method v9fs_vfs_setattr_dotl() copies struct iattr
values without checking whether they are valid causing unitialized
values to be copied. The 9P2000 setattr method v9fs_vfs_setattr() method
gets this right. Check whether struct iattr fields are valid first
before copying in v9fs_vfs_setattr_dotl() too and make sure that all
other fields are set to 0 apart from {g,u}id which should be set to
INVALID_{G,U}ID. This ensure that they can be safely sent over the wire
or printed for debugging later on.

Link: https://lkml.kernel.org/r/20211129114434.3637938-1-brauner@kernel.org
Link: https://lkml.kernel.org/r/000000000000a0d53f05d1c72a4c%40google.com
Cc: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;
Cc: Latchesar Ionkov &lt;lucho@ionkov.net&gt;
Cc: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Cc: stable@kernel.org
Cc: v9fs-developer@lists.sourceforge.net
Reported-by: syzbot+dfac92a50024b54acaa4@syzkaller.appspotmail.com
Signed-off-by: Christian Brauner &lt;christian.brauner@ubuntu.com&gt;
[Dominique: do not set a/mtime with just ATTR_A/MTIME as discussed]
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>netfs, 9p, afs, ceph: Use folios</title>
<updated>2021-11-10T21:16:56Z</updated>
<author>
<name>David Howells</name>
</author>
<published>2021-08-11T08:49:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=78525c74d9e7d1a6ce69bd4388f045f6e474a20b'/>
<id>urn:sha1:78525c74d9e7d1a6ce69bd4388f045f6e474a20b</id>
<content type='text'>
Convert the netfs helper library to use folios throughout, convert the 9p
and afs filesystems to use folios in their file I/O paths and convert the
ceph filesystem to use just enough folios to compile.

With these changes, afs passes -g quick xfstests.

Changes
=======
ver #5:
 - Got rid of folio_end{io,_read,_write}() and inlined the stuff it does
   instead (Willy decided he didn't want this after all).

ver #4:
 - Fixed a bug in afs_redirty_page() whereby it didn't set the next page
   index in the loop and returned too early.
 - Simplified a check in v9fs_vfs_write_folio_locked()[1].
 - Undid a change to afs_symlink_readpage()[1].
 - Used offset_in_folio() in afs_write_end()[1].
 - Changed from using page_endio() to folio_end{io,_read,_write}()[1].

ver #2:
 - Add 9p foliation.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Tested-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Tested-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Tested-by: kafs-testing@auristor.com
cc: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
cc: Marc Dionne &lt;marc.dionne@auristor.com&gt;
cc: Ilya Dryomov &lt;idryomov@gmail.com&gt;
cc: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
cc: v9fs-developer@lists.sourceforge.net
cc: linux-afs@lists.infradead.org
cc: ceph-devel@vger.kernel.org
cc: linux-cachefs@redhat.com
Link: https://lore.kernel.org/r/YYKa3bfQZxK5/wDN@casper.infradead.org/ [1]
Link: https://lore.kernel.org/r/2408234.1628687271@warthog.procyon.org.uk/ # rfc
Link: https://lore.kernel.org/r/162877311459.3085614.10601478228012245108.stgit@warthog.procyon.org.uk/
Link: https://lore.kernel.org/r/162981153551.1901565.3124454657133703341.stgit@warthog.procyon.org.uk/
Link: https://lore.kernel.org/r/163005745264.2472992.9852048135392188995.stgit@warthog.procyon.org.uk/ # v2
Link: https://lore.kernel.org/r/163584187452.4023316.500389675405550116.stgit@warthog.procyon.org.uk/ # v3
Link: https://lore.kernel.org/r/163649328026.309189.1124218109373941936.stgit@warthog.procyon.org.uk/ # v4
Link: https://lore.kernel.org/r/163657852454.834781.9265101983152100556.stgit@warthog.procyon.org.uk/ # v5
</content>
</entry>
<entry>
<title>9p: fix a bunch of checkpatch warnings</title>
<updated>2021-11-04T12:04:25Z</updated>
<author>
<name>Dominique Martinet</name>
</author>
<published>2021-11-02T13:16:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6e195b0f7c8e50927fa31946369c22a0534ec7e2'/>
<id>urn:sha1:6e195b0f7c8e50927fa31946369c22a0534ec7e2</id>
<content type='text'>
Sohaib Mohamed started a serie of tiny and incomplete checkpatch fixes but
seemingly stopped halfway -- take over and do most of it.
This is still missing net/9p/trans* and net/9p/protocol.c for a later
time...

Link: http://lkml.kernel.org/r/20211102134608.1588018-3-dominique.martinet@atmark-techno.com
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
</entry>
<entry>
<title>9p: set readahead and io size according to maxsize</title>
<updated>2021-11-04T12:04:04Z</updated>
<author>
<name>Dominique Martinet</name>
</author>
<published>2021-11-04T12:01:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b1843d23854aeae95ce92a3432bc1bea4cdbb2e7'/>
<id>urn:sha1:b1843d23854aeae95ce92a3432bc1bea4cdbb2e7</id>
<content type='text'>
having a readahead of 128k with a msize of 128k (with overhead) lead to
reading 124+4k everytime, making two roundtrips needlessly.

tune readahead according to msize when cache is enabled for better
performance

Link: http://lkml.kernel.org/r/20211104120323.2189376-1-asmadeus@codewreck.org
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
</entry>
<entry>
<title>9p p9mode2perm: remove useless strlcpy and check sscanf return code</title>
<updated>2021-11-03T08:45:04Z</updated>
<author>
<name>Dominique Martinet</name>
</author>
<published>2021-11-02T13:24:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=05f975cd6a0b35a0fba725250c7b7cdb680046fa'/>
<id>urn:sha1:05f975cd6a0b35a0fba725250c7b7cdb680046fa</id>
<content type='text'>
This is also a checkpatch warning fix but this one might have implications
so keeping it separate

Link: http://lkml.kernel.org/r/20211102134608.1588018-5-dominique.martinet@atmark-techno.com
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
</entry>
<entry>
<title>9p v9fs_parse_options: replace simple_strtoul with kstrtouint</title>
<updated>2021-11-03T08:45:04Z</updated>
<author>
<name>Dominique Martinet</name>
</author>
<published>2021-11-02T13:23:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=10c69a0d08bb2ad5bf17ef85a27362783ffb893a'/>
<id>urn:sha1:10c69a0d08bb2ad5bf17ef85a27362783ffb893a</id>
<content type='text'>
This is also a checkpatch change, but this one might have more implications
so keeping this separate

Link: http://lkml.kernel.org/r/20211102134608.1588018-4-dominique.martinet@atmark-techno.com
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
</entry>
<entry>
<title>9p: fix file headers</title>
<updated>2021-11-03T08:45:04Z</updated>
<author>
<name>Dominique Martinet</name>
</author>
<published>2021-11-02T13:12:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=024b7d6a435a450819f112690052f2923fa5ffdd'/>
<id>urn:sha1:024b7d6a435a450819f112690052f2923fa5ffdd</id>
<content type='text'>
- add missing SPDX-License-Identifier
- remove (sometimes incorrect) file name from file header

Link: http://lkml.kernel.org/r/20211102134608.1588018-2-dominique.martinet@atmark-techno.com
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
</entry>
<entry>
<title>fs/9p: fix indentation and Add missing a blank line after declaration</title>
<updated>2021-11-03T08:45:03Z</updated>
<author>
<name>Sohaib Mohamed</name>
</author>
<published>2021-09-30T22:04:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9a268faa5f8627a0d4279480b8779231adaa45c5'/>
<id>urn:sha1:9a268faa5f8627a0d4279480b8779231adaa45c5</id>
<content type='text'>
Warning found by checkpatch.pl

Link: http://lkml.kernel.org/r/20210930220420.44150-1-sohaib.amhmd@gmail.com
Signed-off-by: Sohaib Mohamed &lt;sohaib.amhmd@gmail.com&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
</entry>
</feed>
