search for: virtio_blk_s_nr

Displaying 2 results from an estimated 2 matches for "virtio_blk_s_nr".

Did you mean: virtio_blk_s_
2011 Aug 16
1
[PATCH] virtio-blk: Add stats VQ to collect information about devices
...virtqueue *vq, *stats_vq; /* The disk structure for the kernel. */ struct gendisk *disk; @@ -35,6 +35,10 @@ struct virtio_blk /* What host tells us, plus 2 for header & tailer. */ unsigned int sg_elems; + /* Block statistics */ + int need_stats_update; + struct virtio_blk_stat stats[VIRTIO_BLK_S_NR]; + /* Scatterlist: can be too big for stack. */ struct scatterlist sg[/*sg_elems*/]; }; @@ -48,6 +52,75 @@ struct virtblk_req u8 status; }; +static inline void update_stat(struct virtio_blk *vb, int idx, + u16 tag, u64 val) +{ + BUG_ON(idx >= VIRTIO_BLK_S_NR); + vb->stats[...
2011 Aug 16
1
[PATCH] virtio-blk: Add stats VQ to collect information about devices
...virtqueue *vq, *stats_vq; /* The disk structure for the kernel. */ struct gendisk *disk; @@ -35,6 +35,10 @@ struct virtio_blk /* What host tells us, plus 2 for header & tailer. */ unsigned int sg_elems; + /* Block statistics */ + int need_stats_update; + struct virtio_blk_stat stats[VIRTIO_BLK_S_NR]; + /* Scatterlist: can be too big for stack. */ struct scatterlist sg[/*sg_elems*/]; }; @@ -48,6 +52,75 @@ struct virtblk_req u8 status; }; +static inline void update_stat(struct virtio_blk *vb, int idx, + u16 tag, u64 val) +{ + BUG_ON(idx >= VIRTIO_BLK_S_NR); + vb->stats[...