From owner-svn-src-head@FreeBSD.ORG Fri Aug 16 14:22:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6C18A76B; Fri, 16 Aug 2013 14:22:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4B0B32A35; Fri, 16 Aug 2013 14:22:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7GEMMqR006758; Fri, 16 Aug 2013 14:22:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7GEMLWE006753; Fri, 16 Aug 2013 14:22:21 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201308161422.r7GEMLWE006753@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 16 Aug 2013 14:22:21 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Aug 2013 14:22:22 -0000 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,