ref: 56df14a6a319b1617d004b46f36710e2c27fe380
parent: aeb41b90f63797b119d8f729f07a49e69c955227
author: aiju <devnull@localhost>
date: Wed Oct 3 14:27:22 EDT 2012
fixed ream code; added megabyte output to df
--- a/sys/src/cmd/hjfs/cons.c
+++ b/sys/src/cmd/hjfs/cons.c
@@ -198,7 +198,8 @@
n++;
putbuf(b);
}
- dprint("hjfs: free %ulld, used %ulld, total %ulld\n", n, sb->sb.size - n, sb->sb.size);
+ dprint("hjfs: (blocks) free %ulld, used %ulld, total %ulld\n", n, sb->sb.size - n, sb->sb.size);
+ dprint("hjfs: (MB) free %ulld, used %ulld, total %ulld\n", n * BLOCK / 1048576, (sb->sb.size - n) * BLOCK / 1048576, sb->sb.size * BLOCK / 1048576);
putbuf(sb);
wunlock(fsmain);
return 1;
--- a/sys/src/cmd/hjfs/fs1.c
+++ b/sys/src/cmd/hjfs/fs1.c
@@ -229,6 +229,12 @@
for(; j < je; j++)
c->refs[j] = 1;
}
+ if(i == b->sb.fend - 1){
+ j = b->sb.size % REFPERBLK;
+ if(j != 0)
+ for(; j < REFPERBLK; j++)
+ c->refs[j] = -1;
+ }
c->op |= BWRIM;
putbuf(c);
}