Lines Matching +full:d +full:- +full:cache +full:- +full:block +full:- +full:size
6 ----------
8 The page cache is usually used to buffer reads and writes to files.
12 For block devices that are memory-like, the page cache pages would be
19 -----
21 If you have a block device which supports `DAX`, you can make a filesystem
22 on it as usual. The `DAX` code currently only supports files with a block
23 size equal to your kernel's `PAGE_SIZE`, so you may need to specify a block
24 size when creating the filesystem.
30 ------------------------------
32 When mounting the filesystem, use the ``-o dax`` option on the command line or
34 within the filesystem. It is equivalent to the ``-o dax=always`` behavior below.
38 ----------------------------
41 -------
43 1. There exists an in-kernel file access mode flag `S_DAX` that corresponds to
61 ``-o dax=inode`` means "follow `FS_XFLAG_DAX`" and is the default.
63 ``-o dax=never`` means "never set `S_DAX`, ignore `FS_XFLAG_DAX`."
65 ``-o dax=always`` means "always set `S_DAX` ignore `FS_XFLAG_DAX`."
67 ``-o dax`` is a legacy option which is an alias for ``dax=always``.
71 The option ``-o dax`` may be removed in the future so ``-o dax=always`` is
78 in-core inode state (`S_DAX`) will be overridden until the filesystem is
98 -------
100 There are 2 per-file dax flags. One is a persistent inode setting (`FS_XFLAG_DAX`)
111 sub-tree.
117 .. code-block:: shell
119 mkdir -p a/b/c
120 xfs_io -c 'chattr +x' a
121 mkdir a/b/c/d
124 ------[outcome]------
127 no dax: b,c,d
131 .. code-block:: shell
134 xfs_io -c 'chattr +x' a
135 mkdir -p a/b/c/d
137 ------[outcome]------
139 dax: a,b,c,d
144 .. code-block:: shell
146 mkdir -p a/b/c
147 xfs_io -c 'chattr +x' c
148 mkdir a/b/c/d
150 ------[outcome]------
152 dax: c,d
172 ----------------------------
174 except that when '-o dax=inode' is specified, virtiofs client derives the hint
187 Implementation Tips for Block Driver Writers
188 --------------------------------------------
190 To support `DAX` in your block driver, implement the 'direct_access'
191 block device operation. It is used to translate the sector number
192 (expressed in units of 512-byte sectors) to a page frame number (pfn)
196 The direct_access method takes a 'size' parameter that indicates the
201 In order to support this method, the storage must be byte-accessible by
208 These block devices may be used for inspiration:
209 - brd: RAM backed block device driver
210 - dcssblk: s390 dcss block device driver
211 - pmem: NVDIMM persistent memory driver
215 ------------------------------------------
221 * Implementing ->read_iter and ->write_iter operations which use
227 appropriate fault size and iomap operations.
245 xfs: see Documentation/admin-guide/xfs.rst
253 ---------------------
256 each pmem block device (in gendisk->badblocks). If we fault at such location,
271 2. Truncate or hole-punch the part of the file that has a bad-block (at least
272 an entire aligned sector has to be hole-punched, but not necessarily an
273 entire filesystem block).
278 provided at the block layer through DM, or additionally, at the filesystem
285 ------------
288 `DAX` on a block device that supports `DAX`, they will still be copied into RAM.
299 those memory ranges from a non-`DAX` file will fail