Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/ufs/ffs Pull up following revision(s) (requested by r...
details: https://anonhg.NetBSD.org/src/rev/7e4b3548002b
branches: netbsd-7
changeset: 799569:7e4b3548002b
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Fri Aug 14 05:29:14 2015 +0000
description:
Pull up following revision(s) (requested by riastradh in ticket #949):
sys/ufs/ffs/ffs_alloc.c: revision 1.151
Need wapbl transaction around ffs_blkfree_cg. Fixes wapbl+discard.
diffstat:
sys/ufs/ffs/ffs_alloc.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (40 lines):
diff -r ed199feb8428 -r 7e4b3548002b sys/ufs/ffs/ffs_alloc.c
--- a/sys/ufs/ffs/ffs_alloc.c Tue Aug 11 08:29:03 2015 +0000
+++ b/sys/ufs/ffs/ffs_alloc.c Fri Aug 14 05:29:14 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_alloc.c,v 1.146 2014/07/25 08:24:31 dholland Exp $ */
+/* $NetBSD: ffs_alloc.c,v 1.146.2.1 2015/08/14 05:29:14 msaitoh Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_alloc.c,v 1.146 2014/07/25 08:24:31 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_alloc.c,v 1.146.2.1 2015/08/14 05:29:14 msaitoh Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -1604,12 +1604,21 @@
static void
ffs_blkfree_td(struct fs *fs, struct discardopdata *td)
{
+ struct mount *mp = spec_node_getmountedfs(td->devvp);
long todo;
+ int error;
while (td->size) {
todo = min(td->size,
ffs_lfragtosize(fs, (fs->fs_frag - ffs_fragnum(fs, td->bno))));
+ error = UFS_WAPBL_BEGIN(mp);
+ if (error) {
+ printf("ffs: failed to begin wapbl transaction"
+ " for discard: %d\n", error);
+ break;
+ }
ffs_blkfree_cg(fs, td->devvp, td->bno, todo);
+ UFS_WAPBL_END(mp);
td->bno += ffs_numfrags(fs, todo);
td->size -= todo;
}
Home |
Main Index |
Thread Index |
Old Index