Lines Matching +full:lock +full:- +full:offset
1 .. SPDX-License-Identifier: GPL-2.0
31 The iteration can involve mappings of file's logical offset ranges to
78 1. Obtain a space mapping via ``->iomap_begin``
80 2. For each sub-unit of work...
89 4. Release the mapping via ``->iomap_end``, if necessary
105 -----------
120 Processes wishing to insert folios must hold this lock in shared
122 Processes wishing to remove folios must hold this lock in exclusive
126 * ``dax_read_lock``: The RCU read lock that dax takes to prevent a
127 device pre-shutdown hook from returning before other threads have
130 * **filesystem mapping lock**: This synchronization primitive is
134 happen; it does not need to be an actual lock.
136 * **iomap internal operation lock**: This is a general term for
139 A specific example would be taking the folio lock while reading or
152 ----------------
158 .. code-block:: c
162 loff_t offset;
176 * ``offset`` and ``length`` describe the range of file offsets, in
193 ``->iomap_end`` function must delete the reservation.
212 For write operation, the ``->iomap_end`` function presumably
217 These flags should be set by the filesystem in ``->iomap_begin``:
250 The filesystem should supply an ``->iomap_end`` function if it needs
257 iomap will call ``->iomap_end`` on this mapping and then
258 ``->iomap_begin`` to obtain a new mapping.
275 * ``private`` is a pointer to `filesystem-private information
276 <https://lore.kernel.org/all/20180619164137.13720-7-hch@lst.de/>`_.
277 This value will be passed unchanged to ``->iomap_end``.
285 should not be held between ``->iomap_begin`` and ``->iomap_end``.
291 --------------------
296 .. code-block:: c
308 ``->iomap_begin``
311 iomap operations call ``->iomap_begin`` to obtain one file mapping for
321 operation-specific sections below.
329 memory-like storage.
334 This is similar in intent to ``O_NONBLOCK`` for network APIs - it is
350 then they should return ``-EAGAIN`` as early as possible rather than
356 <https://lore.kernel.org/all/20191008071527.29304-9-hch@lst.de/>`_
362 ``->iomap_end``
365 After the operation completes, the ``->iomap_end`` function, if present,
368 context that were set up in ``->iomap_begin``.
373 ``flags`` will contain the same value passed to ``->iomap_begin``.
398 but is often a VFS inode, pagecache invalidation, or folio lock.
402 Pagecache writeback may lock a folio to prevent other threads from
406 ``->iomap_begin`` and ``->iomap_end`` functions to coordinate
424 then grab and lock a folio to copy new contents.
425 It may also lock an internal folio state object to update metadata.
439 * Does iomap *actually* work for non-regular file data?