svn commit: r278821 - user/dchagin/lemul/sys/fs/pseudofs
Dmitry Chagin
dchagin at FreeBSD.org
Sun Feb 15 21:50:09 UTC 2015
Author: dchagin
Date: Sun Feb 15 21:50:08 2015
New Revision: 278821
URL: https://svnweb.freebsd.org/changeset/base/278821
Log:
To allow reading pseudofs files by chunks replace sbuf from fixed to autoextend.
The problem appears when the user tries to read a small chunk of the pseudofs
file. The underlying fill method will fail if the size of the supplied sbuf sb
is less than required to contain method data.
Modified:
user/dchagin/lemul/sys/fs/pseudofs/pseudofs_vnops.c
Modified: user/dchagin/lemul/sys/fs/pseudofs/pseudofs_vnops.c
==============================================================================
--- user/dchagin/lemul/sys/fs/pseudofs/pseudofs_vnops.c Sun Feb 15 21:47:43 2015 (r278820)
+++ user/dchagin/lemul/sys/fs/pseudofs/pseudofs_vnops.c Sun Feb 15 21:50:08 2015 (r278821)
@@ -662,7 +662,7 @@ pfs_read(struct vop_read_args *va)
if (buflen > MAXPHYS)
buflen = MAXPHYS;
- sb = sbuf_new(sb, NULL, buflen + 1, 0);
+ sb = sbuf_new_auto();
if (sb == NULL) {
error = EIO;
goto ret;
More information about the svn-src-user
mailing list