1JOURNAL_GET_UNDO_ACC(9)    The Linux Journalling API   JOURNAL_GET_UNDO_ACC(9)
2
3
4

NAME

6       journal_get_undo_access - Notify intent to modify metadata with
7       non-rewindable consequences
8

SYNOPSIS

10       int journal_get_undo_access(handle_t * handle,
11                                   struct buffer_head * bh);
12

ARGUMENTS

14       handle
15           transaction
16
17       bh
18           buffer to undo
19

DESCRIPTION

21       Sometimes there is a need to distinguish between metadata which has
22       been committed to disk and that which has not. The ext3fs code uses
23       this for freeing and allocating space, we have to make sure that we do
24       not reuse freed space until the deallocation has been committed, since
25       if we overwrote that space we would make the delete un-rewindable in
26       case of a crash.
27
28       To deal with that, journal_get_undo_access requests write access to a
29       buffer for parts of non-rewindable operations such as delete operations
30       on the bitmaps. The journaling code must keep a copy of the buffer's
31       contents prior to the undo_access call until such time as we know that
32       the buffer has definitely been committed to disk.
33
34       We never need to know which transaction the committed data is part of,
35       buffers touched here are guaranteed to be dirtied later and so will be
36       committed to a new transaction in due course, at which point we can
37       discard the old committed data pointer.
38
39       Returns error number or 0 on success.
40

AUTHORS

42       Roger Gammans <rgammans@computer-surgery.co.uk>
43           Author.
44
45       Stephen Tweedie <sct@redhat.com>
46           Author.
47
49Kernel Hackers Manual 2.6.       November 2011         JOURNAL_GET_UNDO_ACC(9)
Impressum