Fix ring read nr/part confusion

Some parts of the ring reading were still using the old 'nr' for the
number of blocks to read, but it's now the total number of blocks
in the ring.  Use part instead.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2016-12-08 23:43:54 -08:00
parent c8d61c2e01
commit 1b4bab3217

View File

@@ -258,15 +258,15 @@ int scoutfs_ring_read(struct super_block *sb)
part = min3(nr, (u64)NR_BLOCKS,
le64_to_cpu(super->ring_blocks) - index);
trace_printk("index %llu nr %llu\n", index, nr);
trace_printk("index %llu part %llu\n", index, part);
ret = scoutfs_bio_read(sb, pages, blkno, nr);
ret = scoutfs_bio_read(sb, pages, blkno, part);
if (ret)
goto out;
/* XXX verify block header */
for (i = 0; i < nr; i++) {
for (i = 0; i < part; i++) {
ring = scoutfs_page_block_address(pages, i);
ret = read_entries(sb, ring);
if (ret)