Skip to contentSkip to conversation

Modify loop device to be able to manage partitions of the disk image

PATCH Bodo Eggert 3 participants 3 messages Mar 7, 2008 4 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 11 lines · Nick Piggin
Quoted 7 lines · Laurent Vivier
Quoted 2 lines · Nick Piggin

Do you think we do something similar for drivers/block/brd.c too? I'd like to try to maintain parity between them where possible...

I think it is possible (I've the same patch for NBD too), but I think it is completely useless.

It's useful for testing, and for minimising the divergence in the code.

Maybe there should be a common mechanism to use partitions on any block device. Maybe there is - I have dark memories about the device mapper being able to parse partition tables, and plans on moving partition support to userspace.

#5 lore raw
Quoted 10 lines · Bodo Eggert
Quoted 9 lines · Nick Piggin
Quoted 7 lines · Laurent Vivier
Quoted 2 lines · Nick Piggin

Do you think we do something similar for drivers/block/brd.c too? I'd like to try to maintain parity between them where possible...

I think it is possible (I've the same patch for NBD too), but I think it is completely useless.

Quoted 7 lines
Quoted 2 lines

It's useful for testing, and for minimising the divergence in the code.

Maybe there should be a common mechanism to use partitions on any block device. Maybe there is - I have dark memories about the device mapper being able to parse partition tables, and plans on moving partition support to userspace.

It's easy to add partition support to the loopback device. A patch that realizes this was already published in 2004. See also
http://lwn.net/Articles/110426/.

Bart Van Assche.

#6 lore raw
In reply to Bodo Eggert
Quoted 7 lines · Bodo Eggert
Quoted 6 lines · Nick Piggin
Quoted 5 lines · Laurent Vivier
Quoted 2 lines · Nick Piggin

Do you think we do something similar for drivers/block/brd.c too? I'd like to try to maintain parity between them where possible...

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I think it is possible (I've the same patch for NBD too), but I think it is completely useless.

It's useful for testing, and for minimising the divergence in the code.

Maybe there should be a common mechanism to use partitions on any block device. Maybe there is - I have dark memories about the device mapper

The mechanism exists: the driver must call alloc_disk() with a value !=
1. This is what is modifying this patch.

Quoted 2 lines

being able to parse partition tables, and plans on moving partition support to userspace.

This is kpartx.

Laurent

Signature · 3 lines
----------------- [email protected]  ------------------
"Programmers who subconsciously view themselves as artists
 will enjoy what they do and will do it better." D. Knuth