All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas McClendon <dmc.lists@filteredperception.org>
To: dm-devel@redhat.com
Subject: Re: DM_snapshot_cow filesystem (dmsetup create snapshot)
Date: Thu, 01 Dec 2011 21:44:53 -0600	[thread overview]
Message-ID: <4ED849B5.7020206@filteredperception.org> (raw)
In-Reply-To: <20111201202029.GC7595@agk-dp.fab.redhat.com>

On 12/01/2011 02:20 PM, Alasdair G Kergon wrote:
> On Thu, Dec 01, 2011 at 02:18:37PM -0600, Douglas McClendon wrote:
>> The overlay device in this situation is a read-write tmpfile in tmpfs,
>> looped to be available as the dm-snapshot 'snapshot/overlay device'.
>
> Ah - well if your base device is already read-only, then there is no
> corruption and you should be able to edit the bit of the disk image
> that says 'this image is invalid' and recover it read-only or extend it.

The commandline to do the 'edit' was requested for users like Fred, and 
because I guess one day I might find myself wanting to do the same.

As per possibly avoiding the need for such a workaround, and thinking 
about the non-read-only base situation, does the following request sound 
at least logically consistent, and correct in its assumptions-

Currently in a dm-snapshot case such as the fedora liveusb, the instant 
a persistent snapshot becomes full, it is marked as invalid, and further 
accesses result in (fixme?).  But it would be preferable if instead of 
being marked invalid at the instant it fills up, it is instead marked as 
invalid at the first instant after it is full, and its base device gets 
written to.  And beyond that as a second change from the current state 
of things, the virtual device using the overlay falls into a read-only 
state the instant the overlay it is using reaches a full state. 
(instead of as happens now ?? maybe selective write failures based on 
whether or not the write destination is in a chunk within the full 
overlay ??)

Thus in read-only base cases, the overlay never gets marked as invalid, 
and no users have any need for a workaround tool or commandline to flip 
the invalid bit(?) to valid, in order to mount and use/recover the data 
present in the snapshot.

-dmc

  parent reply	other threads:[~2011-12-02  3:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-29 11:19 DM_snapshot_cow filesystem (dmsetup create snapshot) Mr Dash Four
2011-10-29 20:49 ` Alasdair G Kergon
2011-11-27 22:31   ` Frederick Grose
2011-11-28  1:08     ` Douglas McClendon
2011-11-29  6:22       ` Frederick Grose
2011-11-30  2:09         ` Douglas McClendon
2011-11-30 21:48           ` Frederick Grose
2011-11-30 22:03             ` Alasdair G Kergon
2011-11-30 23:34               ` Douglas McClendon
2011-12-01 14:12                 ` Alasdair G Kergon
2011-12-01 20:18                   ` Douglas McClendon
2011-12-01 20:20                     ` Alasdair G Kergon
2011-12-01 20:26                       ` Douglas McClendon
2011-12-02  3:44                       ` Douglas McClendon [this message]
2011-12-02  8:46                         ` Alasdair G Kergon
2011-12-02 17:42                           ` Frederick Grose
2011-12-01 20:21                   ` Douglas McClendon

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=4ED849B5.7020206@filteredperception.org \
    --to=dmc.lists@filteredperception.org \
    --cc=dm-devel@redhat.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 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.