1433d6423SLionel Sambuc #ifndef __VFS_TYPE_H__ 2433d6423SLionel Sambuc #define __VFS_TYPE_H__ 3433d6423SLionel Sambuc 4433d6423SLionel Sambuc /* VFS<->FS communication */ 5433d6423SLionel Sambuc 6433d6423SLionel Sambuc typedef struct { 7433d6423SLionel Sambuc int c_max_reqs; /* Max requests an FS can handle simultaneously */ 8433d6423SLionel Sambuc int c_cur_reqs; /* Number of requests the FS is currently handling */ 9433d6423SLionel Sambuc struct worker_thread *c_req_queue;/* Queue of procs waiting to send a message */ 10433d6423SLionel Sambuc } comm_t; 11433d6423SLionel Sambuc 12433d6423SLionel Sambuc /* 13433d6423SLionel Sambuc * Cached statvfs fields. We are not using struct statvfs itself because that 14433d6423SLionel Sambuc * would add over 2K of unused memory per mount table entry. 15433d6423SLionel Sambuc */ 16433d6423SLionel Sambuc struct statvfs_cache { 17433d6423SLionel Sambuc unsigned long f_flag; /* copy of mount exported flags */ 18433d6423SLionel Sambuc unsigned long f_bsize; /* file system block size */ 19433d6423SLionel Sambuc unsigned long f_frsize; /* fundamental file system block size */ 20433d6423SLionel Sambuc unsigned long f_iosize; /* optimal file system block size */ 21433d6423SLionel Sambuc 22433d6423SLionel Sambuc fsblkcnt_t f_blocks; /* number of blocks in file system, */ 23433d6423SLionel Sambuc fsblkcnt_t f_bfree; /* free blocks avail in file system */ 24433d6423SLionel Sambuc fsblkcnt_t f_bavail; /* free blocks avail to non-root */ 25433d6423SLionel Sambuc fsblkcnt_t f_bresvd; /* blocks reserved for root */ 26433d6423SLionel Sambuc 27433d6423SLionel Sambuc fsfilcnt_t f_files; /* total file nodes in file system */ 28433d6423SLionel Sambuc fsfilcnt_t f_ffree; /* free file nodes in file system */ 29433d6423SLionel Sambuc fsfilcnt_t f_favail; /* free file nodes avail to non-root */ 30433d6423SLionel Sambuc fsfilcnt_t f_fresvd; /* file nodes reserved for root */ 31433d6423SLionel Sambuc 32433d6423SLionel Sambuc uint64_t f_syncreads; /* count of sync reads since mount */ 33433d6423SLionel Sambuc uint64_t f_syncwrites; /* count of sync writes since mount */ 34433d6423SLionel Sambuc 35433d6423SLionel Sambuc uint64_t f_asyncreads; /* count of async reads since mount */ 36433d6423SLionel Sambuc uint64_t f_asyncwrites; /* count of async writes since mount */ 37433d6423SLionel Sambuc 38433d6423SLionel Sambuc unsigned long f_namemax; /* maximum filename length */ 39433d6423SLionel Sambuc }; 40433d6423SLionel Sambuc 41*e3b8d4bbSDavid van Moolenbroek struct smap { 42*e3b8d4bbSDavid van Moolenbroek unsigned int smap_num; /* one-based number into smap array */ 43*e3b8d4bbSDavid van Moolenbroek endpoint_t smap_endpt; /* driver endpoint, NONE if free */ 44*e3b8d4bbSDavid van Moolenbroek char smap_label[LABEL_MAX]; /* driver label */ 45*e3b8d4bbSDavid van Moolenbroek int smap_sel_busy; /* doing initial select on socket? */ 46*e3b8d4bbSDavid van Moolenbroek struct filp * smap_sel_filp; /* socket being selected on */ 47*e3b8d4bbSDavid van Moolenbroek }; 48*e3b8d4bbSDavid van Moolenbroek 49*e3b8d4bbSDavid van Moolenbroek typedef int32_t sockid_t; 50*e3b8d4bbSDavid van Moolenbroek 51433d6423SLionel Sambuc #endif 52