2 * See the file LICENSE for redistribution information.
4 * Copyright (c) 2001-2009 Oracle. All rights reserved.
12 INCLUDE #include "db_int.h"
13 INCLUDE #include "dbinc/crypto.h"
14 INCLUDE #include "dbinc/db_page.h"
15 INCLUDE #include "dbinc/db_am.h"
16 INCLUDE #include "dbinc/log.h"
17 INCLUDE #include "dbinc/txn.h"
18 INCLUDE #include "dbinc/fop.h"
22 * create -- create a file system object.
24 * name: name in the file system
25 * appname: indicates if the name needs to go through __db_appname
26 * mode: file system mode
28 BEGIN_COMPAT create 42 143
30 ARG appname u_int32_t lu
37 ARG appname u_int32_t lu
42 * remove -- remove a file system object.
44 * name: name in the file system
45 * appname: indicates if the name needs to go through __db_appname
50 ARG appname u_int32_t lu
54 * write: log the writing of data into an object.
56 * name: file containing the page.
57 * appname: indicates if the name needs to go through __db_appname
59 * pageno: page number in the file.
60 * offset: offset on the page.
61 * page: the actual meta-data page.
62 * flag: non-0 indicates that this is a tempfile, so we needn't undo
63 * these modifications (we'll toss the file).
65 BEGIN_COMPAT write 42 145
67 ARG appname u_int32_t lu
68 ARG pgsize u_int32_t lu
69 ARG pageno db_pgno_t lu
70 ARG offset u_int32_t lu
78 ARG appname u_int32_t lu
79 ARG pgsize u_int32_t lu
80 ARG pageno db_pgno_t lu
81 ARG offset u_int32_t lu
87 * rename: move a file from one name to another.
88 * The appname value indicates if this is a path name that should be used
89 * directly (i.e., no interpretation) or if it is a pathname that should
90 * be interpreted via calls to __db_appname. The fileid is the 20-byte
91 * DB fileid of the file being renamed. We need to check it on recovery
92 * so that we don't inadvertently overwrite good files.
94 * There are two variants of this log record: one that must be both done
95 * and undone and one that is not undone (used for renaming tmp files, see
98 * These two record types use the same structure, read, and print functions,
99 * but have different recovery functions.
101 BEGIN_COMPAT rename 42 146
102 DUPLICATE rename_noundo 46 150
106 ARG appname u_int32_t lu
110 DUPLICATE rename_noundo 46 150
115 ARG appname u_int32_t lu
119 * File removal record. This is a DB-level log record that indicates
120 * we've just completed some form of file removal. The purpose of this
121 * log record is to logically identify the particular instance of the
122 * named file so that during recovery, in deciding if we should roll-forward
123 * a remove or a rename, we can make sure that we don't roll one forward and
124 * delete or overwrite the wrong file.
125 * real_fid: The 20-byte unique file identifier of the original file being
127 * tmp_fid: The unique fid of the tmp file that is removed.
128 * name: The pre- __db_appname name of the file
129 * child: The transaction that removed or renamed the file.
132 BEGIN file_remove 42 141
136 ARG appname u_int32_t lu
137 ARG child u_int32_t lx