From: Mike Snitzer <snitzer@redhat.com>
To: Nikos Tsironis <ntsironis@arrikto.com>
Cc: dm-devel@redhat.com, agk@redhat.com
Subject: Re: [dm-devel] [PATCH v2] dm era: only resize metadata in preresume
Date: Thu, 11 Feb 2021 09:45:32 -0500 [thread overview]
Message-ID: <20210211144532.GB13067@redhat.com> (raw)
In-Reply-To: <20210211142243.31062-1-ntsironis@arrikto.com>
On Thu, Feb 11 2021 at 9:22am -0500,
Nikos Tsironis <ntsironis@arrikto.com> wrote:
> Metadata resize shouldn't happen in the ctr. The ctr loads a temporary
> (inactive) table that will only become active upon resume. That is why
> resize should always be done in terms of resume. Otherwise a load (ctr)
> whose inactive table never becomes active will incorrectly resize the
> metadata.
>
> Also, perform the resize directly in preresume, instead of using the
> worker to do it.
>
> The worker might run other metadata operations, e.g., it could start
> digestion, before resizing the metadata. These operations will end up
> using the old size.
>
> This could lead to errors, like:
>
> device-mapper: era: metadata_digest_transcribe_writeset: dm_array_set_value failed
> device-mapper: era: process_old_eras: digest step failed, stopping digestion
>
> The reason of the above error is that the worker started the digestion
> of the archived writeset using the old, larger size.
>
> As a result, metadata_digest_transcribe_writeset tried to write beyond
> the end of the era array.
>
> Fixes: eec40579d84873 ("dm: add era target")
> Cc: stable@vger.kernel.org # v3.15+
> Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
> ---
> drivers/md/dm-era-target.c | 21 ++++++++++-----------
> 1 file changed, 10 insertions(+), 11 deletions(-)
Thanks, I replaced the patch I created (that used a worker to resize
from preresume) with this.
Now staged for 5.12.
Mike
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
prev parent reply other threads:[~2021-02-11 14:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-11 14:22 [dm-devel] [PATCH v2] dm era: only resize metadata in preresume Nikos Tsironis
2021-02-11 14:45 ` Mike Snitzer [this message]
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=20210211144532.GB13067@redhat.com \
--to=snitzer@redhat.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=ntsironis@arrikto.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).