svn commit: r303555 - head/sys/boot/common
Allan Jude
allanjude at FreeBSD.org
Sat Jul 30 17:45:57 UTC 2016
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 at 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);
More information about the svn-src-head
mailing list