Skip to content

Commit 48a8f3c

Browse files
balsinigregkh
authored andcommitted
loop: Add LOOP_SET_DIRECT_IO to compat ioctl
[ Upstream commit fdbe4ee ] 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 <[email protected]> Signed-off-by: Alessio Balsini <[email protected]> Signed-off-by: Jens Axboe <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent eccfa21 commit 48a8f3c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/block/loop.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,6 +1605,7 @@ static int lo_compat_ioctl(struct block_device *bdev, fmode_t mode,
16051605
arg = (unsigned long) compat_ptr(arg);
16061606
case LOOP_SET_FD:
16071607
case LOOP_CHANGE_FD:
1608+
case LOOP_SET_DIRECT_IO:
16081609
err = lo_ioctl(bdev, mode, cmd, arg);
16091610
break;
16101611
default:

0 commit comments

Comments
 (0)