From: Mike Fedyk <mfedyk@matchmail.com>
To: Martin Dalecki <dalecki@evision-ventures.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>, linux-kernel@vger.kernel.org
Subject: Re: ext3 and undeletion
Date: Tue, 26 Feb 2002 09:22:27 -0800 [thread overview]
Message-ID: <20020226172227.GM4393@matchmail.com> (raw)
In-Reply-To: <05cb01c1be1e$c490ba00$1a01a8c0@allyourbase> <20020225172048.GV20060@matchmail.com> <02022518330103.01161@grumpersII> <a5f7s4$2o1$1@cesium.transmeta.com> <20020226160544.GD4393@matchmail.com> <3C7BB9A3.30408@evision-ventures.com> <20020226164316.GH4393@matchmail.com> <3C7BBDE2.8050207@evision-ventures.com> <20020226170520.GJ4393@matchmail.com> <3C7BC0E5.3060300@evision-ventures.com>
In-Reply-To: <3C7BC0E5.3060300@evision-ventures.com>
On Tue, Feb 26, 2002 at 06:07:49PM +0100, Martin Dalecki wrote:
> >>For the educated user it was always a pain
> >>in the you know where, to constantly run out of quota space due to
> >>file versioning.
> >>
> >
> >Ahh, so we'd need to chown the files to root (or a configurable user and
> >group) to get around the quota issue.
>
> Welcome to my kill-file. This just shows that you don't even have basic
> background.
>
Ok guys,
Maybe you'll respect the ideas coming from Andreas Dilger, as some of you
obviously don't like some of my ideas.
Here goes:
On Feb 25, 2002 13:45 -0800, Mike Fedyk wrote:
> I don't think we need anything very complicated either.
>
> Here's what it probably should do *in libc*:
> o trap unlink calls
> o if link count >= 2 then act normally
> o if link count == 1 then move file (including directory structure from
> mount point to $mount_point/.deleted/$path/file)
Well, my idea on this is that you don't check the link count at all. Why
should it be special if I delete /home/adilger/foo, when it is also linked
to /home/adilger/bar? If I want to undelete /home/adilger/foo, then I
should be able to. Since it is on the same filesystem, it doesn't take any
more space in the filesystem to keep this link, and in fact avoids the
race condition entirely.
Only the undelete daemon would do real deletions, everything else would
_always_ do something like:
base=`echo $file | sed "s#$mntpt/##"`
mv $file $mntpt/.undelete/$base[.timestamp/username/etc]
> The undelete daemon (undeleted) would do:
> o monitor how full the various deleted directories are (always keep some
> percentage empty to allow new files to be deleted without overflowing
> the space configured for undelete)
> o enforce configurable setting for how much space .undelete will hold
> o delete any single file that will not fit in .undelete's space no matter
> how new it is
> o any other sysadmin notification type of things
>
> Should the glibc routine interact directly with the undelete daemon so that
> the case of a lot of deletion of large files will be handled faster?
> Otherwise, if you delete a lot of files, df won't show the free space
> getting bigger until undeleted did a rescan of it's undelete dirs and freed
> the old deleted files.
Well, my take on this would be that since we are only ever moving files over
to .undelete, then we are never using up more space than what we are already
using, so we do not need to ever synchronously free space to delete a file.
We could always have unlink() write to a socket (e.g. .undelete/daemon or so)
telling it which file it just deleted, and the daemon sleeps on this socket
until woken to see if it needs to do cleanup. Having the name of the
recently deleted file passed in allows it to do things like clean up old
copies of that file quickly, etc.
Note also that the "unrm" command would need some smarts so that it can
match against variations of $base, because programs may rename a file,
make a new copy, and then delete the renamed file (e.g. emacs, vi, etc).
It would probably do some sort of regexp on the basename() of the file.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
next prev parent reply other threads:[~2002-02-26 17:22 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fa.n4lfl6v.h4chor@ifi.uio.no>
2002-02-25 17:06 ` ext3 and undeletion Dan Maas
2002-02-25 17:20 ` Mike Fedyk
2002-02-25 23:33 ` Tom Rauschenbach
2002-02-26 0:27 ` Bernd Eckenfels
2002-02-26 5:53 ` H. Peter Anvin
2002-02-26 16:05 ` Mike Fedyk
2002-02-26 16:31 ` H. Peter Anvin
2002-02-26 16:40 ` Mike Fedyk
2002-02-26 16:55 ` H. Peter Anvin
2002-02-26 17:12 ` Mike Fedyk
2002-02-26 16:36 ` Martin Dalecki
2002-02-26 16:43 ` Mike Fedyk
2002-02-26 16:54 ` Martin Dalecki
2002-02-26 17:05 ` Mike Fedyk
2002-02-26 17:07 ` Martin Dalecki
2002-02-26 17:16 ` Mike Fedyk
2002-02-26 17:22 ` Rik van Riel
2002-02-26 17:38 ` Mike Fedyk
2002-02-26 18:14 ` Andreas Ferber
2002-02-26 18:55 ` Andreas Dilger
2002-02-26 22:04 ` Mike Fedyk
2002-02-26 18:34 ` Richard B. Johnson
2002-02-26 18:34 ` H. Peter Anvin
2002-02-26 18:47 ` Richard B. Johnson
2002-02-26 18:52 ` Andreas Dilger
2002-02-28 15:05 ` Andreas Ferber
2002-02-28 22:37 ` Andreas Dilger
2002-02-28 22:55 ` James D Strandboge
2002-03-01 4:44 ` Mike Fedyk
2002-03-04 16:26 ` Pavel Machek
2002-03-05 21:29 ` Andreas Ferber
2002-03-06 11:30 ` Pavel Machek
2002-03-05 22:07 ` Richard B. Johnson
2002-02-26 17:22 ` Mike Fedyk [this message]
2002-03-01 0:19 ` Rick Lindsley
2002-03-01 1:02 ` Andreas Dilger
2002-02-26 17:54 ` Andreas Dilger
2002-02-26 18:24 ` Alan Cox
2002-03-04 15:40 ` Pavel Machek
2002-02-25 18:08 ` Richard B. Johnson
2002-02-25 18:40 ` Mike Fedyk
2002-02-25 19:49 ` Andreas Dilger
2002-02-25 22:05 ` ext3 and undeletion (libtrash) Omen Wild
2002-03-05 23:04 ext3 and undeletion Rose, Billy
2002-03-06 20:03 ` Mark Mielke
2002-03-07 21:30 ` Patrick Lynch
-- strict thread matches above, loose matches on Subject: below --
2002-02-28 10:37 Randal, Phil
2002-02-26 18:39 Dana Lacoste
2002-02-26 18:47 ` Daniel Gryniewicz
2002-02-26 18:51 ` David Lang
2002-02-26 17:48 Rose, Billy
2002-02-26 17:53 ` Martin Dalecki
2002-02-26 18:03 ` Mike Fedyk
2002-02-26 17:56 ` Rik van Riel
2002-02-26 19:41 ` Andreas Dilger
2002-02-26 18:00 ` H. Peter Anvin
2002-02-26 18:15 ` Andreas Dilger
2002-02-26 18:23 ` Jakob Østergaard
2002-02-26 18:19 ` David Lang
2002-02-26 18:29 ` Andreas Ferber
2002-02-27 21:00 ` James D Strandboge
2002-02-27 21:40 ` Alan Cox
2002-02-27 22:16 ` James D Strandboge
2002-02-27 22:33 ` Alan Cox
2002-02-27 23:03 ` James D Strandboge
2002-02-28 0:29 ` James D Strandboge
2002-03-04 2:17 ` Mike Fedyk
2002-03-04 15:12 ` Alan Cox
2002-03-04 15:33 ` Mike Fedyk
2002-03-04 19:17 ` James D Strandboge
2002-03-04 20:08 ` Jesse Pollard
2002-03-02 17:36 ` Pablo Alcaraz
2002-02-25 16:46 Rose, Billy
2002-02-25 3:27 Steven Walter
2002-02-25 5:08 ` Andreas Dilger
2002-02-25 10:16 ` Fabrice Bellet
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=20020226172227.GM4393@matchmail.com \
--to=mfedyk@matchmail.com \
--cc=dalecki@evision-ventures.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
/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