BeBits Information Developer Central Submit Application Your Account Web Links Contact Us
BeBits
Please support our sponsors!
cryptoloop
Talkback
 Go back to the cryptoloop page
 Post a new Talkback comment!
why stat
 By zadig - Posted on December 29, 2005 - 14:36:12   (#18701)
 Current version when comment was posted: 0.3.0
>How do you think real block drivers get mounted
>without problems ?
>The correct way is to implement the ioctls documented
> in Drivers.h to return the geometry.
>Of course for virtual devices you have to fake it,
>but it doesn't matter much in that case what is
>cylinder and what is head... reporting the block size
> then putting values for teh rest that match the
>backend file size is the way to go.
Yes I agree. When I started to code I tried this.
but there is another reason why I put the stat hook that I forgot to write in my previous post.
In hailu "Volume::Mount" function, the cache is disabled if the target to mount is a regular file. If we do not hook the stat call, the filesystem will not disable the cache on the opened file. According to the comments in the code this may lead to dead locks.
btw I have no idea whether the same thing apply to beos/zeta.
One solution may be to disable the cache when the loop target is a regular file but I do not know if this is the only specific action done on regular files, and not all software that use loop files may need this.

>I'll send you my current tree, as I have the feeling
>I won't have time to finish it. It's quite crashprone
> atm, as I was in the middle of moving things around
>and adding correct locking.
great. I will be happy to apply your bugfixes. Where did you get locking troubles ?


Re: actually
 By mmu_man - Posted on December 24, 2005 - 11:16:23   (#18667)
 Current version when comment was posted: 0.3.0
How do you think real block drivers get mounted without problems ?
The correct way is to implement the ioctls documented in Drivers.h to return the geometry.
Of course for virtual devices you have to fake it, but it doesn't matter much in that case what is cylinder and what is head... reporting the block size then putting values for teh rest that match the backend file size is the way to go.
I'll send you my current tree, as I have the feeling I won't have time to finish it. It's quite crashprone atm, as I was in the middle of moving things around and adding correct locking.

re: actually
 By zadig - Posted on December 22, 2005 - 04:30:05   (#18646)
 Current version when comment was posted: 0.3.0
the stat hook is here to give to the filesystem layers information about the loop target when it checks where is stored the filesystem and not the loop device.
I could not mount partitions without this: I had mount errors saying that the type or size was not correct. So for the moment this is the only solution I found but I agree that this is just a hack and not a clean solution.

If you did some fixes on the previous version it will be really quick to report them because there are almost no changes in the drivers part. I "just" added the deskbar addon in v 0.3.0.

actually
 By mmu_man - Posted on December 22, 2005 - 03:31:18   (#18644)
 Current version when comment was posted: 0.3.0
I spent quite some time fixing the previous version, but didn't finish yet.
There are lots of stuff done in that are at least strange. That stat() hack has absolutely no reason to be.

great
 By mmu_man - Posted on February 23, 2005 - 02:28:02   (#15939)
 Current version when comment was posted: 0.1.0
me->ThingsToDo--;

 
BeGroovy
  Recent Downloads  -  # 371
Total Downloads  -  # 2,355
Total Views  -  # 1,439
User Ratings  -  N/A
  File System Addons
Misc. Drivers
1.  QEMU - 9.62
2.  ScummVM - 9.50
3.  cpu_fix - 9.42
4.  Jukebox - 9.36
5.  Haiku AGP busm... - 9.35
6.  vim6 - 9.31
7.  Beezer - 9.25
8.  BeeF - 9.25
9.  HandBrake - 9.24
10.  DOSBox - 9.22
1.  Ati Radeon Grap... - 267
2.  BeOS 5 Personal... - 229
3.  Realtek RTL8139... - 211
4.  ATI Rage 128 Pr... - 166
5.  USB Serial driver - 129
6.  Ensoniq AudioPC... - 116
7.  Broadcom 440x 1... - 103
8.  DjVu Viewer - 98
9.  S3 Trio 64 v2 DX... - 70
10.  Sound Blaster Pr... - 68
You are not logged in.
 Login or create an account...
Hosted by NetConnect

 
Unless otherwise noted, everything is copyright © 1999-2002 Fifth Ace Productions, LLC. All Rights Reserved.
For more legal trivia, take a gander at our
Legal Stuff page and our Privacy Statement.
Fifth Ace Productions