From 5eea731d3b0ead89eb1942daac59f5d4ea0563ae Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Tue, 25 Oct 1994 16:54:36 +0000 Subject: entered into RCS --- ufs/alloc.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'ufs/alloc.c') diff --git a/ufs/alloc.c b/ufs/alloc.c index 4464dfa0..b82d6065 100644 --- a/ufs/alloc.c +++ b/ufs/alloc.c @@ -817,6 +817,9 @@ ffs_fragextend(struct node *np, fs->fs_cstotal.cs_nffree--; csum[cg].cs_nffree--; } + record_poke (cgp, sblock->fs_cgsize); + csum_dirty = 1; + sblock_dirty = 1; fs->fs_fmod = 1; /* bdwrite(bp); */ return (bprev); @@ -892,6 +895,10 @@ ffs_alloccg(struct node *np, csum[cg].cs_nffree += i; fs->fs_fmod = 1; cgp->cg_frsum[i]++; + + record_poke (cgp, sblock->fs_cgsize); + csum_dirty = 1; + sblock_dirty = 1; /* bdwrite(bp); */ return (bno); } @@ -909,6 +916,9 @@ ffs_alloccg(struct node *np, cgp->cg_frsum[allocsiz]--; if (frags != allocsiz) cgp->cg_frsum[allocsiz - frags]++; + record_poke (cgp, sblock->fs_cgsize); + csum_dirty = 1; + sblock_dirty = 1; /* bdwrite(bp); */ return (cg * fs->fs_fpg + bno); } @@ -1020,6 +1030,9 @@ gotit: cg_blks(fs, cgp, cylno)[cbtorpos(fs, bno)]--; cg_blktot(cgp)[cylno]--; fs->fs_fmod = 1; + record_poke (cgp, sblock->fs_cgsize); + csum_dirty = 1; + sblock_dirty = 1; return (cgp->cg_cgx * fs->fs_fpg + bno); } @@ -1188,6 +1201,9 @@ gotit: fs->fs_cstotal.cs_ndir++; csum[cg].cs_ndir++; } + record_poke (cgp, sblock->fs_cgsize); + csum_dirty = 1; + sblock_dirty = 1; /* bdwrite(bp); */ return (cg * fs->fs_ipg + ipref); } @@ -1285,6 +1301,9 @@ ffs_blkfree(register struct node *np, cg_blktot(cgp)[i]++; } } + record_poke (cgp, sblock->fs_cgsize); + csum_dirty = 1; + sblock_dirty = 1; fs->fs_fmod = 1; /* bdwrite(bp); */ } @@ -1340,6 +1359,9 @@ diskfs_free_node (struct node *np, mode_t mode) fs->fs_cstotal.cs_ndir--; csum[cg].cs_ndir--; } + record_poke (cgp, sblock->fs_cgsize); + csum_dirty = 1; + sblock_dirty = 1; fs->fs_fmod = 1; /* bdwrite(bp); */ } -- cgit v1.2.3