duperval@ERE.UMontreal.CA (Duperval Laurent) writes:You'd think fsck would handle this, but for some reason Linus hasn't felt safe in doing so. What I've done in the past is to build a kernel that lets you unlink directories. Running that kernel I then remove the bad directory, and then run fsck to recover the space and inodes. Look for the routine minix_unlink in /usr/src/linux/fs/minix/namei.c. Remove the code if (S_ISDIR(inode->i_mode)) goto end_unlink. Once you're running that kernel, make yourself a utility "unlink": main (argc, argv) int argc; char **argv; { if (argc > 0) unlink(argv[1]) }; Use that to remove the bad directory. Now run fsck. (By the way, although I've done this a couple of times in the past, I haven't kept copies of my old changes, so I'm giving you this without having tested it. That is, I know the method works, but there could be a typo in what I'm giving you.)
| Greg Kroah-Hartman | [PATCH 019/196] DMA: Convert from class_device to device for DMA engine |
| Tejun Heo | [PATCH 4/7] FUSE: implement direct lseek support |
| Parag Warudkar | BUG: soft lockup - CPU#1 stuck for 15s! [swapper:0] |
| Greg Smith | PostgreSQL pgbench performance regression in 2.6.23+ |
git: | |
| Len Brown | fatal: unable to create '.git/index': File exists |
| Dan Farina | backup or mirror a repository |
| André Goddard Rosa | Using kdiff3 to compare two different revisions of a folder |
| Petko Manolov | git and binary files |
| Richard Stallman | Real men don't attack straw men |
| Steve B | Intel Atom and D945GCLF2 |
| Jeff Ross | U320 Drive on U160 controller? |
| Sunnz | How do I configure sendmail? |
| Eric Dumazet | [PATCH] fs: pipe/sockets/anon dentries should not have a parent |
| Denys Fedoryshchenko | thousands of classes, e1000 TX unit hang |
| Wei Yongjun | [PATCH] xfrm: Fix kernel panic when flush and dump SPD entries |
| Steffen Klassert | [RFC PATCH 4/5] crypto: allow allocation of percpu crypto transforms |
