aboutsummaryrefslogtreecommitdiff
path: root/lib/libufs/inode.c
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2010-04-24 07:05:35 +0000
committerJeff Roberson <jeff@FreeBSD.org>2010-04-24 07:05:35 +0000
commit113db2dddb719510679d71ff41679afe30c8b3d1 (patch)
treee551aa2ab43f7f11c3646b241ebf3f582988d375 /lib/libufs/inode.c
parent07b9cc2f468471a723504ac789201a84f6dcd38a (diff)
downloadsrc-113db2dddb719510679d71ff41679afe30c8b3d1.tar.gz
src-113db2dddb719510679d71ff41679afe30c8b3d1.zip
- 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
Notes
Notes: svn path=/head/; revision=207141
Diffstat (limited to 'lib/libufs/inode.c')
-rw-r--r--lib/libufs/inode.c16
1 files changed, 16 insertions, 0 deletions
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);
+}