linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 0/1] ext4: Undelete Feature for Ext4
@ 2014-03-18 15:09 Lubos Uhliarik
  2014-03-18 17:14 ` tytso
  0 siblings, 1 reply; 5+ messages in thread
From: Lubos Uhliarik @ 2014-03-18 15:09 UTC (permalink / raw)
  To: linux-ext4; +Cc: lczerner, vojnar


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






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

end of thread, other threads:[~2014-05-08 19:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-18 15:09 [RFC][PATCH 0/1] ext4: Undelete Feature for Ext4 Lubos Uhliarik
2014-03-18 17:14 ` tytso
2014-03-18 17:28   ` Lukáš Czerner
2014-04-18 16:01   ` Lubos Uhliarik
2014-05-08 21:11   ` Lubos Uhliarik

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