linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lubos Uhliarik <uhliarik@seznam.cz>
To: linux-ext4@vger.kernel.org
Cc: lczerner@redhat.com, vojnar@fit.vutbr.cz
Subject: [RFC][PATCH 0/1] ext4: Undelete Feature for Ext4
Date: Tue, 18 Mar 2014 16:09:30 +0100	[thread overview]
Message-ID: <1395155370.15587.9.camel@zerobox.home> (raw)


Hi all,

I'm sending you a patch (see the 1/1 patch) which should make
undelete process for deleted files on ext4 easier. I do this 
patch as a part of my Barchelor's thesis with support of Red Hat
company. 

The main changes in patch are following:

a) commented out zeroing ex->ee_len, ee->start_hi and ee->start_lo,
because these entries are essential for undelete process

b) only in inode structure, storing original value of eh->depth and
eh->entries. These values are stored to unused entry eh_generation in
struct ext4_extent_header after all extents have been definitely
removed. eh->entries is 16 bits value and is stored in first half of 32
bits of eh->generation. eh->depth is also 16 bits value and is stored in
second half of eh->generation. For storing these valued, I wrote macros
to ext4_extents.h. It's should NOT cause problems to store values in 
eh->generation, because eh->generation is used only, when file is NOT
deleted. After delete process, eh->generation can have any value.

c) if deletion process removes extents from block, which is not inode
(eh->depth > 0), then I'm storing only eh->entries original value to
eh->generation, because eh->depth will stay untouched. 

d) if delete process removes all extent_idx structures from block, which
is not in inode (eh->depth > 0), then I'm storing also only eh->entries
original value. But in this case, I need to store original eh->entries
value for each level separately, because delete process is changing
eh->entries value during walking through extent tree. This problem is
solved by allocating array, where I will store original values


This patch shouldn't break ext4, I tested it with xfs_tests and tests 
were successfull.

I also successfully created undelete application, based on e2fslibs,
which demonstrates undelete process. (link:
https://github.com/uhliarik/ext4-undelete )


Thanks! 
Lubos Uhliarik






             reply	other threads:[~2014-03-18 15:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-18 15:09 Lubos Uhliarik [this message]
2014-03-18 17:14 ` [RFC][PATCH 0/1] ext4: Undelete Feature for Ext4 tytso
2014-03-18 17:28   ` Lukáš Czerner
2014-04-18 16:01   ` Lubos Uhliarik
2014-05-08 21:11   ` Lubos Uhliarik

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=1395155370.15587.9.camel@zerobox.home \
    --to=uhliarik@seznam.cz \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=vojnar@fit.vutbr.cz \
    /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).