Changeset 740 for vendor/current/source3/include/vfs.h
- Timestamp:
- Nov 14, 2012, 12:59:34 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/include/vfs.h
r414 r740 126 126 /* Leave at 27 - not yet released. Add translate_name VFS call to convert 127 127 UNIX names to Windows supported names -- asrinivasan. */ 128 #define SMB_VFS_INTERFACE_VERSION 27 129 130 131 /* to bug old modules which are trying to compile with the old functions */ 132 #define vfs_init __ERROR_please_port_this_module_to_SMB_VFS_INTERFACE_VERSION_8_donot_use_vfs_init_anymore(void) { __ERROR_please_port_this_module_to_SMB_VFS_INTERFACE_VERSION_8_donot_use_vfs_init_anymore }; 133 #define lp_parm_string __ERROR_please_port_lp_parm_string_to_lp_parm_const_string_or_lp_parm_talloc_string { \ 134 __ERROR_please_port_lp_parm_string_to_lp_parm_const_string_or_lp_parm_talloc_string }; 135 #define lp_vfs_options __ERROR_please_donot_use_lp_vfs_options_anymore_use_lp_parm_xxxx_functions_instead { \ 136 __ERROR_please_donot_use_lp_vfs_options_anymore_use_lp_parm_xxxx_functions_instead }; 128 /* Changed to version 28 - Add private_flags uint32_t to CREATE call. */ 129 /* Leave at 28 - not yet released. Change realpath to assume NULL and return a 130 malloc'ed path. JRA. */ 131 /* Leave at 28 - not yet released. Move posix_fallocate into the VFS 132 where it belongs. JRA. */ 133 /* Leave at 28 - not yet released. Rename posix_fallocate to fallocate 134 to split out the two possible uses. JRA. */ 135 /* Leave at 28 - not yet released. Add fdopendir. JRA. */ 136 /* Leave at 28 - not yet released. Rename open function to open_fn. - gd */ 137 #define SMB_VFS_INTERFACE_VERSION 28 137 138 138 139 /* … … 164 165 }; 165 166 167 enum vfs_fallocate_mode { 168 VFS_FALLOCATE_EXTEND_SIZE = 0, 169 VFS_FALLOCATE_KEEP_SIZE = 1 170 }; 171 166 172 /* 167 173 Available VFS operations. These values must be in sync with vfs_ops struct … … 170 176 should be added to vfs_op_type so that order of them kept same as in vfs_ops. 171 177 */ 178 struct shadow_copy_data; 172 179 173 180 struct vfs_fn_pointers { … … 180 187 int (*get_quota)(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt); 181 188 int (*set_quota)(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt); 182 int (*get_shadow_copy_data)(struct vfs_handle_struct *handle, struct files_struct *fsp, SHADOW_COPY_DATA*shadow_copy_data, bool labels);189 int (*get_shadow_copy_data)(struct vfs_handle_struct *handle, struct files_struct *fsp, struct shadow_copy_data *shadow_copy_data, bool labels); 183 190 int (*statvfs)(struct vfs_handle_struct *handle, const char *path, struct vfs_statvfs_struct *statbuf); 184 191 uint32_t (*fs_capabilities)(struct vfs_handle_struct *handle, enum timestamp_set_resolution *p_ts_res); … … 187 194 188 195 SMB_STRUCT_DIR *(*opendir)(struct vfs_handle_struct *handle, const char *fname, const char *mask, uint32 attributes); 196 SMB_STRUCT_DIR *(*fdopendir)(struct vfs_handle_struct *handle, files_struct *fsp, const char *mask, uint32 attributes); 189 197 SMB_STRUCT_DIRENT *(*readdir)(struct vfs_handle_struct *handle, 190 198 SMB_STRUCT_DIR *dirp, … … 200 208 /* File operations */ 201 209 202 int (*open )(struct vfs_handle_struct *handle,203 struct smb_filename *smb_fname, files_struct *fsp,204 int flags, mode_t mode);210 int (*open_fn)(struct vfs_handle_struct *handle, 211 struct smb_filename *smb_fname, files_struct *fsp, 212 int flags, mode_t mode); 205 213 NTSTATUS (*create_file)(struct vfs_handle_struct *handle, 206 214 struct smb_request *req, … … 214 222 uint32_t oplock_request, 215 223 uint64_t allocation_size, 224 uint32_t private_flags, 216 225 struct security_descriptor *sd, 217 226 struct ea_list *ea_list, … … 247 256 struct smb_file_time *ft); 248 257 int (*ftruncate)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_OFF_T offset); 258 int (*fallocate)(struct vfs_handle_struct *handle, 259 struct files_struct *fsp, 260 enum vfs_fallocate_mode mode, 261 SMB_OFF_T offset, 262 SMB_OFF_T len); 249 263 bool (*lock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); 250 264 int (*kernel_flock)(struct vfs_handle_struct *handle, struct files_struct *fsp, … … 256 270 int (*link)(struct vfs_handle_struct *handle, const char *oldpath, const char *newpath); 257 271 int (*mknod)(struct vfs_handle_struct *handle, const char *path, mode_t mode, SMB_DEV_T dev); 258 char *(*realpath)(struct vfs_handle_struct *handle, const char *path , char *resolved_path);272 char *(*realpath)(struct vfs_handle_struct *handle, const char *path); 259 273 NTSTATUS (*notify_watch)(struct vfs_handle_struct *handle, 260 274 struct sys_notify_context *ctx, … … 382 396 383 397 /* offline operations */ 384 bool (*is_offline)(struct vfs_handle_struct *handle, const char *path, SMB_STRUCT_STAT *sbuf); 385 int (*set_offline)(struct vfs_handle_struct *handle, const char *path); 398 bool (*is_offline)(struct vfs_handle_struct *handle, 399 const struct smb_filename *fname, 400 SMB_STRUCT_STAT *sbuf); 401 int (*set_offline)(struct vfs_handle_struct *handle, 402 const struct smb_filename *fname); 386 403 }; 387 404 … … 452 469 #define SMB_VFS_HANDLE_GET_DATA(handle, datap, type, ret) { \ 453 470 if (!(handle)||((datap=(type *)(handle)->data)==NULL)) { \ 454 DEBUG(0,("%s() failed to get vfs_handle->data!\n", FUNCTION_MACRO)); \471 DEBUG(0,("%s() failed to get vfs_handle->data!\n",__FUNCTION__)); \ 455 472 ret; \ 456 473 } \ … … 459 476 #define SMB_VFS_HANDLE_SET_DATA(handle, datap, free_fn, type, ret) { \ 460 477 if (!(handle)) { \ 461 DEBUG(0,("%s() failed to set handle->data!\n", FUNCTION_MACRO)); \478 DEBUG(0,("%s() failed to set handle->data!\n",__FUNCTION__)); \ 462 479 ret; \ 463 480 } else { \ … … 500 517 int smb_vfs_call_get_shadow_copy_data(struct vfs_handle_struct *handle, 501 518 struct files_struct *fsp, 502 SHADOW_COPY_DATA*shadow_copy_data,519 struct shadow_copy_data *shadow_copy_data, 503 520 bool labels); 504 521 int smb_vfs_call_statvfs(struct vfs_handle_struct *handle, const char *path, … … 509 526 const char *fname, const char *mask, 510 527 uint32 attributes); 528 SMB_STRUCT_DIR *smb_vfs_call_fdopendir(struct vfs_handle_struct *handle, 529 struct files_struct *fsp, 530 const char *mask, 531 uint32 attributes); 511 532 SMB_STRUCT_DIRENT *smb_vfs_call_readdir(struct vfs_handle_struct *handle, 512 533 SMB_STRUCT_DIR *dirp, … … 539 560 uint32_t oplock_request, 540 561 uint64_t allocation_size, 562 uint32_t private_flags, 541 563 struct security_descriptor *sd, 542 564 struct ea_list *ea_list, … … 598 620 int smb_vfs_call_ftruncate(struct vfs_handle_struct *handle, 599 621 struct files_struct *fsp, SMB_OFF_T offset); 622 int smb_vfs_call_fallocate(struct vfs_handle_struct *handle, 623 struct files_struct *fsp, 624 enum vfs_fallocate_mode mode, 625 SMB_OFF_T offset, 626 SMB_OFF_T len); 600 627 bool smb_vfs_call_lock(struct vfs_handle_struct *handle, 601 628 struct files_struct *fsp, int op, SMB_OFF_T offset, … … 617 644 int smb_vfs_call_mknod(struct vfs_handle_struct *handle, const char *path, 618 645 mode_t mode, SMB_DEV_T dev); 619 char *smb_vfs_call_realpath(struct vfs_handle_struct *handle, 620 const char *path, char *resolved_path); 646 char *smb_vfs_call_realpath(struct vfs_handle_struct *handle, const char *path); 621 647 NTSTATUS smb_vfs_call_notify_watch(struct vfs_handle_struct *handle, 622 648 struct sys_notify_context *ctx, … … 787 813 struct files_struct *fsp); 788 814 bool smb_vfs_call_is_offline(struct vfs_handle_struct *handle, 789 const char *path, SMB_STRUCT_STAT *sbuf); 815 const struct smb_filename *fname, 816 SMB_STRUCT_STAT *sbuf); 790 817 int smb_vfs_call_set_offline(struct vfs_handle_struct *handle, 791 const char *path);818 const struct smb_filename *fname); 792 819 793 820 #endif /* _VFS_H */
Note:
See TracChangeset
for help on using the changeset viewer.