All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu block <qemu-block@nongnu.org>
Cc: qemu-devel <qemu-devel@nongnu.org>, Max Reitz <mreitz@redhat.com>,
	Kevin Wolf <kwolf@redhat.com>, "Denis V. Lunev" <den@openvz.org>,
	Eric Blake <eblake@redhat.com>
Subject: Re: What prevents discarding a cluster during rewrite?
Date: Tue, 23 Feb 2021 00:42:42 +0300	[thread overview]
Message-ID: <21d6f4e3-1512-50b3-d2a0-7969a49f18bb@virtuozzo.com> (raw)
In-Reply-To: <198596cd-4867-3da5-cd8f-68c1c570a52b@virtuozzo.com>

23.02.2021 00:30, Vladimir Sementsov-Ogievskiy wrote:
> Hi all!
> 
> Thinking of how to prevent dereferencing to zero (and discard) of host cluster during flush of compressed cache (which I'm working on now), I have a question.. What prevents it for normal writes?
> 

I have no idea about why didn't it fail for years.. May be, I'm missing something?

I have idea of fixing: increase the refcount of host cluster before write to data_file (it's important to increase refacount in same s->lock critical section where we get host_offset) and dereference it after write.. It should help. Any thoughts?

-- 
Best regards,
Vladimir


  reply	other threads:[~2021-02-22 21:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 21:30 What prevents discarding a cluster during rewrite? Vladimir Sementsov-Ogievskiy
2021-02-22 21:42 ` Vladimir Sementsov-Ogievskiy [this message]
2021-02-23 10:35   ` Kevin Wolf
2021-02-23 15:23     ` Vladimir Sementsov-Ogievskiy
2021-02-23 16:29       ` Kevin Wolf
2021-02-24  6:04         ` Vladimir Sementsov-Ogievskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21d6f4e3-1512-50b3-d2a0-7969a49f18bb@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=den@openvz.org \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.