linux-nilfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Ability to discard all changes after a point in time?
@ 2011-05-27  6:28 dexen deVries
       [not found] ` <201105270828.32843.dexen.devries-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: dexen deVries @ 2011-05-27  6:28 UTC (permalink / raw)
  To: linux-nilfs-u79uwXL29TY76Z2rM5mHXA

Hi,


recently I was searching for a way to discard all changes after a certain 
point in time -- that is, to rollback filesystem state to a particular 
checkpoint. I couldn't find a way, is there any?

If not, I'd like to request such functionality. Preferrably selectable at 
mount time, via an argument to mount (or the `rootflags' kernel parameter).

Something along the lines `rollbackto=<checkpoint-number>'. 

The desired effect is to set the indicated checkpoint as the latest one, so all 
subsequent changes to filesystem are discarded.


What are your thoughts on that?


Regards,
-- 
dexen deVries

``One can't proceed from the informal to the formal by formal means.''
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: Ability to discard all changes after a point in time?
@ 2011-05-27  7:44 Mateusz Jan Przybylski
       [not found] ` <201105270944.52201.m.przybylski-HTS31/ZL/NClPcVs/6D9LQ@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Mateusz Jan Przybylski @ 2011-05-27  7:44 UTC (permalink / raw)
  To: linux-nilfs-u79uwXL29TY76Z2rM5mHXA

Hi Ryusuke,

On Friday 27 of May 2011 09:34:34 you wrote:
> The feature is indeed one of todo items, and I just have been
> considering the topic for upcoming LinuxCon Japan.
> 
> At present, I made a patchset which can revert only one fully deleted
> regular file without duplicating data blocks. (This work derives your
> post titled "It is not possible to restore file from a mounted
> snapshot using a hardlink" and the successive reflink topic.)
> 
> 
> The challenge in the rollback (or revert) feature is to handle
> lifetime of each disk block, which is maintained for garbage
> collection.  (a disk address table, which we call DAT file, preserves
> this metadata).
> 
> The mount-time whole checkpoint reversion, that is to say rollback,
> seems rather difficult than this.  In my estimation, it would take too
> long time to rewrite whole DAT file.

thanks for prompt reply.

I'm surprised this is that complex. My limited understanding of NILFS2 was 
that the latest complete checkpoint is considered `the current one' during 
mount. The big idea was to irreversibly destroy (by actually overwritting 
relevant metadata) the checkpoints if admin indicated that wish with the 
supposed new `rollbackto=<checkpoint_number>' parameter. Just before the mount 
operation; perhaps even going through the normal rountine for recovery after 
unclean mount.

After that, the latest remaining checkpoint (the one indicated in option) 
would be the current state of the FS. The metadata from that checkpoint would 
be used, and newer metadata from newer checkpoints would simply be 
inaccessible to the driver. No new checkpoint would be created in that case, 
unlike the action of `rmcp' command.

How far am I here from the actual workings of the filesystem?


meta: oops, sent reply directly to Ryusuke again. Sorry~


Regards
--
dexen deVries

[[[↓][→]]]

For example, if the first thing in the file is:
   <?kzy irefvba="1.0" rapbqvat="ebg13"?>
an XML parser will recognize that the document is stored in the traditional 
ROT13 encoding.

(( Joe English, http://www.flightlab.com/~joe/sgml/faq-not.txt ))
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-06-02 11:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-27  6:28 Ability to discard all changes after a point in time? dexen deVries
     [not found] ` <201105270828.32843.dexen.devries-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-05-27  7:34   ` Ryusuke Konishi
2011-06-01 12:33   ` Jiro SEKIBA
     [not found]     ` <87hb89loja.wl%jir-27yqGEOhnJbQT0dZR+AlfA@public.gmane.org>
2011-06-01 12:41       ` dexen deVries
     [not found]         ` <201106011441.12465.dexen.devries-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-06-02 11:36           ` Jiro SEKIBA
  -- strict thread matches above, loose matches on Subject: below --
2011-05-27  7:44 Mateusz Jan Przybylski
     [not found] ` <201105270944.52201.m.przybylski-HTS31/ZL/NClPcVs/6D9LQ@public.gmane.org>
2011-05-27 14:03   ` Ryusuke Konishi

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).