From 113db2dddb719510679d71ff41679afe30c8b3d1 Mon Sep 17 00:00:00 2001 From: Jeff Roberson Date: Sat, 24 Apr 2010 07:05:35 +0000 Subject: - Merge soft-updates journaling from projects/suj/head into head. This brings in support for an optional intent log which eliminates the need for background fsck on unclean shutdown. Sponsored by: iXsystems, Yahoo!, and Juniper. With help from: McKusick and Peter Holm --- lib/libufs/inode.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib/libufs/inode.c') diff --git a/lib/libufs/inode.c b/lib/libufs/inode.c index d8bef61f8917..6d94582b3e54 100644 --- a/lib/libufs/inode.c +++ b/lib/libufs/inode.c @@ -93,3 +93,19 @@ gotit: switch (disk->d_ufs) { ERROR(disk, "unknown UFS filesystem type"); return (-1); } + +int +putino(struct uufsd *disk) +{ + struct fs *fs; + + fs = &disk->d_fs; + if (disk->d_inoblock == NULL) { + ERROR(disk, "No inode block allocated"); + return (-1); + } + if (bwrite(disk, fsbtodb(fs, ino_to_fsba(&disk->d_fs, disk->d_inomin)), + disk->d_inoblock, disk->d_fs.fs_bsize) <= 0) + return (-1); + return (0); +} -- cgit v1.2.3