Date: Sat, 30 Jul 2016 17:45:56 +0000 (UTC) From: Allan Jude <allanjude@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303555 - head/sys/boot/common Message-ID: <201607301745.u6UHju8p033813@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: allanjude Date: Sat Jul 30 17:45:56 2016 New Revision: 303555 URL: https://svnweb.freebsd.org/changeset/base/303555 Log: bcache should support reads shorter than sector size dosfs (fat file systems) can perform reads of partial sectors bcache should support such reads. Submitted by: Toomas Soome <tsoome@me.com> Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D6475 Modified: head/sys/boot/common/bcache.c Modified: head/sys/boot/common/bcache.c ============================================================================== --- head/sys/boot/common/bcache.c Sat Jul 30 15:56:36 2016 (r303554) +++ head/sys/boot/common/bcache.c Sat Jul 30 17:45:56 2016 (r303555) @@ -303,7 +303,9 @@ read_strategy(void *devdata, int rw, dad break; } - size = i * bcache_blksize; + if (size > i * bcache_blksize) + size = i * bcache_blksize; + if (size != 0) { bcopy(bc->bcache_data + (bcache_blksize * BHASH(bc, blk)) + offset, buf, size);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607301745.u6UHju8p033813>