Print this page
5404 smbfs needs mmap support
Portions contributed by: Gordon Ross <gordon.w.ross@gmail.com>


 215         /*
 216          * File handle, directory search handle,
 217          * and reference counts for them, etc.
 218          * Lock for these is: r_lkserlock
 219          */
 220         int             n_dirrefs;
 221         struct smbfs_fctx       *n_dirseq;      /* ff context */
 222         int             n_dirofs;       /* last ff offset */
 223         int             n_fidrefs;
 224         uint16_t        n_fid;          /* file handle */
 225         enum vtype      n_ovtype;       /* vnode type opened */
 226         uint32_t        n_rights;       /* granted rights */
 227         int             n_vcgenid;      /* gereration no. (reconnect) */
 228 
 229         /*
 230          * Misc. bookkeeping
 231          */
 232         cred_t          *r_cred;        /* current credentials */
 233         u_offset_t      r_nextr;        /* next read offset (read-ahead) */
 234         long            r_mapcnt;       /* count of mmapped pages */

 235         uint_t          r_count;        /* # of refs not reflect in v_count */
 236         uint_t          r_awcount;      /* # of outstanding async write */
 237         uint_t          r_gcount;       /* getattrs waiting to flush pages */
 238         uint_t          r_flags;        /* flags, see below */
 239         uint32_t        n_flag;         /* NXXX flags below */
 240         uint_t          r_error;        /* async write error */
 241         kcondvar_t      r_cv;           /* condvar for blocked threads */
 242         avl_tree_t      r_dir;          /* cache of readdir responses */
 243         rddir_cache     *r_direof;      /* pointer to the EOF entry */

 244         kthread_t       *r_serial;      /* id of purging thread */
 245         list_t          r_indelmap;     /* list of delmap callers */
 246 
 247         /*
 248          * Attributes: local, and as last seen on the server.
 249          * See notes above re: r_size vs r_attr.fa_size, etc.
 250          */
 251         smbfattr_t      r_attr;         /* attributes from the server */
 252         hrtime_t        r_attrtime;     /* time attributes become invalid */
 253         hrtime_t        r_mtime;        /* client time file last modified */
 254         len_t           r_size;         /* client's view of file size */
 255 
 256         /*
 257          * Security attributes.
 258          */
 259         vsecattr_t      r_secattr;
 260         hrtime_t        r_sectime;
 261 
 262         /*
 263          * Other attributes, not carried in smbfattr_t




 215         /*
 216          * File handle, directory search handle,
 217          * and reference counts for them, etc.
 218          * Lock for these is: r_lkserlock
 219          */
 220         int             n_dirrefs;
 221         struct smbfs_fctx       *n_dirseq;      /* ff context */
 222         int             n_dirofs;       /* last ff offset */
 223         int             n_fidrefs;
 224         uint16_t        n_fid;          /* file handle */
 225         enum vtype      n_ovtype;       /* vnode type opened */
 226         uint32_t        n_rights;       /* granted rights */
 227         int             n_vcgenid;      /* gereration no. (reconnect) */
 228 
 229         /*
 230          * Misc. bookkeeping
 231          */
 232         cred_t          *r_cred;        /* current credentials */
 233         u_offset_t      r_nextr;        /* next read offset (read-ahead) */
 234         long            r_mapcnt;       /* count of mmapped pages */
 235         uint_t          r_inmap;        /* to serialize read/write and mmap */
 236         uint_t          r_count;        /* # of refs not reflect in v_count */
 237         uint_t          r_awcount;      /* # of outstanding async write */
 238         uint_t          r_gcount;       /* getattrs waiting to flush pages */
 239         uint_t          r_flags;        /* flags, see below */
 240         uint32_t        n_flag;         /* N--- flags below */
 241         uint_t          r_error;        /* async write error */
 242         kcondvar_t      r_cv;           /* condvar for blocked threads */
 243         avl_tree_t      r_dir;          /* cache of readdir responses */
 244         rddir_cache     *r_direof;      /* pointer to the EOF entry */
 245         u_offset_t      r_modaddr;      /* address for page in writenp */
 246         kthread_t       *r_serial;      /* id of purging thread */
 247         list_t          r_indelmap;     /* list of delmap callers */
 248 
 249         /*
 250          * Attributes: local, and as last seen on the server.
 251          * See notes above re: r_size vs r_attr.fa_size, etc.
 252          */
 253         smbfattr_t      r_attr;         /* attributes from the server */
 254         hrtime_t        r_attrtime;     /* time attributes become invalid */
 255         hrtime_t        r_mtime;        /* client time file last modified */
 256         len_t           r_size;         /* client's view of file size */
 257 
 258         /*
 259          * Security attributes.
 260          */
 261         vsecattr_t      r_secattr;
 262         hrtime_t        r_sectime;
 263 
 264         /*
 265          * Other attributes, not carried in smbfattr_t