b24413180f560 include/linux/coda_psdev.h (Greg Kroah-Hartman 2017-11-01 15:07:57 +0100 1) /* SPDX-License-Identifier: GPL-2.0 */
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 2) #ifndef __CODA_PSDEV_H
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 3) #define __CODA_PSDEV_H
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 4)
33f60e9640b2f include/linux/coda_psdev.h (Jens Axboe 2010-04-28 09:20:33 +0200 5) #include <linux/backing-dev.h>
6dc280ebeed2c fs/coda/coda_psdev.h (Jan Harkes 2019-07-16 16:28:51 -0700 6) #include <linux/magic.h>
da47c19e5c746 include/linux/coda_psdev.h (Yoshihisa Abe 2010-10-25 02:03:46 -0400 7) #include <linux/mutex.h>
6dc280ebeed2c fs/coda/coda_psdev.h (Jan Harkes 2019-07-16 16:28:51 -0700 8)
6dc280ebeed2c fs/coda/coda_psdev.h (Jan Harkes 2019-07-16 16:28:51 -0700 9) #define CODA_PSDEV_MAJOR 67
6dc280ebeed2c fs/coda/coda_psdev.h (Jan Harkes 2019-07-16 16:28:51 -0700 10) #define MAX_CODADEVS 5 /* how many do we allow */
33f60e9640b2f include/linux/coda_psdev.h (Jens Axboe 2010-04-28 09:20:33 +0200 11)
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 12) struct kstatfs;
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 13)
f90fb3c7e2c13 include/linux/coda_psdev.h (Mikko Rapeli 2019-07-16 16:28:10 -0700 14) /* messages between coda filesystem in kernel and Venus */
f90fb3c7e2c13 include/linux/coda_psdev.h (Mikko Rapeli 2019-07-16 16:28:10 -0700 15) struct upc_req {
f90fb3c7e2c13 include/linux/coda_psdev.h (Mikko Rapeli 2019-07-16 16:28:10 -0700 16) struct list_head uc_chain;
f90fb3c7e2c13 include/linux/coda_psdev.h (Mikko Rapeli 2019-07-16 16:28:10 -0700 17) caddr_t uc_data;
f90fb3c7e2c13 include/linux/coda_psdev.h (Mikko Rapeli 2019-07-16 16:28:10 -0700 18) u_short uc_flags;
f90fb3c7e2c13 include/linux/coda_psdev.h (Mikko Rapeli 2019-07-16 16:28:10 -0700 19) u_short uc_inSize; /* Size is at most 5000 bytes */
f90fb3c7e2c13 include/linux/coda_psdev.h (Mikko Rapeli 2019-07-16 16:28:10 -0700 20) u_short uc_outSize;
f90fb3c7e2c13 include/linux/coda_psdev.h (Mikko Rapeli 2019-07-16 16:28:10 -0700 21) u_short uc_opcode; /* copied from data to save lookup */
f90fb3c7e2c13 include/linux/coda_psdev.h (Mikko Rapeli 2019-07-16 16:28:10 -0700 22) int uc_unique;
f90fb3c7e2c13 include/linux/coda_psdev.h (Mikko Rapeli 2019-07-16 16:28:10 -0700 23) wait_queue_head_t uc_sleep; /* process' wait queue */
f90fb3c7e2c13 include/linux/coda_psdev.h (Mikko Rapeli 2019-07-16 16:28:10 -0700 24) };
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 25)
2fe7491d21942 include/linux/coda_psdev.h (Jan Harkes 2019-07-16 16:28:26 -0700 26) #define CODA_REQ_ASYNC 0x1
2fe7491d21942 include/linux/coda_psdev.h (Jan Harkes 2019-07-16 16:28:26 -0700 27) #define CODA_REQ_READ 0x2
2fe7491d21942 include/linux/coda_psdev.h (Jan Harkes 2019-07-16 16:28:26 -0700 28) #define CODA_REQ_WRITE 0x4
2fe7491d21942 include/linux/coda_psdev.h (Jan Harkes 2019-07-16 16:28:26 -0700 29) #define CODA_REQ_ABORT 0x8
2fe7491d21942 include/linux/coda_psdev.h (Jan Harkes 2019-07-16 16:28:26 -0700 30)
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 31) /* communication pending/processing queues */
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 32) struct venus_comm {
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 33) u_long vc_seq;
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 34) wait_queue_head_t vc_waitq; /* Venus wait queue */
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 35) struct list_head vc_pending;
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 36) struct list_head vc_processing;
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 37) int vc_inuse;
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 38) struct super_block *vc_sb;
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 39) struct mutex vc_mutex;
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 40) };
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 41)
a1b0aa8764749 include/linux/coda_psdev.h (Jan Harkes 2007-07-19 01:48:50 -0700 42) static inline struct venus_comm *coda_vcp(struct super_block *sb)
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 43) {
a1b0aa8764749 include/linux/coda_psdev.h (Jan Harkes 2007-07-19 01:48:50 -0700 44) return (struct venus_comm *)((sb)->s_fs_info);
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 45) }
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 46)
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 47) /* upcalls */
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 48) int venus_rootfid(struct super_block *sb, struct CodaFid *fidp);
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 49) int venus_getattr(struct super_block *sb, struct CodaFid *fid,
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 50) struct coda_vattr *attr);
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 51) int venus_setattr(struct super_block *, struct CodaFid *, struct coda_vattr *);
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 52) int venus_lookup(struct super_block *sb, struct CodaFid *fid,
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 53) const char *name, int length, int *type,
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 54) struct CodaFid *resfid);
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 55) int venus_close(struct super_block *sb, struct CodaFid *fid, int flags,
d83f5901bc0cd include/linux/coda_psdev.h (Eric W. Biederman 2013-01-30 19:21:14 -0800 56) kuid_t uid);
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 57) int venus_open(struct super_block *sb, struct CodaFid *fid, int flags,
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 58) struct file **f);
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 59) int venus_mkdir(struct super_block *sb, struct CodaFid *dirfid,
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 60) const char *name, int length,
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 61) struct CodaFid *newfid, struct coda_vattr *attrs);
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 62) int venus_create(struct super_block *sb, struct CodaFid *dirfid,
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 63) const char *name, int length, int excl, int mode,
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 64) struct CodaFid *newfid, struct coda_vattr *attrs);
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 65) int venus_rmdir(struct super_block *sb, struct CodaFid *dirfid,
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 66) const char *name, int length);
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 67) int venus_remove(struct super_block *sb, struct CodaFid *dirfid,
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 68) const char *name, int length);
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 69) int venus_readlink(struct super_block *sb, struct CodaFid *fid,
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 70) char *buffer, int *length);
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 71) int venus_rename(struct super_block *sb, struct CodaFid *new_fid,
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 72) struct CodaFid *old_fid, size_t old_length,
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 73) size_t new_length, const char *old_name,
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 74) const char *new_name);
8fc8b9df83138 fs/coda/coda_psdev.h (David Howells 2019-07-16 16:28:47 -0700 75) int venus_link(struct super_block *sb, struct CodaFid *fid,
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 76) struct CodaFid *dirfid, const char *name, int len );
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 77) int venus_symlink(struct super_block *sb, struct CodaFid *fid,
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 78) const char *name, int len, const char *symname, int symlen);
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 79) int venus_access(struct super_block *sb, struct CodaFid *fid, int mask);
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 80) int venus_pioctl(struct super_block *sb, struct CodaFid *fid,
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 81) unsigned int cmd, struct PioctlData *data);
6e51f8aa76b67 include/linux/coda_psdev.h (Jan Harkes 2019-07-16 16:28:16 -0700 82) int coda_downcall(struct venus_comm *vcp, int opcode, union outputArgs *out,
6e51f8aa76b67 include/linux/coda_psdev.h (Jan Harkes 2019-07-16 16:28:16 -0700 83) size_t nbytes);
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 84) int venus_fsync(struct super_block *sb, struct CodaFid *fid);
726c334223180 include/linux/coda_psdev.h (David Howells 2006-06-23 02:02:58 -0700 85) int venus_statfs(struct dentry *dentry, struct kstatfs *sfs);
a9fba24c6ac9b fs/coda/coda_psdev.h (Pedro Cuadra 2019-07-16 16:29:13 -0700 86) int venus_access_intent(struct super_block *sb, struct CodaFid *fid,
a9fba24c6ac9b fs/coda/coda_psdev.h (Pedro Cuadra 2019-07-16 16:29:13 -0700 87) bool *access_intent_supported,
a9fba24c6ac9b fs/coda/coda_psdev.h (Pedro Cuadra 2019-07-16 16:29:13 -0700 88) size_t count, loff_t ppos, int type);
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 89)
7e7f4eae28711 include/linux/coda_psdev.h (Jaswinder Singh Rajput 2009-02-02 21:40:10 +0530 90) /*
7e7f4eae28711 include/linux/coda_psdev.h (Jaswinder Singh Rajput 2009-02-02 21:40:10 +0530 91) * Statistics
7e7f4eae28711 include/linux/coda_psdev.h (Jaswinder Singh Rajput 2009-02-02 21:40:10 +0530 92) */
7e7f4eae28711 include/linux/coda_psdev.h (Jaswinder Singh Rajput 2009-02-02 21:40:10 +0530 93)
7e7f4eae28711 include/linux/coda_psdev.h (Jaswinder Singh Rajput 2009-02-02 21:40:10 +0530 94) extern struct venus_comm coda_comms[];
^1da177e4c3f4 include/linux/coda_psdev.h (Linus Torvalds 2005-04-16 15:20:36 -0700 95) #endif