[issue1283] "hammer cleanup" ignores some PFS

Patrick Georgi (via DragonFly issue tracker) sinknull at crater.dragonflybsd.org
Mon Feb 16 14:12:02 PST 2009


New submission from Patrick Georgi <patrick at georgi-clan.de>:

The periodical "hammer cleanup" run doesn't handle all active PFS. It scans
through the mount points of fstype "hammer" or "null" whose device starts with
/pfs.
I have two hammer filesystems, and keep the pfs symlinks in their respective
root directories, so "/pfs" didn't match "/backup/pfs".
Attached patch changes the test to look for the occurrence of "/@@0x" in the
device path, which should be rare enough to only match hammer filesystems.

----------
files: 20090216-1-hammer-cleanup.diff
messages: 6188
nosy: pgeorgi
priority: bug
status: unread
title: "hammer cleanup" ignores some PFS

_____________________________________________________
DragonFly issue tracker <bugs at lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue1283>
_____________________________________________________diff --git a/sbin/hammer/cmd_cleanup.c b/sbin/hammer/cmd_cleanup.c
index 9053532..81fc02f 100644
--- a/sbin/hammer/cmd_cleanup.c
+++ b/sbin/hammer/cmd_cleanup.c
@@ -115,7 +115,7 @@ hammer_cmd_cleanup(char **av, int ac)
 				continue;
 			if ((strncmp(ptr, "(hammer,", 8) == 0) ||
 			    ((strncmp(ptr, "(null,", 6) == 0) &&
-			     (strncmp(fs, "/pfs", 4) == 0)))
+			     (strstr(fs, "/@@0x") != NULL)))
 				do_cleanup(path);
 		}
 		fclose(fp);




More information about the Bugs mailing list