| 1 |
.\" Copyright (c) 2019, Oracle. All rights reserved. |
| 2 |
.\" |
| 3 |
.\" %%%LICENSE_START(GPLv2+_DOC_FULL) |
| 4 |
.\" SPDX-License-Identifier: GPL-2.0+ |
| 5 |
.\" %%%LICENSE_END |
| 6 |
.TH IOCTL-XFS-GOINGDOWN 2 2019-06-17 "XFS" |
| 7 |
.SH NAME |
| 8 |
ioctl_xfs_goingdown \- shut down an XFS filesystem |
| 9 |
.SH SYNOPSIS |
| 10 |
.br |
| 11 |
.B #include <xfs/xfs_fs.h> |
| 12 |
.PP |
| 13 |
.BI "int ioctl(int " fd ", XFS_IOC_GOINGDOWN, uint32_t " flags ); |
| 14 |
.SH DESCRIPTION |
| 15 |
Shuts down a live XFS filesystem. |
| 16 |
This is a software initiated hard shutdown and should be avoided whenever |
| 17 |
possible. |
| 18 |
After this call completes, the filesystem ill be totally unusable until the |
| 19 |
filesystem has been unmounted and remounted. |
| 20 |
|
| 21 |
.PP |
| 22 |
.I flags |
| 23 |
can be one of the following: |
| 24 |
.RS 0.4i |
| 25 |
.TP |
| 26 |
.B XFS_FSOP_GOING_FLAGS_DEFAULT |
| 27 |
Flush all dirty data and metadata to disk, flush pending transactions |
| 28 |
to the log, and shut down. |
| 29 |
.TP |
| 30 |
.B XFS_FSOP_GOING_FLAGS_LOGFLUSH |
| 31 |
Flush all pending metadata transactions to the log and shut down, leaving |
| 32 |
all dirty data unwritten. |
| 33 |
.TP |
| 34 |
.B XFS_FSOP_GOING_FLAGS_NOLOGFLUSH |
| 35 |
Shut down immediately, without writing pending transactions or dirty data |
| 36 |
to disk. |
| 37 |
|
| 38 |
.SH RETURN VALUE |
| 39 |
On error, \-1 is returned, and |
| 40 |
.I errno |
| 41 |
is set to indicate the error. |
| 42 |
.PP |
| 43 |
.SH ERRORS |
| 44 |
Error codes can be one of, but are not limited to, the following: |
| 45 |
.TP |
| 46 |
.B EFSBADCRC |
| 47 |
Metadata checksum validation failed while performing the query. |
| 48 |
.TP |
| 49 |
.B EFSCORRUPTED |
| 50 |
Metadata corruption was encountered while performing the query. |
| 51 |
.TP |
| 52 |
.B EIO |
| 53 |
An I/O error was encountered while performing the query. |
| 54 |
.TP |
| 55 |
.B EPERM |
| 56 |
Caller did not have permission to shut down the filesystem. |
| 57 |
.SH CONFORMING TO |
| 58 |
This API is specific to XFS filesystem on the Linux kernel. |
| 59 |
.SH SEE ALSO |
| 60 |
.BR ioctl (2) |