diff options
author | Manuel Bentele | 2019-08-14 18:48:14 +0200 |
---|---|---|
committer | Manuel Bentele | 2019-08-21 22:04:34 +0200 |
commit | 5bf58ecf30c12aaf6130332188facb5225b1c486 (patch) | |
tree | 8e68a8091339d795eb893c7f682a04c3b3983b46 /drivers/block/drbd/drbd_nla.c | |
parent | block: loop: file_fmt_qcow: write decompressed data to correct position in bvec (diff) | |
download | kernel-qcow2-linux-5bf58ecf30c12aaf6130332188facb5225b1c486.tar.gz kernel-qcow2-linux-5bf58ecf30c12aaf6130332188facb5225b1c486.tar.xz kernel-qcow2-linux-5bf58ecf30c12aaf6130332188facb5225b1c486.zip |
block: loop: fix backward compatibility for loop_info structure
While using the new loop kernel module with file format support and an old
losetup without file format support, problems occur. If losetup wants to have
the loop_info structure filled by the loop kernel module, the kernel module
writes across the boundaries of the old structure.
A new flag called LO_FLAGS_FILE_FMT is introduced to specify the support of the
loop_info extension for the file format support. If the flag is set before an
- LOOP_GET_STATUS
- LOOP_GET_STATUS64
- LOOP_SET_STATUS
- LOOP_SET_STATUS64
ioctl call, the caller informs the kernel module about the usage of the extended
loop_info structure. The module cna access the extension. Older versions of
losetup do not set the flag by default and the loop module preserves the
backward compatibility and do not write across the boundaries of the structure.
Signed-off-by: Manuel Bentele <development@manuel-bentele.de>
Diffstat (limited to 'drivers/block/drbd/drbd_nla.c')
0 files changed, 0 insertions, 0 deletions