Print this page
Update from fsd_sep3 webrev to fsd_sep9

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/fsh.h
          +++ new/usr/src/uts/common/sys/fsh.h
↓ open down ↓ 20 lines elided ↑ open up ↑
  21   21  #include <sys/vfs.h>
  22   22  #include <sys/vnode.h>
  23   23  
  24   24  #ifdef __cplusplus
  25   25  extern "C" {
  26   26  #endif
  27   27  
  28   28  typedef id_t fsh_handle_t;
  29   29  typedef id_t fsh_callback_handle_t;
  30   30  
  31      -struct fsh_int;
  32      -typedef struct fsh_int fsh_int_t;
  33      -
  34   31  typedef struct fsh {
  35   32          void *arg;
  36   33          void (*remove_cb)(void *, fsh_handle_t);
  37   34  
  38   35          /* vnode */
  39      -        int (*read)(fsh_int_t *, void *, vnode_t *, uio_t *, int, cred_t *,
       36 +        void (*pre_read)(void *, void **, vnode_t **, uio_t **, int *,
       37 +                cred_t **, caller_context_t **);
       38 +        int (*post_read)(int, void *, void *, vnode_t *, uio_t *, int, cred_t *,
  40   39                  caller_context_t *);
  41      -        int (*write)(fsh_int_t *, void *, vnode_t *, uio_t *, int, cred_t *,
  42      -                caller_context_t *);
       40 +        void (*pre_write)(void *, void **, vnode_t **, uio_t **, int *,
       41 +                cred_t **, caller_context_t **);
       42 +        int (*post_write)(int, void *, void *, vnode_t *, uio_t *, int,
       43 +                cred_t *, caller_context_t *);
  43   44  
  44   45          /* vfs */
  45      -        int (*mount)(fsh_int_t *, void *, vfs_t *, vnode_t *, struct mounta *,
  46      -                cred_t *);
  47      -        int (*unmount)(fsh_int_t *, void *, vfs_t *, int, cred_t *);
       46 +        void (*pre_mount)(void *, void **, vfs_t **, vnode_t **,
       47 +                struct mounta **, cred_t **);
       48 +        int (*post_mount)(int, void *, void *, vfs_t *, vnode_t *,
       49 +                struct mounta *, cred_t *);
       50 +        void (*pre_unmount)(void *, void **, vfs_t **, int *, cred_t **);
       51 +        int (*post_unmount)(int, void *, void *, vfs_t *, int, cred_t *);
  48   52  } fsh_t;
  49   53  
  50   54  typedef struct fsh_callback {
  51   55          void    *fshc_arg;
  52   56          void    (*fshc_free)(vfs_t *, void *);
  53   57          void    (*fshc_mount)(vfs_t *, void *);
  54   58  } fsh_callback_t;
  55   59  
  56   60  /* API */
  57   61  extern fsh_handle_t fsh_hook_install(vfs_t *, fsh_t *);
  58   62  extern int fsh_hook_remove(fsh_handle_t);
  59   63  
  60   64  extern fsh_callback_handle_t fsh_callback_install(fsh_callback_t *);
  61   65  extern int fsh_callback_remove(fsh_callback_handle_t);
  62   66  
  63   67  extern void fsh_fs_enable(vfs_t *);
  64   68  extern void fsh_fs_disable(vfs_t *);
  65   69  
  66      -/* fsh control passing */
  67      -extern int fsh_next_read(fsh_int_t *, vnode_t *, uio_t *, int, cred_t *,
  68      -                caller_context_t *);
  69      -extern int fsh_next_write(fsh_int_t *, vnode_t *, uio_t *, int, cred_t *,
  70      -                caller_context_t *);
  71      -
  72      -extern int fsh_next_mount(fsh_int_t *, vfs_t *, vnode_t *, struct mounta *uap,
  73      -                cred_t *);
  74      -extern int fsh_next_unmount(fsh_int_t *, vfs_t *, int, cred_t *);
  75      -
  76   70  #ifdef __cplusplus
  77   71  }
  78   72  #endif
  79   73  
  80   74  #endif /* _FSH_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX