| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Thiago Abdo <tjabdo@inf.ufpr.br>
|
|
|
|
| |
Signed-off-by: Thiago Abdo <tjabdo@inf.ufpr.br>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The loop_info structure is not initialized correctly if an old losetup
utility without file format support is used. In that case, the file format
type is not initalized and the LOOP_SET_STATUS* ioctl calls always fails.
This patch initalizes the loop file format in the backward compatibility
mode to the default RAW file format type and prevents the failing of the
LOOP_SET_STATUS* ioctl calls.
Signed-off-by: Manuel Bentele <development@manuel-bentele.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The loop device module is extended by providing debugfs support if debugfs is
enabled in kconfig. The provided debugfs root directory is called loop and
contains for each loop device a subfolder named after its disk name of the block
device. These folders can be used by the different loop file format drivers to
export debugging information.
This patch contains debugfs entries for the QCOW2 file format driver, too. The
read-only 'header' entry provides human readable information of the QCOW header.
The 'offset' entry provides interaction with the address calulation engine of
the QCOW implementation. One linear address number can be written to the
'offset' entry. Later on, after writing to the entry, the calulated non-linear
cluster offset can be read.
Signed-off-by: Manuel Bentele <development@manuel-bentele.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The QCOW2 file format is added as a new file format module to the existing loop
device file format subsystem. The implementation of the QCOW2 format is based on
the original implementation of the QEMU project and was ported to the Linux
kernel space.
The implementation of the QCOW2 file format supports the reading of a normal
QCOW2 disk image as well as the reading of sparsed and/or compressed QCOW2
images. Write support is missing and is not ported yet. Discard, flush and
reading or writing aio is missing, too. That's the reason why the loop device
can not be configured to use direct IO with this implementation.
Signed-off-by: Manuel Bentele <development@manuel-bentele.de>
|
|
|
|
|
|
|
| |
Wrong file names in header comments of the loop device module and file format
subsystem are fixed.
Signed-off-by: Manuel Bentele <development@manuel-bentele.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The loop device is extended by a file format subsystem to allow the
implementation of various disk file formats. The file format drivers are
implemented as own kernel modules and registered by the subsystem. The subsystem
takes control over the specified file format at loop creation and calls the
corresponding file format driver functions.
At the moment, the file format subsystem can handle ...
- read
- write
- discard
- flush
... operations of the loop block device. To implement any disk file format in
the future, the interface of the subsystem must be extended by a size and
capacity functionality. This is especially necessary for sparse disk file
formats.
Signed-off-by: Manuel Bentele <development@manuel-bentele.de>
|
|
The existing loop device kernel module source files are renamed and moved into
its own subfolder to prepare the source for the extension of the file format
support for loop devices. Also, it cleans up the block device drivers directory.
Signed-off-by: Manuel Bentele <development@manuel-bentele.de>
|