mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
This commit is contained in:
parent
a8ec75016f
commit
6bf8d16009
1 changed files with 3 additions and 1 deletions
|
|
@ -303,7 +303,9 @@ read_strategy(void *devdata, int rw, daddr_t blk, size_t offset,
|
|||
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue