Re: try this again

From: Howard (alicebt_at_hotmail.com)
Date: 12/02/04


Date: Thu, 02 Dec 2004 19:07:06 GMT


"Joseph" <crossgrid@gmail.com> wrote in message
news:conktq$73t$3@usenet01.srv.cis.pitt.edu...
> Modify the file system to allow the maximum size of a file to be as
> large as the disk (128Kbytes). In the basic file system, each file is
> limited to a file size of just under 4Kbytes. Each file has a header
> (class FileHeader) that is a table of direct pointers to the disk blocks
> for that file. Since the header is stored in one disk sector, the
> maximum size of a file is limited by the number of pointers that will
> fit in one disk sector. Increasing the limit to 128KBytes will probably
> but not necessarily require you to implement double indirect, or
> linked-list blocks.
>
> i get a segment fault when the file size is larger thank 8K. I'm pretty
> sure its in the Allocation method.
>
> attachment is the code
>
Your best bet to locate an error like this is to run it in the debugger, and
step through the funtion that you believe is failing. Look at the values of
the variables, especially the index when using loops. Also check that any
pointers that you dereference actually point to something that you've
dynamically allocated (and have not yet deleted). Once you've found the
line at which it actually crashes, you should know what's gone wrong. Then,
if you still don't see how to fix it, tell us which line fails, what the
relevant values were, and what you think they should have been. Then we can
help more easily.

I don't see SectorSize defined anywhere. The other calculations are all
based on this value. What is it defined as (and where is it defined)?
Could it be 0?

One other note: as mentioned in the FAQ, please post your responses either
at the bottom of the message, or intersepersed in the message, as
appropriate. Writing your response at the top is called "top posting", and
is frowned upon in usenet postings.

-Howard



Relevant Pages

  • disktab for VPC Disk
    ... I'm trying to optimize the disk access of NEXTSTEP on Virtual PC 5.0.4. ... Maximum size of NeXT file system is 2GB. ... programs in the initial 8 sectors of the device. ... The number of cylinders per cylinder group in a file system. ...
    (microsoft.public.mac.virtualpc)
  • Re: partition naming - newbie
    ... hardware address that is assigned to each disk, tape, or CD-ROM. ... Using the prtconf command ... In addition to managing these directories, the devfsadm command also ... Berkeley fast file system. ...
    (comp.unix.solaris)
  • SUMMARY N2: RE: Veritas Volume Manager and Solaris 8 disk space problem
    ... DESC: Commercial File System ... Disk layout version 4 won't support filesistem sizes bigger than 1Tb. ... VERITAS File System disk layout version 6 supports the creation of file ... Sector Count Sector ...
    (SunManagers)
  • Re: [patch] ext2/3: document conditions when reliable operation is possible
    ... when the power fails, the disk either writes a particular disk block, ... Now consider a file system which does logical journalling. ... down pending DMA transfers to prevent this failure mode from causing ...
    (Linux-Kernel)
  • Re: Windows bug?
    ... >> "The file system structure on the disk is corrupt and unusable. ... >> Windows has made corrections to the file system. ... >> 9070410 allocation units available on disk. ...
    (microsoft.public.windows.file_system)