Home | History | Annotate | Download | only in sysvbfs
History log of /src/sys/fs/sysvbfs/sysvbfs_vnops.c
RevisionDateAuthorComments
 1.69  31-Jul-2022  mlelstv Don't panic for a negative offset, just fail the operation with EINVAL.
 1.68  20-Oct-2021  thorpej Overhaul of the EVFILT_VNODE kevent(2) filter:

- Centralize vnode kevent handling in the VOP_*() wrappers, rather than
forcing each individual file system to deal with it (except VOP_RENAME(),
because VOP_RENAME() is a mess and we currently have 2 different ways
of handling it; at least it's reasonably well-centralized in the "new"
way).
- Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ,
compatible with the same events in FreeBSD.
- Track which kevent notifications clients are interested in receiving
to avoid doing work for events no one cares about (avoiding, e.g.
taking locks and traversing the klist to send a NOTE_WRITE when
someone is merely watching for a file to be deleted, for example).

In support of the above:

- Add support in vnode_if.sh for specifying PRE- and POST-op handlers,
to be invoked before and after vop_pre() and vop_post(), respectively.
Basic idea from FreeBSD, but implemented differently.
- Add support in vnode_if.sh for specifying CONTEXT fields in the
vop_*_args structures. These context fields are used to convey information
between the file system VOP function and the VOP wrapper, but do not
occupy an argument slot in the VOP_*() call itself. These context fields
are initialized and subsequently interpreted by PRE- and POST-op handlers.
- Version VOP_REMOVE(), uses the a context field for the file system to report
back the resulting link count of the target vnode. Return this in tmpfs,
udf, nfs, chfs, ext2fs, lfs, and ufs.

NetBSD 9.99.92.
 1.67  27-Jun-2020  christos Introduce genfs_pathconf() and use it for the default case in all filesystems.
 1.66  16-May-2020  christos Add ACL support for FFS. From FreeBSD.
 1.65  23-Apr-2020  ad PR kern/54759 (vm.ubc_direct deadlock when read()/write() into mapping of itself)

- Add new flag UBC_ISMAPPED which tells ubc_uiomove() the object is mmap()ed
somewhere. Use it to decide whether to do direct-mapped copy, rather than
poking around directly in the vnode in ubc_uiomove(), which is ugly and
doesn't work for tmpfs. It would be nicer to contain all this in UVM but
the filesystem provides the needed locking here (VV_MAPPED) and to
reinvent that would suck more.

- Rename UBC_UNMAP_FLAG() to UBC_VNODE_FLAGS(). Pass in UBC_ISMAPPED where
appropriate.
 1.64  17-Jan-2020  ad branches: 1.64.4;
VFS_VGET(), VFS_ROOT(), VFS_FHTOVP(): give them a "int lktype" argument, to
allow us to get shared locks (or no lock) on the returned vnode. Matches
FreeBSD.
 1.63  26-May-2017  riastradh branches: 1.63.10; 1.63.16;
Make VOP_RECLAIM do the last unlock of the vnode.

VOP_RECLAIM naturally has exclusive access to the vnode, so having it
locked on entry is not strictly necessary -- but it means if there
are any final operations that must be done on the vnode, such as
ffs_update, requiring exclusive access to it, we can now kassert that
the vnode is locked in those operations.

We can't just have the caller release the last lock because some file
systems don't use genfs_lock, and require the vnode to remain valid
for VOP_UNLOCK to work, notably unionfs.
 1.62  26-Apr-2017  riastradh Change VOP_REMOVE and VOP_RMDIR to preserve lock/ref on dvp.

No change to vp -- the plan is to replace the node by the
componentname in the vop parameters, and let all directory vops do
lookups internally.

Proposed on tech-kern with no objections:
https://mail-index.netbsd.org/tech-kern/2017/04/17/msg021825.html
 1.61  11-Apr-2017  riastradh Make VOP_INACTIVE preserve vnode lock on return.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2017/04/01/msg021751.html

Ride 7.99.68, a bumpy bus of incremental vfs improvements!
 1.60  20-Aug-2016  hannken branches: 1.60.2;
Remove now obsolete operation vcache_remove().

Welcome to 7.99.36
 1.59  13-Nov-2015  pooka branches: 1.59.2;
Fix bug in readdir loop condition.

Reading all dirents using a small buffer and multiple calls now works.

Bug found by "Shamar" on #rumpkernel
 1.58  04-Apr-2015  riastradh Make sure err is initialized.
 1.57  04-Apr-2015  riastradh Fix remaining read(fd, NULL, 1) cases.
 1.56  26-Dec-2014  hannken Change sysvbfs to vcache.
 1.55  26-Dec-2014  hannken Sysvbfs_rename: Call bfs_file_delete(bfs, to_name, true) before calling
bfs_file_rename() and remove the bfs_file_delete() from bfs_file_rename().

After calling bfs_file_rename() it was too late to set "tnode->removed"
as the inode already disappeared.
 1.54  08-Aug-2014  gson branches: 1.54.4;
Whitespace fix
 1.53  07-Feb-2014  hannken branches: 1.53.2;
Change vnode operation lookup to return the resulting vnode *vpp unlocked.
Change cache_lookup() to return an unlocked vnode.

Discussed on tech-kern@

Welcome to 6.99.31
 1.52  23-Jan-2014  hannken Change vnode operations create, mknod, mkdir and symlink to return
the resulting vnode *vpp unlocked.

Discussed on tech-kern@

Welcome to 6.99.30
 1.51  17-Jan-2014  hannken Change vnode operations create, mknod, mkdir and symlink to keep the
directory node dvp locked on return.

Discussed on tech-kern@

Welcome to 6.99.29
 1.50  09-Jan-2014  hannken Operation sysvbfs_remove() destructs inodes attached to active vnodes.
Defer the destruction to sysvbfs_reclaim().

Disable test t_renamerace:sysvbfs_renamerace as it will exhaust the
inode table (sysvbfs has space for 8 inodes only).

Ok: Izumi Tsutsui <tsutsui@netbsd.org>
 1.49  24-Dec-2013  hannken It is not the task of sysvbfs_open() to check for unlinked nodes.
 1.48  15-May-2013  pooka branches: 1.48.2;
Don't change a read-only file system.
 1.47  18-Mar-2013  plunky C99 section 6.7.2.3 (Tags) Note 3 states that:

A type specifier of the form

enum identifier

without an enumerator list shall only appear after the type it
specifies is complete.

which means that we cannot pass an "enum vtype" argument to
kauth_access_action() without fully specifying the type first.
Unfortunately there is a complicated include file loop which
makes that difficult, so convert this minimal function into a
macro (and capitalize it).

(ok elad@)
 1.46  11-Jun-2012  agc branches: 1.46.2;
cosmetic change: fix two casts to be of the appropriate type
 1.45  08-May-2012  tsutsui Move bfs_file_setsize() from bfs.c to sysvbfs_vnops.c
(and rename it to sysvbfs_file_setsize()) because it's actually
part of vnode ops and bfs.c is also pulled by standalone bootloaders
which don't want vnode header mess.
 1.44  29-Apr-2012  chs change vflushbuf() to take the full FSYNC_* flags.
translate FSYNC_LAZY into PGO_LAZY for VOP_PUTPAGES() so that
genfs_do_io() can set the appropriate io priority for the I/O.
this is the first part of addressing PR 46325.
 1.43  30-Mar-2012  njoly sysvbfs do not support file flags; fail with EOPNOTSUPP.
 1.42  18-Mar-2012  christos handle file resizing.
 1.41  13-Mar-2012  elad Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
something meaningful. All relevant documentation has been updated or
written.

Most of these changes were brought up in the following messages:

http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html

Thanks to christos, manu, njoly, and jmmv for input.

Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.
 1.40  27-Jan-2012  njoly branches: 1.40.2;
Check credentials when setting uid, gid or mode attributes.
 1.39  12-Dec-2011  njoly Start making fs read(2) fail with EISDIR if the implementation does
not allow read on directories (kernfs, rumpfs, ptyfs and sysvbfs).
Adjust man page accordingly, and add a small corresponding vfs
testcase.
 1.38  19-May-2011  rmind branches: 1.38.4; 1.38.8;
Remove cache_purge(9) calls from reclamation routines in the file systems,
as vclean(9) performs it for us since Lite2 merge.
 1.37  26-Apr-2011  hannken Change vflushbuf() to return an error if a synchronous write fails.

Welcome to 5.99.51.
 1.36  31-Jan-2011  njoly In sysvbfs_lookup(), deny last component write operation on a
read-only mount.
Fix PR/44302: sysvbfs allows unlink on fs mounted MNT_RDONLY.

Reviewed by pooka.
 1.35  30-Nov-2010  dholland branches: 1.35.2; 1.35.4;
Abolish the SAVENAME and HASBUF flags. There is now always a buffer,
so the path in a struct componentname is now always valid during VOP
calls.
 1.34  30-Nov-2010  dholland Abolish struct componentname's cn_pnbuf. Use the path buffer in the
pathbuf object passed to namei as work space instead. (For now a pnbuf
pointer appears in struct nameidata, to support certain unclean things
that haven't been fixed yet, but it will be going away in the future.)

This removes the need for the SAVENAME and HASBUF namei flags.
 1.33  17-Jul-2010  njoly Fix build with SYSVBFS_VNOPS_DEBUG.
 1.32  16-Jul-2010  njoly Small typo in comment.
 1.31  24-Jun-2010  hannken Clean up vnode lock operations pass 2:

VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.

Welcome to 5.99.32.

Discussed on tech-kern.
 1.30  27-May-2010  pooka Mark files removed in the in-memory structure. This allows us
to do two things:

1) properly set "recycle?" in inactive
2) easily check if we are renaming a removed vnode. without the
check, it was possible to enter a dirent in the file system for
a removed (and hence scheduled to be vcleaned) vnode. this would
lead to the succesful vget() of a clean vnode. the use of the
cleaned vnode was, however, less succesful, except for purposes
of crashing.
 1.29  27-May-2010  pooka Release pathname buffers after use.
 1.28  26-May-2010  pooka fix refcounting
 1.27  26-May-2010  pooka Initialize *vpp to NULL: relookup() requires it without initializing
the value before the call (yea, changing relookup would probably
be smart, but other file systems already initialize vpp, so I'm
letting someone else experiment with tylenol od).
 1.26  08-Jan-2010  pooka branches: 1.26.2; 1.26.4;
The VATTR_NULL/VREF/VHOLD/HOLDRELE() macros lost their will to live
years ago when the kernel was modified to not alter ABI based on
DIAGNOSTIC, and now just call the respective function interfaces
(in lowercase). Plenty of mix'n match upper/lowercase has creeped
into the tree since then. Nuke the macros and convert all callsites
to lowercase.

no functional change
 1.25  05-Jan-2010  mbalmer Remove extra semicolons.
 1.24  03-Jul-2009  pgoyette Define error before using it.

(Hello again, elad!)
 1.23  03-Jul-2009  elad Where possible, extract the file-system's access() routine to two internal
functions: the first checking if the operation is possible (regardless of
permissions), the second checking file-system permissions, ACLs, etc.

Mailing list reference:

http://mail-index.netbsd.org/tech-kern/2009/06/21/msg005311.html
 1.22  23-Jun-2009  elad Move the implementation of vaccess() to genfs_can_access(), in line with
the other routines of the same spirit.

Adjust file-system code to use it.

