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
This commit is contained in:
Konstantin Belousov 2013-08-16 14:22:20 +00:00
parent fdafa7840f
commit b1dd38f408
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=254415
5 changed files with 5 additions and 1 deletions

View File

@ -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 = {

View File

@ -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
};

View File

@ -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,
};

View File

@ -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,

View File

@ -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,