Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Aug 2013 14:22:21 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r254415 - in head/sys: dev/streams fs/devfs kern sys
Message-ID:  <201308161422.r7GEMLWE006753@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Fri Aug 16 14:22:20 2013
New Revision: 254415
URL: http://svnweb.freebsd.org/changeset/base/254415

Log:
  Restore the previous sendfile(2) behaviour on the block devices.
  Provide valid .fo_sendfile method for several missed struct fileops.
  
  Reviewed by:	glebius
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/dev/streams/streams.c
  head/sys/fs/devfs/devfs_vnops.c
  head/sys/kern/sys_procdesc.c
  head/sys/kern/vfs_vnops.c
  head/sys/sys/file.h

Modified: head/sys/dev/streams/streams.c
==============================================================================
--- head/sys/dev/streams/streams.c	Fri Aug 16 14:06:29 2013	(r254414)
+++ head/sys/dev/streams/streams.c	Fri Aug 16 14:22:20 2013	(r254415)
@@ -98,6 +98,7 @@ static struct fileops svr4_netops = {
 	.fo_close =  svr4_soo_close,
 	.fo_chmod = invfo_chmod,
 	.fo_chown = invfo_chown,
+	.fo_sendfile = invfo_sendfile,
 };
  
 static struct cdevsw streams_cdevsw = {

Modified: head/sys/fs/devfs/devfs_vnops.c
==============================================================================
--- head/sys/fs/devfs/devfs_vnops.c	Fri Aug 16 14:06:29 2013	(r254414)
+++ head/sys/fs/devfs/devfs_vnops.c	Fri Aug 16 14:22:20 2013	(r254415)
@@ -1696,6 +1696,7 @@ static struct fileops devfs_ops_f = {
 	.fo_close =	devfs_close_f,
 	.fo_chmod =	vn_chmod,
 	.fo_chown =	vn_chown,
+	.fo_sendfile =	vn_sendfile,
 	.fo_flags =	DFLAG_PASSABLE | DFLAG_SEEKABLE
 };
 

Modified: head/sys/kern/sys_procdesc.c
==============================================================================
--- head/sys/kern/sys_procdesc.c	Fri Aug 16 14:06:29 2013	(r254414)
+++ head/sys/kern/sys_procdesc.c	Fri Aug 16 14:22:20 2013	(r254415)
@@ -113,6 +113,7 @@ static struct fileops procdesc_ops = {
 	.fo_close = procdesc_close,
 	.fo_chmod = procdesc_chmod,
 	.fo_chown = procdesc_chown,
+	.fo_sendfile = invfo_sendfile,
 	.fo_flags = DFLAG_PASSABLE,
 };
 

Modified: head/sys/kern/vfs_vnops.c
==============================================================================
--- head/sys/kern/vfs_vnops.c	Fri Aug 16 14:06:29 2013	(r254414)
+++ head/sys/kern/vfs_vnops.c	Fri Aug 16 14:22:20 2013	(r254415)
@@ -88,7 +88,6 @@ static fo_poll_t	vn_poll;
 static fo_kqfilter_t	vn_kqfilter;
 static fo_stat_t	vn_statfile;
 static fo_close_t	vn_closefile;
-extern fo_sendfile_t	vn_sendfile;
 
 struct 	fileops vnops = {
 	.fo_read = vn_io_fault,

Modified: head/sys/sys/file.h
==============================================================================
--- head/sys/sys/file.h	Fri Aug 16 14:06:29 2013	(r254414)
+++ head/sys/sys/file.h	Fri Aug 16 14:22:20 2013	(r254415)
@@ -241,6 +241,8 @@ fo_chmod_t	invfo_chmod;
 fo_chown_t	invfo_chown;
 fo_sendfile_t	invfo_sendfile;
 
+fo_sendfile_t	vn_sendfile;
+
 void finit(struct file *, u_int, short, void *, struct fileops *);
 int fgetvp(struct thread *td, int fd, cap_rights_t rights, struct vnode **vpp);
 int fgetvp_exec(struct thread *td, int fd, cap_rights_t rights,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308161422.r7GEMLWE006753>