VirtualBox

Ignore:
Timestamp:
Jun 10, 2010 4:05:56 PM (14 years ago)
Author:
vboxsync
Message:

Linux shared folders: re-read the directory if a file was changed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.h

    r28998 r30150  
    2323#include "product-generated.h"
    2424
    25 #if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 0)
     25#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
    2626# include <linux/backing-dev.h>
    2727#endif
     
    4141        int dmask;
    4242        int fmask;
    43 #if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 0)
     43#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
    4444        struct backing_dev_info bdi;
    4545#endif
     
    5252        /* some information was changed, update data on next revalidate */
    5353        int force_restat;
     54        /* directory content changed, update the whole directory on next sf_getdent */
     55        int force_reread;
    5456        /* file structure, only valid between open() and release() */
    5557        struct file *file;
     
    8789
    8890extern void
    89 sf_init_inode (struct sf_glob_info *sf_g, struct inode *inode,
    90                RTFSOBJINFO *info);
    91 extern int
    92 sf_stat (const char *caller, struct sf_glob_info *sf_g,
    93          SHFLSTRING *path, RTFSOBJINFO *result, int ok_to_fail);
    94 extern int
    95 sf_inode_revalidate (struct dentry *dentry);
    96 #if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 0)
    97 extern int
    98 sf_getattr (struct vfsmount *mnt, struct dentry *dentry, struct kstat *kstat);
    99 extern int
    100 sf_setattr (struct dentry *dentry, struct iattr *iattr);
     91sf_init_inode(struct sf_glob_info *sf_g, struct inode *inode,
     92              RTFSOBJINFO *info);
     93extern int sf_stat(const char *caller, struct sf_glob_info *sf_g,
     94                   SHFLSTRING *path, RTFSOBJINFO *result, int ok_to_fail);
     95extern int sf_inode_revalidate(struct dentry *dentry);
     96#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
     97extern int sf_getattr(struct vfsmount *mnt, struct dentry *dentry,
     98                      struct kstat *kstat);
     99extern int sf_setattr(struct dentry *dentry, struct iattr *iattr);
    101100#endif
    102 extern int
    103 sf_path_from_dentry (const char *caller, struct sf_glob_info *sf_g,
    104                      struct sf_inode_info *sf_i, struct dentry *dentry,
    105                      SHFLSTRING **result);
    106 extern int
    107 sf_nlscpy (struct sf_glob_info *sf_g,
    108            char *name, size_t name_bound_len,
    109            const unsigned char *utf8_name, size_t utf8_len);
    110 extern void
    111 sf_dir_info_free (struct sf_dir_info *p);
    112 extern struct sf_dir_info *
    113 sf_dir_info_alloc (void);
    114 extern int
    115 sf_dir_read_all (struct sf_glob_info *sf_g, struct sf_inode_info *sf_i,
    116                  struct sf_dir_info *sf_d, SHFLHANDLE handle);
    117 extern int
    118 sf_init_backing_dev (struct sf_glob_info *sf_g, const char *name);
    119 extern void
    120 sf_done_backing_dev (struct sf_glob_info *sf_g);
     101extern int sf_path_from_dentry(const char *caller, struct sf_glob_info *sf_g,
     102                               struct sf_inode_info *sf_i, struct dentry *dentry,
     103                               SHFLSTRING **result);
     104extern int sf_nlscpy(struct sf_glob_info *sf_g,
     105                     char *name, size_t name_bound_len,
     106                     const unsigned char *utf8_name, size_t utf8_len);
     107extern void sf_dir_info_free(struct sf_dir_info *p);
     108extern void sf_dir_info_empty(struct sf_dir_info *p);
     109extern struct sf_dir_info *sf_dir_info_alloc(void);
     110extern int sf_dir_read_all(struct sf_glob_info *sf_g, struct sf_inode_info *sf_i,
     111                           struct sf_dir_info *sf_d, SHFLHANDLE handle);
     112extern int sf_init_backing_dev(struct sf_glob_info *sf_g, const char *name);
     113extern void sf_done_backing_dev(struct sf_glob_info *sf_g);
    121114
    122 #if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 0)
     115#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
    123116#define STRUCT_STATFS  struct statfs
    124117#else
     
    137130/* Following casts are here to prevent assignment of void * to
    138131   pointers of arbitrary type */
    139 #if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 0)
     132#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
    140133#define GET_GLOB_INFO(sb) ((struct sf_glob_info *) (sb)->u.generic_sbp)
    141134#define SET_GLOB_INFO(sb, sf_g) (sb)->u.generic_sbp = sf_g
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette