On Sun, Apr 11, 2010 at 01:05:44PM +0530, shivpratap chauhan wrote:
> Hi All,
Hi,
and hi all, i've back!
> 
> I have few qeries and observations:
> 
> #1:
> 
> I am trying to understand ext2 fs and how it interact with vfs. I am not
> able to see any log in serial output for ext2 though i enabled debugging for
> it also i manually tried these changes:
it should works without any modifications.
you just need to compile kernel with serial debug option.

> --- a/filesystems/regular/ext2/log.h
> +++ b/filesystems/regular/ext2/log.h
> @@ -7,16 +7,17 @@
>  #define EXT2FS_DEBUG
>  #endif
> 
> -#ifdef EXT2FS_DEBUG
> +#define EXT2FS_DEBUG
> +//#ifdef EXT2FS_DEBUG
>  #define ext2_debug(f, a...)                                             \
>    do {                                                                  \
>      klog("EXT2-fs DEBUG (%s, %d): %s:",                                 \
>           __FILE__, __LINE__, __func__);                                 \
>      klog(f"\n", ## a);                                                  \
>    } while (0)
> -#else
> -#define ext2_debug(f, a...) do {} while(0)
> -#endif
> +//#else
> +//#define ext2_debug(f, a...) do {} while(0)
> +//#endif
> 
> 
> 
> 
> #2
> 
> when I did mkdir in root directory jariOS crashes pls see log below:
Actually jari OS didn't crashed, it's a pf in the ext2.
> 
> [v2] {pp_lookup} point->point-> (0x1096a98)<<END
> [EXT2] (creating dir): mkdir error: 2133571369
It's a debug output of the ext2, it works.
ext2 doesn't support write support now and it will fails 
on write access always.
> ================[USER-SPACE PAGE FAULT #14]================
>   [CPU #0] Task: ext2.fs (PID=24, TID=0)
>   Error code: 0x6
>   Invalid address: 0x545, RIP: 0x10024e3
>   [=== General purpose registers dump ===]
>   |RAX: 0x0000000000000545 | RBP: 0x0000000000000000 | RSI:
> 0x0000000000000000|
>   |RDI: 0x000000ffffffd9c0 | RDX: 0x0000000000000000 | RCX:
> 0x000000ffffffd748|
>   |RBX: 0x0000000001002420 | R15: 0x0000000000000000 | R14:
> 0x0000000000000000|
>   |R13: 0x0000000001185018 | R12: 0x0000000001185010 | R11:
> 0x0000000000000206|
>   |R10: 0x0000000000000000 | R9:  0x0000000000000000 | R8:
> 0x0000000000000000|
>   [=== Interrupt stack frame ===]
>    > RIP: 0x00000000010024e3, CS: 0x000000000000001b
>    > RSP: 0x000000ffffffdab0, SS: 0x000000000000001b
>    > RFLAGS: 0x0000000000000202
>   [=== USER STACK DUMP ===]
>     [0x000000ffffffdaf0] [0x0000000000000000] [0x0000000000000000]
>     [0x0000000000000000] [0x00000001000001ed]
> 
> 
> 
> #3
> 
> There is a minor issue with makefile for core_servers
> 
> diff --git a/Makefile b/Makefile
> index d2e1f4a..2e10461 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -183,7 +183,7 @@ help:
>         $(Q)$(MAKE) -f sconfig/Makefile help
>         $(Q)echo ''
>         $(Q)echo 'Targets:'
> -       $(Q)echo '  all [default]       - make all but five services shared"
> +       $(Q)echo '  all [default]       - make all but five services shared'
>         $(Q)echo '  static              - make everything as static modules'
>         $(Q)echo '  shared              - make everything as shared modules'
>         $(Q)echo ''
> 
> 
> PS: Can anybody tell me relation in vfs (vfs also tun in usersapce? ) and
> kernel how they interact
VFS layer (vfs/fses/file resources) all is works in user space.
u need to know that you have a major components:
 - vfsv2 service (that keeps all the information about
filedescriptors, mounted filesystems and mount tree itself).
 - libv2 is a library that linked to the filesystem and it works with
vfsv2 proto and libc, also it provide the major filesystem
abstractions (vnode for example)
 - libc part (low level and proto part of the fs<->application operation)
Also, there are need to keep in mind that actually you have two
generic types of the user<->vfs layer interaction:
 - indirect
 - direct 
For example, when you need to resolve file name, create file or
directory - it will be always indirect operation and it will goes
throw vfsv2, vfsv2 will determine which of the mounted fses may keeps this
file and redirect that to the concrete fs.
Otherwise, while you have filedescriptor (you are connected to the fs
resource already) and you need to read or write - that will be a
direct call to the filesystem that keep that resource.
In your case you're trying to create directory - that means that first
you are going to the vfsv2 service, that determine the concrete
filesystem, and redirect it to the ext2 (that going to the PF, because
many things was not implemented/ported in ext2 specific code).
> Thanks,
> Shiv
Thanks,
have a nice day.
> _______________________________________________
> Jarios-dev mailing list
> [email protected]
> http://lists.jarios.org/cgi-bin/mailman/listinfo/jarios-dev

_______________________________________________
Jarios-dev mailing list
[email protected]
http://lists.jarios.org/cgi-bin/mailman/listinfo/jarios-dev

Reply via email to