[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | AdvFS Support/Info/Questions Notefile |
Notice: | note 187 is Freq Asked Questions;note 7 is support policy |
Moderator: | DECWET::DADDAMIO |
|
Created: | Wed Jun 02 1993 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 1077 |
Total number of notes: | 4417 |
1013.0. "Problem with ADVFS representation on 4.0b" by MDR01::ARANCHA (MCS Madrid) Wed Mar 05 1997 03:11
*****************
I posted this note on DECC_BUG, but I think the problem is ADVFS on
4.0a or 4.0b. Because I do it on Dunix 3.2c/3.2f and it's working
O.K. on advfs and ufs.
*****************
Hi,
My customer has reported the following error on Digital UNIX 4.0B.
This program osftest.c uses only system calls, it creates a file veria.bdf
of 18944 bytes, fills the first blocks with 1.1 and then writes from
address 6656 on 12000 bytes (representing 3000 floating point values going
from 0.0 to 29.99 in steps of 0.01).
All system calls execute successfully. But when you do
> od -f veria.bdf
you see that the last value written is only: 2.4309999e+01.
This happens on a directory which is set up with DEC's advanced file system.
If I do the same in a directory set up with DEC's UFS the program
works o.k. (last value = 2.9990000e+01)
This is very critical for the application customer.
Has anybody any idea ??
Thanks in the advance,
Arancha
*************************
Program : OSFTEST.C
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
/*
#define O_write (O_WRONLY | O_CREAT)
*/
#define O_write O_RDWR
/*
*/
long oskseek(fid, address)
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.PURPOSE moves the file pointer.
The argument fid is the file identification
obtained from osdopen. The address defines
the pointer position in bytes relative to:
start of the file, current position or end of the file as
defined by the variable mode (FILE_START, FILE_CURRENT, FILE_END).
(see midas/osparms.h). (i.e. : an address=0 and OS_START set means
first byte of the file).
.RETURNS Upon successful completion, the resulting pointer position
.RETURNS measured in bytes is returned, in case of error -1L.
.REMARKS System dependencies:
-- UNIX: lseek(2)
------------------------------------------------------------*/
int fid; /* file identification */
long address; /* file pointer */
{
int mode;
off_t ret;
mode = SEEK_SET;
if ((ret = lseek(fid, (off_t)address, mode)) == (off_t)-1)
printf("oskseek: error...\n");
else
printf("oskseek: addr = %ld, retpntr = %ld\n",address,(long)ret);
return((long)ret);
}
/*
*/
main()
{
char *mypntr;
char *cbuf;
int size, status, kk;
int fid, nr, n, allbytes;
long int addr;
float *fpntr, fbuf[512];
for (nr=0; nr<512; nr++) fbuf[nr] = 1.1;
cbuf = (char *)fbuf;
/* create file on disk with size = 18944 bytes */
fid = creat("veria.bdf",0666);
if (fid < 0)
printf("creat: problems with creat...\n");
n = 18944;
addr = n - 1; /* move to last byte */
status = oskseek(fid,addr);
if (status != -1)
{
char c;
c = ' ';
n = 1; /* write 1 byte */
if ((kk = write(fid,&c,(unsigned int)n)) == -1)
printf("write failed...\n");
else
printf("write: nobyt = %d, ret = %d\n",n,kk);
}
if (close(fid) < 0) printf("'roblems with close...\n");
fid = open("veria.bdf",O_write,0666);
allbytes = 12000;
mypntr = (char *) malloc((size_t) allbytes);
printf("mypntr = %x\n",mypntr);
fpntr = (float *) mypntr;
for (nr=0; nr<3000; nr++)
{
*fpntr++ = 0.01 * nr;
}
addr = 0;
n = 512;
status = oskseek(fid,addr);
if (status != -1)
{
if ((kk = write(fid,cbuf,(unsigned int)n)) == -1)
printf("write failed...\n");
else
printf("write: nobyt = %d, ret = %d\n",n,kk);
}
addr += 512; /* 512 */
n = 2048;
status = oskseek(fid,addr);
if (status != -1)
{
if ((kk = write(fid,cbuf,(unsigned int)n)) == -1)
printf("write failed...\n");
else
printf("write: nobyt = %d, ret = %d\n",n,kk);
}
addr +=2048; /* 2560 */
n = 2048;
status = oskseek(fid,addr);
if (status != -1)
{
if ((kk = write(fid,cbuf,(unsigned int)n)) == -1)
printf("write failed...\n");
else
printf("write: nobyt = %d, ret = %d\n",n,kk);
}
addr +=2048; /* 4608 */
n = 2048;
status = oskseek(fid,addr);
if (status != -1)
{
if ((kk = write(fid,cbuf,(unsigned int)n)) == -1)
printf("write failed...\n");
else
printf("write: nobyt = %d, ret = %d\n",n,kk);
}
addr +=2048; /* 6656 */
status = oskseek(fid,addr);
if (status != -1)
{
if ((kk = write(fid,mypntr,(unsigned int)allbytes)) == -1)
printf("write failed...\n");
else
printf("write: nobyt = %d, ret = %d\n",allbytes,kk);
}
close(fid);
}
T.R | Title | User | Personal Name | Date | Lines |
---|
1013.1 | Known problem | NETRIX::"[email protected]" | Tim Mark | Wed Mar 05 1997 04:19 | 10 |
| This is a known problem in AdvFS. It has been fixed in the releases
currently under development but to my knowledge a patch has not yet been
created for 4.0, 4.0A, and 4.0B. The problem was originally reported as
QAR 50226. A new QAR requesting that this fix be backported to 4.0,
4.0A, and 4.0B has been filed. It is QAR 51304. I will check on its status
today.
By the way, this is the second report we've seen of this. The first was from
Germany. This one is from Spain. What application is hitting this problem?
[Posted by WWW Notes gateway]
|
1013.2 | News about QAR and Thanks ... | MDR01::ARANCHA | MCS Madrid | Wed Mar 05 1997 07:10 | 8 |
| The application and source code is the same on Germany and Spain.
The customer doesn't tell me about the application, but it must be
of astrophic.
I'm waiting for your news over QAR.
Do I open an IMPT case ?
Thanks,
Arancha
|
1013.3 | Yes, open an IPMT case | NETRIX::"[email protected]" | Tim Mark | Wed Mar 05 1997 10:26 | 4 |
| I think that if you opened an IPMT case you would probably speed up the
process of getting a patch. Mention in the IPMT case that this is a
serious data corruption problem in AdvFS. That should get some attention.
[Posted by WWW Notes gateway]
|
1013.4 | QAR update | NETRIX::"[email protected]" | Tim Mark | Wed Mar 05 1997 11:33 | 4 |
| I got mail from the patch-creation manager who said there was just one other
filesystems bug ahead of it in the patch-creation queue. She said she would
raise the priority of creating a patch for this bug.
[Posted by WWW Notes gateway]
|