vfs: Add spare fileops function pointer slots

This allows backporting of new fileops function pointers while
preserving KBI.

Bump __FreeBSD_version.

Sponsored by:	Juniper Networks, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D37636
This commit is contained in:
Ka Ho Ng 2022-12-08 20:45:47 -05:00
parent b1ef176eb5
commit e28932c643
2 changed files with 3 additions and 1 deletions

View File

@ -132,6 +132,7 @@ typedef int fo_fallocate_t(struct file *fp, off_t offset, off_t len,
typedef int fo_fspacectl_t(struct file *fp, int cmd,
off_t *offset, off_t *length, int flags,
struct ucred *active_cred, struct thread *td);
typedef int fo_spare_t(struct file *fp);
typedef int fo_flags_t;
struct fileops {
@ -154,6 +155,7 @@ struct fileops {
fo_get_seals_t *fo_get_seals;
fo_fallocate_t *fo_fallocate;
fo_fspacectl_t *fo_fspacectl;
fo_spare_t *fo_spares[8]; /* Spare slots */
fo_flags_t fo_flags; /* DFLAG_* below */
};

View File

@ -76,7 +76,7 @@
* cannot include sys/param.h and should only be updated here.
*/
#undef __FreeBSD_version
#define __FreeBSD_version 1400073
#define __FreeBSD_version 1400074
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,