<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/iomap, 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>2021-11-24T18:15:47Z</updated>
<entry>
<title>iomap: iomap_read_inline_data cleanup</title>
<updated>2021-11-24T18:15:47Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2021-11-24T18:15:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5ad448ce2976f829d95dcae5e6e91f6686b0e4de'/>
<id>urn:sha1:5ad448ce2976f829d95dcae5e6e91f6686b0e4de</id>
<content type='text'>
Change iomap_read_inline_data to return 0 or an error code; this
simplifies the callers.  Add a description.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
[djwong: document the return value of iomap_read_inline_data explicitly]
Reviewed-by: Darrick J. Wong &lt;djwong@kernel.org&gt;
Signed-off-by: Darrick J. Wong &lt;djwong@kernel.org&gt;
</content>
</entry>
<entry>
<title>iomap: Fix inline extent handling in iomap_readpage</title>
<updated>2021-11-22T00:28:07Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2021-11-18T01:59:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d8af404ffce71448f29bbc19a05e3d095baf98eb'/>
<id>urn:sha1:d8af404ffce71448f29bbc19a05e3d095baf98eb</id>
<content type='text'>
Before commit 740499c78408 ("iomap: fix the iomap_readpage_actor return
value for inline data"), when hitting an IOMAP_INLINE extent,
iomap_readpage_actor would report having read the entire page.  Since
then, it only reports having read the inline data (iomap-&gt;length).

This will force iomap_readpage into another iteration, and the
filesystem will report an unaligned hole after the IOMAP_INLINE extent.
But iomap_readpage_actor (now iomap_readpage_iter) isn't prepared to
deal with unaligned extents, it will get things wrong on filesystems
with a block size smaller than the page size, and we'll eventually run
into the following warning in iomap_iter_advance:

  WARN_ON_ONCE(iter-&gt;processed &gt; iomap_length(iter));

Fix that by changing iomap_readpage_iter to return 0 when hitting an
inline extent; this will cause iomap_iter to stop immediately.

To fix readahead as well, change iomap_readahead_iter to pass on
iomap_readpage_iter return values less than or equal to zero.

Fixes: 740499c78408 ("iomap: fix the iomap_readpage_actor return value for inline data")
Cc: stable@vger.kernel.org # v5.15+
Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Darrick J. Wong &lt;djwong@kernel.org&gt;
Signed-off-by: Darrick J. Wong &lt;djwong@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'gfs2-v5.15-rc5-mmap-fault' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2</title>
<updated>2021-11-02T19:25:03Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2021-11-02T19:25:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c03098d4b9ad76bca2966a8769dcfe59f7f85103'/>
<id>urn:sha1:c03098d4b9ad76bca2966a8769dcfe59f7f85103</id>
<content type='text'>
Pull gfs2 mmap + page fault deadlocks fixes from Andreas Gruenbacher:
 "Functions gfs2_file_read_iter and gfs2_file_write_iter are both
  accessing the user buffer to write to or read from while holding the
  inode glock.

  In the most basic deadlock scenario, that buffer will not be resident
  and it will be mapped to the same file. Accessing the buffer will
  trigger a page fault, and gfs2 will deadlock trying to take the same
  inode glock again while trying to handle that fault.

  Fix that and similar, more complex scenarios by disabling page faults
  while accessing user buffers. To make this work, introduce a small
  amount of new infrastructure and fix some bugs that didn't trigger so
  far, with page faults enabled"

* tag 'gfs2-v5.15-rc5-mmap-fault' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
  gfs2: Fix mmap + page fault deadlocks for direct I/O
  iov_iter: Introduce nofault flag to disable page faults
  gup: Introduce FOLL_NOFAULT flag to disable page faults
  iomap: Add done_before argument to iomap_dio_rw
  iomap: Support partial direct I/O on user copy failures
  iomap: Fix iomap_dio_rw return value for user copies
  gfs2: Fix mmap + page fault deadlocks for buffered I/O
  gfs2: Eliminate ip-&gt;i_gh
  gfs2: Move the inode glock locking to gfs2_file_buffered_write
  gfs2: Introduce flag for glock holder auto-demotion
  gfs2: Clean up function may_grant
  gfs2: Add wrapper for iomap_file_buffered_write
  iov_iter: Introduce fault_in_iov_iter_writeable
  iov_iter: Turn iov_iter_fault_in_readable into fault_in_iov_iter_readable
  gup: Turn fault_in_pages_{readable,writeable} into fault_in_{readable,writeable}
  powerpc/kvm: Fix kvm_use_magic_page
  iov_iter: Fix iov_iter_get_pages{,_alloc} page fault return value
</content>
</entry>
<entry>
<title>fs: get rid of the res2 iocb-&gt;ki_complete argument</title>
<updated>2021-10-25T16:36:24Z</updated>
<author>
<name>Jens Axboe</name>
</author>
<published>2021-10-21T15:22:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6b19b766e8f077f29cdb47da5003469a85bbfb9c'/>
<id>urn:sha1:6b19b766e8f077f29cdb47da5003469a85bbfb9c</id>
<content type='text'>
The second argument was only used by the USB gadget code, yet everyone
pays the overhead of passing a zero to be passed into aio, where it
ends up being part of the aio res2 value.

Now that everybody is passing in zero, kill off the extra argument.

Reviewed-by: Darrick J. Wong &lt;djwong@kernel.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>iomap: Add done_before argument to iomap_dio_rw</title>
<updated>2021-10-24T13:26:05Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2021-07-24T10:26:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4fdccaa0d184c202f98d73b24e3ec8eeee88ab8d'/>
<id>urn:sha1:4fdccaa0d184c202f98d73b24e3ec8eeee88ab8d</id>
<content type='text'>
Add a done_before argument to iomap_dio_rw that indicates how much of
the request has already been transferred.  When the request succeeds, we
report that done_before additional bytes were tranferred.  This is
useful for finishing a request asynchronously when part of the request
has already been completed synchronously.

We'll use that to allow iomap_dio_rw to be used with page faults
disabled: when a page fault occurs while submitting a request, we
synchronously complete the part of the request that has already been
submitted.  The caller can then take care of the page fault and call
iomap_dio_rw again for the rest of the request, passing in the number of
bytes already tranferred.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Reviewed-by: Darrick J. Wong &lt;djwong@kernel.org&gt;
</content>
</entry>
<entry>
<title>iomap: Support partial direct I/O on user copy failures</title>
<updated>2021-10-24T13:26:05Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2021-07-22T23:59:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=97308f8b0d867e9ef59528cd97f0db55ffdf5651'/>
<id>urn:sha1:97308f8b0d867e9ef59528cd97f0db55ffdf5651</id>
<content type='text'>
In iomap_dio_rw, when iomap_apply returns an -EFAULT error and the
IOMAP_DIO_PARTIAL flag is set, complete the request synchronously and
return a partial result.  This allows the caller to deal with the page
fault and retry the remainder of the request.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Reviewed-by: Darrick J. Wong &lt;djwong@kernel.org&gt;
</content>
</entry>
<entry>
<title>iomap: Fix iomap_dio_rw return value for user copies</title>
<updated>2021-10-24T13:26:05Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2021-07-15T20:31:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=42c498c18a94eed79896c50871889af52fa0822e'/>
<id>urn:sha1:42c498c18a94eed79896c50871889af52fa0822e</id>
<content type='text'>
When a user copy fails in one of the helpers of iomap_dio_rw, fail with
-EFAULT instead of returning 0.  This matches what iomap_dio_bio_actor
returns when it gets an -EFAULT from bio_iov_iter_get_pages.  With these
changes, iomap_dio_actor now consistently fails with -EFAULT when a user
page cannot be faulted in.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Reviewed-by: Darrick J. Wong &lt;djwong@kernel.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>block: add a struct io_comp_batch argument to fops-&gt;iopoll()</title>
<updated>2021-10-18T20:40:40Z</updated>
<author>
<name>Jens Axboe</name>
</author>
<published>2021-10-12T15:24:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a72e899ceb465d731c413d57c6c12cdbf88303c'/>
<id>urn:sha1:5a72e899ceb465d731c413d57c6c12cdbf88303c</id>
<content type='text'>
struct io_comp_batch contains a list head and a completion handler, which
will allow completions to more effciently completed batches of IO.

For now, no functional changes in this patch, we just define the
io_comp_batch structure and add the argument to the file_operations iopoll
handler.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>iov_iter: Turn iov_iter_fault_in_readable into fault_in_iov_iter_readable</title>
<updated>2021-10-18T14:35:06Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2021-08-02T12:54:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a6294593e8a1290091d0b078d5d33da5e0cd3dfe'/>
<id>urn:sha1:a6294593e8a1290091d0b078d5d33da5e0cd3dfe</id>
<content type='text'>
Turn iov_iter_fault_in_readable into a function that returns the number
of bytes not faulted in, similar to copy_to_user, instead of returning a
non-zero value when any of the requested pages couldn't be faulted in.
This supports the existing users that require all pages to be faulted in
as well as new users that are happy if any pages can be faulted in.

Rename iov_iter_fault_in_readable to fault_in_iov_iter_readable to make
sure this change doesn't silently break things.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: switch polling to be bio based</title>
<updated>2021-10-18T12:17:36Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2021-10-12T11:12:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3e08773c3841e9db7a520908cc2b136a77d275ff'/>
<id>urn:sha1:3e08773c3841e9db7a520908cc2b136a77d275ff</id>
<content type='text'>
Replace the blk_poll interface that requires the caller to keep a queue
and cookie from the submissions with polling based on the bio.

Polling for the bio itself leads to a few advantages:

 - the cookie construction can made entirely private in blk-mq.c
 - the caller does not need to remember the request_queue and cookie
   separately and thus sidesteps their lifetime issues
 - keeping the device and the cookie inside the bio allows to trivially
   support polling BIOs remapping by stacking drivers
 - a lot of code to propagate the cookie back up the submission path can
   be removed entirely.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Mark Wunderlich &lt;mark.wunderlich@intel.com&gt;
Link: https://lore.kernel.org/r/20211012111226.760968-15-hch@lst.de
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
