git: 9d52823bf1df - main - vm_object: Widen the flags field
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 06 Oct 2024 13:13:52 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=9d52823bf1dfac237e58b5208299aaa5e2df42e9
commit 9d52823bf1dfac237e58b5208299aaa5e2df42e9
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-10-06 13:07:31 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-10-06 13:13:30 +0000
vm_object: Widen the flags field
Take advantage of a nearby 2-byte hole to avoid growing the struct.
This way, only the offsets of "flags" and "pg_color" change. Bump
__FreeBSD_version since some out-of-tree kernel modules may access these
fields, though I haven't found any examples so far.
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D35905
---
sys/sys/param.h | 2 +-
sys/vm/vm_object.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 3d772d551ffe..8af2f9594bc1 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -73,7 +73,7 @@
* cannot include sys/param.h and should only be updated here.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 1500024
+#define __FreeBSD_version 1500025
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h
index 9155d9cd6d6d..3274f59f958f 100644
--- a/sys/vm/vm_object.h
+++ b/sys/vm/vm_object.h
@@ -108,8 +108,8 @@ struct vm_object {
int shadow_count; /* how many objects that this is a shadow for */
vm_memattr_t memattr; /* default memory attribute for pages */
objtype_t type; /* type of pager */
- u_short flags; /* see below */
u_short pg_color; /* (c) color of first page in obj */
+ u_int flags; /* see below */
blockcount_t paging_in_progress; /* (a) Paging (in or out) so don't collapse or destroy */
blockcount_t busy; /* (a) object is busy, disallow page busy. */
int resident_page_count; /* number of resident pages */