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 <tso...@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); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"