git: da779f262c58 - main - vfs_default: Change vop_stddeallocate() from static to global

Rick Macklem rmacklem at FreeBSD.org
Sat Aug 28 01:29:22 UTC 2021


The branch main has been updated by rmacklem:

URL: https://cgit.FreeBSD.org/src/commit/?id=da779f262c58c65f7061e979371a89d1df1acccc

commit da779f262c58c65f7061e979371a89d1df1acccc
Author:     Rick Macklem <rmacklem at FreeBSD.org>
AuthorDate: 2021-08-28 01:25:44 +0000
Commit:     Rick Macklem <rmacklem at FreeBSD.org>
CommitDate: 2021-08-28 01:25:44 +0000

    vfs_default: Change vop_stddeallocate() from static to global
    
    A future commit to the NFS client uses vop_stddeallocate() for
    cases where the NFS server does not support a Deallocate operation.
    Change vop_stddeallocate() from static to global so that it can
    be called by the NFS client.
    
    Reviewed by:    kib
    Differential Revision:  https://reviews.freebsd.org/D31640
---
 sys/kern/vfs_default.c | 3 +--
 sys/sys/vnode.h        | 1 +
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index 9fd43004b8fd..d66443e6d6f0 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -93,7 +93,6 @@ static int vop_stdgetpages_async(struct vop_getpages_async_args *ap);
 static int vop_stdread_pgcache(struct vop_read_pgcache_args *ap);
 static int vop_stdstat(struct vop_stat_args *ap);
 static int vop_stdvput_pair(struct vop_vput_pair_args *ap);
-static int vop_stddeallocate(struct vop_deallocate_args *ap);
 
 /*
  * This vnode table stores what we want to do if the filesystem doesn't
@@ -1126,7 +1125,7 @@ vp_zerofill(struct vnode *vp, struct vattr *vap, off_t *offsetp, off_t *lenp,
 	return (error);
 }
 
-static int
+int
 vop_stddeallocate(struct vop_deallocate_args *ap)
 {
 	struct vnode *vp;
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 56591a8d8a8d..61c6a13010f6 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -861,6 +861,7 @@ int	vop_stdadvlock(struct vop_advlock_args *ap);
 int	vop_stdadvlockasync(struct vop_advlockasync_args *ap);
 int	vop_stdadvlockpurge(struct vop_advlockpurge_args *ap);
 int	vop_stdallocate(struct vop_allocate_args *ap);
+int	vop_stddeallocate(struct vop_deallocate_args *ap);
 int	vop_stdset_text(struct vop_set_text_args *ap);
 int	vop_stdpathconf(struct vop_pathconf_args *);
 int	vop_stdpoll(struct vop_poll_args *);


More information about the dev-commits-src-all mailing list