]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC revision 197579 and 199617:
authordelphij <delphij@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 7 Dec 2009 19:59:28 +0000 (19:59 +0000)
committerdelphij <delphij@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 7 Dec 2009 19:59:28 +0000 (19:59 +0000)
commitcad24d1f0b54e65c65bba09bf8bdea89532fff55
tree77097b7100ce86aff77bfce89d23931c7acce522
parent089989d6980d4b103ad0508c7cfddbab2df88680
MFC revision 197579 and 199617:

Add two new fcntls to enable/disable read-ahead:

 - F_READAHEAD: specify the amount for sequential access.  The amount is
   specified in bytes and is rounded up to nearest block size.
 - F_RDAHEAD: Darwin compatible version that use 128KB as the sequential
   access size.

A third argument of zero disables the read-ahead behavior.

Please note that the read-ahead amount is also constrainted by sysctl
variable, vfs.read_max, which may need to be raised in order to better
utilize this feature.

Thanks Igor Sysoev for proposing the feature and submitting the original
version, and kib@ for his valuable comments.

git-svn-id: svn://svn.freebsd.org/base/stable/8@200229 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libc/sys/fcntl.2
sys/kern/kern_descrip.c
sys/kern/vfs_vnops.c
sys/sys/fcntl.h