Keep vaccess() for KPI compatibility and to keep element of least
surprise. A "diagnostic" message warning that vaccess() is deprecated will
be printed when it's used (obviously, only in DIAGNOSTIC kernels).

No objections on tech-kern@:

http://mail-index.netbsd.org/tech-kern/2009/06/21/msg005310.html
 1.21  26-Nov-2008  pooka branches: 1.21.4;
Rototill all remaining file systems to use ubc_uiomove() instead
of the ubc_alloc() - uiomove() - ubc_release() dance.
 1.20  16-Nov-2008  pooka more <sys/buf.h> police
 1.19  30-Apr-2008  ad branches: 1.19.6; 1.19.8;
Make various bits of debug code compile again.
 1.18  28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.17  02-Jan-2008  ad branches: 1.17.6; 1.17.8; 1.17.10;
Merge vmlocking2 to head.
 1.16  15-Dec-2007  perry __FUNCTION__ -> __func__
 1.15  26-Nov-2007  pooka branches: 1.15.2; 1.15.6;
Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start. In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern
 1.14  24-Sep-2007  rumble branches: 1.14.4;
Avoid stack allocation of large dirent structures in foo_readdir().
 1.13  29-Jul-2007  ad branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10;
It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
 1.12  30-Jun-2007  pooka branches: 1.12.2;
Using POOL_INIT here makes no sense, since file systems always have
an init method. So get rid of it and #ifdef _LKM and just always
init in the init method. Give malloc types the same treatment.
Makes file systems nicer to work with in linksetless environments
and fixes a few LKM discrepancies.
 1.11  22-Feb-2007  thorpej branches: 1.11.4; 1.11.6;
TRUE -> true, FALSE -> false
 1.10  21-Feb-2007  thorpej Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
 1.9  20-Feb-2007  ad Call genfs_node_destroy() where appropriate.
 1.8  29-Jan-2007  hubertf branches: 1.8.2;
Remove more duplicate headers.
Patch by Slava Semushin <slava.semushin@gmail.com>

Again, this was tested by comparing obj files from a pristine and a patched
source tree against an i386/ALL kernel, and also for src/sbin/fsck_ffs,
src/sbin/fsdb and src/usr.sbin/makefs. Only changes in assert() line numbers
were detected in 'objdump -d' output.
 1.7  25-Dec-2006  wiz Spell "algorithm" correctly. From Zafer Aydogan.
 1.6  09-Dec-2006  chs a smorgasbord of improvements to vnode locking and path lookup:
