Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109681663
D25072.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D25072.diff
View Options
Index: head/sys/ufs/ffs/ffs_balloc.c
===================================================================
--- head/sys/ufs/ffs/ffs_balloc.c
+++ head/sys/ufs/ffs/ffs_balloc.c
@@ -224,7 +224,7 @@
nsize, 0, bp);
}
dp->di_db[lbn] = dbtofsb(fs, bp->b_blkno);
- UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE);
+ UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE | IN_IBLKDATA);
*bpp = bp;
return (0);
}
@@ -280,7 +280,7 @@
}
allocib = &dp->di_ib[indirs[0].in_off];
*allocib = nb;
- UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE);
+ UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE | IN_IBLKDATA);
}
/*
* Fetch through the indirect blocks, allocating as necessary.
@@ -721,7 +721,7 @@
nsize, 0, bp);
}
dp->di_extb[lbn] = dbtofsb(fs, bp->b_blkno);
- UFS_INODE_SET_FLAG(ip, IN_CHANGE);
+ UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_IBLKDATA);
*bpp = bp;
return (0);
}
@@ -750,7 +750,8 @@
ip->i_size = smalllblktosize(fs, nb + 1);
dp->di_size = ip->i_size;
dp->di_db[nb] = dbtofsb(fs, bp->b_blkno);
- UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE);
+ UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE |
+ IN_IBLKDATA);
if (flags & IO_SYNC)
bwrite(bp);
else
@@ -820,7 +821,7 @@
nsize, 0, bp);
}
dp->di_db[lbn] = dbtofsb(fs, bp->b_blkno);
- UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE);
+ UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE | IN_IBLKDATA);
*bpp = bp;
return (0);
}
@@ -877,7 +878,7 @@
}
allocib = &dp->di_ib[indirs[0].in_off];
*allocib = nb;
- UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE);
+ UFS_INODE_SET_FLAG(ip, IN_CHANGE | IN_UPDATE | IN_IBLKDATA);
}
/*
* Fetch through the indirect blocks, allocating as necessary.
Index: head/sys/ufs/ffs/ffs_inode.c
===================================================================
--- head/sys/ufs/ffs/ffs_inode.c
+++ head/sys/ufs/ffs/ffs_inode.c
@@ -94,7 +94,7 @@
ip = VTOI(vp);
if ((ip->i_flag & IN_MODIFIED) == 0 && waitfor == 0)
return (0);
- ip->i_flag &= ~(IN_LAZYACCESS | IN_LAZYMOD | IN_MODIFIED);
+ ip->i_flag &= ~(IN_LAZYACCESS | IN_LAZYMOD | IN_MODIFIED | IN_IBLKDATA);
fs = ITOFS(ip);
if (fs->fs_ronly && ITOUMP(ip)->um_fsckpid == 0)
return (0);
Index: head/sys/ufs/ffs/ffs_vnops.c
===================================================================
--- head/sys/ufs/ffs/ffs_vnops.c
+++ head/sys/ufs/ffs/ffs_vnops.c
@@ -416,6 +416,8 @@
error = ffs_update(vp, 1);
if (DOINGSUJ(vp))
softdep_journal_fsync(VTOI(vp));
+ } else if ((ip->i_flags & IN_IBLKDATA) != 0) {
+ error = ffs_update(vp, 1);
}
return (error);
}
Index: head/sys/ufs/ufs/inode.h
===================================================================
--- head/sys/ufs/ufs/inode.h
+++ head/sys/ufs/ufs/inode.h
@@ -129,13 +129,13 @@
suspension finished */
#define IN_EA_LOCKED 0x0080
#define IN_EA_LOCKWAIT 0x0100
-
#define IN_TRUNCATED 0x0200 /* Journaled truncation pending. */
-
#define IN_UFS2 0x0400 /* UFS2 vs UFS1 */
+#define IN_IBLKDATA 0x0800 /* datasync requires inode block
+ update */
#define PRINT_INODE_FLAGS "\20\20b16\17b15\16b14\15b13" \
- "\14b12\13is_ufs2\12truncated\11ea_lockwait\10ea_locked" \
+ "\14iblkdata\13is_ufs2\12truncated\11ea_lockwait\10ea_locked" \
"\7lazyaccess\6lazymod\5needsync\4modified\3update\2change\1access"
#define UFS_INODE_FLAG_LAZY_MASK \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 9, 7:16 AM (20 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16547800
Default Alt Text
D25072.diff (3 KB)
Attached To
Mode
D25072: UFS: write inode block for fdatasync(2) if pointers in inode where allocated
Attached
Detach File
Event Timeline
Log In to Comment