mke2fs freezes with device-mapper device

Timur galiullintimur at ...9...
Tue Nov 20 11:33:38 CET 2012

mke2fs with simple block device (l4linux + atapi drv) work's correctly, but if 
i create encrypted device with cryptsetup, open it (there device mapper file 
created) and try to create file system (on dm-device) using mke2fs  then 
system freezes(infinitely write to device). I found that problem in fsync call 
unix_flush(io_channel channel) function (mke2fs_source/lib/ext2fs/unix_io.c). 
Help me to solve this problem) 
.run file attached
initrd with cryptsetup -
Galiullin Timur
-------------- next part --------------
assert_spec foc

# Build
set build_components {
	l4linux }

lappend_if [have_spec     pci] build_components drivers/pci
lappend_if [have_spec x86] build_components drivers/nic
lappend_if [have_spec     ps2] build_components drivers/input/ps2
lappend_if [have_spec   x86]   build_components drivers/atapi

build $build_components

# Config
set config  {
<config prio_levels="2" verbose="yes">
		<service name="ROM"/>
		<service name="RAM"/>
		<service name="IRQ"/>
		<service name="IO_MEM"/>
		<service name="IO_PORT"/>
		<service name="CAP"/>
		<service name="PD"/>
		<service name="RM"/>
		<service name="CPU"/>
		<service name="LOG"/>
		<service name="SIGNAL"/>
		<any-service> <parent/> <any-child/> </any-service>
	<start name="timer">
		<resource name="RAM" quantum="1M"/>
		<provides><service name="Timer"/></provides>
	<start name="uart_drv">
		<resource name="RAM" quantum="1M"/>
		<provides><service name="Terminal"/></provides>
		<config><policy label="l4linux" uart="1"/></config>
	</start> }

append_if [have_spec pci] config {
	<start name="pci_drv">
		<resource name="RAM" quantum="1M"/>
		<provides><service name="PCI"/></provides>
  <start name="atapi_drv">
    <resource name="RAM" quantum="1M" />
      <provides><service name="Block" /></provides>
      <config ata="yes" />

append_if [have_spec vesa] config {
	<start name="vesa_drv">
		<resource name="RAM" quantum="1M"/>
		<provides><service name="Framebuffer"/></provides>
	</start> }

append_if [have_spec pl11x] config {
	<start name="pl11x_drv">
		<resource name="RAM" quantum="2M"/>
		<provides><service name="Framebuffer"/></provides>
	</start> }

append_if [have_spec ps2] config {
	<start name="ps2_drv">
		<resource name="RAM" quantum="1M"/>
		<provides><service name="Input"/></provides>
append_if [have_spec x86] config {
<start name="nic_drv">
<resource name="RAM" quantum="2M"/>
<provides><service name="Nic"/></provides>

append config {
	<start name="l4linux">
		<resource name="RAM" quantum="600M"/>

append_if [have_spec x86] config {
		<config args="mem=500M console=ttyS0 l4x_rd=initrd.gz l4x_cpus=2 l4x_cpus_map=0,1">
			<block label="sda"/>

append_if [have_spec arm] config {
		<config args="mem=64M console=ttyS0 l4x_rd=initrd.gz_my"/>

append config {

install_config $config

# Boot modules
set boot_modules { core init timer uart_drv l4linux initrd.gz }
lappend_if [have_spec     pci] boot_modules pci_drv
lappend_if [have_spec x86] boot_modules nic_drv
lappend_if [have_spec     ps2] boot_modules ps2_drv
lappend_if [have_spec   pl11x] boot_modules pl11x_drv
lappend_if [have_spec    vesa] boot_modules vesa_drv
lappend_if [have_spec x86]     boot_modules atapi_drv

if {[have_spec x86]} {
	set uri ""
} elseif {[have_spec arm]} {
	set uri ""
if {![file exists bin/initrd.gz]} {
	puts "Download initramfs ..."
	exec >& /dev/null wget -c -O bin/initrd.gz $uri

build_boot_image  [join $boot_modules " "]

# Qemu
append qemu_args " -m 768 -nographic "
append qemu_args " -serial file:kdb.log "
append qemu_args " -serial mon:stdio "
append_if [have_spec     x86] qemu_args " -smp 2,cores=2 -no-kvm-irqchip -cpu qemu32 -hda ata.raw "
append_if [have_spec x86] qemu_args " -net nic,model=e1000 -net user "
append_if [have_spec lan9118] qemu_args " -net nic,model=lan9118 -net user "
#append_if [have_spec     x86] qemu_args " -smp 1,cores=1 "
#append_if [have_spec     x86] qemu_args " -hda ata.raw "

run_genode_until forever

More information about the users mailing list