Article View: comp.sys.concurrent
Article #20Available Contig. File Space?
From: Dave Hall (Sverdrup)
Date: Fri, 04 Sep 1992 12:39
Date: Fri, 04 Sep 1992 12:39
45 lines
2702 bytes
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
Technical Details
Message-ID:
<4SEP199207391576@ariel.lerc.nasa.gov>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!elroy.jpl.nasa.gov!nntp-server.caltech.edu!mustang.mst6.lanl.gov!data.nas.nasa.gov!taligent!apple!satyr!bdcsys!newsShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!elroy.jpl.nasa.gov!nntp-server.caltech.edu!mustang.mst6.lanl.gov!data.nas.nasa.gov!taligent!apple!satyr!bdcsys!news From: tohall@ariel.lerc.nasa.gov (Dave Hall (Sverdrup)) Newsgroups: comp.sys.concurrent Subject: Available Contig. File Space? Message-ID: <4SEP199207391576@ariel.lerc.nasa.gov> Date: 4 Sep 92 12:39:00 GMT Sender: news@bdcsys.suvl.ca.us Organization: ncurrent-request Lines: 45 Approved: concurrent-request@bdcsys.suvl.ca.us