2
* See the file LICENSE for redistribution information.
4
* Copyright (c) 2001-2002
5
* Sleepycat Software. All rights reserved.
7
* $Id: fileops.src,v 1.8 2002/04/06 18:25:55 bostic Exp $
13
INCLUDE #include "db_config.h"
15
INCLUDE #ifndef NO_SYSTEM_INCLUDES
16
INCLUDE #include <sys/types.h>
18
INCLUDE #include <ctype.h>
19
INCLUDE #include <string.h>
22
INCLUDE #include "db_int.h"
23
INCLUDE #include "dbinc/crypto.h"
24
INCLUDE #include "dbinc/db_page.h"
25
INCLUDE #include "dbinc/db_dispatch.h"
26
INCLUDE #include "dbinc/db_am.h"
27
INCLUDE #include "dbinc/log.h"
28
INCLUDE #include "dbinc/rep.h"
29
INCLUDE #include "dbinc/txn.h"
30
INCLUDE #include "dbinc/fop.h"
34
* create -- create a file system object.
36
* name: name in the file system
37
* appname: indicates if the name needs to go through __db_appname
38
* mode: file system mode
42
ARG appname u_int32_t lu
47
* remove -- remove a file system object.
49
* name: name in the file system
50
* appname: indicates if the name needs to go through __db_appname
55
ARG appname u_int32_t lu
59
* write: log the writing of data into an object.
61
* name: file containing the page.
62
* appname: indicates if the name needs to go through __db_appname
63
* offset: offset in the file.
64
* page: the actual meta-data page.
65
* flag: non-0 indicates that this is a tempfile, so we needn't undo
66
* these modifications (we'll toss the file).
70
ARG appname u_int32_t lu
71
ARG offset u_int32_t lu
77
* rename: move a file from one name to another.
78
* The appname value indicates if this is a path name that should be used
79
* directly (i.e., no interpretation) or if it is a pathname that should
80
* be interpreted via calls to __db_appname. The fileid is the 20-byte
81
* DB fileid of the file being renamed. We need to check it on recovery
82
* so that we don't inadvertently overwrite good files.
88
ARG appname u_int32_t lu
92
* File removal record. This is a DB-level log record that indicates
93
* we've just completed some form of file removal. The purpose of this
94
* log record is to logically identify the particular instance of the
95
* named file so that during recovery, in deciding if we should roll-forward
96
* a remove or a rename, we can make sure that we don't roll one forward and
97
* delete or overwrite the wrong file.
98
* real_fid: The 20-byte unique file identifier of the original file being
100
* tmp_fid: The unique fid of the tmp file that is removed.
101
* name: The pre- __db_appname name of the file
102
* child: The transaction that removed or renamed the file.
105
BEGIN file_remove 141
109
ARG appname u_int32_t lu
110
ARG child u_int32_t lx