Fix the AttachOptions.part_scan function (#50)

The function currently writes a value of 16 to lo_flags, but 16 is the value for
LO_FLAGS_DIRECT_IO.  The intended flag, LO_FLAGS_PARTSCAN, has a value of 8 [0].

It looks like this was a regression when deprecating attach_with_partscan[1],
which had the correct value of 8.  That same commit introduces this bug.

[0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/loop.h?h=v5.15#n25
[1] 1ec9826012

Co-authored-by: player-two <>
This commit is contained in:
player-two 2022-10-29 17:48:27 -05:00 • committed by GitHub
commit d9fb0c5c57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23