1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>journal_abort</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Filesystems API"><link rel="up" href="functions.html#journal_level" title="Journal Level"><link rel="prev" href="API-journal-wipe.html" title="journal_wipe"><link rel="next" href="API-journal-errno.html" title="journal_errno"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">journal_abort</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-journal-wipe.html">Prev</a>&#160;</td><th width="60%" align="center">Journal Level</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-journal-errno.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-journal-abort"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>journal_abort &#8212; 
2     Shutdown the journal immediately.
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">journal_abort </b>(</code></td><td>journal_t * <var class="pdparam">journal</var>, </td></tr><tr><td>&#160;</td><td>int <var class="pdparam">errno</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1103788676"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>journal</code></em></span></dt><dd><p>
4     the journal to shutdown.
5    </p></dd><dt><span class="term"><em class="parameter"><code>errno</code></em></span></dt><dd><p>
6     an error number to record in the journal indicating
7     the reason for the shutdown.
8    </p></dd></dl></div></div><div class="refsect1"><a name="idp1103791380"></a><h2>Description</h2><p>
9   Perform a complete, immediate shutdown of the ENTIRE
10   journal (not of a single transaction).  This operation cannot be
11   undone without closing and reopening the journal.
12   </p><p>
13
14   The journal_abort function is intended to support higher level error
15   recovery mechanisms such as the ext2/ext3 remount-readonly error
16   mode.
17   </p><p>
18
19   Journal abort has very specific semantics.  Any existing dirty,
20   unjournaled buffers in the main filesystem will still be written to
21   disk by bdflush, but the journaling mechanism will be suspended
22   immediately and no further transaction commits will be honoured.
23   </p><p>
24
25   Any dirty, journaled buffers will be written back to disk without
26   hitting the journal.  Atomicity cannot be guaranteed on an aborted
27   filesystem, but we _do_ attempt to leave as much data as possible
28   behind for fsck to use for cleanup.
29   </p><p>
30
31   Any attempt to get a new transaction handle on a journal which is in
32   ABORT state will just result in an -EROFS error return.  A
33   journal_stop on an existing handle will return -EIO if we have
34   entered abort state during the update.
35   </p><p>
36
37   Recursive transactions are not disturbed by journal abort until the
38   final journal_stop, which will receive the -EIO error.
39   </p><p>
40
41   Finally, the journal_abort call allows the caller to supply an errno
42   which will be recorded (if possible) in the journal superblock.  This
43   allows a client to record failure conditions in the middle of a
44   transaction without having to complete the transaction to record the
45   failure to disk.  ext3_error, for example, now uses this
46   functionality.
47   </p><p>
48
49   Errors which originate from within the journaling layer will NOT
50   supply an errno; a null errno implies that absolutely no further
51   writes are done to the journal (unless there are any already in
52   progress).
53</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-journal-wipe.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="functions.html#journal_level">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-journal-errno.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">journal_wipe</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">journal_errno</span></td></tr></table></div></body></html>
54