Skip to contentSkip to conversation

Re: [BusyBox] [Fwd: Loopback device setup?]

BusyBox vda 3 participants 3 messages Feb 17, 2004 2 messages not in the archive

lore
Share & tools
lore

vda

author
#2 lore raw
In reply to a message not in the archive
Quoted 11 lines · Tom Guilliams

in /driver/block/loop.c -

loop_set_fd()

		/*
                  * If we can't read - sorry. If we only can't write -
                 		 * well, it's going to be read-only.
                  */
                 if (!aops->readpage)
                         goto out_putf;
Quoted 7 lines

I confirmed the "if (!aops->readpage)" is true. I'm not sure what the readpage routine is trying to do (which dev or file) in my command below -

# mount -t ext2 -o loop ramdisk.image rootfs

Anyone have any thoughts?? This is all being done in the /tmp dircectory which is mounted as "tmpfs". Not sure if that has anything to do with it.

I recall that tmpfs cannot do readpage (by design?). CCing LKML, maybe someone will pour in more info.

Signature · 1 line
vda
#3 lore raw
Quoted 16 lines · vda
Quoted 15 lines · Tom Guilliams

in /driver/block/loop.c -

loop_set_fd()

		/*
                  * If we can't read - sorry. If we only can't write -
                 		 * well, it's going to be read-only.
                  */
                 if (!aops->readpage)
                         goto out_putf;

I confirmed the "if (!aops->readpage)" is true. I'm not sure what the readpage routine is trying to do (which dev or file) in my command below -

# mount -t ext2 -o loop ramdisk.image rootfs
Quoted 6 lines
Quoted 3 lines

Anyone have any thoughts?? This is all being done in the /tmp dircectory which is mounted as "tmpfs". Not sure if that has anything to do with it.

I recall that tmpfs cannot do readpage (by design?). CCing LKML, maybe someone will pour in more info.

readpage is not straightforward for tmpfs, so it took a long time to be added, but tmpfs has supported loop since 2.4.22 and 2.5.45.

Hugh

#4 lore raw

Thanks to all who responded. I have a 2.4.20 kernel so mounting on the tmpfs is not supported. I have found an alternative by using the ram device nodes for storage.

Thanks again,

Tom

Quoted 33 lines · Hugh Dickins
Quoted 17 lines · vda
Quoted 15 lines · Tom Guilliams

in /driver/block/loop.c -

loop_set_fd()

		/*
                 * If we can't read - sorry. If we only can't write -
                		 * well, it's going to be read-only.
                 */
                if (!aops->readpage)
                        goto out_putf;

I confirmed the "if (!aops->readpage)" is true. I'm not sure what the readpage routine is trying to do (which dev or file) in my command below -

# mount -t ext2 -o loop ramdisk.image rootfs
Quoted 6 lines
Quoted 3 lines

Anyone have any thoughts?? This is all being done in the /tmp dircectory which is mounted as "tmpfs". Not sure if that has anything to do with it.

I recall that tmpfs cannot do readpage (by design?). CCing LKML, maybe someone will pour in more info.

readpage is not straightforward for tmpfs, so it took a long time to be added, but tmpfs has supported loop since 2.4.22 and 2.5.45.

Hugh