- LOCKPARENT is no longer relevant for lookup(), relookup() or VOP_LOOKUP().
these now always return the parent vnode locked. namei() works as before.
lookup() and various other paths no longer acquire vnode locks in the
wrong order via vrele(). fixes PR 32535.
as a nice side effect, path lookup is also up to 25% faster.
- the above allows us to get rid of PDIRUNLOCK.
- also get rid of WANTPARENT (just use LOCKPARENT and unlock it).
- remove an assumption in layer_node_find() that all file systems implement
a recursive VOP_LOCK() (unionfs doesn't).
- require that all file systems supply vfs_vptofh and vfs_fhtovp routines.
fill in eopnotsupp() for file systems that don't support being exported
and remove the checks for NULL. (layerfs calls these without checking.)
- in union_lookup1(), don't change refcounts in the ISDOTDOT case, just
adjust which vnode is locked. fixes PR 33374.
- apply fixes for ufs_rename() from ufs_vnops.c rev. 1.61 to ext2fs_rename().
 1.5  01-Jul-2006  martin branches: 1.5.4; 1.5.6; 1.5.8;
Redo previous differently - just use time_second.
Pointed out by Frank Kardel.
 1.4  01-Jul-2006  martin Make it compile post time-counter merge
 1.3  15-May-2006  yamt branches: 1.3.4; 1.3.6;
don't try to dereference kauth_cred_t.
 1.2  14-May-2006  elad integrate kauth.
 1.1  29-Dec-2005  tsutsui branches: 1.1.4; 1.1.6; 1.1.8; 1.1.10; 1.1.12;
Add preliminary support for System V Boot File System.
Written by UCHIYAMA Yasushi <uch@netbsd>.
 1.1.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.1.10.1  08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.1.8.2  11-Aug-2006  yamt sync with head
 1.1.8.1  24-May-2006  yamt sync with head.
 1.1.6.1  01-Jun-2006  kardel Sync with head.
 1.1.4.1  09-Sep-2006  rpaulo sync with head
 1.3.6.8  21-Jan-2008  yamt sync with head
 1.3.6.7  07-Dec-2007  yamt sync with head
 1.3.6.6  27-Oct-2007  yamt sync with head.
 1.3.6.5  03-Sep-2007  yamt sync with head.
 1.3.6.4  26-Feb-2007  yamt sync with head.
 1.3.6.3  30-Dec-2006  yamt sync with head.
 1.3.6.2  21-Jun-2006  yamt sync with head.
 1.3.6.1  15-May-2006  yamt file sysvbfs_vnops.c was added on branch yamt-lazymbuf on 2006-06-21 15:09:30 +0000
 1.3.4.1  13-Jul-2006  gdamore Merge from HEAD.
 1.5.8.1  17-Feb-2007  tron Apply patch (requested by chs in ticket #422):
- Fix various deadlock problems with nullfs and unionfs.
- Speed up path lookups by upto 25%.
 1.5.6.1  10-Dec-2006  yamt sync with head.
 1.5.4.2  01-Feb-2007  ad Sync with head.
 1.5.4.1  12-Jan-2007  ad Sync with head.
 1.8.2.1  27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.11.6.1  11-Jul-2007  mjf Sync with head.
 1.11.4.5  09-Oct-2007  ad Sync with head.
 1.11.4.4  16-Sep-2007  ad Checkpoint work in progress on the vnode lifecycle and reference counting
stuff. This makes it work properly without kernel_lock and fixes a few
quite old bugs. See vfs_subr.c 1.283.2.17 for details.
 1.11.4.3  19-Aug-2007  ad - Back out the biodone() changes.
- Eliminate B_ERROR (from HEAD).
 1.11.4.2  15-Jul-2007  ad Sync with head.
 1.11.4.1  15-Jul-2007  ad Sync with head.
 1.12.2.1  15-Aug-2007  skrll Sync with HEAD.
 1.13.10.2  29-Jul-2007  ad It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
 1.13.10.1  29-Jul-2007  ad file sysvbfs_vnops.c was added on branch matt-mips64 on 2007-07-29 13:31:11 +0000
 1.13.8.1  06-Oct-2007  yamt sync with head.
 1.13.6.2  09-Jan-2008  matt sync with HEAD
 1.13.6.1  06-Nov-2007  matt sync with HEAD
 1.13.4.2  27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.13.4.1  02-Oct-2007  joerg Sync with HEAD.
 1.14.4.3  18-Feb-2008  mjf Sync with HEAD.
 1.14.4.2  27-Dec-2007  mjf Sync with HEAD.
 1.14.4.1  08-Dec-2007  mjf Sync with HEAD.
 1.15.6.1  02-Jan-2008  bouyer Sync with HEAD
 1.15.2.3  26-Dec-2007  ad Sync with head.
 1.15.2.2  08-Dec-2007  ad Sync with head.
 1.15.2.1  04-Dec-2007  ad Pull the vmlocking changes into a new branch.
 1.17.10.5  11-Aug-2010  yamt sync with head.
 1.17.10.4  11-Mar-2010  yamt sync with head
 1.17.10.3  18-Jul-2009  yamt sync with head.
 1.17.10.2  04-May-2009  yamt sync with head.
 1.17.10.1  16-May-2008  yamt sync with head.
 1.17.8.1  18-May-2008  yamt sync with head.
 1.17.6.2  17-Jan-2009  mjf Sync with HEAD.
 1.17.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.19.8.1  19-Jan-2009  skrll Sync with HEAD.
 1.19.6.1  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.21.4.1  23-Jul-2009  jym Sync with HEAD.
 1.26.4.4  31-May-2011  rmind sync with head
 1.26.4.3  05-Mar-2011  rmind sync with head
 1.26.4.2  03-Jul-2010  rmind sync with head
 1.26.4.1  30-May-2010  rmind sync with head
 1.26.2.1  17-Aug-2010  uebayasi Sync with HEAD.
 1.35.4.1  08-Feb-2011  bouyer Sync with HEAD
 1.35.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.38.8.3  02-Jun-2012  mrg sync to latest -current.
 1.38.8.2  05-Apr-2012  mrg sync to latest -current.
 1.38.8.1  18-Feb-2012  mrg merge to -current.
 1.38.4.4  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.38.4.3  30-Oct-2012  yamt sync with head
 1.38.4.2  23-May-2012  yamt sync with head.
 1.38.4.1  17-Apr-2012  yamt sync with head
 1.40.2.1  07-May-2012  riz Pull up following revision(s) (requested by chs in ticket #204):
sys/fs/sysvbfs/sysvbfs_vnops.c: revision 1.44
sys/ufs/ffs/ffs_vfsops.c: revision 1.277
sys/fs/v7fs/v7fs_vnops.c: revision 1.11
sys/ufs/chfs/chfs_vnops.c: revision 1.7
sys/ufs/ext2fs/ext2fs_readwrite.c: revision 1.61
sys/miscfs/genfs/genfs_io.c: revision 1.54
sys/kern/vfs_wapbl.c: revision 1.52
sys/uvm/uvm_pager.h: revision 1.43
sys/ufs/ffs/ffs_vnops.c: revision 1.121
sys/kern/vfs_subr.c: revision 1.434
sys/fs/msdosfs/msdosfs_vnops.c: revision 1.83
sys/fs/ntfs/ntfs_vnops.c: revision 1.51
sys/fs/udf/udf_subr.c: revision 1.119
sys/miscfs/specfs/spec_vnops.c: revision 1.135
sys/ufs/ext2fs/ext2fs_vnops.c: revision 1.103
sys/fs/udf/udf_vnops.c: revision 1.71
sys/ufs/ufs/ufs_readwrite.c: revision 1.104
change vflushbuf() to take the full FSYNC_* flags.
translate FSYNC_LAZY into PGO_LAZY for VOP_PUTPAGES() so that
genfs_do_io() can set the appropriate io priority for the I/O.
this is the first part of addressing PR 46325.
mark all wapbl I/O as BPRIO_TIMECRITICAL.
this is the second part of addressing PR 46325.
 1.46.2.3  03-Dec-2017  jdolecek update from HEAD
 1.46.2.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.46.2.1  23-Jun-2013  tls resync from head
 1.48.2.1  18-May-2014  rmind sync with head
 1.53.2.1  10-Aug-2014  tls Rebase.
 1.54.4.4  28-Aug-2017  skrll Sync with HEAD
 1.54.4.3  05-Oct-2016  skrll Sync with HEAD
 1.54.4.2  27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.54.4.1  06-Apr-2015  skrll Sync with HEAD
 1.59.2.1  26-Apr-2017  pgoyette Sync with HEAD
 1.60.2.1  21-Apr-2017  bouyer Sync with HEAD
 1.63.16.1  17-Jan-2020  ad Sync with head.
 1.63.10.1  08-Apr-2020  martin Merge changes from current as of 20200406
 1.64.4.1  25-Apr-2020  bouyer Sync with bouyer-xenpvh-base2 (HEAD)

RSS XML Feed