public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libfrog: fix the if condition in xfrog_bulk_req_v1_setup
@ 2022-07-29  7:57 Stephen Zhang
  2022-07-29 15:44 ` Darrick J. Wong
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Zhang @ 2022-07-29  7:57 UTC (permalink / raw)
  To: sandeen, djwong, hch; +Cc: zhangshida, starzhangzsd, linux-xfs

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_agno(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(-)

diff --git a/libfrog/bulkstat.c b/libfrog/bulkstat.c
index 195f6ea0..77a385bb 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_agno(xfd, hdr->ino))
 		hdr->ino--;
 	bulkreq->lastip = (__u64 *)&hdr->ino,
 	bulkreq->icount = hdr->icount,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-07-31 16:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-29  7:57 [PATCH] libfrog: fix the if condition in xfrog_bulk_req_v1_setup Stephen Zhang
2022-07-29 15:44 ` Darrick J. Wong
2022-07-30  1:25   ` Stephen Zhang
2022-07-30  1:30     ` Darrick J. Wong
2022-07-30  7:51       ` Stephen Zhang
2022-07-31 16:44         ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox