?? vxw_pt3.html
字號:
<hr WIDTH="60%"><p><h3><a NAME="3.5"><center>3.5 General file system questions</center></a></h3><a NAME="3.5-A"></a>Q: It seems that VxWorks does not write to the file on the host but isbuffering all file output in memory until the end of the application or until the file is closed. Also when I open a large file it seems that VxWorksis allocating memory to store the complete file, and the open fails when notenough memory is available.<p>A: It sounds like you were using netdrv and that's what happened when afile is either being read or written (the whole file is buffered in memory).Try nfs.<br>(From: M Lang, mlang@fst.jpl.nasa.gov)<p><hr WIDTH="50%"><a NAME="3.5-B"></a><p>Q: What is the maximum number of open file descriptors in VxWorks? Is itconfigurable?<p>A: Yes, see config/all/configAll.h:<pre>#define NUM_FILES 50 /* max 50 files open simultaneously */</pre>The maximum number is 256, as this is a hard-coded maximum for select, butyou can only use up to 253 files, as you cannot use fd's 0, 1 and 2.<p>Increasing NUM_FILES to 100, only got us to about 79 file descriptors.Then we had to change to following #defines as well<pre>/*Changed SJP 2/1/00 all entries were 64 and then bumbed to 128*//*Since the NUM_FILES in configAll.h was changed to 256 we had to increasethe size of the clusters that are used when opening sockets*/#define NUM_SYS_64 256 /* 64 byte system clusters */#define NUM_SYS_128 256 /* 128 byte system clusters */#define NUM_SYS_256 256 /* 256 byte system clusters */#define NUM_SYS_512 256 /* 512 byte system clusters */</pre><br>(From: Peter Marqui (peter.marqui@rauland.com))<p><hr WIDTH="50%"><a NAME="3.5-C"></a><p>Q: I would like to use more than 256 files in a select. Is this possible?<p>A: There is a fixed limit of 256 bits in an fd_set so you can only select on fd's in the range [0..255].<br>Unfortunately changing FD_SETSIZE to a value above 255 won't have any effectunless you also recompile the VxWorks select library (and, for safety,anything else that depends on FD_SETSIZE).<br>I investigated various ways to solve/work around this problem several yearsago, and concluded that the only reasonable way to do so was to get source codefor the VxWorks selectLib and either recompile it with a fixed (different)FD_SETSIZE, or (as I eventually did) make it support a variable sized fd_set.Bear in mind that you will need a source licence for selectLib.c before youcan make any of these changes.<br>(From: Ian Willats, ian.willats@telelogic.com)<p><hr WIDTH="50%"><a NAME="3.5-D"></a><p>Q: Is it possible to use files larger than 4 Gbytes?<p>A: In DosFs 2.0, when using Microsoft compatible FAT32 format, thislimitation exists due to MSFT's 32-bit file size field in directorystructure.<br>If you however format DosFs 2.0 disk with the proprietary WindRiver longfile names (aka VX_LONG), you will get a 40-bit file size, and 64-bitcounterparts of the standard ioctl codes, which use a 64-bit integer argumentsas the third ioctl argument.<br>Also, if my memory serves me well, we have also implemented these same64-bit API calls on the rawFsLib, in the course of developing DosFs 2.0,so the extended rawFs does exist somwwhere, but I am not sure if and howyou can obtain this from WindRiver.<br>Finally, there is the alternative of circumcenting file systems alltogether,and use the Block Device API to directly interface the disk driver. This issimilar to using RAW file system, but you will be forced to sector aligned I/O,i.e. your disk address will be a sector number, and all your R/W buffers willhave to be multiple of 512 bytes (preferrably aligned if the driver has gotDMA in it).<br>(From: Leonid Rosenboim)<p><hr WIDTH="50%"><a NAME="3.5-E"></a><p>Q: I cannot mount my ATA CDROM drive<p>A: This is because CD-ROM drives usually do not implement the ATA protocol,as hard drives do, but instead use the ATAPI protocol, which runs over the sameIDE hardware but is something else.<br>Couple of years back we did an ATAPI driver addition, which makes theVxWorks ATA driver know both ATA and ATAPI protocols, but its burried somewhereat WindRiver. Try to ask your FAE to get you the driver.<br>(From: Leonid Rosenboim, leonid@bitband.com)<p><hr WIDTH="50%"><a NAME="3.5-F"></a><p>Q: How can I convert from "file pointer" (fp) to "file description" (fd)<p>A: Use the following: <code>fd = fileno(fp);</code><br>(From: Donald McLachlan, don@mars.dgrc.crc.ca)<p><hr WIDTH="50%"><a NAME="3.5-G"></a><p>Q: When closing a file I get the errno 226. The error message I get is:<pre>HELLO.TXT: The system cannot find the file specified.HELLO.TXT: Access is denied.</pre><p>A: You are probably using the FTP based netDrv file system. That wouldexplain both the error number, and the fact that it only failed whenyou closed the file.<br>Firstly, the reason for failing only when you close is that netDrv(whether using ftp or rsh), will only actually write a file on thehost file system when you close it. Up until then, the file has beenheld in memory. You can tell which protocol you are using very easily:if you entered a password in the bootline for the taregt, you'll beusing ftp, otherwise you'll be using rsh. Of course, if your host is aWindoze box, you only have the choice of ftp.<br>Now, the error number. This is a little quirk of the ftp clientlibrary in VxWorks. It will place any FTP protocol error in the errnofield so that you can see it. So, error 226 is probably an FTP errorcode. Looking this up athttp://hpcf.nersc.gov/help/access/ftp_error_codes.html you'll find thefollowing:<br>226 Closing data connection. Requested file action successful (forexample, file transfer or file abort).<br>The clue as to what is happening though is in the messages; "AccessDenied" suggests that the ftp user you specified in the bootline doesnot have write permission. Check the config. of the ftp server (forWindoze), or check whether the user has write access to the directoryyou are using for Unix.<br>(From:John, john_94501@yahoo.com)<hr WIDTH="100%"><p><h3><a NAME="index"><center>Index</center></a></h3><TABLE BORDER=1 CELLSPACING=3><TR><TD VALIGN=TOP><A HREF="#3.1">3.1</A></TD><TD VALIGN=TOP><A HREF="#3.1-A">A</A></TD><TD VALIGN=TOP>All my files on the disk have the date 1 Jan 1980. How can I get thesystem to use the actual date?</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.1-B">B</A></TD><TD VALIGN=TOP>When I create a file with a size of 0 on a removable medium withVxWorks and run Scandisk on a PC on this filesystem, Scandisk complainsabout Incorrect file size. This in only the case if the size is 0.</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.1-C">C</A></TD><TD VALIGN=TOP>With the new disk partition manageger which is part of the dosFs2.0release, is there an elegant means to mount all the valid partitions?</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.1-D">D</A></TD><TD VALIGN=TOP>Is it possible to use FTP with the raw file system?</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.1-E">E</A></TD><TD VALIGN=TOP>When I create a direcory <code>chkdsk</code> complains at the next reboot.</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.1-F">F</A></TD><TD VALIGN=TOP>Why does the task 'dCacheUpd' take so much of the processortime?</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.1-G">G</A></TD><TD VALIGN=TOP>How can I unmount a DOS-filesystem?</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.1-H">H</A></TD><TD VALIGN=TOP>Why does a file, when deleted on the target, still appear on the NFSexported drive?</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.1-I">I</A></TD><TD VALIGN=TOP>With DosFS2 some of our files started disappearing.</TD></TR><TR><TD VALIGN=TOP><A HREF="#3.2">3.2</A></TD><TD VALIGN=TOP><A HREF="#3.2-A">A</A></TD><TD VALIGN=TOP>When my system boots from network the network link is opened , but whenI use TFFS as a boot device the network is not opened.</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.2-B">B</A></TD><TD VALIGN=TOP>Can I use long filenames with TFFS?</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.2-C">C</A></TD><TD VALIGN=TOP>I want to use TFFS with a Raw file system. Is this possible?</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.2-D">D</A></TD><TD VALIGN=TOP>Is there an alternative for TFFS?</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.2-E">E</A></TD><TD VALIGN=TOP>I am having problems getting TFFS to work with StataFlash chips.</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.2-F">F</A></TD><TD VALIGN=TOP>How can I defragment a TFFS volume?</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.2-G">G</A></TD><TD VALIGN=TOP>How can I access a TFFS device using raw I/O after it was mounted?</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.2-H">H</A></TD><TD VALIGN=TOP>How can I format a 128 Mbyte device? I can only see 32 Mbyte.</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.2-I">I</A></TD><TD VALIGN=TOP>How can I reduce wear by updating the "Last Accessed" field?</TD></TR><TR><TD VALIGN=TOP><A HREF="#3.3">3.3</A></TD><TD VALIGN=TOP><A HREF="#3.3-A">A</A></TD><TD VALIGN=TOP>I try to create a floppy device using usrFdConfig(0,0,"/fd0/")as suggested in the programmer's manual, but I always get the"dosFsDevInit() failed" error message. How can I avoid this message andhave the system create the device?</TD></TR><TR><TD VALIGN=TOP><A HREF="#3.4">3.4</A></TD><TD VALIGN=TOP><A HREF="#3.4-A">A</A></TD><TD VALIGN=TOP>When I use the RAM-disk as supplied with DosFS2 (configured using theitem Hardware->Peripherals->RAM Disk with MSDOS filesystem) it is formattedevery time I startup, even if I assign a seperate memory area.</TD></TR><TR><TD VALIGN=TOP><A HREF="#3.5">3.5</A></TD><TD VALIGN=TOP><A HREF="#3.5-A">A</A></TD><TD VALIGN=TOP>Also when I open a large file it seems that VxWorksis allocating memory to store the complete file, and the open fails when notenough memory is available.</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.5-B">B</A></TD><TD VALIGN=TOP>What is the maximum number of open file descriptors in VxWorks? Is itconfigurable?</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.5-C">C</A></TD><TD VALIGN=TOP>I would like to use more than 256 files in a select. Is this possible?</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.5-D">D</A></TD><TD VALIGN=TOP>Is it possible to use files larger than 4 Gbytes?</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.5-E">E</A></TD><TD VALIGN=TOP>I cannot mount my ATA CDROM drive</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.5-F">F</A></TD><TD VALIGN=TOP>How can I convert from "file pointer" (fp) to "file description" (fd)</TD></TR><TR><TD VALIGN=TOP></TD><TD VALIGN=TOP><A HREF="#3.5-G">G</A></TD><TD VALIGN=TOP>When closing a file I get the errno 226.</TD></TR></TABLE><p><hr WIDTH="100%"><p><a href="mailto:borkhuis@agere.com"><img SRC="sendmail.gif" ALT="Send me an e-mail if this page was helpfull" height=49 width=124 align=RIGHT></a><p><a href="vxworks.html"><img SRC="back0001.gif" ALT="VxWorks Homepage" height=54 width=104></a><br><center>© J.A. Borkhuis, 2001</center><center><script language="JavaScript"><!-- var theDate = "" theDate = document.lastModified document.write("Last Updated: "); document.write(theDate); document.write();//--></script></center></body></html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -