]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ufs: untangle ubh_...block...(), part 3
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 28 Jan 2023 00:56:44 +0000 (19:56 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 18 Oct 2024 21:35:31 +0000 (17:35 -0400)
commitdce3e8d33aa7588fe9bea5f58796e94ee66091c3
treeb0073c658f4d69ca66ea4af527940c11c4b7f3d1
parent8bec0618a42959b9fecac115c5dbf942675f9776
ufs: untangle ubh_...block...(), part 3

Pass fragment number instead of a block one.  It's available in all
callers and it makes the logics inside those helpers much simpler.
The bitmap they operate upon is with bit per fragment, block being
an aligned group of 1, 2, 4 or 8 adjacent fragments.  We still
need a switch by the number of fragments in block (== number of
bits to check/set/clear), but finding the byte we need to work
with becomes uniform and that makes the things easier to follow.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ufs/balloc.c
fs/ufs/util.h