Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140354872
D23117.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D23117.diff
View Options
Index: head/sys/geom/geom_vfs.c
===================================================================
--- head/sys/geom/geom_vfs.c
+++ head/sys/geom/geom_vfs.c
@@ -191,6 +191,8 @@
bip->bio_flags |= BIO_ORDERED;
bp->b_flags &= ~B_BARRIER;
}
+ if (bp->b_iocmd == BIO_SPEEDUP)
+ bip->bio_flags |= bp->b_ioflags;
bip->bio_done = g_vfs_done;
bip->bio_caller2 = bp;
#if defined(BUF_TRACKING) || defined(FULL_BUF_TRACKING)
Index: head/sys/ufs/ffs/ffs_softdep.c
===================================================================
--- head/sys/ufs/ffs/ffs_softdep.c
+++ head/sys/ufs/ffs/ffs_softdep.c
@@ -87,6 +87,7 @@
#include <vm/vm_object.h>
#include <geom/geom.h>
+#include <geom/geom_vfs.h>
#include <ddb/ddb.h>
@@ -1452,6 +1453,20 @@
wakeup(&ump->softdep_flushtd);
}
+static void
+softdep_send_speedup(struct ufsmount *ump, size_t shortage, u_int flags)
+{
+ struct buf *bp;
+
+ bp = malloc(sizeof(*bp), M_TRIM, M_WAITOK | M_ZERO);
+ bp->b_iocmd = BIO_SPEEDUP;
+ bp->b_ioflags = flags;
+ bp->b_bcount = shortage;
+ g_vfs_strategy(ump->um_bo, bp);
+ bufwait(bp);
+ free(bp, M_TRIM);
+}
+
static int
softdep_speedup(ump)
struct ufsmount *ump;
@@ -13364,7 +13379,6 @@
struct ufsmount *ump;
struct mount *mp;
long starttime;
- size_t resid;
ufs2_daddr_t needed;
int error, failed_vnode;
@@ -13442,8 +13456,8 @@
retry:
if (resource == FLUSH_BLOCKS_WAIT &&
fs->fs_cstotal.cs_nbfree <= needed)
- g_io_speedup(needed * fs->fs_bsize, BIO_SPEEDUP_TRIM, &resid,
- ump->um_cp);
+ softdep_send_speedup(ump, needed * fs->fs_bsize,
+ BIO_SPEEDUP_TRIM);
if ((resource == FLUSH_BLOCKS_WAIT && ump->softdep_on_worklist > 0 &&
fs->fs_cstotal.cs_nbfree <= needed) ||
(resource == FLUSH_INODES_WAIT && fs->fs_pendinginodes > 0 &&
@@ -13757,7 +13771,6 @@
struct mount *mp;
{
struct ufsmount *ump;
- size_t resid;
/*
* Tell the lower layers that any TRIM or WRITE transactions
@@ -13766,7 +13779,7 @@
*/
ump = VFSTOUFS(mp);
FREE_LOCK(ump);
- g_io_speedup(0, BIO_SPEEDUP_TRIM | BIO_SPEEDUP_WRITE, &resid, ump->um_cp);
+ softdep_send_speedup(ump, 0, BIO_SPEEDUP_TRIM | BIO_SPEEDUP_WRITE);
ACQUIRE_LOCK(ump);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 24, 12:27 AM (42 m, 45 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27203000
Default Alt Text
D23117.diff (2 KB)
Attached To
Mode
D23117: Use buf to send speedup
Attached
Detach File
Event Timeline
Log In to Comment