This codding style is wrong:
On 01.11.2022 10:25, Andrey Zhadchenko wrote:
+static void vhost_blk_req_done(struct bio *bio)
+{
+ struct vhost_blk_req *req = bio->bi_private;
+ struct vhost_blk *blk = req->blk;
+ int err = blk_status_to_errno(bio->bi_status);
+
+ if (err)
On 01.11.2022 10:25, Andrey Zhadchenko wrote:
+ snprintf(blk->serial, VIRTIO_BLK_ID_BYTES, "vhost-blk%d", gen++);
Still no explanation comment about gen++ thing, please do.
--
Best regards, Tikhomirov Pavel
Software Developer, Virtuozzo.
___
De
On 01.11.2022 10:25, Andrey Zhadchenko wrote:
+ bio_len = (total_pages / (UINT_MAX / PAGE_SIZE) + 1) * sizeof(struct
bio *);
excess space ^^
--
Best regards, Tikhomirov Pavel
Software Developer, Virtuozzo.
On 01.11.2022 10:25, Andrey Zhadchenko wrote:
+/* It is forbidden to call more than one vhost_blk_flush() simultaneously */
Let's add at least a warning for this case:
+static void vhost_blk_flush(struct vhost_blk *blk)
+{
+ int flush_bin;
+
+ spin_lock(&blk->flush_lock);
WAR
On 01.11.2022 10:25, Andrey Zhadchenko wrote:
+/* It is forbidden to call more than one vhost_blk_flush() simultaneously */
+static void vhost_blk_flush(struct vhost_blk *blk)
+{
+ int flush_bin;
+
+ spin_lock(&blk->flush_lock);
+ blk->during_flush = 1;
+ flush_bin = bl
On 04.11.2022 11:54, Pavel Tikhomirov wrote:
On 01.11.2022 10:25, Andrey Zhadchenko wrote:
+ snprintf(blk->serial, VIRTIO_BLK_ID_BYTES, "vhost-blk%d", gen++);
Still no explanation comment about gen++ thing, please do.
Ah sorry, now I see that serial can be configured from userspace by
On 11/4/22 14:31, Pavel Tikhomirov wrote:
On 01.11.2022 10:25, Andrey Zhadchenko wrote:
+/* It is forbidden to call more than one vhost_blk_flush()
simultaneously */
+static void vhost_blk_flush(struct vhost_blk *blk)
+{
+ int flush_bin;
+
+ spin_lock(&blk->flush_lock);
+ blk->duri
Initially in commit 80da9c2abac9 ("ploop: add a standby mode") a flag
on the block device's request queue was added to put the queue
into standby mode on EBUSY. Later on, the list with errors was extended
in commit e868f1e0b1a3 ("ploop: move to standby after -ENOTCONN too") and
in commit 4b1eb3f667
On 04.11.2022 15:28, Andrey Zhadchenko wrote:
On 11/4/22 14:31, Pavel Tikhomirov wrote:
On 01.11.2022 10:25, Andrey Zhadchenko wrote:
+/* It is forbidden to call more than one vhost_blk_flush()
simultaneously */
+static void vhost_blk_flush(struct vhost_blk *blk)
+{
+ int flush_bin;
+
Cool, thanks!
От: Pavel Tikhomirov
Отправлено: 4 ноября 2022 г. 15:56
Кому: Andrey Zhadchenko
Копия: devel@openvz.org ; Konstantin Khorenko
Тема: Re: [PATCH RH9 v4 01/10] drivers/vhost: vhost-blk accelerator for
virtio-blk guests
On 04.11.2022 15:28, Andrey
10 matches
Mail list logo