diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-10-04 08:11:03 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-10-04 08:11:03 +0000 |
commit | bffcbc4a301ed3d8680cb02d51b34a354edd5db7 (patch) | |
tree | 7fc7a621395b957699d41b7eb5947e4410f67c14 /sys/ufs/ext2fs | |
parent | 7e174fc2f0c87344167c4296f0a42c2b2cd0b478 (diff) |
Use the fact the vnodes are locked when operations are inflight.
Remove the v_inflight member and alter the ffs and ext2fs sync code to
track inflight by checking if the node is locked or not (which it already
did before but for a different reason).
OK mpi@
Diffstat (limited to 'sys/ufs/ext2fs')
-rw-r--r-- | sys/ufs/ext2fs/ext2fs_vfsops.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_vfsops.c b/sys/ufs/ext2fs/ext2fs_vfsops.c index 4561dda88be..371ca53f096 100644 --- a/sys/ufs/ext2fs/ext2fs_vfsops.c +++ b/sys/ufs/ext2fs/ext2fs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_vfsops.c,v 1.115 2020/06/24 22:03:44 cheloha Exp $ */ +/* $OpenBSD: ext2fs_vfsops.c,v 1.116 2021/10/04 08:11:02 claudio Exp $ */ /* $NetBSD: ext2fs_vfsops.c,v 1.1 1997/06/11 09:34:07 bouyer Exp $ */ /* @@ -717,9 +717,6 @@ ext2fs_sync_vnode(struct vnode *vp, void *args) if (vp->v_type == VNON) return (0); - if (vp->v_inflight) - esa->inflight = MIN(esa->inflight+1, 65536); - ip = VTOI(vp); if (ip->i_e2fs_nlink == 0) @@ -731,7 +728,7 @@ ext2fs_sync_vnode(struct vnode *vp, void *args) } if (vget(vp, LK_EXCLUSIVE | LK_NOWAIT)) { - nlink0 = 1; /* potentially */ + esa->inflight = MIN(esa->inflight+1, 65536); goto end; } @@ -742,6 +739,7 @@ end: esa->nlink0 = MIN(esa->nlink0 + nlink0, 65536); return (0); } + /* * Go through the disk queues to initiate sandbagged IO; * go through the inodes to write those that have been modified; |