Lines Matching +full:sub +full:- +full:sampled

1 .. SPDX-License-Identifier: GPL-2.0
35 linked lists of buffer heads instead of the per-folio bitmaps that iomap
42 -----------------------------------
61 --------------------------
63 The ``->iomap_begin`` function for pagecache operations may set the
67 .. code-block:: c
79 - ``get_folio``: Called to allocate and return an active reference to
83 This could be used to `set up per-folio filesystem state
84 <https://lore.kernel.org/all/20190429220934.10415-5-agruenba@redhat.com/>`_
87 - ``put_folio``: Called to unlock and put a folio after a pagecache
91 This could be used to `commit per-folio filesystem state
92 <https://lore.kernel.org/all/20180619164137.13720-6-hch@lst.de/>`_
93 that was set up by ``->get_folio``.
95 - ``iomap_valid``: The filesystem may not hold locks between
96 ``->iomap_begin`` and ``->iomap_end`` because pagecache operations
98 for memory reclamation, or engage in other time-consuming actions.
102 <https://lore.kernel.org/all/20221123055812.747923-8-david@fromorbit.com/>`_
115 ``->iomap_valid`` function to decide if the mapping is still valid.
116 If the mapping is not valid, the mapping will be sampled again.
119 ``->iomap_begin`` function may set ``struct iomap::validity_cookie``
124 iomap::validity_cookie`` during ``->iomap_begin``.
127 ``->iomap_valid``, then the iomap should considered stale and the
134 Internal per-Folio State
135 ------------------------
144 tracks the per-fsblock uptodate and dirty state itself.
146 <https://lore.kernel.org/all/20230725122932.144426-1-ritesh.list@gmail.com/>`_
157 * ``dirty``: iomap will set the per-block dirty state when programs
165 because there is only one per folio, and the per-fsblock overhead is two
172 ----------------------------
177 The ``flags`` argument to ``->iomap_begin`` will be set to zero.
182 ---------------
187 the ``flags`` argument to ``->iomap_begin``.
197 to ``->iomap_begin``.
207 <https://lore.kernel.org/all/20221123055812.747923-6-david@fromorbit.com/>`_
209 <https://lore.kernel.org/linux-xfs/20220817093627.GZ3600936@dread.disaster.area/>`_
212 ``->iomap_end`` function to find all the clean areas of the folios
227 pagecache for non-truncation file operations that are not aligned to
230 ``->iomap_begin``.
241 to ``->iomap_begin``.
246 ----------
254 ``->iomap_begin``.
259 -------------------
272 ``->map_blocks`` machinery described below even if the writeback fails.
274 ``-EIO`` is recorded for userspace to collect via ``fsync``.
281 .. code-block:: c
292 - ``map_blocks``: Sets ``wpc->iomap`` to the space mapping of the file
296 <https://lore.kernel.org/all/20231207072710.176093-15-hch@lst.de/>`_
298 Do not return ``IOMAP_INLINE`` mappings here; the ``->iomap_end``
304 This revalidation must be open-coded by the filesystem; it is
309 - ``prepare_ioend``: Enables filesystems to transform the writeback
312 This might include pre-write space accounting updates, or installing
313 a custom ``->bi_end_io`` function for internal purposes, such as
318 - ``discard_folio``: iomap calls this function after ``->map_blocks``
322 The folio will be marked clean and an ``-EIO`` recorded in the
325 <https://lore.kernel.org/all/20201029163313.1766967-1-bfoster@redhat.com/>`_
344 extent conversions) should provide a ``->prepare_ioend`` function to
351 <https://lore.kernel.org/all/20220120034733.221737-1-david@fromorbit.com/>`_
352 for post-writeback updates by batching them.
382 .. code-block:: c
410 or fail with ``-EAGAIN``.
419 sub-block zeroing safely.
422 <https://lore.kernel.org/linux-ext4/20230314130759.642710-1-bfoster@redhat.com/>`_
424 <https://lore.kernel.org/linux-ext4/20230810165559.946222-1-bfoster@redhat.com/>`_.
451 Filesystems should call ``iomap_dio_rw`` from ``->read_iter`` and
452 ``->write_iter``, and set ``FMODE_CAN_ODIRECT`` in the ``->open``
454 They should not set ``->direct_IO``, which is deprecated.
463 -------------
467 * A non-negative number of bytes transferred.
469 * ``-ENOTBLK``: Fall back to buffered I/O.
472 The ``->iomap_begin`` or ``->iomap_end`` functions may also return
475 * ``-EIOCBQUEUED``: The asynchronous direct I/O request has been
481 ------------
487 The ``flags`` value for ``->iomap_begin`` will be ``IOMAP_DIRECT`` with
496 -------------
503 The ``flags`` value for ``->iomap_begin`` will be ``IOMAP_DIRECT |
520 -------------------------
521 .. code-block:: c
533 - ``submit_io``: iomap calls this function when it has constructed a
540 - ``end_io``: This is called after the ``struct bio`` completes.
541 This function should perform post-write conversions of unwritten
551 - ``bio_set``: This allows the filesystem to provide a custom bio_set
553 This enables filesystems to `stash additional per-bio information
554 <https://lore.kernel.org/all/20220505201115.937837-3-hch@lst.de/>`_
559 should set a custom ``->bi_end_io`` function via ``->submit_io``.
571 -----------
575 The ``flags`` value for ``->iomap_begin`` will be ``IOMAP_DAX`` with any
584 ------------
588 The ``flags`` value for ``->iomap_begin`` will be ``IOMAP_DAX |
600 mapping operation with ``-EAGAIN``.
611 ``flags`` argument to ``->iomap_begin``.
613 passed as the ``flags`` argument to ``->iomap_begin``.
619 ------------------------------------------
623 The ``flags`` argument to ``->iomap_begin`` are the same as the
634 -------------------
646 ---------
651 ``->iomap_begin``.
661 ---------
666 ``->iomap_begin``.
678 The ``iomap_swapfile_activate`` function finds all the base-page aligned
682 ``->iomap_begin``.
694 -------------
699 ``->iomap_begin``.
704 -------------------