🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.concurrent
1 messages
1 total messages Started by Dave Hall (Sverdrup) Fri, 04 Sep 1992 12:39
Available Contig. File Space?
#20
Author: Dave Hall (Sverdrup)
Date: Fri, 04 Sep 1992 12:39
45 lines
2702 bytes
     This is my second attempt to post on this subject. The article seemed
to disappear the first time (along with the file!). Sorry if this is a
repeat at some sites.


     I would like to find a way to determine the amount of contiguous disk 
space available at any given time. My system is an SLS-5550 running RTU
6.0. Here is some background. I have a data acquisition application program
which uses the IEEE-488/Multibus interface to transfer large data buffers.
I am using the National Instruments IBRDF library call to read the buffer. 
This call opens a big file with the contiguous attribute for speed. If the 
file system does not have enough contiguous space available, the application
bombs with UNIX error code 28. I then have to re-make the file system. I 
have a solution figured out for the immediate problem. I can detect the
occurrence of UNIX error code 28, and call a different subroutine to
read the buffer into non-contigous space. It will be slow, but better than
having to shut down for a couple of hours to re-build the file system!

    What I would really like to do is to predict the occurrence of the problem
and re-build the file system before it gets critical. The problem is that
I can not find any RTU system call that is able to analyze the file system
and give me a report on the amount of contiguous space available. I am 
willing to write my own analyzer, but I need help. I see two ways to
attack it. 

    The first way is purely brute force. I could write a Fortran application
to make repetitive calls to the contig(2) call to allocate contiguous files 
until it fails with ENOSPC. This seems crude, and it may cause the file
system to become fragmented that much sooner.

    I would really like to access the file system bitmap. All I know about
this bitmap is what I have read in the RTU programming manual. Each physical
data block in the file system has a corresponding bit in the bitmap. Used
blocks have their bits set to one, unused blocks to zero. 


      Does anyone know how to access this bitmap from a C or Fortran
application program? 


                       Thanx in advance, 


                               Dave Hall
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads