qcow2: Add offset_to_sc_index()
commita53e8b7202dd941c619a57a640389560214d1f70
authorAlberto Garcia <berto@igalia.com>
Fri, 10 Jul 2020 16:12:52 +0000 (10 18:12 +0200)
committerMax Reitz <mreitz@redhat.com>
Tue, 25 Aug 2020 06:33:20 +0000 (25 08:33 +0200)
tree00077921d402bbe9aa8a6e01cf179ab7db748ba1
parentd0346b5591825bab4d4b35aefb0ab0d7650e3641
qcow2: Add offset_to_sc_index()

For a given offset, return the subcluster number within its cluster
(i.e. with 32 subclusters per cluster it returns a number between 0
and 31).

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <56e3e4ac0d827c6a2f5f259106c5ddb7c4ca2653.1594396418.git.berto@igalia.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/qcow2.h