--- In [email protected], Mickey Mathieson <[EMAIL PROTECTED]> wrote:
>
> --- Ajinkya Kale <[EMAIL PROTECTED]> wrote:
> 
> > hi all,
> > 
> > Project should be of a duration of 6 months(ie it
> > should be that complicated)
> > 
> > Prefarably in Linux OS.......or some more secure and
> > efficient file system something of that kind i dont
> > know exactly.
<snip>

One example what you might want to address is the following situation.

Suppose you have a partition formatted with the Reiser file system.
Reiser FS allows you to work on a file in such a way that either the
previous state of the file is preserved or its new contents are valid.
This means that a file is either completely changed during some
program or not changed at all.

What do I mean? (for those who have not worked with journalling file
systems yet)
Suppose you have this piece of C code:

FILE * OutFile;
char OutFileName[] = "/home/nico/example.txt";
if ( ! (OutFile = fopen( OutFileName, "w")))
{ perror( "Cannot open example.txt");
  exit( EXIT_FAILURE);
}

/* else */
CurrentTreeElement = MyTree;
while ( CurrentTreeElement != NULL)
{ ...
  /* save current tree element to OutFile */
  ...
  CurrentTreeElement = NextTreeElement( CurrentTreeElement);
}
fclose( OutFile);
...

Now consider something goes wrong while saving your tree (namely the
process crashes due to some bug) to the file. What will happen to the
file contents?

With e.g. an Ext2 file system the previous contents of the file are
gone, and the file created is incomplete. Which means: the file
contains basically garbage.

With a journalling file system like Reiser, however, the file will
retain its contents in case the process crashes and can't close the
file properly.

Now such a journalling file system has one huge disadvantage:
Consider you have (for whatever stupid reason your managers have asked
you to do so) stored a database file on a Reiser partition. The DB
file has grown over the past days to let's say 50 GB in size (and
believe me, this is not big). Now, whenever you open such a file on a
Reiser partition it might well be that the Reiser driver will keep a
complete copy of that file. Which means that:
1) the FS driver has to copy the complete 50 GB before
   opening the file,
2) you have 50 GB less disk space on this partition.
Both things hurt.

Now what's the logical consequence?

This is a perfect area for discussion. So now I leave it up to you to
consider one or several approaches to addressing and remedying this
problem and implement one or two of them. I think that's hard enough
stuff for six months.

Don't underestimate the effort for such a job. As Data Warehouse
consultants use to say: Think Big, Build Small. Otherwise six months
won't suffice to finalise your project but will suffice to turn you mad.

Regards,
Nico

Reply via email to