]> git.ipfire.org Git - thirdparty/linux.git/commit
iomap: use find_next_bit() for dirty bitmap scanning
authorJoanne Koong <joannelkoong@gmail.com>
Tue, 11 Nov 2025 19:36:57 +0000 (11:36 -0800)
committerChristian Brauner <brauner@kernel.org>
Tue, 25 Nov 2025 09:22:10 +0000 (10:22 +0100)
commitfed9c62d28b726dad70cc03fd28ffd700b59c741
tree67dfbecc87f605921d309b668640534c207095a9
parenta298febc47e0ce116b9fc8151337ba8b2137e42d
iomap: use find_next_bit() for dirty bitmap scanning

Use find_next_bit()/find_next_zero_bit() for iomap dirty bitmap
scanning. This uses __ffs() internally and is more efficient for
finding the next dirty or clean bit than iterating through the bitmap
range testing every bit.

Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Link: https://patch.msgid.link/20251111193658.3495942-9-joannelkoong@gmail.com
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Suggested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/iomap/buffered-io.c