Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
common.h File Reference
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/blkdev.h>
#include <linux/vmalloc.h>
#include <linux/wait.h>
#include <linux/io.h>
#include <asm/setup.h>
#include <asm/pgalloc.h>
#include <asm/hypervisor.h>
#include <xen/grant_table.h>
#include <xen/xenbus.h>
#include <xen/interface/io/ring.h>
#include <xen/interface/io/blkif.h>
#include <xen/interface/io/protocols.h>

Go to the source code of this file.

Data Structures

struct  blkif_common_request
 
struct  blkif_common_response
 
struct  blkif_x86_32_request_rw
 
struct  blkif_x86_32_request_discard
 
struct  blkif_x86_32_request
 
struct  blkif_x86_32_response
 
struct  blkif_x86_64_request_rw
 
struct  blkif_x86_64_request_discard
 
struct  blkif_x86_64_request
 
struct  blkif_x86_64_response
 
union  blkif_back_rings
 
struct  xen_vbd
 
struct  xen_blkif
 
struct  phys_req
 

Macros

#define DRV_PFX   "xen-blkback:"
 
#define DPRINTK(fmt, args...)
 
#define vbd_sz(_v)
 
#define xen_blkif_get(_b)   (atomic_inc(&(_b)->refcnt))
 
#define xen_blkif_put(_b)
 

Enumerations

enum  blkif_protocol { BLKIF_PROTOCOL_NATIVE = 1, BLKIF_PROTOCOL_X86_32 = 2, BLKIF_PROTOCOL_X86_64 = 3 }
 

Functions

struct blkif_x86_32_request_rw __attribute__ ((__packed__))
 
 DEFINE_RING_TYPES (blkif_common, struct blkif_common_request, struct blkif_common_response)
 
 DEFINE_RING_TYPES (blkif_x86_32, struct blkif_x86_32_request, struct blkif_x86_32_response)
 
 DEFINE_RING_TYPES (blkif_x86_64, struct blkif_x86_64_request, struct blkif_x86_64_response)
 
int xen_blkif_interface_init (void)
 
int xen_blkif_xenbus_init (void)
 
irqreturn_t xen_blkif_be_int (int irq, void *dev_id)
 
int xen_blkif_schedule (void *arg)
 
int xen_blkbk_flush_diskcache (struct xenbus_transaction xbt, struct backend_info *be, int state)
 
int xen_blkbk_barrier (struct xenbus_transaction xbt, struct backend_info *be, int state)
 
struct xenbus_devicexen_blkbk_xenbus (struct backend_info *be)
 

Variables

uint8_t nr_segments
 
blkif_vdev_t handle
 
uint64_t id
 
blkif_sector_t sector_number
 
struct blkif_request_segment seg [BLKIF_MAX_SEGMENTS_PER_REQUEST]
 
uint8_t flag
 
blkif_vdev_t _pad1
 
uint64_t nr_sectors
 
uint8_t operation
 
union {
   struct blkif_x86_32_request_rw   rw
 
   struct blkif_x86_32_request_discard   discard
 
u
 
struct blkif_x86_32_response __attribute__
 
uint32_t _pad2
 

Macro Definition Documentation

#define DPRINTK (   fmt,
  args... 
)
Value:
pr_debug(DRV_PFX "(%s:%d) " fmt ".\n", \
__func__, __LINE__, ##args)

Definition at line 47 of file common.h.

#define DRV_PFX   "xen-blkback:"

Definition at line 46 of file common.h.

#define vbd_sz (   _v)
Value:
((_v)->bdev->bd_part ? \
(_v)->bdev->bd_part->nr_sects : \
get_capacity((_v)->bdev->bd_disk))

Definition at line 207 of file common.h.

#define xen_blkif_get (   _b)    (atomic_inc(&(_b)->refcnt))

Definition at line 211 of file common.h.

#define xen_blkif_put (   _b)
Value:
do { \
if (atomic_dec_and_test(&(_b)->refcnt)) \
wake_up(&(_b)->waiting_to_free);\
} while (0)

Definition at line 212 of file common.h.

Enumeration Type Documentation

Enumerator:
BLKIF_PROTOCOL_NATIVE 
BLKIF_PROTOCOL_X86_32 
BLKIF_PROTOCOL_X86_64 

Definition at line 143 of file common.h.

Function Documentation

struct blkif_x86_32_request_rw __attribute__ ( (__packed__)  )
read

Definition at line 85 of file mpc512x_dma.c.

DEFINE_RING_TYPES ( blkif_common  ,
struct blkif_common_request  ,
struct blkif_common_response   
)
DEFINE_RING_TYPES ( blkif_x86_32  ,
struct blkif_x86_32_request  ,
struct blkif_x86_32_response   
)
DEFINE_RING_TYPES ( blkif_x86_64  ,
struct blkif_x86_64_request  ,
struct blkif_x86_64_response   
)
int xen_blkbk_barrier ( struct xenbus_transaction  xbt,
struct backend_info be,
int  state 
)

Definition at line 427 of file xenbus.c.

int xen_blkbk_flush_diskcache ( struct xenbus_transaction  xbt,
struct backend_info be,
int  state 
)

Definition at line 374 of file xenbus.c.

struct xenbus_device* xen_blkbk_xenbus ( struct backend_info be)
read

Definition at line 39 of file xenbus.c.

irqreturn_t xen_blkif_be_int ( int  irq,
void dev_id 
)

Definition at line 250 of file blkback.c.

int xen_blkif_interface_init ( void  )

Definition at line 205 of file xenbus.c.

int xen_blkif_schedule ( void arg)

Definition at line 274 of file blkback.c.

int xen_blkif_xenbus_init ( void  )

Definition at line 783 of file xenbus.c.

Variable Documentation

blkif_vdev_t _pad1

Definition at line 79 of file common.h.

uint32_t _pad2

Definition at line 116 of file common.h.

Definition at line 89 of file common.h.

Definition at line 78 of file common.h.

Definition at line 71 of file common.h.

Definition at line 72 of file common.h.

uint64_t nr_sectors

Definition at line 82 of file common.h.

uint8_t nr_segments

Definition at line 70 of file common.h.

Definition at line 86 of file common.h.

Definition at line 88 of file common.h.

blkif_sector_t sector_number

Definition at line 73 of file common.h.

Definition at line 74 of file common.h.

union { ... } u