DragonFly bugs List (threaded) for 2009-02
DragonFly BSD
DragonFly bugs List (threaded) for 2009-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[issue1283] "hammer cleanup" ignores some PFS


From: "Patrick Georgi \(via DragonFly issue tracker\)" <sinknull@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 16 Feb 2009 22:09:59 +0000

New submission from Patrick Georgi <patrick@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@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);


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]