Remove definition of builtin function
[platform/upstream/db4.git] / fileops / fileops.src
1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2001-2009 Oracle.  All rights reserved.
5  *
6  * $Id$
7  */
8
9 DBPRIVATE
10 PREFIX  __fop
11
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"
19 INCLUDE
20
21 /*
22  * create -- create a file system object.
23  *
24  * name: name in the file system
25  * appname: indicates if the name needs to go through __db_appname
26  * mode: file system mode
27  */
28 BEGIN_COMPAT create             42      143
29 DBT     name            DBT             s
30 ARG     appname         u_int32_t       lu
31 ARG     mode            u_int32_t       o
32 END
33
34 BEGIN create            48      143
35 DBT     name            DBT             s
36 DBT     dirname         DBT             s
37 ARG     appname         u_int32_t       lu
38 ARG     mode            u_int32_t       o
39 END
40
41 /*
42  * remove -- remove a file system object.
43  *
44  * name: name in the file system
45  * appname: indicates if the name needs to go through __db_appname
46  */
47 BEGIN remove            42      144
48 DBT     name            DBT             s
49 DBT     fid             DBT             s
50 ARG     appname         u_int32_t       lu
51 END
52
53 /*
54  * write: log the writing of data into an object.
55  *
56  * name: file containing the page.
57  * appname: indicates if the name needs to go through __db_appname
58  * pgsize: page size.
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).
64  */
65 BEGIN_COMPAT write      42      145
66 DBT     name            DBT             s
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
71 DBT     page            DBT             s
72 ARG     flag            u_int32_t       lu
73 END
74
75 BEGIN write     48      145
76 DBT     name            DBT             s
77 DBT     dirname         DBT             s
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
82 DBT     page            DBT             s
83 ARG     flag            u_int32_t       lu
84 END
85
86 /*
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.
93  *
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
96  * SR #15119)
97  *
98  * These two record types use the same structure, read, and print functions,
99  * but have different recovery functions.
100  */
101 BEGIN_COMPAT rename     42      146
102 DUPLICATE rename_noundo 46      150
103 DBT     oldname         DBT             s
104 DBT     newname         DBT             s
105 DBT     fileid          DBT             s
106 ARG     appname         u_int32_t       lu
107 END
108
109 BEGIN rename    48      146
110 DUPLICATE rename_noundo 46      150
111 DBT     oldname         DBT             s
112 DBT     newname         DBT             s
113 DBT     dirname         DBT             s
114 DBT     fileid          DBT             s
115 ARG     appname         u_int32_t       lu
116 END
117
118 /*
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
126  *              removed.
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.
130  */
131  */
132 BEGIN file_remove       42      141
133 DBT     real_fid        DBT     s
134 DBT     tmp_fid         DBT     s
135 DBT     name            DBT     s
136 ARG     appname         u_int32_t       lu
137 ARG     child           u_int32_t       lx
138 END