[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MirageOS-devel] How to support a larger disk with hvt + kv_ro=direct (pass-through)?
Thanks for checking. Yes, it would be great to have multi-blocks requests eventually. But you are right, the fix for ocaml-fat is OK. Although that's mainly because FAT happens to default to 512 Byte blocks; other FSes do not (like ISO that defaults to 2048).
Ricardo
----- Original message ----- From: Hiroshi Doyu <hiroshi.doyu@xxxxxxxxxxxx> To: "kollerr@xxxxxxxxxx" <kollerr@xxxxxxxxxx> Cc: "mirageos-devel@xxxxxxxxxxxxxxxxxxxx" <mirageos-devel@xxxxxxxxxxxxxxxxxxxx> Subject: Re: [MirageOS-devel] How to support a larger disk with hvt + kv_ro=direct (pass-through)? Date: Tue, Apr 9, 2019 10:14 AM
Hi Ricardo,
You are right:
$ ~/src/mirage-skeleton/device-usage/kv_ro$ sudo /home/ehirdoy/.opam/4.06.1+lto/bin/solo5-hvt --disk=fat_block1.img kv_ro.hvt -l "*:debug"
| ___|
__| _ \ | _ \ __ \
\__ \ ( | | ( | ) |
____/\___/ _|\___/____/
Solo5: Memory map: 512 MB addressable:
Solo5: reserved @ (0x0 - 0xfffff)
Solo5: text @ (0x100000 - 0x22dfff)
Solo5: rodata @ (0x22e000 - 0x26afff)
Solo5: data @ (0x26b000 - 0x34dfff)
Solo5: heap >= 0x34e000 < stack < 0x20000000
ERROR: solo5_block_read(80) size=4096 block_size=512
2019-04-09 14:01:16 -00:00: ERR [application] main: (Failure "error reading essential sectors: Invalid argument")
Raised at file "src/core/lwt.ml", line 2998, characters 20-29
Called from file "lib/main.ml", line 64, characters 15-25
FAT requests 4096 bytes to read, which caused this error. Actually FAT doesn't need 4096 bytes but it wants FAT sector size as:
If FAT sector size == block sector size quite often it's 512 bytes, the above works ok.
We could survive temporary for the above fix,
but probably solo5_block_read() needs to support multi sector read eventually?
From: Hiroshi Doyu Sent: Tuesday, April 9, 2019 12:06 PM To: kollerr@xxxxxxxxxx Cc: mirageos-devel@xxxxxxxxxxxxxxxxxxxx Subject: Re: [MirageOS-devel] How to support a larger disk with hvt + kv_ro=direct (pass-through)?
Hi Ricardo,
Most likely you are right since this shows too. I'll check this later. https://github.com/ehirdoy/ocaml-fat/commit/32894feed7c9248ae50d332e4fabdeee22f0df8a
On Mon, 2019-04-08 at 14:03 +0000, Ricardo Koller wrote: > Hi, > > I'm pretty sure it's this: https://github.com/Solo5/solo5/blob/master/bindings/hvt/block.c#L77-L80 > And from those three checks, the most likely one failing is that the request is larger than a block. > > Could you confirm that please? in that case, then we need to split the request somewhere, or even better, fix this: https://github.com/Solo5/solo5/issues/325 > > Ricardo > > ----- Original message ----- > From: Hiroshi Doyu <hiroshi.doyu@xxxxxxxxxxxx> > Sent by: "MirageOS-devel" <mirageos-devel-bounces@xxxxxxxxxxxxxxxxxxxx> > To: "mirageos-devel@xxxxxxxxxxxxxxxxxxxx" <mirageos-devel@xxxxxxxxxxxxxxxxxxxx> > Cc: > Subject: Re: [MirageOS-devel] How to support a larger disk with hvt + kv_ro=direct (pass-through)? > Date: Mon, Apr 8, 2019 7:01 AM > > I found that "--kv_ro=fat" integrates FAT+disk.image automatically. > This works with "-t unix --kv_ro=fat" but not with "-t hvt --kv_ro=fat" as below. > Any hint to investigate further? > > $~/src/mirage-skeleton/device-usage/kv_ro$ sudo ./solo5-hvt --disk=fat_block1.img kv_ro.hvt -l "*:debug" > | ___| > __| _ \ | _ \ __ \ > \__ \ ( | | ( | ) | > ____/\___/ _|\___/____/ > Solo5: Memory map: 512 MB addressable: > Solo5: unused @ (0x0 - 0xfffff) > Solo5: text @ (0x100000 - 0x22bfff) > Solo5: rodata @ (0x22c000 - 0x268fff) > Solo5: data @ (0x269000 - 0x34bfff) > Solo5: heap >= 0x34c000 < stack < 0x20000000 > 2019-04-08 10:27:23 -00:00: ERR [application] main: (Failure "error reading essential sectors: Invalid argument") > Raised at file "src/core/lwt.ml", line 2998, characters 20-29 > Called from file "lib/main.ml", line 64, characters 15-25 > > > Also "fat" command seems to need "--unbuffered" appended. > > On Tue, 2019-03-26 at 18:44 +0200, Hiroshi Doyu wrote: > > Hello, > > > > Configured unix+kv_ro=direct, it seems to read a file from disk dynamically[1]. > > But hvt+kv_ro=direct seems to use a ramdisk(crunch?) statically[2]. > > > > How can hvt do the similar pass-through to a file as "unix+kv_ro=direct"? > > > > [1] > > $ mirage configure -t unix --kv_ro=direct && make depend && make > > $ ./kv_ro > > 2019-03-26 16:31:28 +00:00: INF [application] foo > > $ echo -n "hello" > t/secret > > $ ./kv_ro > > 2019-03-26 16:32:15 +00:00: INF [application] hello > > > > [2] > > $ mirage configure -t hvt --kv_ro=direct && make depend && make > > $ sudo ./solo5-hvt kv_ro.hvt > > 2019-03-26 16:34:19 -00:00: INF [application] foo > > $ echo -n "hello" > t/secret > > $ sudo ./solo5-hvt kv_ro.hvt > > 2019-03-26 16:35:11 -00:00: INF [application] foo > > > > the above code change for skelton/device-usage/kv_ro: > > https://github.com/ehirdoy/mirage-skeleton/commit/bff6688e075ffec67723d5663a984263bffa8563 > _______________________________________________ > MirageOS-devel mailing list > MirageOS-devel@xxxxxxxxxxxxxxxxxxxx > https://lists.xenproject.org/mailman/listinfo/mirageos-devel > > >
_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/mirageos-devel
|