Matthew Dillon wrote: > :Yeah, I was thinking about wildcarding as well. > : > :But is it possible to implement it within cmd_prune.c, or do I have to > :modify the ioctl kernel code? If done in cmd_prune.c, I somehow have to > :iterate over all deleted files and call the prune command for it. > : > :I thought, it's easier to introduce a check in the kernel, whether the > :file that should be pruned matches a given pattern. Doesn't sound very > :hard to do, if it is easy to get the pathname for a given inode. > : > :Are you thinking about something like the archive flag? > > I think it is probably best to implement that level of sophistication > in the utility rather then in the kernel. The pruning ioctl code > has no concept of files or directories... literally it has no concept. > All it understands, really, are object id's (aka inode numbers) and > records. > > The hammer utility on the other hand can actually scan the filesystem > hierarchy. > > Locating wholely deleted files and directories is not hard to do. > As-of queries can be used to access earlier versions of a directory. Hm, how would that work, if I want it to behave like the prune command? I'd need to traverse a lot of filesystem trees, to just determine which files were deleted. Imagine: compare /mnt with /mnt@1-hour-ago and prune deleted files. compare /mnt@1-hour-ago with /mnt@2-hours-ago ... I wouldn't find files that were deleted in between 1-hour-ago and 2-hours-ago. To make it work, I'd need to compare the filesystem trees of every possible timestamp. It's probably easier, and more efficient, to have separate filesystems. > We might want to add some kernel support to make it more efficient, > for example to make it possible for the hammer utility to have > visibility into all deleted directory entries. It could use that > visbility to do as-of accesses and through that mechanic would thus > have visibility into all deleted files and directories. Does this mean, I'd see files like: /a@12312323 /a@12312323/x@... /b@43434343 Regards, Michael
| Pardo | Re: pthread_create() slow for many threads; also time to revisit 64b context switc... |
| Andrew Morton | 2.6.23-rc4-mm1 |
| Albert Cahalan | JIT emulator needs |
| Jack Stone | [PATCH 5/7] Replace DPRINTK with pr_debug in ncpfs |
git: | |
| Theodore Tso | Re: git on MacOSX and files with decomposed utf-8 file names |
| Johan Herland | [PATCH 0/6] Refactor the tag object |
| Ingo Molnar | [OT] Your branch is ahead of the tracked remote branch 'origin/master' by 50 commi... |
| Johannes Schindelin | [WIP PATCH] Add 'git fast-export', the sister of 'git fast-import' |
| Mark Reitblatt | US Export of Cryptography |
| Rico Secada | About non-free software in OpenBSD |
| Reza Muhammad | Dell PowerEdge 1950 III / R200 |
| Ivo Chutkin | problem installing some packages on 4.2 |
| David Miller | Re: [RFC PATCH 05/13] ip: support for TX timestamps on UDP and RAW sockets |
| Adrian Bunk | [2.6 patch] remove CONFIG_NET_SCH_RR |
| Erik Mouw | Lots of "BUG eth1 code -5 qlen 0" messages in 2.6.24 |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
