When generating bootable VM images certain systems (most notably s390x) require devices with 4k blocksize. This patch implements a new flag 'LO_FLAGS_BLOCKSIZE' which will set the physical blocksize to that of the underlying device, and allow to change the logical blocksize for up to the physical blocksize.
Showing the changes to include/uapi/linux (1 of 3 files). Show all
Unified · Split
| @@ -22,6 +22,7 @@ enum { · 21 unmodified lines | |||
| 22 | LO_FLAGS_AUTOCLEAR = 4, | 22 | LO_FLAGS_AUTOCLEAR = 4, |
| 23 | LO_FLAGS_PARTSCAN = 8, | 23 | LO_FLAGS_PARTSCAN = 8, |
| 24 | LO_FLAGS_DIRECT_IO = 16, | 24 | LO_FLAGS_DIRECT_IO = 16, |
| 25 | LO_FLAGS_BLOCKSIZE = 32, | ||
| 25 | }; | 26 | }; |
| 26 | 27 | ||
| 27 | #include <asm/posix_types.h> /* for __kernel_old_dev_t */ | 28 | #include <asm/posix_types.h> /* for __kernel_old_dev_t */ |
| @@ -59,6 +60,8 @@ struct loop_info64 { · 31 unmodified lines | |||
| 59 | __u64 lo_init[2]; | 60 | __u64 lo_init[2]; |
| 60 | }; | 61 | }; |
| 61 | 62 | ||
| 63 | #define LO_INFO_BLOCKSIZE(l) (l)->lo_init[0] | ||
| 64 | |||
| 62 | /* | 65 | /* |
| 63 | * Loop filter types | 66 | * Loop filter types |
| 64 | */ | 67 | */ |