]>
Commit | Line | Data |
---|---|---|
e246ba5f NS |
1 | .TH xfs_io 8 |
2 | .SH NAME | |
48c46ee3 | 3 | xfs_io \- debug the I/O path of an XFS filesystem |
e246ba5f | 4 | .SH SYNOPSIS |
2017d0d0 BN |
5 | .B xfs_io |
6 | [ | |
da2b3c09 | 7 | .B \-adfmrRstxT |
2017d0d0 BN |
8 | ] [ |
9 | .B \-c | |
10 | .I cmd | |
11 | ] ... [ | |
12 | .B \-p | |
13 | .I prog | |
14 | ] | |
15 | .I file | |
eaa6a2bf ES |
16 | .br |
17 | .B xfs_io \-V | |
e246ba5f | 18 | .SH DESCRIPTION |
2017d0d0 BN |
19 | .B xfs_io |
20 | is a debugging tool like | |
21 | .BR xfs_db (8), | |
22 | but is aimed at examining the regular file I/O paths rather than the | |
23 | raw XFS volume itself. | |
7289a92c NS |
24 | These code paths include not only the obvious read/write/mmap interfaces |
25 | for manipulating files, but also cover all of the XFS extensions (such | |
26 | as space preallocation, additional inode flags, etc). | |
2017d0d0 BN |
27 | .SH OPTIONS |
28 | .TP 1.0i | |
29 | .BI \-c " cmd" | |
30 | .B xfs_io | |
31 | commands may be run interactively (the default) or as arguments on | |
32 | the command line. Multiple | |
33 | .B \-c | |
34 | arguments may be given. The commands are run in the sequence given, | |
35 | then the program exits. | |
36 | .TP | |
37 | .BI \-p " prog" | |
e246ba5f | 38 | Set the program name for prompts and some error messages, |
2017d0d0 BN |
39 | the default value is |
40 | .BR xfs_io . | |
e246ba5f | 41 | .TP |
2017d0d0 BN |
42 | .B \-f |
43 | Create | |
44 | .I file | |
45 | if it does not already exist. | |
f72d20ad | 46 | .TP |
2017d0d0 BN |
47 | .B \-r |
48 | Open | |
49 | .I file | |
9ef5a52e BN |
50 | read-only, initially. This is required if |
51 | .I file | |
52 | is immutable or append-only. | |
48c46ee3 | 53 | .TP |
2017d0d0 BN |
54 | .B \-x |
55 | Expert mode. Dangerous commands are only available in this mode. | |
48c46ee3 | 56 | These commands also tend to require additional privileges. |
eaa6a2bf ES |
57 | .TP |
58 | .B \-V | |
59 | Prints the version number and exits. | |
48c46ee3 | 60 | .PP |
2017d0d0 BN |
61 | The other |
62 | .BR open (2) | |
63 | options described below are also available from the command line. | |
e246ba5f | 64 | .SH CONCEPTS |
2017d0d0 BN |
65 | .B xfs_io |
66 | maintains a number of open files and memory mappings. | |
48c46ee3 NS |
67 | Files can be initially opened on the command line (optionally), |
68 | and additional files can also be opened later. | |
69 | .PP | |
2017d0d0 BN |
70 | .B xfs_io |
71 | commands can be broken up into three groups. | |
48c46ee3 NS |
72 | Some commands are aimed at doing regular file I/O - read, write, |
73 | sync, space preallocation, etc. | |
74 | .PP | |
75 | The second set of commands exist for manipulating memory mapped regions | |
76 | of a file - mapping, accessing, storing, unmapping, flushing, etc. | |
e246ba5f | 77 | .PP |
48c46ee3 NS |
78 | The remaining commands are for the navigation and display of data |
79 | structures relating to the open files, mappings, and the filesystems | |
80 | where they reside. | |
e246ba5f | 81 | .PP |
2017d0d0 BN |
82 | Many commands have extensive online help. Use the |
83 | .B help | |
84 | command for more details on any command. | |
48c46ee3 | 85 | .SH FILE I/O COMMANDS |
c0211f67 | 86 | .TP |
2017d0d0 | 87 | .BI "file [ " N " ]" |
c0211f67 NS |
88 | Display a list of all open files and (optionally) switch to an alternate |
89 | current open file. | |
2017d0d0 | 90 | .TP |
da2b3c09 | 91 | .BI "open [[ \-acdfrstRT ] " path " ]" |
2017d0d0 BN |
92 | Closes the current file, and opens the file specified by |
93 | .I path | |
94 | instead. Without any arguments, displays statistics about the current | |
95 | file \- see the | |
96 | .B stat | |
97 | command. | |
98 | .RS 1.0i | |
99 | .PD 0 | |
100 | .TP 0.4i | |
2017d0d0 BN |
101 | .B \-a |
102 | opens append-only (O_APPEND). | |
103 | .TP | |
104 | .B \-d | |
105 | opens for direct I/O (O_DIRECT). | |
106 | .TP | |
107 | .B \-f | |
108 | creates the file if it doesn't already exist (O_CREAT). | |
109 | .TP | |
110 | .B \-r | |
111 | opens read-only (O_RDONLY). | |
112 | .TP | |
113 | .B \-s | |
114 | opens for synchronous I/O (O_SYNC). | |
115 | .TP | |
116 | .B \-t | |
117 | truncates on open (O_TRUNC). | |
118 | .TP | |
eaa6a2bf ES |
119 | .B \-n |
120 | opens in non-blocking mode if possible (O_NONBLOCK). | |
121 | .TP | |
da2b3c09 CH |
122 | .B \-T |
123 | create a temporary file not linked into the filesystem namespace | |
124 | (O_TMPFILE). The pathname passed must refer to a directory which | |
125 | is treated as virtual parent for the newly created invisible file. | |
126 | Can not be used together with the | |
127 | .B \-r | |
128 | option. | |
129 | .TP | |
2017d0d0 BN |
130 | .B \-R |
131 | marks the file as a realtime XFS file after | |
e246ba5f | 132 | opening it, if it is not already marked as such. |
2017d0d0 BN |
133 | .PD |
134 | .RE | |
e246ba5f | 135 | .TP |
2017d0d0 BN |
136 | .B o |
137 | See the | |
138 | .B open | |
139 | command. | |
48c46ee3 | 140 | .TP |
2017d0d0 | 141 | .B close |
48c46ee3 NS |
142 | Closes the current open file, marking the next open file as current |
143 | (if one exists). | |
144 | .TP | |
2017d0d0 BN |
145 | .B c |
146 | See the | |
147 | .B close | |
148 | command. | |
149 | .TP | |
e115d3b2 | 150 | .BI "pread [ \-b " bsize " ] [ \-v ] [ \-FBR [ \-Z " seed " ] ] [ \-V " vectors " ] " "offset length" |
2017d0d0 BN |
151 | Reads a range of bytes in a specified blocksize from the given |
152 | .IR offset . | |
153 | .RS 1.0i | |
154 | .PD 0 | |
155 | .TP 0.4i | |
156 | .B \-b | |
157 | can be used to set the blocksize into which the | |
158 | .BR read (2) | |
159 | requests will be split. The default blocksize is 4096 bytes. | |
160 | .TP | |
161 | .B \-v | |
162 | dump the contents of the buffer after reading, | |
e246ba5f | 163 | by default only the count of bytes actually read is dumped. |
e115d3b2 DC |
164 | .TP |
165 | .B \-F | |
166 | read the buffers in a forwards sequential direction. | |
167 | .TP | |
168 | .B \-B | |
169 | read the buffers in a reserve sequential direction. | |
170 | .TP | |
171 | .B \-R | |
172 | read the buffers in the give range in a random order. | |
173 | .TP | |
174 | .B \-Z seed | |
175 | specify the random number seed used for random reads. | |
176 | .TP | |
177 | .B \-V vectors | |
178 | Use the vectored IO read syscall | |
179 | .BR preadv (2) | |
180 | with a number of blocksize length iovecs. The number of iovecs is set by the | |
181 | .I vectors | |
182 | parameter. | |
2017d0d0 BN |
183 | .PD |
184 | .RE | |
e246ba5f | 185 | .TP |
2017d0d0 BN |
186 | .B r |
187 | See the | |
188 | .B pread | |
189 | command. | |
48c46ee3 | 190 | .TP |
10899f17 | 191 | .BI "pwrite [ \-i " file " ] [ \-d ] [ \-s " skip " ] [ \-b " size " ] [ \-S " seed " ] [ \-FBR [ \-Z " zeed " ] ] [ \-wW ] [ \-V " vectors " ] " "offset length" |
2017d0d0 BN |
192 | Writes a range of bytes in a specified blocksize from the given |
193 | .IR offset . | |
e246ba5f NS |
194 | The bytes written can be either a set pattern or read in from another |
195 | file before writing. | |
2017d0d0 BN |
196 | .RS 1.0i |
197 | .PD 0 | |
198 | .TP 0.4i | |
199 | .B \-i | |
200 | allows an input | |
201 | .I file | |
202 | to be specified as the source of the data to be written. | |
203 | .TP | |
204 | .B \-d | |
205 | causes direct I/O, rather than the usual buffered | |
48c46ee3 | 206 | I/O, to be used when reading the input file. |
2017d0d0 BN |
207 | .TP |
208 | .B \-s | |
209 | specifies the number of bytes to | |
210 | .I skip | |
211 | from the start of the input file before starting to read. | |
212 | .TP | |
213 | .B \-b | |
214 | used to set the blocksize into which the | |
215 | .BR write (2) | |
216 | requests will be split. The default blocksize is 4096 bytes. | |
217 | .TP | |
218 | .B \-S | |
219 | used to set the (repeated) fill pattern which | |
e246ba5f NS |
220 | is used when the data to write is not coming from a file. |
221 | The default buffer fill pattern value is 0xcdcdcdcd. | |
10899f17 DC |
222 | .TP |
223 | .B \-F | |
224 | write the buffers in a forwards sequential direction. | |
225 | .TP | |
226 | .B \-B | |
227 | write the buffers in a reserve sequential direction. | |
228 | .TP | |
229 | .B \-R | |
230 | write the buffers in the give range in a random order. | |
231 | .TP | |
232 | .B \-Z seed | |
233 | specify the random number seed used for random write | |
234 | .TP | |
235 | .B \-w | |
236 | call | |
237 | .BR fdatasync (2) | |
238 | once all writes are complete (included in timing results) | |
239 | .TP | |
240 | .B \-W | |
241 | call | |
242 | .BR fsync (2) | |
243 | once all writes are complete (included in timing results) | |
244 | .TP | |
245 | .B \-V vectors | |
246 | Use the vectored IO write syscall | |
247 | .BR pwritev (2) | |
248 | with a number of blocksize length iovecs. The number of iovecs is set by the | |
249 | .I vectors | |
250 | parameter. | |
2017d0d0 BN |
251 | .RE |
252 | .PD | |
e246ba5f | 253 | .TP |
2017d0d0 BN |
254 | .B w |
255 | See the | |
256 | .B pwrite | |
257 | command. | |
e246ba5f | 258 | .TP |
2017d0d0 BN |
259 | .BI "bmap [ \-adlpv ] [ \-n " nx " ]" |
260 | Prints the block mapping for the current open file. Refer to the | |
261 | .BR xfs_bmap (8) | |
262 | manual page for complete documentation. | |
e246ba5f | 263 | .TP |
83c32408 ES |
264 | .BI "fiemap [ \-alv ] [ \-n " nx " ]" |
265 | Prints the block mapping for the current open file using the fiemap | |
266 | ioctl. Options behave as described in the | |
267 | .BR xfs_bmap (8) | |
268 | manual page. | |
269 | .TP | |
2017d0d0 | 270 | .BI "extsize [ \-R | \-D ] [ " value " ]" |
54d46c1c | 271 | Display and/or modify the preferred extent size used when allocating |
2017d0d0 BN |
272 | space for the currently open file. If the |
273 | .B \-R | |
274 | option is specified, a recursive descent is performed | |
275 | for all directory entries below the currently open file | |
276 | .RB ( \-D | |
277 | can be used to restrict the output to directories only). | |
54d46c1c NS |
278 | If the target file is a directory, then the inherited extent size |
279 | is set for that directory (new files created in that directory | |
280 | inherit that extent size). | |
2017d0d0 BN |
281 | The |
282 | .I value | |
283 | should be specified in bytes, or using one of the usual units suffixes | |
284 | (k, m, g, b, etc). The extent size is always reported in units of bytes. | |
285 | .TP | |
286 | .BI "allocsp " size " 0" | |
287 | Sets the size of the file to | |
288 | .I size | |
289 | and zeroes any additional space allocated using the | |
290 | XFS_IOC_ALLOCSP/XFS_IOC_FREESP system call described in the | |
291 | .BR xfsctl (3) | |
292 | manual page. | |
293 | .B allocsp | |
294 | and | |
295 | .B freesp | |
296 | do exactly the same thing. | |
297 | .TP | |
298 | .BI "freesp " size " 0" | |
299 | See the | |
300 | .B allocsp | |
301 | command. | |
302 | .TP | |
303 | .BI "fadvise [ \-r | \-s | [[ \-d | \-n | \-w ] " "offset length " ]] | |
48c46ee3 NS |
304 | On platforms which support it, allows hints be given to the system |
305 | regarding the expected I/O patterns on the file. | |
2017d0d0 BN |
306 | The range arguments are required by some advise commands ([*] below), and |
307 | the others must have no range arguments. | |
308 | With no arguments, the POSIX_FADV_NORMAL advice is implied (default readahead). | |
309 | .RS 1.0i | |
310 | .PD 0 | |
311 | .TP 0.4i | |
312 | .B \-d | |
313 | the data will not be accessed again in the near future (POSIX_FADV_DONTNEED[*]). | |
314 | .TP | |
315 | .B \-n | |
316 | data will be accessed once and not be reused (POSIX_FADV_NOREUSE[*]). | |
317 | .TP | |
318 | .B \-r | |
319 | expect access to data in random order (POSIX_FADV_RANDOM), which sets readahead to zero. | |
320 | .TP | |
321 | .B \-s | |
322 | expect access to data in sequential order (POSIX_FADV_SEQUENTIAL), | |
323 | which doubles the default readahead on the file. | |
324 | .TP | |
325 | .B \-w | |
326 | advises the specified data will be needed again (POSIX_FADV_WILLNEED[*]) | |
327 | which forces the maximum readahead. | |
328 | .RE | |
329 | .PD | |
330 | .TP | |
331 | .B fdatasync | |
332 | Calls | |
333 | .BR fdatasync (2) | |
334 | to flush the file's in-core data to disk. | |
335 | .TP | |
336 | .B fsync | |
337 | Calls | |
338 | .BR fsync (2) | |
339 | to flush all in-core file state to disk. | |
340 | .TP | |
341 | .B s | |
342 | See the | |
343 | .B fsync | |
344 | command. | |
345 | .TP | |
a278c389 DC |
346 | .BI "sync_range [ \-a | \-b | \-w ] offset length " |
347 | On platforms which support it, allows control of syncing a range of the file to | |
348 | disk. With no options, SYNC_FILE_RANGE_WRITE is implied on the range supplied. | |
349 | .RS 1.0i | |
350 | .PD 0 | |
351 | .TP 0.4i | |
352 | .B \-a | |
353 | wait for IO in the given range to finish after writing | |
354 | (SYNC_FILE_RANGE_WAIT_AFTER). | |
355 | .TP | |
356 | .B \-b | |
357 | wait for IO in the given range to finish before writing | |
358 | (SYNC_FILE_RANGE_WAIT_BEFORE). | |
359 | .TP | |
360 | .B \-w | |
361 | start writeback of dirty data in the given range (SYNC_FILE_RANGE_WRITE). | |
362 | .RE | |
363 | .PD | |
364 | .TP | |
c7dd81c7 ES |
365 | .B sync |
366 | Calls | |
367 | .BR sync (2) | |
368 | to flush all filesystems' in-core data to disk. | |
369 | .TP | |
370 | .B syncfs | |
371 | Calls | |
372 | .BR syncfs (2) | |
373 | to flush this filesystem's in-core data to disk. | |
374 | .TP | |
2017d0d0 BN |
375 | .BI resvsp " offset length" |
376 | Allocates reserved, unwritten space for part of a file using the | |
377 | XFS_IOC_RESVSP system call described in the | |
378 | .BR xfsctl (3) | |
379 | manual page. | |
380 | .TP | |
381 | .BI unresvsp " offset length" | |
e246ba5f | 382 | Frees reserved space for part of a file using the XFS_IOC_UNRESVSP |
2017d0d0 BN |
383 | system call described in the |
384 | .BR xfsctl (3) | |
385 | manual page. | |
e246ba5f | 386 | .TP |
c0b5232a ES |
387 | .BI "falloc [ \-k ]" " offset length" |
388 | Allocates reserved, unwritten space for part of a file using the | |
389 | fallocate routine as described in the | |
83c32408 | 390 | .BR fallocate (2) |
c0b5232a ES |
391 | manual page. |
392 | .RS 1.0i | |
393 | .PD 0 | |
394 | .TP 0.4i | |
395 | .B \-k | |
396 | will set the FALLOC_FL_KEEP_SIZE flag as described in | |
83c32408 | 397 | .BR fallocate (2). |
c0b5232a ES |
398 | .PD |
399 | .RE | |
400 | .TP | |
ca692f16 NJ |
401 | .BI fcollapse " offset length" |
402 | Call fallocate with FALLOC_FL_COLLAPSE_RANGE flag as described in the | |
403 | .BR fallocate (2) | |
404 | manual page to de-allocates blocks and eliminates the hole created in this process | |
405 | by shifting data blocks into the hole. | |
406 | .TP | |
83c32408 ES |
407 | .BI fpunch " offset length" |
408 | Punches (de-allocates) blocks in the file by calling fallocate with | |
409 | the FALLOC_FL_PUNCH_HOLE flag as described in the | |
410 | .BR fallocate (2) | |
411 | manual page. | |
412 | .TP | |
938904c4 LC |
413 | .BI fzero " offset length" |
414 | Call fallocate with FALLOC_FL_ZERO_RANGE flag as described in the | |
415 | .BR fallocate (2) | |
416 | manual page to allocate and zero blocks within the range. | |
417 | .TP | |
2017d0d0 BN |
418 | .BI truncate " offset" |
419 | Truncates the current file at the given offset using | |
420 | .BR ftruncate (2). | |
c0211f67 | 421 | .TP |
2017d0d0 | 422 | .BI "sendfile \-i " srcfile " | \-f " N " [ " "offset length " ] |
c0211f67 | 423 | On platforms which support it, allows a direct in-kernel copy between |
2017d0d0 BN |
424 | two file descriptors. The current open file is the target, the source |
425 | must be specified as another open file | |
426 | .RB ( \-f ) | |
427 | or by path | |
428 | .RB ( \-i ). | |
3bc05641 BF |
429 | .TP |
430 | .BI "readdir [ -v ] [ -o " offset " ] [ -l " length " ] " | |
431 | Read a range of directory entries from a given offset of a directory. | |
432 | .RS 1.0i | |
433 | .PD 0 | |
434 | .TP 0.4i | |
435 | .B \-v | |
436 | verbose mode - dump dirent content as defined in | |
437 | .BR readdir (3) | |
438 | .TP | |
439 | .B \-o | |
440 | specify starting | |
441 | .I offset | |
442 | .TP | |
443 | .B \-l | |
444 | specify total | |
445 | .I length | |
446 | to read (in bytes) | |
447 | .RE | |
448 | .PD | |
449 | .TP | |
b169249b MT |
450 | .TP |
451 | .BI "seek \-a | \-d | \-h [ \-r ] [ \-s ] offset" | |
452 | On platforms that support the | |
453 | .BR lseek (2) | |
454 | .B SEEK_DATA | |
455 | and | |
456 | .B SEEK_HOLE | |
457 | options, display the offsets of the specified segments. | |
458 | .RS 1.0i | |
459 | .PD 0 | |
460 | .TP 0.4i | |
461 | .B \-a | |
462 | Display both | |
463 | .B data | |
464 | and | |
465 | .B hole | |
466 | segments starting at the specified | |
467 | .B offset. | |
468 | .TP | |
469 | .B \-d | |
470 | Display the | |
471 | .B data | |
472 | segment starting at the specified | |
473 | .B offset. | |
474 | .TP | |
475 | .B \-h | |
476 | Display the | |
477 | .B hole | |
478 | segment starting at the specified | |
479 | .B offset. | |
480 | .TP | |
481 | .B \-r | |
482 | Recursively display all the specified segments starting at the specified | |
483 | .B offset. | |
484 | .TP | |
485 | .B \-s | |
486 | Display the starting lseek(2) offset. This offset will be a calculated value when | |
487 | both data and holes are displayed together or performing a recusively display. | |
488 | .TP | |
48c46ee3 NS |
489 | |
490 | .SH MEMORY MAPPED I/O COMMANDS | |
491 | .TP | |
2017d0d0 BN |
492 | .BI "mmap [ " N " | [[ \-rwx ] " "offset length " ]] |
493 | With no arguments, | |
494 | .B mmap | |
495 | shows the current mappings. Specifying a single numeric argument | |
496 | .I N | |
497 | sets the current mapping. If two arguments are specified (a range specified by | |
498 | .I offset | |
499 | and | |
500 | .IR length ), | |
501 | a new mapping is created spanning the range, and the protection mode can | |
502 | be given as a combination of PROT_READ | |
503 | .RB ( \-r ), | |
504 | PROT_WRITE | |
505 | .RB ( \-w ), | |
506 | and PROT_EXEC | |
507 | .RB ( \-x ). | |
508 | .TP | |
509 | .B mm | |
510 | See the | |
511 | .B mmap | |
512 | command. | |
513 | .TP | |
4f20f6a3 ES |
514 | .BI "mremap [ \-f ] [ \-m ] " new_length |
515 | Changes the current mapping size to | |
516 | .IR new_length . | |
517 | Whether the mapping may be moved is controlled by the flags passed; | |
518 | MREMAP_FIXED | |
519 | .RB ( \-f ), | |
520 | or MREMAP_MAYMOVE | |
521 | .RB ( \-m ). | |
522 | .TP | |
523 | .B mrm | |
524 | See the | |
525 | .B mremap | |
526 | command. | |
527 | .TP | |
2017d0d0 | 528 | .B munmap |
48c46ee3 NS |
529 | Unmaps the current memory mapping. |
530 | .TP | |
2017d0d0 BN |
531 | .B mu |
532 | See the | |
533 | .B munmap | |
534 | command. | |
48c46ee3 | 535 | .TP |
2017d0d0 | 536 | .BI "mread [ \-f | \-v ] [ \-r ] [" " offset length " ] |
48c46ee3 | 537 | Accesses a segment of the current memory mapping, optionally dumping it to |
2017d0d0 BN |
538 | the standard output stream (with |
539 | .B \-v | |
540 | or | |
541 | .B \-f | |
542 | option) for inspection. The accesses are performed sequentially from the start | |
543 | .I offset | |
544 | by default, but can also be done from the end backwards through the | |
545 | mapping if the | |
546 | .B \-r | |
547 | option in specified. | |
548 | The two verbose modes differ only in the relative offsets they display, the | |
549 | .B \-f | |
550 | option is relative to file start, whereas | |
551 | .B \-v | |
552 | shows offsets relative to the start of the mapping. | |
553 | .TP | |
554 | .B mr | |
555 | See the | |
556 | .B mread | |
557 | command. | |
558 | .TP | |
559 | .BI "mwrite [ \-r ] [ \-S " seed " ] [ " "offset length " ] | |
48c46ee3 NS |
560 | Stores a byte into memory for a range within a mapping. |
561 | The default stored value is 'X', repeated to fill the range specified, | |
2017d0d0 BN |
562 | but this can be changed using the |
563 | .B \-S | |
564 | option. | |
48c46ee3 | 565 | The memory stores are performed sequentially from the start offset by default, |
2017d0d0 BN |
566 | but can also be done from the end backwards through the mapping if the |
567 | .B \-r | |
48c46ee3 NS |
568 | option in specified. |
569 | .TP | |
2017d0d0 BN |
570 | .B mw |
571 | See the | |
572 | .B mwrite | |
573 | command. | |
48c46ee3 | 574 | .TP |
2017d0d0 | 575 | .BI "msync [ \-i ] [ \-a | \-s ] [ " "offset length " ] |
48c46ee3 NS |
576 | Writes all modified copies of pages over the specified range (or entire |
577 | mapping if no range specified) to their backing storage locations. | |
2017d0d0 BN |
578 | Also, optionally invalidates |
579 | .RB ( \-i ) | |
580 | so that subsequent references to the pages will be obtained from their | |
581 | backing storage locations (instead of cached copies). | |
582 | The flush can be done synchronously | |
583 | .RB ( \-s) | |
584 | or asynchronously | |
585 | .RB ( \-a ). | |
586 | .TP | |
587 | .B ms | |
588 | See the | |
589 | .B msync | |
590 | command. | |
591 | .TP | |
592 | .BI "madvise [ \-d | \-r | \-s | \-w ] [ " "offset length " ] | |
48c46ee3 NS |
593 | Modifies page cache behavior when operating on the current mapping. |
594 | The range arguments are required by some advise commands ([*] below). | |
595 | With no arguments, the POSIX_MADV_NORMAL advice is implied (default readahead). | |
2017d0d0 BN |
596 | .RS 1.0i |
597 | .PD 0 | |
598 | .TP 0.4i | |
599 | .B \-d | |
600 | the pages will not be needed (POSIX_MADV_DONTNEED[*]). | |
601 | .TP | |
602 | .B \-r | |
603 | expect random page references (POSIX_MADV_RANDOM), which sets readahead to zero. | |
604 | .TP | |
605 | .B \-s | |
606 | expect sequential page references (POSIX_MADV_SEQUENTIAL), | |
607 | which doubles the default readahead on the file. | |
608 | .TP | |
609 | .B \-w | |
610 | advises the specified pages will be needed again (POSIX_MADV_WILLNEED[*]) | |
611 | which forces the maximum readahead. | |
612 | .RE | |
613 | .PD | |
614 | .TP | |
615 | .B mincore | |
48c46ee3 NS |
616 | Dumps a list of pages or ranges of pages that are currently in core, |
617 | for the current memory mapping. | |
618 | ||
619 | .SH OTHER COMMANDS | |
e246ba5f | 620 | .TP |
2017d0d0 | 621 | .B print |
48c46ee3 NS |
622 | Display a list of all open files and memory mapped regions. |
623 | The current file and current mapping are distinguishable from | |
624 | any others. | |
625 | .TP | |
2017d0d0 BN |
626 | .B p |
627 | See the | |
628 | .B print | |
629 | command. | |
630 | .TP | |
631 | .B quit | |
632 | Exit | |
633 | .BR xfs_io . | |
634 | .TP | |
635 | .B q | |
636 | See the | |
637 | .B quit | |
638 | command. | |
639 | .TP | |
640 | .BR lsattr " [ " \-R " | " \-D " | " \-a " | " \-v " ]" | |
641 | List extended inode flags on the currently open file. If the | |
642 | .B \-R | |
643 | option is specified, a recursive descent is performed | |
644 | for all directory entries below the currently open file | |
645 | .RB ( \-D | |
646 | can be used to restrict the output to directories only). | |
3392325d NS |
647 | This is a depth first descent, it does not follow symlinks and |
648 | it also does not cross mount points. | |
48c46ee3 | 649 | .TP |
2017d0d0 BN |
650 | .BR chattr " [ " \-R " | " \-D " ] [ " + / \-riasAdtPneEfS " ]" |
651 | Change extended inode flags on the currently open file. The | |
652 | .B \-R | |
653 | and | |
654 | .B \-D | |
655 | options have the same meaning as above. The mapping between each | |
656 | letter and the inode flags (refer to | |
657 | .BR xfsctl (3) | |
658 | for the full list) is available via the | |
659 | .B help | |
660 | command. | |
661 | .TP | |
662 | .B freeze | |
48c46ee3 NS |
663 | Suspend all write I/O requests to the filesystem of the current file. |
664 | Only available in expert mode and requires privileges. | |
665 | .TP | |
2017d0d0 | 666 | .B thaw |
48c46ee3 NS |
667 | Undo the effects of a filesystem freeze operation. |
668 | Only available in expert mode and requires privileges. | |
669 | .TP | |
aa210c4d CH |
670 | .BI "flink " path |
671 | Link the currently open file descriptor into the filesystem namespace. | |
672 | .TP | |
2017d0d0 | 673 | .BI "inject [ " tag " ]" |
48c46ee3 | 674 | Inject errors into a filesystem to observe filesystem behavior at |
2017d0d0 BN |
675 | specific points under adverse conditions. Without the |
676 | .I tag | |
677 | argument, displays the list of error tags available. | |
48c46ee3 NS |
678 | Only available in expert mode and requires privileges. |
679 | .TP | |
2017d0d0 | 680 | .BI "resblks [ " blocks " ]" |
48c46ee3 | 681 | Get and/or set count of reserved filesystem blocks using the |
2a1888c5 | 682 | XFS_IOC_GET_RESBLKS or XFS_IOC_SET_RESBLKS system calls. |
48c46ee3 NS |
683 | Note \-\- this can be useful for exercising out of space behavior. |
684 | Only available in expert mode and requires privileges. | |
685 | .TP | |
2017d0d0 | 686 | .BR shutdown " [ " \-f " ]" |
48c46ee3 NS |
687 | Force the filesystem to shutdown (with or without flushing the log). |
688 | Only available in expert mode and requires privileges. | |
689 | .TP | |
2017d0d0 BN |
690 | .BR stat " [ " \-v " ]" |
691 | Selected statistics from | |
692 | .BR stat (2) | |
693 | and the XFS_IOC_GETXATTR system call on the current file. If the | |
694 | .B \-v | |
695 | option is specified, the atime (last access), mtime | |
e246ba5f NS |
696 | (last modify), and ctime (last change) timestamps are also displayed. |
697 | .TP | |
2017d0d0 BN |
698 | .B statfs |
699 | Selected statistics from | |
700 | .BR statfs (2) | |
701 | and the XFS_IOC_FSGEOMETRY | |
2a1888c5 | 702 | system call on the filesystem where the current file resides. |
258b00ea | 703 | .TP |
83c32408 ES |
704 | .BR chproj " [ " \-R | \-D " ]" |
705 | Modifies the project identifier associated with the current path. The | |
706 | .B \-R | |
707 | option will recursively descend if the current path is a directory. The | |
708 | .B \-D | |
709 | option will also recursively descend, only setting modifying projects | |
710 | on subdirectories. See the | |
711 | .BR xfs_quota (8) | |
712 | manual page for more information about project identifiers. | |
713 | .TP | |
714 | .BR lsproj " [ " \-R | \-D " ]" | |
715 | Displays the project identifier associated with the current path. The | |
716 | .B \-R | |
717 | and | |
718 | .B \-D | |
719 | options behave as described above, in | |
720 | .B chproj. | |
721 | .TP | |
2017d0d0 | 722 | .BR parent " [ " \-cpv " ]" |
258b00ea TS |
723 | By default this command prints out the parent inode numbers, |
724 | inode generation numbers and basenames of all the hardlinks which | |
725 | point to the inode of the current file. | |
2017d0d0 BN |
726 | .RS 1.0i |
727 | .PD 0 | |
728 | .TP 0.4i | |
729 | .B \-p | |
730 | the output is similar to the default output except pathnames up to | |
731 | the mount-point are printed out instead of the component name. | |
732 | .TP | |
733 | .B \-c | |
734 | the file's filesystem will check all the parent attributes for consistency. | |
735 | .TP | |
736 | .B \-v | |
737 | verbose output will be printed. | |
738 | .RE | |
739 | .IP | |
740 | .B [NOTE: Not currently operational on Linux.] | |
741 | .PD | |
48c46ee3 | 742 | |
e246ba5f | 743 | .SH SEE ALSO |
2017d0d0 BN |
744 | .BR mkfs.xfs (8), |
745 | .BR xfsctl (3), | |
746 | .BR xfs_bmap (8), | |
747 | .BR xfs_db (8), | |
748 | .BR xfs (5), | |
749 | .BR fdatasync (2), | |
750 | .BR fstat (2), | |
751 | .BR fstatfs (2), | |
752 | .BR fsync (2), | |
753 | .BR ftruncate (2), | |
754 | .BR mmap (2), | |
755 | .BR msync (2), | |
756 | .BR open (2), | |
757 | .BR pread (2), | |
3bc05641 BF |
758 | .BR pwrite (2), |
759 | .BR readdir (3). |