Message ID | 20220730080753.1963823-1-zhangshida@kylinos.cn (mailing list archive) |
---|---|
State | Deferred, archived |
Headers | show |
Series | [RESEND] libfrog: fix the if condition in xfrog_bulk_req_v1_setup | expand |
diff --git a/libfrog/bulkstat.c b/libfrog/bulkstat.c index 195f6ea0..8f403f1e 100644 --- a/libfrog/bulkstat.c +++ b/libfrog/bulkstat.c @@ -172,7 +172,7 @@ xfrog_bulk_req_v1_setup( if (!buf) return -errno; - if (hdr->ino) + if (cvt_ino_to_agino(xfd, hdr->ino)) hdr->ino--; bulkreq->lastip = (__u64 *)&hdr->ino, bulkreq->icount = hdr->icount,
when scanning all inodes in each ag, hdr->ino serves as a iterator to specify the ino to start scanning with. After hdr->ino-- , we can get the last ino returned from the previous iteration. But there are cases that hdr->ino-- is pointless, that is,the case when starting to scan inodes in each ag. Hence the condition should be cvt_ino_to_agino(xfd, hdr->ino) ==0, which represents the start of scan in each ag, instead of hdr->ino ==0, which represents the start of scan in ag 0 only. Signed-off-by: Stephen Zhang <zhangshida@kylinos.cn> --- libfrog/bulkstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)