goldfish: fix loop driver compat mode ioctl

BUG: 146580512
Test: build x86_64 ranchu kernel
boot sdk_phone_x86-userdebug with avb on

Combining the following cls:

go/oag/777015
Author: Evan Green <evgreen@chromium.org>
Date:   Mon Jul 2 16:03:46 2018 -0700

    loop: Add LOOP_SET_BLOCK_SIZE in compat ioctl

    This change adds LOOP_SET_BLOCK_SIZE as one of the supported ioctls
    in lo_compat_ioctl. It only takes an unsigned long argument, and
    in practice a 32-bit value works fine.

    Reviewed-by: Omar Sandoval <osandov@fb.com>
    Signed-off-by: Evan Green <evgreen@chromium.org>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Author: Alessio Balsini <balsini@android.com>
Date:   Wed Aug 7 01:48:28 2019 +0100

    loop: Add LOOP_SET_DIRECT_IO to compat ioctl

    Enabling Direct I/O with loop devices helps reducing memory usage by
    avoiding double caching.  32 bit applications running on 64 bits systems
    are currently not able to request direct I/O because is missing from the
    lo_compat_ioctl.

    This patch fixes the compatibility issue mentioned above by exporting
    LOOP_SET_DIRECT_IO as additional lo_compat_ioctl() entry.
    The input argument for this ioctl is a single long converted to a 1-bit
    boolean, so compatibility is preserved.

    Cc: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Alessio Balsini <balsini@android.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Bo Hu <bohu@google.com>
Change-Id: I99a82d9f1d1c6ab16c13d96e7ce5838bdec507ff
1 file changed