.\" This documentation was generated from the book titled "The Linux Journalling API", which is part of the Linux kernel source. .\" .\" Documentation by: Roger Gammans (rgammans@computer-surgery.co.uk) .\" Documentation by: Stephen Tweedie (sct@redhat.com) .\" Documentation copyright: 2002 Roger Gammans .\" This documentation comes with the following legal notice: .\" .\" This documentation is free software; you can redistribute .\" it and/or modify it under the terms of the GNU General Public .\" License as published by the Free Software Foundation; either .\" version 2 of the License, or (at your option) any later .\" version. .\" .\" This program is distributed in the hope that it will be .\" useful, but WITHOUT ANY WARRANTY; without even the implied .\" warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .\" See the GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this program; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, .\" MA 02111-1307 USA .\" .\" For more details see the file COPYING in the source .\" distribution of Linux. .\" .\" For comments on the formatting of this manpage, please contact Michael Still .\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "JOURNAL_CALLBACK_SET" "9" "09 April 2004" "" "" .SH NAME journal_callback_set \- Register a callback function for this handle. .SH SYNOPSIS .sp \fB .sp void journal_callback_set (handle_t * \fIhandle\fB, void (*\fIfunc\fB) struct journal_callback *jcb, int error, struct journal_callback * \fIjcb\fB); \fR .SH "ARGUMENTS" .TP \fB\fIhandle\fB\fR handle to attach the callback to. .TP \fB\fIfunc\fB\fR function to callback. .TP \fB\fIjcb\fB\fR structure with additional information required by \fBfunc\fR , and some space for jbd internal information. .SH "DESCRIPTION" .PP The function will be called when the transaction that this handle is part of has been committed to disk with the original callback data struct and the error status of the journal as parameters. There is no guarantee of ordering between handles within a single transaction, nor between callbacks registered on the same handle. .PP The caller is responsible for allocating the journal_callback struct. This is to allow the caller to add as much extra data to the callback as needed, but reduce the overhead of multiple allocations. The caller allocated struct must start with a struct journal_callback at offset 0, and has the caller-specific data afterwards. .SH "ABOUT THIS DOCUMENT" .PP This documentation was generated with kernel version 2.6.0.