search for: virtio_blk_t_barrier

Displaying 20 results from an estimated 54 matches for "virtio_blk_t_barrier".

2010 Feb 18
5
[PATCH] virtio-spec: document block CMD and FLUSH
...\begin_layout Plain Layout +\change_deleted 0 1266472188 + #define VIRTIO_BLK_T_IN 0 \end_layout \begin_layout Plain Layout +\change_deleted 0 1266472188 + #define VIRTIO_BLK_T_OUT 1 \end_layout \begin_layout Plain Layout +\change_deleted 0 1266472188 + #define VIRTIO_BLK_T_BARRIER 0x80000000 +\change_unchanged + \end_layout \begin_layout Plain Layout @@ -4735,11 +4763,15 @@ struct virtio_blk_req { \begin_layout Plain Layout +\change_deleted 0 1266472204 + #define VIRTIO_BLK_S_OK 0 \end_layout \begin_layout Plain Layout +\change_deleted 0 1266472204 +...
2010 Feb 18
5
[PATCH] virtio-spec: document block CMD and FLUSH
...\begin_layout Plain Layout +\change_deleted 0 1266472188 + #define VIRTIO_BLK_T_IN 0 \end_layout \begin_layout Plain Layout +\change_deleted 0 1266472188 + #define VIRTIO_BLK_T_OUT 1 \end_layout \begin_layout Plain Layout +\change_deleted 0 1266472188 + #define VIRTIO_BLK_T_BARRIER 0x80000000 +\change_unchanged + \end_layout \begin_layout Plain Layout @@ -4735,11 +4763,15 @@ struct virtio_blk_req { \begin_layout Plain Layout +\change_deleted 0 1266472204 + #define VIRTIO_BLK_S_OK 0 \end_layout \begin_layout Plain Layout +\change_deleted 0 1266472204 +...
2017 Jul 05
3
[PATCH v2] virtio-blk: add DISCARD support to virtio-blk driver
...+ __u32 max_discard_num; } __attribute__((packed)); /* @@ -114,6 +119,9 @@ struct virtio_blk_config { /* Get device ID command */ #define VIRTIO_BLK_T_GET_ID 8 +/* Discard command */ +#define VIRTIO_BLK_T_DISCARD 16 + #ifndef VIRTIO_BLK_NO_LEGACY /* Barrier before this op. */ #define VIRTIO_BLK_T_BARRIER 0x80000000 @@ -133,6 +141,17 @@ struct virtio_blk_outhdr { __virtio64 sector; }; +/* + * Array of discard ranges for each request. + */ +struct virtio_blk_discard { + /* start discard lba */ + __virtio64 slba; + /* number of discard sectors */ + __virtio32 nlba; + __virtio32 reserved; +}; + #...
2017 Jul 05
3
[PATCH v2] virtio-blk: add DISCARD support to virtio-blk driver
...+ __u32 max_discard_num; } __attribute__((packed)); /* @@ -114,6 +119,9 @@ struct virtio_blk_config { /* Get device ID command */ #define VIRTIO_BLK_T_GET_ID 8 +/* Discard command */ +#define VIRTIO_BLK_T_DISCARD 16 + #ifndef VIRTIO_BLK_NO_LEGACY /* Barrier before this op. */ #define VIRTIO_BLK_T_BARRIER 0x80000000 @@ -133,6 +141,17 @@ struct virtio_blk_outhdr { __virtio64 sector; }; +/* + * Array of discard ranges for each request. + */ +struct virtio_blk_discard { + /* start discard lba */ + __virtio64 slba; + /* number of discard sectors */ + __virtio32 nlba; + __virtio32 reserved; +}; + #...
2017 Mar 28
6
[PATCH] virtio-blk: add DISCARD support to virtio-blk driver
.../* Legacy feature bits */ #ifndef VIRTIO_BLK_NO_LEGACY @@ -114,6 +115,9 @@ struct virtio_blk_config { /* Get device ID command */ #define VIRTIO_BLK_T_GET_ID 8 +/* Discard command */ +#define VIRTIO_BLK_T_DISCARD 16 + #ifndef VIRTIO_BLK_NO_LEGACY /* Barrier before this op. */ #define VIRTIO_BLK_T_BARRIER 0x80000000 @@ -127,8 +131,12 @@ struct virtio_blk_config { struct virtio_blk_outhdr { /* VIRTIO_BLK_T* */ __virtio32 type; - /* io priority. */ - __virtio32 ioprio; + union { + /* io priority. */ + __virtio32 ioprio; + /* discard number of sectors */ + __virtio32 discard_nr_sectors; + } u;...
2017 Mar 28
6
[PATCH] virtio-blk: add DISCARD support to virtio-blk driver
.../* Legacy feature bits */ #ifndef VIRTIO_BLK_NO_LEGACY @@ -114,6 +115,9 @@ struct virtio_blk_config { /* Get device ID command */ #define VIRTIO_BLK_T_GET_ID 8 +/* Discard command */ +#define VIRTIO_BLK_T_DISCARD 16 + #ifndef VIRTIO_BLK_NO_LEGACY /* Barrier before this op. */ #define VIRTIO_BLK_T_BARRIER 0x80000000 @@ -127,8 +131,12 @@ struct virtio_blk_config { struct virtio_blk_outhdr { /* VIRTIO_BLK_T* */ __virtio32 type; - /* io priority. */ - __virtio32 ioprio; + union { + /* io priority. */ + __virtio32 ioprio; + /* discard number of sectors */ + __virtio32 discard_nr_sectors; + } u;...
2017 Mar 28
1
[PATCH] virtio-blk: add DISCARD support to virtio-blk driver
...irtio_blk_config { > > /* Get device ID command */ > > #define VIRTIO_BLK_T_GET_ID 8 > > > > +/* Discard command */ > > +#define VIRTIO_BLK_T_DISCARD 16 > > + > > #ifndef VIRTIO_BLK_NO_LEGACY > > /* Barrier before this op. */ > > #define VIRTIO_BLK_T_BARRIER 0x80000000 > > @@ -127,8 +131,12 @@ struct virtio_blk_config { > > struct virtio_blk_outhdr { > > /* VIRTIO_BLK_T* */ > > __virtio32 type; > > - /* io priority. */ > > - __virtio32 ioprio; > > + union { > > + /* io priority. */ > > + __vi...
2017 Mar 28
1
[PATCH] virtio-blk: add DISCARD support to virtio-blk driver
...irtio_blk_config { > > /* Get device ID command */ > > #define VIRTIO_BLK_T_GET_ID 8 > > > > +/* Discard command */ > > +#define VIRTIO_BLK_T_DISCARD 16 > > + > > #ifndef VIRTIO_BLK_NO_LEGACY > > /* Barrier before this op. */ > > #define VIRTIO_BLK_T_BARRIER 0x80000000 > > @@ -127,8 +131,12 @@ struct virtio_blk_config { > > struct virtio_blk_outhdr { > > /* VIRTIO_BLK_T* */ > > __virtio32 type; > > - /* io priority. */ > > - __virtio32 ioprio; > > + union { > > + /* io priority. */ > > + __vi...
2009 Mar 27
0
[PATCH] lguest: barrier me harder
...e noted that it was pretty poor to use an fdatasync as a + * barrier. But Christoph Hellwig points out that we need a sync + * *afterwards* as well: "Barriers specify no reordering to the front + * or the back." And Jens Axboe confirmed it, so here we are: */ + if (out->type & VIRTIO_BLK_T_BARRIER) + fdatasync(vblk->fd); + /* We can't trigger an IRQ, because we're not the Launcher. It does * that when we tell it we're done. */ add_used(dev->vq, head, wlen);
2009 Mar 27
0
[PATCH] lguest: barrier me harder
...e noted that it was pretty poor to use an fdatasync as a + * barrier. But Christoph Hellwig points out that we need a sync + * *afterwards* as well: "Barriers specify no reordering to the front + * or the back." And Jens Axboe confirmed it, so here we are: */ + if (out->type & VIRTIO_BLK_T_BARRIER) + fdatasync(vblk->fd); + /* We can't trigger an IRQ, because we're not the Launcher. It does * that when we tell it we're done. */ add_used(dev->vq, head, wlen);
2015 Mar 01
3
[PATCH 0/2] virtio_blk header fixes
Now that QEmu reuses linux virtio headers, we noticed a typo in the exported virtio block header. Fix it up. I'd like these merged for 4.0 so that Qemu 2.3 can alredy get it right. Michael S. Tsirkin (2): virtio_blk: typo fix virtio_blk: fix comment for virtio 1.0 include/uapi/linux/virtio_blk.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- MST
2015 Mar 01
0
[PATCH 2/2] virtio_blk: fix comment for virtio 1.0
...6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/virtio_blk.h b/include/uapi/linux/virtio_blk.h index b695ba9..19c66fc 100644 --- a/include/uapi/linux/virtio_blk.h +++ b/include/uapi/linux/virtio_blk.h @@ -119,7 +119,11 @@ struct virtio_blk_config { #define VIRTIO_BLK_T_BARRIER 0x80000000 #endif /* !VIRTIO_BLK_NO_LEGACY */ -/* This is the first element of the read scatter-gather list. */ +/* + * This comes first in the read scatter-gather list. + * For legacy virtio, if VIRTIO_F_ANY_LAYOUT is not negotiated, + * this is the first element of the read scatter-gather list...
2015 Mar 01
3
[PATCH 0/2] virtio_blk header fixes
Now that QEmu reuses linux virtio headers, we noticed a typo in the exported virtio block header. Fix it up. I'd like these merged for 4.0 so that Qemu 2.3 can alredy get it right. Michael S. Tsirkin (2): virtio_blk: typo fix virtio_blk: fix comment for virtio 1.0 include/uapi/linux/virtio_blk.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- MST
2015 Mar 01
0
[PATCH 2/2] virtio_blk: fix comment for virtio 1.0
...6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/virtio_blk.h b/include/uapi/linux/virtio_blk.h index b695ba9..19c66fc 100644 --- a/include/uapi/linux/virtio_blk.h +++ b/include/uapi/linux/virtio_blk.h @@ -119,7 +119,11 @@ struct virtio_blk_config { #define VIRTIO_BLK_T_BARRIER 0x80000000 #endif /* !VIRTIO_BLK_NO_LEGACY */ -/* This is the first element of the read scatter-gather list. */ +/* + * This comes first in the read scatter-gather list. + * For legacy virtio, if VIRTIO_F_ANY_LAYOUT is not negotiated, + * this is the first element of the read scatter-gather list...
2018 Mar 30
2
[PATCH v3] virtio_blk: add DISCARD and WRIET ZEROES command support
...+132,12 @@ struct virtio_blk_config { /* Get device ID command */ #define VIRTIO_BLK_T_GET_ID 8 +/* Discard command */ +#define VIRTIO_BLK_T_DISCARD 11 + +/* Write zeroes command */ +#define VIRTIO_BLK_T_WRITE_ZEROES 13 + #ifndef VIRTIO_BLK_NO_LEGACY /* Barrier before this op. */ #define VIRTIO_BLK_T_BARRIER 0x80000000 @@ -133,6 +157,21 @@ struct virtio_blk_outhdr { __virtio64 sector; }; +/* + * discard/write zeroes range for each request. + */ +struct virtio_blk_discard_write_zeroes { + /* discard/write zeroes start sector */ + __virtio64 sector; + /* number of discard/write zeroes sectors */ + _...
2018 Mar 30
2
[PATCH v3] virtio_blk: add DISCARD and WRIET ZEROES command support
...+132,12 @@ struct virtio_blk_config { /* Get device ID command */ #define VIRTIO_BLK_T_GET_ID 8 +/* Discard command */ +#define VIRTIO_BLK_T_DISCARD 11 + +/* Write zeroes command */ +#define VIRTIO_BLK_T_WRITE_ZEROES 13 + #ifndef VIRTIO_BLK_NO_LEGACY /* Barrier before this op. */ #define VIRTIO_BLK_T_BARRIER 0x80000000 @@ -133,6 +157,21 @@ struct virtio_blk_outhdr { __virtio64 sector; }; +/* + * discard/write zeroes range for each request. + */ +struct virtio_blk_discard_write_zeroes { + /* discard/write zeroes start sector */ + __virtio64 sector; + /* number of discard/write zeroes sectors */ + _...
2009 Sep 29
0
[PATCH 3/4] virtio_blk: implement a request-based ID command, VIRTIO_BLK_T_GET_ID
...IO_BLK_T_GET_ID support */ #define VIRTIO_BLK_ID_BYTES (sizeof(__u16[256])) /* IDENTIFY DATA */ @@ -65,6 +66,9 @@ struct virtio_blk_config { /* Cache flush command */ #define VIRTIO_BLK_T_FLUSH 4 +/* Get ID command */ +#define VIRTIO_BLK_T_GET_ID 8 + /* Barrier before this op. */ #define VIRTIO_BLK_T_BARRIER 0x80000000
2009 Sep 29
0
[PATCH 3/4] virtio_blk: implement a request-based ID command, VIRTIO_BLK_T_GET_ID
...IO_BLK_T_GET_ID support */ #define VIRTIO_BLK_ID_BYTES (sizeof(__u16[256])) /* IDENTIFY DATA */ @@ -65,6 +66,9 @@ struct virtio_blk_config { /* Cache flush command */ #define VIRTIO_BLK_T_FLUSH 4 +/* Get ID command */ +#define VIRTIO_BLK_T_GET_ID 8 + /* Barrier before this op. */ #define VIRTIO_BLK_T_BARRIER 0x80000000
2007 Jul 03
6
[PATCH 1/3] Virtio draft IV
In response to Avi's excellent analysis, I've updated virtio as promised (apologies for the delay, travel got in the way). === This attempts to implement a "virtual I/O" layer which should allow common drivers to be efficiently used across most virtual I/O mechanisms. It will no-doubt need further enhancement. The details of probing the device are left to hypervisor-specific
2007 Jul 03
6
[PATCH 1/3] Virtio draft IV
In response to Avi's excellent analysis, I've updated virtio as promised (apologies for the delay, travel got in the way). === This attempts to implement a "virtual I/O" layer which should allow common drivers to be efficiently used across most virtual I/O mechanisms. It will no-doubt need further enhancement. The details of probing the device are left to hypervisor-specific