.\" 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_GET_UNDO_ACCESS" "9" "07 August 2003" "" "" .SH NAME journal_get_undo_access \- Notify intent to modify metadata with .SH SYNOPSIS .sp \fB .sp int journal_get_undo_access (handle_t * \fIhandle\fB, struct buffer_head * \fIbh\fB, int * \fIcredits\fB); \fR .SH "ARGUMENTS" .TP \fB\fIhandle\fB\fR transaction .TP \fB\fIbh\fB\fR buffer to undo .TP \fB\fIcredits\fB\fR store the number of taken credits here (if not NULL) .SH "DESCRIPTION" .PP Sometimes there is a need to distinguish between metadata which has been committed to disk and that which has not. The ext3fs code uses this for freeing and allocating space, we have to make sure that we do not reuse freed space until the deallocation has been committed, since if we overwrote that space we would make the delete un-rewindable in case of a crash. .PP To deal with that, journal_get_undo_access requests write access to a buffer for parts of non-rewindable operations such as delete operations on the bitmaps. The journaling code must keep a copy of the buffer's contents prior to the undo_access call until such time as we know that the buffer has definitely been committed to disk. .PP We never need to know which transaction the committed data is part of, buffers touched here are guaranteed to be dirtied later and so will be committed to a new transaction in due course, at which point we can discard the old committed data pointer. .PP Returns error number or 0 on success. .SH "DESCRIPTION" .PP Sometimes there is a need to distinguish between metadata which has been committed to disk and that which has not. The ext3fs code uses this for freeing and allocating space, we have to make sure that we do not reuse freed space until the deallocation has been committed, since if we overwrote that space we would make the delete un-rewindable in case of a crash. .PP To deal with that, journal_get_undo_access requests write access to a buffer for parts of non-rewindable operations such as delete operations on the bitmaps. The journaling code must keep a copy of the buffer's contents prior to the undo_access call until such time as we know that the buffer has definitely been committed to disk. .PP We never need to know which transaction the committed data is part of, buffers touched here are guaranteed to be dirtied later and so will be committed to a new transaction in due course, at which point we can discard the old committed data pointer. .PP Returns error number or 0 on success. .SH "ABOUT THIS DOCUMENT" .PP This documentation was generated with kernel version 2.6.0.