Ignore:
Timestamp:
Nov 14, 2012, 12:59:34 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to 3.6.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/include/vfs.h

    r414 r740  
    126126/* Leave at 27 - not yet released. Add translate_name VFS call to convert
    127127                 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
    137138
    138139/*
     
    164165};
    165166
     167enum vfs_fallocate_mode {
     168        VFS_FALLOCATE_EXTEND_SIZE = 0,
     169        VFS_FALLOCATE_KEEP_SIZE = 1
     170};
     171
    166172/*
    167173    Available VFS operations. These values must be in sync with vfs_ops struct
     
    170176    should be added to vfs_op_type so that order of them kept same as in vfs_ops.
    171177*/
     178struct shadow_copy_data;
    172179
    173180struct vfs_fn_pointers {
     
    180187        int (*get_quota)(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt);
    181188        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);
    183190        int (*statvfs)(struct vfs_handle_struct *handle, const char *path, struct vfs_statvfs_struct *statbuf);
    184191        uint32_t (*fs_capabilities)(struct vfs_handle_struct *handle, enum timestamp_set_resolution *p_ts_res);
     
    187194
    188195        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);
    189197        SMB_STRUCT_DIRENT *(*readdir)(struct vfs_handle_struct *handle,
    190198                                      SMB_STRUCT_DIR *dirp,
     
    200208        /* File operations */
    201209
    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);
    205213        NTSTATUS (*create_file)(struct vfs_handle_struct *handle,
    206214                                struct smb_request *req,
     
    214222                                uint32_t oplock_request,
    215223                                uint64_t allocation_size,
     224                                uint32_t private_flags,
    216225                                struct security_descriptor *sd,
    217226                                struct ea_list *ea_list,
     
    247256                      struct smb_file_time *ft);
    248257        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);
    249263        bool (*lock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
    250264        int (*kernel_flock)(struct vfs_handle_struct *handle, struct files_struct *fsp,
     
    256270        int (*link)(struct vfs_handle_struct *handle, const char *oldpath, const char *newpath);
    257271        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);
    259273        NTSTATUS (*notify_watch)(struct vfs_handle_struct *handle,
    260274                                 struct sys_notify_context *ctx,
     
    382396
    383397        /* 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);
    386403};
    387404
     
    452469#define SMB_VFS_HANDLE_GET_DATA(handle, datap, type, ret) { \
    453470        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__)); \
    455472                ret; \
    456473        } \
     
    459476#define SMB_VFS_HANDLE_SET_DATA(handle, datap, free_fn, type, ret) { \
    460477        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__)); \
    462479                ret; \
    463480        } else { \
     
    500517int smb_vfs_call_get_shadow_copy_data(struct vfs_handle_struct *handle,
    501518                                      struct files_struct *fsp,
    502                                       SHADOW_COPY_DATA *shadow_copy_data,
     519                                      struct shadow_copy_data *shadow_copy_data,
    503520                                      bool labels);
    504521int smb_vfs_call_statvfs(struct vfs_handle_struct *handle, const char *path,
     
    509526                                     const char *fname, const char *mask,
    510527                                     uint32 attributes);
     528SMB_STRUCT_DIR *smb_vfs_call_fdopendir(struct vfs_handle_struct *handle,
     529                                        struct files_struct *fsp,
     530                                        const char *mask,
     531                                        uint32 attributes);
    511532SMB_STRUCT_DIRENT *smb_vfs_call_readdir(struct vfs_handle_struct *handle,
    512533                                        SMB_STRUCT_DIR *dirp,
     
    539560                                  uint32_t oplock_request,
    540561                                  uint64_t allocation_size,
     562                                  uint32_t private_flags,
    541563                                  struct security_descriptor *sd,
    542564                                  struct ea_list *ea_list,
     
    598620int smb_vfs_call_ftruncate(struct vfs_handle_struct *handle,
    599621                           struct files_struct *fsp, SMB_OFF_T offset);
     622int 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);
    600627bool smb_vfs_call_lock(struct vfs_handle_struct *handle,
    601628                       struct files_struct *fsp, int op, SMB_OFF_T offset,
     
    617644int smb_vfs_call_mknod(struct vfs_handle_struct *handle, const char *path,
    618645                       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);
     646char *smb_vfs_call_realpath(struct vfs_handle_struct *handle, const char *path);
    621647NTSTATUS smb_vfs_call_notify_watch(struct vfs_handle_struct *handle,
    622648                                   struct sys_notify_context *ctx,
     
    787813                            struct files_struct *fsp);
    788814bool 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);
    790817int smb_vfs_call_set_offline(struct vfs_handle_struct *handle,
    791                              const char *path);
     818                             const struct smb_filename *fname);
    792819
    793820#endif /* _VFS_H */
Note: See TracChangeset for help on using the changeset viewer.