X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Finclude%2Flinux%2Fobd_class.h;h=f7d6f22f70bee5b2dec0545f6332821472abe15e;hp=a124b36e293a2f76e1d7f0bed6ba4234735cbf11;hb=1e7d496794cc655eabb30c1edb1a269aec6309dc;hpb=133a494b5ee8ed3c12b1711175ad2e0570371e2f diff --git a/lustre/include/linux/obd_class.h b/lustre/include/linux/obd_class.h index a124b36..f7d6f22 100644 --- a/lustre/include/linux/obd_class.h +++ b/lustre/include/linux/obd_class.h @@ -4,12 +4,18 @@ #include #include +#include +/* #include */ + #define OBD_PSDEV_MAJOR 120 #define MAX_OBD_DEVICES 2 +extern struct obd_device obd_dev[MAX_OBD_DEVICES]; + struct obd_conn_info { unsigned int conn_id; /* handle */ unsigned long conn_ino; /* root inode number */ + /* XXX do we really need this */ unsigned long conn_blocksize; unsigned char conn_blocksize_bits; }; @@ -18,21 +24,24 @@ struct obd_type { struct list_head typ_chain; struct obd_ops *typ_ops; char *typ_name; - int typ_refcount; + int typ_refcnt; }; +/* corresponds to one of the obdx */ struct obd_device { struct obd_type *obd_type; - int refcnt; - struct super_block * sb; - unsigned int last_id; - unsigned long prealloc_quota; - struct list_head clients; + int obd_refcnt; + union { + struct sim_obd sim; + /* struct fc_obd fc; */ + } u; }; #define OBD_FL_SETUP 0x1 struct obd_ops { + int (*o_format)(void); + int (*o_partition)(int partition, unsigned int size); int (*o_connect)(int minor, struct obd_conn_info *info); int (*o_disconnect)(unsigned int conn_id); int (*o_setup) (struct obd_device *dev, void *data); @@ -43,7 +52,9 @@ struct obd_ops { int (*o_create)(struct obd_device *, int prealloc_ino, int *er); int (*o_destroy)(unsigned int conn_id, unsigned long ino); unsigned long (*o_read)(unsigned int conn_id, unsigned long ino, char *buf, unsigned long count, loff_t offset, int *err); + unsigned long (*o_read2)(unsigned int conn_id, unsigned long ino, char *buf, unsigned long count, loff_t offset, int *err); unsigned long (*o_write)(unsigned int conn_id, unsigned long ino, char *buf, unsigned long count, loff_t offset, int *err); + int (*o_brw)(int rw, int conn, int objectid, struct page *page); long (*o_preallocate)(unsigned int conn_id, int req, long inodes[32], int *err); void (*o_cleanup_device)(int dev); }; @@ -87,10 +98,15 @@ struct oic_rw_s { unsigned long count; loff_t offset; }; +struct oic_partition { + int partition; + unsigned int size; +}; + #define OBD_IOC_CREATE _IOR ('f', 3, long) -#define OBD_IOC_SETUP_SUPER _IOW ('f', 4, long) -#define OBD_IOC_CLEANUP_SUPER _IO ('f', 5 ) +#define OBD_IOC_SETUP_OBDDEV _IOW ('f', 4, long) +#define OBD_IOC_CLEANUP_OBDDEV _IO ('f', 5 ) #define OBD_IOC_DESTROY _IOW ('f', 6, long) #define OBD_IOC_PREALLOCATE _IOWR('f', 7, long) #define OBD_IOC_DEC_USE_COUNT _IO ('f', 8 ) @@ -102,6 +118,9 @@ struct oic_rw_s { #define OBD_IOC_DISCONNECT _IOW ('f', 14, long) #define OBD_IOC_STATFS _IOWR('f', 15, long) #define OBD_IOC_SYNC _IOR ('f', 16, long) +#define OBD_IOC_READ2 _IOWR('f', 17, long) +#define OBD_IOC_FORMAT _IO('f', 17, long) +#define OBD_IOC_READ2 _IOWR('f', 17, long) #define OBD_IOC_DEC_FS_USE_COUNT _IO ('f', 32 )