データ構造 | |
| struct | commit_info |
関数 | |
| static void | commit_all (struct vfs_handle_struct *handle, files_struct *fsp) |
| static void | commit (struct vfs_handle_struct *handle, files_struct *fsp, ssize_t last_write) |
| static int | commit_connect (struct vfs_handle_struct *handle, const char *service, const char *user) |
| static int | commit_open (vfs_handle_struct *handle, const char *fname, files_struct *fsp, int flags, mode_t mode) |
| static ssize_t | commit_write (vfs_handle_struct *handle, files_struct *fsp, int fd, void *data, size_t count) |
| static ssize_t | commit_pwrite (vfs_handle_struct *handle, files_struct *fsp, int fd, void *data, size_t count, SMB_OFF_T offset) |
| static ssize_t | commit_close (vfs_handle_struct *handle, files_struct *fsp, int fd) |
| NTSTATUS | vfs_commit_init (void) |
変数 | |
| static int | module_debug |
| static vfs_op_tuple | commit_ops [] |
| static void commit_all | ( | struct vfs_handle_struct * | handle, | |
| files_struct * | fsp | |||
| ) | [static] |
vfs_commit.c の 49 行で定義されています。
参照先 c・fd_handle::fd・files_struct::fh・handle・module_debug.
参照元 commit_close().
00052 { 00053 struct commit_info *c; 00054 00055 if ((c = VFS_FETCH_FSP_EXTENSION(handle, fsp))) { 00056 if (c->dbytes) { 00057 DEBUG(module_debug, 00058 ("%s: flushing %lu dirty bytes\n", 00059 MODULE, (unsigned long)c->dbytes)); 00060 00061 fdatasync(fsp->fh->fd); 00062 c->dbytes = 0; 00063 } 00064 } 00065 }
| static void commit | ( | struct vfs_handle_struct * | handle, | |
| files_struct * | fsp, | |||
| ssize_t | last_write | |||
| ) | [static] |
vfs_commit.c の 67 行で定義されています。
参照先 c・fd_handle::fd・files_struct::fh・handle・module_debug.
参照元 commit_pwrite()・commit_write().
00071 { 00072 struct commit_info *c; 00073 00074 if ((c = VFS_FETCH_FSP_EXTENSION(handle, fsp))) { 00075 00076 if (last_write > 0) { 00077 c->dbytes += last_write; 00078 } 00079 00080 if (c->dbytes > c->dthresh) { 00081 DEBUG(module_debug, 00082 ("%s: flushing %lu dirty bytes\n", 00083 MODULE, (unsigned long)c->dbytes)); 00084 00085 fdatasync(fsp->fh->fd); 00086 c->dbytes = 0; 00087 } 00088 } 00089 }
| static int commit_connect | ( | struct vfs_handle_struct * | handle, | |
| const char * | service, | |||
| const char * | user | |||
| ) | [static] |
vfs_commit.c の 91 行で定義されています。
参照先 handle・lp_parm_int()・module_debug.
00095 { 00096 module_debug = lp_parm_int(SNUM(handle->conn), MODULE, "debug", 100); 00097 return SMB_VFS_NEXT_CONNECT(handle, service, user); 00098 }
| static int commit_open | ( | vfs_handle_struct * | handle, | |
| const char * | fname, | |||
| files_struct * | fsp, | |||
| int | flags, | |||
| mode_t | mode | |||
| ) | [static] |
vfs_commit.c の 100 行で定義されています。
参照先 c・conv_str_size()・commit_info::dthresh・handle・lp_parm_const_string().
00106 { 00107 SMB_OFF_T dthresh; 00108 00109 /* Don't bother with read-only files. */ 00110 if ((flags & O_ACCMODE) == O_RDONLY) { 00111 return SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode); 00112 } 00113 00114 dthresh = conv_str_size(lp_parm_const_string(SNUM(handle->conn), 00115 MODULE, "dthresh", NULL)); 00116 00117 if (dthresh > 0) { 00118 struct commit_info * c; 00119 c = VFS_ADD_FSP_EXTENSION(handle, fsp, struct commit_info); 00120 if (c) { 00121 c->dthresh = dthresh; 00122 c->dbytes = 0; 00123 } 00124 } 00125 00126 return SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode); 00127 }
| static ssize_t commit_write | ( | vfs_handle_struct * | handle, | |
| files_struct * | fsp, | |||
| int | fd, | |||
| void * | data, | |||
| size_t | count | |||
| ) | [static] |
| static ssize_t commit_pwrite | ( | vfs_handle_struct * | handle, | |
| files_struct * | fsp, | |||
| int | fd, | |||
| void * | data, | |||
| size_t | count, | |||
| SMB_OFF_T | offset | |||
| ) | [static] |
| static ssize_t commit_close | ( | vfs_handle_struct * | handle, | |
| files_struct * | fsp, | |||
| int | fd | |||
| ) | [static] |
vfs_commit.c の 160 行で定義されています。
参照先 commit_all()・handle.
00164 { 00165 commit_all(handle, fsp); 00166 return SMB_VFS_NEXT_CLOSE(handle, fsp, fd); 00167 }
| NTSTATUS vfs_commit_init | ( | void | ) |
vfs_commit.c の 186 行で定義されています。
参照先 commit_ops・smb_register_vfs().
00187 { 00188 return smb_register_vfs(SMB_VFS_INTERFACE_VERSION, MODULE, commit_ops); 00189 }
int module_debug [static] |
vfs_commit.c の 41 行で定義されています。
vfs_op_tuple commit_ops[] [static] |
初期値:
{
{SMB_VFS_OP(commit_open),
SMB_VFS_OP_OPEN, SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(commit_close),
SMB_VFS_OP_CLOSE, SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(commit_write),
SMB_VFS_OP_WRITE, SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(commit_pwrite),
SMB_VFS_OP_PWRITE, SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(commit_connect),
SMB_VFS_OP_CONNECT, SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
}
vfs_commit.c の 169 行で定義されています。
参照元 vfs_commit_init().
1.4.7