diff options
author | mckusick <mckusick@FreeBSD.org> | 2001-12-18 18:05:17 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2001-12-18 18:05:17 +0000 |
commit | eeb2a6d271c89bef0d0d3e718d2b04d30953ce21 (patch) | |
tree | 308349f289245644e341b5abbc226a4626914f01 /sys/ufs/ffs/ffs_snapshot.c | |
parent | c623c4930da644b3446433ec3a3377bcdc878394 (diff) | |
download | FreeBSD-src-eeb2a6d271c89bef0d0d3e718d2b04d30953ce21.zip FreeBSD-src-eeb2a6d271c89bef0d0d3e718d2b04d30953ce21.tar.gz |
Change the atomic_set_char to atomic_set_int and atomic_clear_char
to atomic_clear_int to ease the implementation for the sparc64.
Requested by: Jake Burkholder <jake@locore.ca>
Diffstat (limited to 'sys/ufs/ffs/ffs_snapshot.c')
-rw-r--r-- | sys/ufs/ffs/ffs_snapshot.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index 5e67774..fbbc67f 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -266,8 +266,8 @@ restart: * touch up the few cylinder groups that changed during * the suspension period. */ - len = howmany(fs->fs_ncg, NBBY); - MALLOC(fs->fs_active, char *, len, M_DEVBUF, M_WAITOK); + len = howmany(fs->fs_ncg, (NBBY * sizeof(int))); + MALLOC(fs->fs_active, int *, len, M_DEVBUF, M_WAITOK); bzero(fs->fs_active, len); for (cg = 0; cg < fs->fs_ncg; cg++) { error = bread(vp, fragstoblks(fs, cgtod(fs, cg)), fs->fs_bsize, @@ -314,7 +314,7 @@ restart: if (collectsnapstats) nanotime(&starttime); for (cg = 0; cg < fs->fs_ncg; cg++) { - if ((fs->fs_active[cg / NBBY] & (1 << (cg % NBBY))) != 0) + if ((ACTIVECGNUM(fs, cg) & ACTIVECGOFF(cg)) != 0) continue; redo++; error = bread(vp, fragstoblks(fs, cgtod(fs, cg)), fs->fs_bsize, @@ -504,7 +504,7 @@ cgaccount(cg, vp, nbp, passno) brelse(bp); return (EIO); } - atomic_set_char(&fs->fs_active[cg / NBBY], 1 << (cg % NBBY)); + atomic_set_int(&ACTIVECGNUM(fs, cg), ACTIVECGOFF(cg)); bcopy(bp->b_data, nbp->b_data, fs->fs_cgsize); if (fs->fs_cgsize < fs->fs_bsize) bzero(&nbp->b_data[fs->fs_cgsize], |