Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys allow to enable ffs "discard" by update mounts, make the...
details: https://anonhg.NetBSD.org/src/rev/2107ad1d0911
branches: trunk
changeset: 782912:2107ad1d0911
user: drochner <drochner%NetBSD.org@localhost>
date: Mon Nov 26 16:22:21 2012 +0000
description:
allow to enable ffs "discard" by update mounts, make the flag visible
to userland
diffstat:
sys/sys/fstypes.h | 3 ++-
sys/ufs/ffs/ffs_vfsops.c | 8 ++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diffs (46 lines):
diff -r c7b932380712 -r 2107ad1d0911 sys/sys/fstypes.h
--- a/sys/sys/fstypes.h Mon Nov 26 08:05:47 2012 +0000
+++ b/sys/sys/fstypes.h Mon Nov 26 16:22:21 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fstypes.h,v 1.31 2012/10/19 17:09:07 drochner Exp $ */
+/* $NetBSD: fstypes.h,v 1.32 2012/11/26 16:22:21 drochner Exp $ */
/*
* Copyright (c) 1989, 1991, 1993
@@ -171,6 +171,7 @@
MNT_ASYNC | \
MNT_NOCOREDUMP | \
MNT_IGNORE | \
+ MNT_DISCARD | \
MNT_NOATIME | \
MNT_SYMPERM | \
MNT_NODEVMTIME | \
diff -r c7b932380712 -r 2107ad1d0911 sys/ufs/ffs/ffs_vfsops.c
--- a/sys/ufs/ffs/ffs_vfsops.c Mon Nov 26 08:05:47 2012 +0000
+++ b/sys/ufs/ffs/ffs_vfsops.c Mon Nov 26 16:22:21 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_vfsops.c,v 1.279 2012/10/19 17:09:08 drochner Exp $ */
+/* $NetBSD: ffs_vfsops.c,v 1.280 2012/11/26 16:22:21 drochner Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.279 2012/10/19 17:09:08 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.280 2012/11/26 16:22:21 drochner Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -580,6 +580,10 @@
}
}
#endif
+
+ if ((mp->mnt_flag & MNT_DISCARD) && !(ump->um_discarddata))
+ ump->um_discarddata = ffs_discard_init(devvp, fs);
+
if (args->fspec == NULL)
return 0;
}
Home |
Main Index |
Thread Index |
Old Index