public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: "Lars Täuber" <taeuber@bbaw.de>
To: Theodore Tso <tytso@mit.edu>
Cc: Manish Katiyar <mkatiyar@gmail.com>, linux-ext4@vger.kernel.org
Subject: Re: undelete still opened file
Date: Fri, 17 Oct 2008 15:39:57 +0200	[thread overview]
Message-ID: <20081017153957.28a4dd67.taeuber@bbaw.de> (raw)
In-Reply-To: <20081017132443.GA8755@mit.edu>

Hi Theodore,


Theodore Tso <tytso@mit.edu> schrieb:
> On Fri, Oct 17, 2008 at 02:33:11PM +0200, Lars Täuber wrote:
> > Is the space of the file on the underlying block device already
> > marked as free? Or does this happen after all processes have closed
> > all file descriptors pointing to the file?
> 
> No, the space on the file is not yet marked as free.  *However* for
> ext3 and ext4, the inode has been placed on the orphaned inode list,
> so that if the system crashes, part of the journal recovery process
> will at that point free the blocks.

not that it is a way I would go, but theoretically: I could provoke a crash and mount the ext3 filesystem as ext2 and restore the file?

> > I really want to undo the deletion. (get a link/name connected to
> > the root inode of the file again) Is there a way to do this?
> 
> Not currently using ext3/ext4, no.  There would have to be an entirely
> new system call or other userspace interface for something like this.

Is this planned?

But a solution should be independent of the real filesystem. Because the file is still somewhere in the ram and represented in linux vfs, isn't it?
It only needs to be copied/recreated on to a (different) filesystem somehow.

Regards
Lars
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-10-17 13:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-17 10:08 undelete still opened file Lars Täuber
2008-10-17 10:33 ` Manish Katiyar
2008-10-17 12:33   ` Lars Täuber
2008-10-17 13:24     ` Theodore Tso
2008-10-17 13:39       ` Lars Täuber [this message]
2008-10-17 14:02         ` Manish Katiyar
2008-10-17 16:14         ` Theodore Tso
2008-10-20  7:23           ` Lars Täuber

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=20081017153957.28a4dd67.taeuber@bbaw.de \
    --to=taeuber@bbaw.de \
    --cc=linux-ext4@vger.kernel.org \
    --cc=mkatiyar@gmail.com \
    --cc=tytso@mit.edu \
    /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