Changeset 7441fe2c in rtems


Ignore:
Timestamp:
Oct 12, 1999, 9:54:40 PM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
fb02e4c4
Parents:
482ffbb2
Message:

Made many changes to turn the outline into something more like a manual
and less like a collection of notes.

Location:
doc/filesystem
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • doc/filesystem/Makefile

    r482ffbb2 r7441fe2c  
    2222COMMON_FILES=../common/cpright.texi ../common/setup.texi
    2323
    24 GENERATED_FILES=basefs.texi applayering.texi patheval.texi \
    25     init.texi mounting.texi lifecycle.texi imfs.texi \
    26     syscalls.texi basefs.texi
     24GENERATED_FILES=patheval.texi \
     25    init.texi mounting.texi fsrequirements.texi imfs.texi \
     26    syscalls.texi
    2727
    2828FILES= $(PROJECT).texi \
     
    5454        cp $(PROJECT).dvi $(WWW_INSTALL)/$(PROJECT)
    5555
    56 basefs.texi: basefs.t Makefile
    57         $(BMENU) -p "Preface" \
    58            -u "Top" \
    59            -n "" ${*}.t
    60 
    61 applayering.texi: applayering.t Makefile
    62         $(BMENU) -p "" \
    63            -u "Top" \
    64            -n "" ${*}.t
    65 
    6656patheval.texi: patheval.t Makefile
    6757        $(BMENU) -p "" \
     
    7969           -n "" ${*}.t
    8070
    81 lifecycle.texi: lifecycle.t Makefile
     71fsrequirements.texi: fsrequirements.t Makefile
    8272        $(BMENU) -p "" \
    8373           -u "Top" \
  • doc/filesystem/filesystem.texi

    r482ffbb2 r7441fe2c  
    6464
    6565@include preface.texi
    66 @include basefs.texi
    67 @include applayering.texi
    6866@include patheval.texi
    6967@include init.texi
    7068@include mounting.texi
    71 @include lifecycle.texi
     69@include fsrequirements.texi
    7270@include imfs.texi
    7371@include syscalls.texi
     
    8078@menu
    8179* Preface::
    82 * Base Filesystem::
    83 * Applications and Functional Layering::
    8480* Pathname Evaluation::
    8581* System Initialization::
    8682* Mounting and Unmounting Filesystems::
    87 * Filesystem Lifecycle::
     83* Filesystem Requirements::
    8884* In-Memory Filesystem::
    8985* System Call Development Notes::
  • doc/filesystem/fsrequirements.t

    r482ffbb2 r7441fe2c  
    1313implementations must adhere to.
    1414
    15 @section Filesystem File and Directory Removal Constraints
     15@section General
     16
     17The RTEMS filesystem framework was intended to be compliant with the
     18POSIX Files and Directories interface standard. The following filesystem
     19characteristics resulted in a functional switching layer.
     20
     21@example
     22Figure of the Filesystem Functional Layering goes here.
     23This figure includes networking and disk caching layering.
     24@end example
     25
     26@ifset use-ascii
     27@example
     28@group
     29@end group
     30@end example
     31@end ifset
     32
     33@ifset use-tex
     34@c @image{FunctionalLayerCake,6in,4in}
     35@end ifset
     36
     37@ifset use-html
     38@end ifset
     39
     40@enumerate
     41
     42@item Application programs are presented with a standard set of POSIX
     43compliant functions that allow them to interface with the files, devices
     44and directories in the filesystem. The interfaces to these routines do
     45not reflect the type of subordinate filesystem implementation in which
     46the file will be found.
     47
     48@item The filesystem framework developed under RTEMS allows for mounting
     49filesystem of different types under the base filesystem.
     50
     51@item The mechanics of locating file information may be quite different
     52between filesystem types.
     53
     54@item The process of locating a file may require crossing filesystem
     55boundaries.
     56
     57@item The transitions between filesystem and the processing required to
     58access information in different filesystem is not visible at the level
     59of the POSIX function call.
     60
     61@item The POSIX interface standard provides file access by character
     62pathname to the file in some functions and through an integer file
     63descriptor in other functions.
     64
     65@item The nature of the integer file descriptor and its associated
     66processing is operating system and filesystem specific.
     67
     68@item Directory and device information must be processed with some of the
     69same routines that apply to files.
     70
     71@item The form and content of directory and device information differs
     72greatly from that of a regular file.
     73
     74@item Files, directories and devices represent elements (nodes) of a tree
     75hierarchy.
     76
     77@item The rules for processing each of the node types that exist under the
     78filesystem are node specific but are still not reflected in the POSIX
     79interface routines.
     80
     81@end enumerate
     82
     83
     84@example
     85Figure of the Filesystem Functional Layering goes here.
     86This figure focuses on the Base Filesystem and IMFS.
     87@end example
     88
     89@example
     90Figure of the IMFS Memfile control blocks
     91@end example
     92
     93@section File and Directory Removal Constraints
    1694
    1795The following POSIX constraints must be honored by all filesystems.
     
    33111@end itemize
    34112
     113@c
     114@c
     115@c
     116@section API Layering
     117
     118@subsection Mapping of Generic System Calls to Filesystem Specific Functions
     119
     120The list of generic system calls includes the routines open(), read(),
     121write(), close(), etc..
     122
     123The Files and Directories section of the POSIX Application Programs
     124Interface specifies a set of functions with calling arguments that are
     125used to gain access to the information in a filesystem. To the
     126application program, these functions allow access to information in any
     127mounted filesystem without explicit knowledge of the filesystem type or
     128the filesystem mount configuration. The following are functions that are
     129provided to the application:
     130
     131@enumerate
     132@item access()
     133@item chdir()
     134@item chmod()
     135@item chown()
     136@item close()
     137@item closedir()
     138@item fchmod()
     139@item fcntl()
     140@item fdatasync()
     141@item fpathconf()
     142@item fstat()
     143@item fsync()
     144@item ftruncate()
     145@item link()
     146@item lseek()
     147@item mkdir()
     148@item mknod()
     149@item mount()
     150@item open()
     151@item opendir()
     152@item pathconf()
     153@item read()
     154@item readdir()
     155@item rewinddir()
     156@item rmdir()
     157@item rmnod()
     158@item scandir()
     159@item seekdir()
     160@item stat()
     161@item telldir()
     162@item umask()
     163@item unlink()
     164@item unmount()
     165@item utime()
     166@item write()
     167@end enumerate
     168
     169The filesystem's type as well as the node type within the filesystem
     170determine the nature of the processing that must be performed for each of
     171the functions above. The RTEMS filesystem provides a framework that
     172allows new filesystem to be developed and integrated without alteration
     173to the basic framework.
     174
     175To provide the functional switching that is required, each of the POSIX
     176file and directory functions have been implemented as a shell function.
     177The shell function adheres to the POSIX interface standard. Within this
     178functional shell, filesystem and node type information is accessed which
     179is then used to invoke the appropriate filesystem and node type specific
     180routine to process the POSIX function call.
     181
     182@subsection File/Device/Directory function access via file control block - rtems_libio_t structure
     183
     184The POSIX open() function returns an integer file descriptor that is used
     185as a reference to file control block information for a specific file. The
     186file control block contains information that is used to locate node, file
     187system, mount table and functional handler information. The diagram in
     188Figure 8 depicts the relationship between and among the following
     189components.
     190
     191@enumerate
     192
     193@item File Descriptor Table
     194
     195This is an internal RTEMS structure that tracks all currently defined file
     196descriptors in the system. The index that is returned by the file open()
     197operation references a slot in this table. The slot contains a pointer to
     198the file descriptor table entry for this file. The rtems_libio_t structure
     199represents the file control block.
     200
     201@item Allocation of entry in the File Descriptor Table
     202
     203Access to the file descriptor table is controlled through a semaphore that
     204is implemented using the rtems_libio_allocate() function. This routine
     205will grab a semaphore and then scan the file control blocks to determine
     206which slot is free for use. The first free slot is marked as used and the
     207index to this slot is returned as the file descriptor for the open()
     208request. After the alterations have been made to the file control block
     209table, the semaphore is released to allow further operations on the table.
     210
     211@item Maximum number of entries in the file descriptor table is
     212configurable through the src/exec/sapi/headers/confdefs.h file. If the
     213CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS constant is defined its value
     214will represent the maximum number of file descriptors that are allowed. 
     215If CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS is not specified a default
     216value of 20 will be used as the maximum number of file descriptors
     217allowed.
     218
     219@item File control block - rtems_libio_t structure
     220
     221@example
     222struct rtems_libio_tt @{
     223  rtems_driver_name_t               *driver;
     224  off_t                              size;      /* size of file */
     225  off_t                              offset;    /* current offset into file */
     226  unsigned32                         flags;
     227  rtems_filesystem_location_info_t   pathinfo;
     228  Objects_Id                         sem;
     229  unsigned32                         data0;     /* private to "driver" */
     230  void                               data1;     / . */
     231  void                               file_info; /used by file handlers/
     232  rtems_filesystem_file_handlers_r   handlers;  /type specific handlers/
     233@};
     234@end example
     235
     236A file control block can exist for regular files, devices and directories.
     237The following fields are important for regular file and directory access:
     238
     239@itemize @bullet
     240
     241@item Size - For a file this represents the number of bytes currently
     242stored in a file. For a directory this field is not filled in.
     243
     244@item Offset - For a file this is the byte file position index relative to
     245the start of the file. For a directory this is the byte offset into a
     246sequence of dirent structures.
     247
     248@item Pathinfo - This is a structure that provides a pointer to node
     249information, OPS table functions, Handler functions and the mount table
     250entry associated with this node.
     251
     252@item file_info - A pointer to node information that is used by Handler
     253functions
     254
     255@item handlers - A pointer to a table of handler functions that operate on
     256a file, device or directory through a file descriptor index
     257
     258@end itemize
     259
     260@end enumerate
     261
     262@subsection File/Directory function access via rtems_filesystem_location_info_t structure
     263
     264The rtems_filesystem_location_info_tt structure below provides sufficient
     265information to process nodes under a mounted filesystem.
     266
     267@example
     268struct rtems_filesystem_location_info_tt @{
     269    void                                         *node_access;
     270    rtems_filesystem_file_handlers_r         *handlers;
     271    rtems_filesystem_operations_table        *ops;
     272    rtems_filesystem_mount_table_entry_t     *mt_entry;
     273@};
     274@end example
     275
     276It contains a void pointer to filesystem specific nodal structure,
     277pointers to the OPS table for the filesystem that contains the node, the
     278node type specific handlers for the node and a reference pointer to the
     279mount table entry associated with the filesystem containing the node
     280
     281@section Operation Tables
     282
     283Filesystem specific operations are invoked indirectly.  The set of
     284routines that implement the filesystem are configured into two tables.
     285The Filesystem Handler Table has routines that are specific to a
     286filesystem but remain constant regardless of the actual file type.
     287The File Handler Table has routines that are both filesystem and file type
     288specific.
     289
     290@subsection Filesystem Handler Table Functions
     291
     292OPS table functions are defined in a @code{rtems_filesystem_operations_table}
     293structure.  It defines functions that are specific to a given filesystem.
     294One table exists for each filesystem that is supported in the RTEMS
     295configuration. The structure definition appears below and is followed by
     296general developmental information on each of the functions contained in this
     297function management structure.
     298
     299@example
     300typedef struct @{
     301  rtems_filesystem_evalpath_t        evalpath;
     302  rtems_filesystem_evalmake_t        evalformake;
     303  rtems_filesystem_link_t            link;
     304  rtems_filesystem_unlink_t          unlink;
     305  rtems_filesystem_node_type_t       node_type;
     306  rtems_filesystem_mknod_t           mknod;
     307  rtems_filesystem_rmnod_t           rmnod;
     308  rtems_filesystem_chown_t           chown;
     309  rtems_filesystem_freenode_t        freenod;
     310  rtems_filesystem_mount_t           mount;
     311  rtems_filesystem_fsmount_me_t      fsmount_me;
     312  rtems_filesystem_unmount_t         unmount;
     313  rtems_filesystem_fsunmount_me_t    fsunmount_me;
     314  rtems_filesystem_utime_t           utime;
     315  rtems_filesystem_evaluate_link_t   eval_link;
     316  rtems_filesystem_symlink_t         symlink;
     317@} rtems_filesystem_operations_table;
     318@end example
     319
     320@c
     321@c
     322@c
     323@page
     324
     325@subsubsection evalpath Handler
     326
     327@subheading Corresponding Structure Element:
     328
     329XXX
     330
     331@subheading Arguments:
     332
     333XXX
     334
     335@subheading File:
     336
     337XXX
     338
     339@subheading Description:
     340
     341XXX
     342
     343
     344@c
     345@c
     346@c
     347@page
     348
     349@subsubsection evalformake Handler
     350
     351@subheading Corresponding Structure Element:
     352
     353XXX
     354
     355@subheading Arguments:
     356
     357XXX
     358
     359@subheading File:
     360
     361XXX
     362
     363@subheading Description:
     364
     365XXX
     366
     367
     368@c
     369@c
     370@c
     371@page
     372
     373@subsubsection link Handler
     374
     375@subheading Corresponding Structure Element:
     376
     377link
     378
     379@subheading Arguments:
     380
     381
     382@example
     383rtems_filesystem_location_info_t    *to_loc,      /* IN */
     384rtems_filesystem_location_info_t    *parent_loc,  /* IN */
     385const char                          *token        /* IN */
     386@end example
     387
     388@subheading File:
     389
     390imfs_link.c
     391
     392@subheading Description:
     393
     394
     395This routine is used to create a hard-link.
     396
     397It will first examine the st_nlink count of the node that we are trying to.
     398If the link count exceeds LINK_MAX an error will be returned.
     399
     400The name of the link will be normalized to remove extraneous separators from
     401the end of the name.
     402
     403@c
     404@c
     405@c
     406@page
     407
     408@subsubsection unlink Handler
     409
     410@subheading Corresponding Structure Element:
     411
     412XXX
     413
     414@subheading Arguments:
     415
     416XXX
     417
     418@subheading File:
     419
     420XXX
     421
     422@subheading Description:
     423
     424XXX
     425
     426
     427@c
     428@c
     429@c
     430@page
     431
     432@subsubsection node_type Handler
     433
     434@subheading Corresponding Structure Element:
     435
     436node_type()
     437
     438@subheading Arguments:
     439
     440@example
     441rtems_filesystem_location_info_t    *pathloc        /* IN */
     442@end example
     443
     444@subheading File:
     445
     446imfs_ntype.c
     447
     448@subheading Description:
     449
     450XXX
     451
     452@c
     453@c
     454@c
     455@page
     456
     457@subsubsection mknod Handler
     458
     459@subheading Corresponding Structure Element:
     460
     461mknod()
     462
     463@subheading Arguments:
     464
     465@example
     466const char                          *token,        /* IN */
     467mode_t                               mode,         /* IN */
     468dev_t                                dev,          /* IN */
     469rtems_filesystem_location_info_t    *pathloc       /* IN/OUT */
     470@end example
     471
     472@subheading File:
     473
     474mknod.c
     475
     476@subheading Description:
     477
     478XXX
     479
     480@c
     481@c
     482@c
     483@page
     484
     485@subsubsection rmnod Handler
     486
     487@subheading Corresponding Structure Element:
     488
     489XXX
     490
     491@subheading Arguments:
     492
     493XXX
     494
     495@subheading File:
     496
     497XXX
     498
     499@subheading Description:
     500
     501XXX
     502
     503
     504@c
     505@c
     506@c
     507@page
     508
     509@subsubsection chown Handler
     510
     511@subheading Corresponding Structure Element:
     512
     513chown()
     514
     515@subheading Arguments:
     516
     517@example
     518rtems_filesystem_location_info_t    *pathloc        /* IN */
     519uid_t                                owner          /* IN */
     520gid_t                                group          /* IN */
     521@end example
     522
     523@subheading File:
     524
     525imfs_chown.c
     526
     527@subheading Description:
     528
     529XXX
     530
     531@c
     532@c
     533@c
     534@page
     535
     536@subsubsection freenod Handler
     537
     538@subheading Corresponding Structure Element:
     539
     540XXX
     541
     542@subheading Arguments:
     543
     544XXX
     545
     546@subheading File:
     547
     548XXX
     549
     550@subheading Description:
     551
     552XXX
     553
     554
     555@c
     556@c
     557@c
     558@page
     559
     560@subsubsection mount Handler
     561
     562@subheading Corresponding Structure Element:
     563
     564mount()
     565
     566@subheading Arguments:
     567
     568@example
     569rtems_filesystem_mount_table_entry_t   *mt_entry
     570@end example
     571
     572@subheading File:
     573
     574mount.c
     575
     576@subheading Description:
     577
     578XXX
     579
     580@c
     581@c
     582@c
     583@page
     584
     585@subsubsection fsmount_me Handler
     586
     587@subheading Corresponding Structure Element:
     588
     589XXX
     590
     591@subheading Arguments:
     592
     593@example
     594rtems_filesystem_mount_table_entry_t   *mt_entry   
     595@end example
     596
     597@subheading File:
     598
     599XXX
     600
     601@subheading Description:
     602
     603This function is provided with a filesystem to take care of the internal
     604filesystem management details associated with mounting that filesystem
     605under the RTEMS environment.
     606
     607It is not responsible for the mounting details associated the filesystem
     608containing the mount point.
     609
     610The rtems_filesystem_mount_table_entry_t structure contains the key elements
     611below:
     612
     613rtems_filesystem_location_info_t         *mt_point_node,
     614
     615This structure contains information about the mount point. This
     616allows us to find the ops-table and the handling functions
     617associated with the filesystem containing the mount point.
     618
     619rtems_filesystem_location_info_t         *fs_root_node,
     620
     621This structure contains information about the root node in the file
     622system to be mounted. It allows us to find the ops-table and the
     623handling functions associated with the filesystem to be mounted.
     624
     625rtems_filesystem_options_t                 options,
     626
     627Read only or read/write access
     628
     629void                                         *fs_info,
     630
     631This points to an allocated block of memory the will be used to
     632hold any filesystem specific information of a global nature. This
     633allocated region if important because it allows us to mount the
     634same filesystem type more than once under the RTEMS system.
     635Each instance of the mounted filesystem has its own set of global
     636management information that is separate from the global
     637management information associated with the other instances of the
     638mounted filesystem type.
     639
     640rtems_filesystem_limits_and_options_t    pathconf_info,
     641
     642The table contains the following set of values associated with the
     643mounted filesystem:
     644
     645@itemize @bullet
     646
     647@item link_max
     648
     649@item max_canon
     650
     651@item max_input
     652
     653@item name_max
     654
     655@item path_max
     656
     657@item pipe_buf
     658
     659@item posix_async_io
     660
     661@item posix_chown_restrictions
     662
     663@item posix_no_trunc
     664
     665@item posix_prio_io
     666
     667@item posix_sync_io
     668
     669@item posix_vdisable
     670
     671@end itemize
     672
     673These values are accessed with the pathconf() and the fpathconf () 
     674functions.
     675
     676const char                                   *dev
     677
     678The is intended to contain a string that identifies the device that contains
     679the filesystem information. The filesystems that are currently implemented
     680are memory based and don't require a device specification.
     681
     682If the mt_point_node.node_access is NULL then we are mounting the base file
     683system.
     684
     685The routine will create a directory node for the root of the IMFS file
     686system.
     687
     688The node will have read, write and execute permissions for owner, group and
     689others.
     690
     691The node's name will be a null string.
     692
     693A filesystem information structure(fs_info) will be allocated and
     694initialized for the IMFS filesystem. The fs_info pointer in the mount table
     695entry will be set to point the filesystem information structure.
     696
     697The pathconf_info element of the mount table will be set to the appropriate
     698table of path configuration constants (LIMITS_AND_OPTIONS).
     699
     700The fs_root_node structure will be filled in with the following:
     701
     702@itemize @bullet
     703
     704@item pointer to the allocated root node of the filesystem
     705
     706@item directory handlers for a directory node under the IMFS filesystem
     707
     708@item OPS table functions for the IMFS
     709
     710@end itemize
     711
     712A 0 will be returned to the calling routine if the process succeeded,
     713otherwise a 1 will be returned.
     714
     715
     716@c
     717@c
     718@c
     719@page
     720
     721@subsubsection unmount Handler
     722
     723@subheading Corresponding Structure Element:
     724
     725XXX
     726
     727@subheading Arguments:
     728
     729XXX
     730
     731@subheading File:
     732
     733XXX
     734
     735@subheading Description:
     736
     737XXX
     738
     739
     740@c
     741@c
     742@c
     743@page
     744
     745@subsubsection fsunmount_me Handler
     746
     747@subheading Corresponding Structure Element:
     748
     749imfs_fsunmount_me()
     750
     751@subheading Arguments:
     752
     753@example
     754rtems_filesystem_mount_table_entry_t   *mt_entry   
     755@end example
     756
     757@subheading File:
     758
     759imfs_fsunmount_me.c
     760
     761@subheading Description:
     762
     763XXX
     764
     765
     766@c
     767@c
     768@c
     769@page
     770
     771@subsubsection utime Handler
     772
     773@subheading Corresponding Structure Element:
     774
     775XXX
     776
     777@subheading Arguments:
     778
     779XXX
     780
     781@subheading File:
     782
     783XXX
     784
     785@subheading Description:
     786
     787XXX
     788
     789@c
     790@c
     791@c
     792@page
     793
     794@subsubsection eval_link Handler
     795
     796@subheading Corresponding Structure Element:
     797
     798XXX
     799
     800@subheading Arguments:
     801
     802XXX
     803
     804@subheading File:
     805
     806XXX
     807
     808@subheading Description:
     809
     810XXX
     811
     812@c
     813@c
     814@c
     815@page
     816
     817@subsubsection symlink Handler
     818
     819@subheading Corresponding Structure Element:
     820
     821XXX
     822
     823@subheading Arguments:
     824
     825XXX
     826
     827@subheading File:
     828
     829XXX
     830
     831@subheading Description:
     832
     833XXX
     834
     835@c
     836@c
     837@c
     838@page
     839@subsection File Handler Table Functions
     840
     841Handler table functions are defined in a @code{rtems_filesystem_file_handlers_r}
     842structure. It defines functions that are specific to a node type in a given
     843filesystem. One table exists for each of the filesystem's node types. The
     844structure definition appears below. It is followed by general developmental
     845information on each of the functions associated with regular files contained
     846in this function management structure.
     847
     848@example
     849typedef struct @{
     850    rtems_filesystem_open_t           open;
     851    rtems_filesystem_close_t          close;
     852    rtems_filesystem_read_t           read;
     853    rtems_filesystem_write_t          write;
     854    rtems_filesystem_ioctl_t          ioctl;
     855    rtems_filesystem_lseek_t          lseek;
     856    rtems_filesystem_fstat_t          fstat;
     857    rtems_filesystem_fchmod_t         fchmod;
     858    rtems_filesystem_ftruncate_t      ftruncate;
     859    rtems_filesystem_fpathconf_t      fpathconf;
     860    rtems_filesystem_fsync_t          fsync;
     861    rtems_filesystem_fdatasync_t      fdatasync;
     862    rtems_filesystem_fcntl_t          fcntl;
     863@} rtems_filesystem_file_handlers_r;
     864@end example
     865
     866@c
     867@c
     868@c
     869@page
     870
     871@subsubsection open Handler
     872
     873@subheading Corresponding Structure Element:
     874
     875open()
     876
     877@subheading Arguments:
     878
     879@example
     880rtems_libio_t   *iop,
     881const char      *pathname,
     882unsigned32       flag,
     883unsigned32       mode
     884@end example
     885
     886@subheading File:
     887
     888XXX
     889
     890@subheading Description:
     891
     892XXX
     893
     894@c
     895@c
     896@c
     897@page
     898
     899@subsubsection close Handler
     900
     901@subheading Corresponding Structure Element:
     902
     903close()
     904
     905@subheading Arguments:
     906
     907@example
     908rtems_libio_t     *iop
     909@end example
     910
     911@subheading File:
     912
     913XXX
     914
     915@subheading Description:
     916
     917XXX
     918
     919@subheading NOTES:
     920
     921XXX
     922
     923
     924
     925@c
     926@c
     927@c
     928@page
     929
     930@subsubsection read Handler
     931
     932@subheading Corresponding Structure Element:
     933
     934read()
     935
     936@subheading Arguments:
     937
     938@example
     939rtems_libio_t     *iop,
     940void              *buffer,
     941unsigned32         count
     942@end example
     943
     944@subheading File:
     945
     946XXX
     947
     948@subheading Description:
     949
     950XXX
     951
     952@subheading NOTES:
     953
     954XXX
     955
     956
     957@c
     958@c
     959@c
     960@page
     961
     962@subsubsection write Handler
     963
     964@subheading Corresponding Structure Element:
     965
     966XXX
     967
     968@subheading Arguments:
     969
     970XXX
     971@subheading File:
     972
     973XXX
     974
     975@subheading Description:
     976
     977XXX
     978
     979@subheading NOTES:
     980
     981XXX
     982
     983
     984@c
     985@c
     986@c
     987@page
     988
     989@subsubsection ioctl Handler
     990
     991@subheading Corresponding Structure Element:
     992
     993XXX
     994
     995@subheading Arguments:
     996
     997@example
     998rtems_libio_t     *iop,
     999unsigned32       command,
     1000void              *buffer
     1001@end example
     1002
     1003@subheading File:
     1004
     1005XXX
     1006
     1007@subheading Description:
     1008
     1009XXX
     1010
     1011@subheading NOTES:
     1012
     1013XXX
     1014
     1015
     1016@c
     1017@c
     1018@c
     1019@page
     1020
     1021@subsubsection lseek Handler
     1022
     1023@subheading Corresponding Structure Element:
     1024
     1025lseek()
     1026
     1027@subheading Arguments:
     1028
     1029@example
     1030rtems_libio_t     *iop,
     1031off_t              offset,
     1032int                whence
     1033@end example
     1034
     1035@subheading File:
     1036
     1037XXX
     1038
     1039@subheading Description:
     1040
     1041XXX
     1042
     1043@subheading NOTES:
     1044
     1045XXX
     1046
     1047
     1048@c
     1049@c
     1050@c
     1051@page
     1052
     1053@subsubsection fstat Handler
     1054
     1055@subheading Corresponding Structure Element:
     1056
     1057fstat()
     1058
     1059@subheading Arguments:
     1060
     1061@example
     1062rtems_filesystem_location_info_t   *loc,
     1063struct stat                        *buf
     1064@end example
     1065
     1066@subheading File:
     1067
     1068XXX
     1069
     1070@subheading Description:
     1071
     1072The following information is extracted from the filesystem
     1073specific node and placed in the @code{stat} structure:
     1074
     1075@itemize @bullet
     1076
     1077@item st_mode
     1078
     1079@item st_nlink
     1080
     1081@item st_ino
     1082
     1083@item st_uid
     1084
     1085@item st_gid
     1086
     1087@item st_atime
     1088
     1089@item st_mtime
     1090
     1091@item st_ctime
     1092
     1093@end itemize
     1094
     1095
     1096@subheading NOTES:
     1097
     1098XXX
     1099
     1100@c
     1101@c
     1102@c
     1103@page
     1104
     1105@subsubsection fchmod Handler
     1106
     1107@subheading Corresponding Structure Element:
     1108
     1109fchmod()
     1110
     1111@subheading Arguments:
     1112
     1113@example
     1114rtems_libio_t     *iop
     1115mode_t              mode
     1116@end example
     1117
     1118@subheading File:
     1119
     1120imfs_fchmod.c
     1121
     1122@subheading Description:
     1123
     1124XXX
     1125
     1126
     1127@subheading NOTES:
     1128
     1129XXX
     1130
     1131@c
     1132@c
     1133@c
     1134@page
     1135
     1136@subsubsection ftruncate Handler
     1137
     1138@subheading Corresponding Structure Element:
     1139
     1140XXX
     1141
     1142@subheading Arguments:
     1143
     1144XXX
     1145@subheading File:
     1146
     1147XXX
     1148
     1149@subheading Description:
     1150
     1151XXX
     1152
     1153@subheading NOTES:
     1154
     1155XXX
     1156
     1157@subsubsection fpathconf Handler
     1158
     1159@subheading Corresponding Structure Element:
     1160
     1161XXX
     1162
     1163@subheading Arguments:
     1164
     1165XXX
     1166
     1167@subheading File:
     1168
     1169XXX
     1170
     1171@subheading Description:
     1172
     1173XXX
     1174
     1175@subheading NOTES:
     1176
     1177XXX
     1178
     1179@c
     1180@c
     1181@c
     1182@page
     1183
     1184@subsubsection fsync Handler
     1185
     1186@subheading Corresponding Structure Element:
     1187
     1188XXX
     1189
     1190@subheading Arguments:
     1191
     1192XXX
     1193@subheading File:
     1194
     1195XXX
     1196
     1197@subheading Description:
     1198
     1199XXX
     1200
     1201@subheading NOTES:
     1202
     1203XXX
     1204
     1205@c
     1206@c
     1207@c
     1208@page
     1209
     1210@subsubsection fdatasync Handler
     1211
     1212@subheading Corresponding Structure Element:
     1213
     1214XXX
     1215
     1216@subheading Arguments:
     1217
     1218XXX
     1219
     1220@subheading File:
     1221
     1222XXX
     1223
     1224@subheading Description:
     1225
     1226XXX
     1227
     1228@subheading NOTES:
     1229
     1230XXX
     1231
     1232@c
     1233@c
     1234@c
     1235@page
     1236
     1237@subsubsection fcntl Handler
     1238
     1239@subheading Corresponding Structure Element:
     1240
     1241XXX
     1242
     1243@subheading Arguments:
     1244
     1245XXX
     1246
     1247@subheading File:
     1248
     1249XXX
     1250
     1251@subheading Description:
     1252
     1253XXX
     1254
     1255@subheading NOTES:
     1256
     1257XXX
  • doc/filesystem/imfs.t

    r482ffbb2 r7441fe2c  
     1@c  COPYRIGHT (c) 1988-1998.
     2@c  On-Line Applications Research Corporation (OAR).
     3@c  All rights reserved.
     4@c
     5@c  $Id$
     6@c
    17
    28@chapter In-Memory Filesystem
    39
    4 This chapter describes the In-Memory Filesystem.
    5 
    6 @section Filesystem Handler Table Functions
     10This chapter describes the In-Memory Filesystem (IMFS).  The IMFS is a
     11full featured POSIX filesystem that keeps all information in memory.
     12
     13@section IMFS Per Node Data Structure
     14
     15Each regular file, device, hard link, and directory is represented by a data
     16structure called a @code{jnode}. The @code{jnode} is formally represented by the
     17structure:
     18
     19@example
     20struct IMFS_jnode_tt @{
     21  Chain_Node          Node;             /* for chaining them together */
     22  IMFS_jnode_t       *Parent;           /* Parent node */
     23  char                name[NAME_MAX+1]; /* "basename" */
     24  mode_t              st_mode;          /* File mode */
     25  nlink_t             st_nlink;         /* Link count */
     26  ino_t               st_ino;           /* inode */
     27
     28  uid_t               st_uid;           /* User ID of owner */
     29  gid_t               st_gid;           /* Group ID of owner */
     30  time_t              st_atime;         /* Time of last access */
     31  time_t              st_mtime;         /* Time of last modification */
     32  time_t              st_ctime;         /* Time of last status change */
     33  IMFS_jnode_types_t  type;             /* Type of this entry */
     34  IMFS_typs_union     info;
     35@};
     36@end example
     37
     38The key elements of this structure are listed below together with a brief
     39explanation of their role in the filesystem.
     40
     41@table @b
     42
     43@item Node
     44exists to allow the entire @code{jnode} structure to be included in a chain.
     45
     46@item Parent
     47is a pointer to another @code{jnode} structure that is the logical parent of the
     48node in which it appears.  This field may be NULL if the file associated with
     49this node is deleted but there are open file descriptors on this file or
     50there are still hard links to this node.
     51
     52@item name
     53is the name of this node within the filesystem hierarchical tree. Example:  If
     54the fully qualified pathname to the @code{jnode} was @code{/a/b/c}, the
     55@code{jnode} name field would contain the null terminated string @code{"c"}.
     56
     57@item st_mode
     58is the standard Unix access permissions for the file or directory.
     59
     60@item st_nlink
     61is the number of hard links to this file. When a @code{jnode} is first created
     62its link count is set to 1. A @code{jnode} and its associated resources
     63cannot be deleted unless its link count is less than 1.
     64
     65@item st_ino
     66is a unique node identification number
     67
     68@item st_uid
     69is the user ID of the file's owner
     70
     71@item st_gid
     72is the group ID of the file's owner
     73
     74@item st_atime
     75is the time of the last access to this file
     76
     77@item st_mtime
     78is the time of the last modification of this file
     79
     80@item st_ctime
     81is the time of the last status change to the file
     82
     83@item type
     84is the indication of node type must be one of the following states:
     85
     86@itemize @bullet
     87@item IMFS_DIRECTORY
     88@item IMFS_MEMORY_FILE
     89@item IMFS_HARD_LINK
     90@item IMFS_SYM_LINK
     91@item IMFS_DEVICE
     92@end itemize
     93
     94
     95@item info
     96is this contains a structure that is unique to file type (See IMFS_typs_union
     97in imfs.h).
     98
     99@itemize @bullet
     100
     101@item IMFS_DIRECTORY
     102
     103An IMFS directory contains a dynamic chain structure that
     104records all files and directories that are subordinate to the directory node.
     105
     106@item IMFS_MEMORY_FILE
     107
     108Under the in memory filesystem regular files hold data. Data is dynamically
     109allocated to the file in 128 byte chunks of memory.  The individual chunks of
     110memory are tracked by arrays of pointers that record the address of the
     111allocated chunk of memory. Single, double, and triple indirection pointers
     112are used to record the locations of all segments of the file.  The
     113memory organization of an IMFS file are discussed elsewhere in this manual.
     114
     115@item IMFS_HARD_LINK
     116
     117The IMFS filesystem supports the concept of hard links to other nodes in the
     118IMFS filesystem.  These hard links are actual pointers to other nodes in the
     119same filesystem. This type of link cannot cross-filesystem boundaries.
     120
     121@item IMFS_SYM_LINK
     122
     123The IMFS filesystem supports the concept of symbolic links to other nodes in
     124any filesystem. A symbolic link consists of a pointer to a character string
     125that represents the pathname to the target node. This type of link can
     126cross-filesystem boundaries.  Just as with most versions of UNIX supporting
     127symbolic links, a symbolic link can point to a non-existent file.
     128
     129@item IMFS_DEVICE
     130
     131All RTEMS devices now appear as files under the in memory filesystem. On
     132system initialization, all devices are registered as nodes under the file
     133system.
     134
     135@end itemize
     136
     137@end table
     138
     139@section Miscellaneous IMFS Information
     140
     141@section Memory associated with the IMFS
     142
     143A memory based filesystem draws its resources for files and directories
     144from the memory resources of the system. When it is time to un-mount the
     145filesystem, the memory resources that supported filesystem are set free.
     146In order to free these resources, a recursive walk of the filesystems
     147tree structure will be performed. As the leaf nodes under the filesystem
     148are encountered their resources are freed. When directories are made empty
     149by this process, their resources are freed.
     150
     151@subsection Node removal constraints for the IMFS
     152
     153The IMFS conforms to the general filesystem requirements for node
     154removal.  See @ref{File and Directory Removal Constraints}.
     155
     156@subsection IMFS General Housekeeping Notes
     157
     158The following is a list of odd housekeeping notes for the IMFS.
     159
     160@itemize @bullet
     161
     162@item If the global variable rtems_filesystem_current refers to the node that
     163we are trying to remove, the node_access element of this structure must be
     164set to NULL to invalidate it.
     165
     166@item If the node was of IMFS_MEMORY_FILE type, free the memory associated
     167with the memory file before freeing the node. Use the IMFS_memfile_remove()
     168function.
     169
     170@end itemize
     171
     172@section IMFS Operation Tables
     173
     174@subsection IMFS Filesystem Handler Table Functions
    7175
    8176OPS table functions are defined in a rtems_filesystem_operations_table
    9 structure.  It defines functions that are specific to a given file system.
    10 One table exists for each file system that is supported in the RTEMS
     177structure.  It defines functions that are specific to a given filesystem.
     178One table exists for each filesystem that is supported in the RTEMS
    11179configuration. The structure definition appears below and is followed by
    12180general developmental information on each of the functions contained in this
     
    14182
    15183@example
    16 typedef struct @{
    17   rtems_filesystem_evalpath_t        evalpath;
    18   rtems_filesystem_evalmake_t        evalformake;
    19   rtems_filesystem_link_t            link;
    20   rtems_filesystem_unlink_t          unlink;
    21   rtems_filesystem_node_type_t       node_type;
    22   rtems_filesystem_mknod_t           mknod;
    23   rtems_filesystem_rmnod_t           rmnod;
    24   rtems_filesystem_chown_t           chown;
    25   rtems_filesystem_freenode_t        freenod;
    26   rtems_filesystem_mount_t           mount;
    27   rtems_filesystem_fsmount_me_t      fsmount_me;
    28   rtems_filesystem_unmount_t         unmount;
    29   rtems_filesystem_fsunmount_me_t    fsunmount_me;
    30   rtems_filesystem_utime_t           utime;
    31   rtems_filesystem_evaluate_link_t   eval_link;
    32   rtems_filesystem_symlink_t         symlink;
    33 @} rtems_filesystem_operations_table;
    34 @end example
    35 
    36 
    37 
    38 @c
    39 @c
    40 @c
    41 
    42 @page
    43 
    44 @subsection evalpath()
    45 
    46 @subheading Slot Function:
    47 
    48 XXX
    49 
    50 @subheading Arguments:
    51 
    52 XXX
    53 
    54 @subheading File:
    55 
    56 XXX
    57 
    58 @subheading Development Comments:
    59 
    60 XXX
    61 
    62 
    63 @c
    64 @c
    65 @c
    66 
    67 @page
    68 
    69 @subsection evalformake()
    70 
    71 @subheading Slot Function:
    72 
    73 XXX
    74 
    75 @subheading Arguments:
    76 
    77 XXX
    78 
    79 @subheading File:
    80 
    81 XXX
    82 
    83 @subheading Development Comments:
    84 
    85 XXX
    86 
    87 
    88 @c
    89 @c
    90 @c
    91 
    92 @page
    93 
    94 @subsection link()
    95 
    96 @subheading Slot Function:
     184rtems_filesystem_operations_table  IMFS_ops = @{
     185  IMFS_eval_path,
     186  IMFS_evaluate_for_make,
     187  IMFS_link,
     188  IMFS_unlink,
     189  IMFS_node_type,
     190  IMFS_mknod,
     191  IMFS_rmnod,
     192  IMFS_chown,
     193  IMFS_freenodinfo,
     194  IMFS_mount,
     195  IMFS_initialize,
     196  IMFS_unmount,
     197  IMFS_fsunmount,
     198  IMFS_utime,
     199  IMFS_evaluate_link,
     200  IMFS_symlink,
     201  IMFS_readlink
     202@};
     203@end example
     204
     205@c
     206@c
     207@c
     208@page
     209
     210@subsubsection IMFS_evalpath()
     211
     212@subheading Corresponding Structure Element:
     213
     214XXX
     215
     216@subheading Arguments:
     217
     218XXX
     219
     220@subheading File:
     221
     222XXX
     223
     224@subheading Description:
     225
     226XXX
     227
     228
     229@c
     230@c
     231@c
     232@page
     233
     234@subsubsection IMFS_evalformake()
     235
     236@subheading Corresponding Structure Element:
     237
     238XXX
     239
     240@subheading Arguments:
     241
     242XXX
     243
     244@subheading File:
     245
     246XXX
     247
     248@subheading Description:
     249
     250XXX
     251
     252
     253@c
     254@c
     255@c
     256@page
     257
     258@subsubsection IMFS_link()
     259
     260@subheading Corresponding Structure Element:
    97261
    98262link
     
    111275imfs_link.c
    112276
    113 @subheading Development Comments:
    114 
    115 
    116 This routine is used in the IMFS file system to create a hard-link.
     277@subheading Description:
     278
     279
     280This routine is used in the IMFS filesystem to create a hard-link.
    117281
    118282It will first examine the st_nlink count of the node that we are trying to.
     
    122286the end of the name.
    123287
    124 IMFS_create_node will be used to create a file system node that will have the
     288IMFS_create_node will be used to create a filesystem node that will have the
    125289following characteristics:
    126290
     
    147311
    148312
    149 @c @c @c
    150 
    151 @page
    152 
    153 @subsection unlink()
    154 
    155 @subheading Slot Function:
    156 
    157 XXX
    158 
    159 @subheading Arguments:
    160 
    161 XXX
    162 
    163 @subheading File:
    164 
    165 XXX
    166 
    167 @subheading Development Comments:
    168 
    169 XXX
    170 
    171 
    172 @c
    173 @c
    174 @c
    175 
    176 @page
    177 
    178 @subsection node_type()
    179 
    180 @subheading Slot Function:
     313@c
     314@c
     315@c
     316@page
     317
     318@subsubsection IMFS_unlink()
     319
     320@subheading Corresponding Structure Element:
     321
     322XXX
     323
     324@subheading Arguments:
     325
     326XXX
     327
     328@subheading File:
     329
     330XXX
     331
     332@subheading Description:
     333
     334XXX
     335
     336
     337@c
     338@c
     339@c
     340@page
     341
     342@subsubsection IMFS_node_type()
     343
     344@subheading Corresponding Structure Element:
    181345
    182346IMFS_node_type()
     
    192356imfs_ntype.c
    193357
    194 @subheading Development Comments:
     358@subheading Description:
    195359
    196360This routine will locate the IMFS_jnode_t structure that holds ownership
    197 information for the selected node in the file system.
     361information for the selected node in the filesystem.
    198362
    199363This structure is pointed to by pathloc->node_access.
     
    216380@c
    217381@c
    218 
    219 @page
    220 
    221 @subsection mknod()
    222 
    223 @subheading Slot Function:
     382@page
     383
     384@subsubsection IMFS_mknod()
     385
     386@subheading Corresponding Structure Element:
    224387
    225388IMFS_mknod()
     
    238401imfs_mknod.c
    239402
    240 @subheading Development Comments:
     403@subheading Description:
    241404
    242405This routine will examine the mode argument to determine is we are trying to
     
    255418@c
    256419@c
    257 
    258 @page
    259 
    260 @subsection rmnod()
    261 
    262 @subheading Slot Function:
    263 
    264 XXX
    265 
    266 @subheading Arguments:
    267 
    268 XXX
    269 
    270 @subheading File:
    271 
    272 XXX
    273 
    274 @subheading Development Comments:
    275 
    276 XXX
    277 
    278 
    279 @c
    280 @c
    281 @c
    282 
    283 @page
    284 
    285 @subsection chown()
    286 
    287 @subheading Slot Function:
     420@page
     421
     422@subsubsection IMFS_rmnod()
     423
     424@subheading Corresponding Structure Element:
     425
     426XXX
     427
     428@subheading Arguments:
     429
     430XXX
     431
     432@subheading File:
     433
     434XXX
     435
     436@subheading Description:
     437
     438XXX
     439
     440
     441@c
     442@c
     443@c
     444@page
     445
     446@subsubsection IMFS_chown()
     447
     448@subheading Corresponding Structure Element:
    288449
    289450IMFS_chown()
     
    301462imfs_chown.c
    302463
    303 @subheading Development Comments:
     464@subheading Description:
    304465
    305466This routine will locate the IMFS_jnode_t structure that holds ownership
    306 information for the selected node in the file system.
     467information for the selected node in the filesystem.
    307468
    308469This structure is pointed to by pathloc->node_access.
    309470
    310471The st_uid and st_gid fields of the node are then modified. Since this is a
    311 memory based file system, no further action is required to alter the
     472memory based filesystem, no further action is required to alter the
    312473ownership of the IMFS_jnode_t structure.
    313474
     
    317478@c
    318479@c
    319 
    320 @page
    321 
    322 @subsection freenod()
    323 
    324 @subheading Slot Function:
    325 
    326 XXX
    327 
    328 @subheading Arguments:
    329 
    330 XXX
    331 
    332 @subheading File:
    333 
    334 XXX
    335 
    336 @subheading Development Comments:
     480@page
     481
     482@subsubsection IMFS_freenod()
     483
     484@subheading Corresponding Structure Element:
     485
     486XXX
     487
     488@subheading Arguments:
     489
     490XXX
     491
     492@subheading File:
     493
     494XXX
     495
     496@subheading Description:
    337497
    338498XXX
     
    342502@c
    343503@c
    344 
    345 @page
    346 
    347 @subsection mount()
    348 
    349 @subheading Slot Function:
     504@page
     505
     506@subsubsection IMFS_mount()
     507
     508@subheading Corresponding Structure Element:
    350509
    351510IMFS_mount()
     
    361520imfs_mount.c
    362521
    363 @subheading Development Comments:
    364 
    365 This routine provides the file system specific processing required to mount a
    366 file system for the system that contains the mount point. It will determine
     522@subheading Description:
     523
     524This routine provides the filesystem specific processing required to mount a
     525filesystem for the system that contains the mount point. It will determine
    367526if the point that we are trying to mount onto is a node of IMFS_DIRECTORY
    368527type.
     
    370529If it is the node's info element is altered so that the info.directory.mt_fs
    371530element points to the mount table chain entry that is associated with the
    372 mounted file system at this point. The info.directory.mt_fs element can be
    373 examined to determine if a file system is mounted at a directory. If it is
     531mounted filesystem at this point. The info.directory.mt_fs element can be
     532examined to determine if a filesystem is mounted at a directory. If it is
    374533NULL, the directory does not serve as a mount point. A non-NULL entry
    375534indicates that the directory does serve as a mount point and the value of
    376535info.directory.mt_fs can be used to locate the mount table chain entry that
    377 describes the file system mounted at this point.
    378 
    379 
    380 @c
    381 @c
    382 @c
    383 
    384 @page
    385 
    386 @subsection fsmount_me()
    387 
    388 @subheading Slot Function:
     536describes the filesystem mounted at this point.
     537
     538
     539@c
     540@c
     541@c
     542@page
     543
     544@subsubsection IMFS_fsmount_me()
     545
     546@subheading Corresponding Structure Element:
    389547
    390548IMFS_initialize()
     
    400558imfs_init.c
    401559
    402 @subheading Development Comments:
    403 
    404 This function is provided with a file system to take care of the internal
    405 file system management details associated with mounting that file system
     560@subheading Description:
     561
     562This function is provided with a filesystem to take care of the internal
     563filesystem management details associated with mounting that filesystem
    406564under the RTEMS environment.
    407565
    408 It is not responsible for the mounting details associated the file system
     566It is not responsible for the mounting details associated the filesystem
    409567containing the mount point.
    410568
     
    416574This structure contains information about the mount point. This
    417575allows us to find the ops-table and the handling functions
    418 associated with the file system containing the mount point.
     576associated with the filesystem containing the mount point.
    419577
    420578rtems_filesystem_location_info_t         *fs_root_node,
     
    422580This structure contains information about the root node in the file
    423581system to be mounted. It allows us to find the ops-table and the
    424 handling functions associated with the file system to be mounted.
     582handling functions associated with the filesystem to be mounted.
    425583
    426584rtems_filesystem_options_t                 options,
     
    431589
    432590This points to an allocated block of memory the will be used to
    433 hold any file system specific information of a global nature. This
     591hold any filesystem specific information of a global nature. This
    434592allocated region if important because it allows us to mount the
    435 same file system type more than once under the RTEMS system.
    436 Each instance of the mounted file system has its own set of global
     593same filesystem type more than once under the RTEMS system.
     594Each instance of the mounted filesystem has its own set of global
    437595management information that is separate from the global
    438596management information associated with the other instances of the
    439 mounted file system type.
     597mounted filesystem type.
    440598
    441599rtems_filesystem_limits_and_options_t    pathconf_info,
    442600
    443601The table contains the following set of values associated with the
    444 mounted file system:
     602mounted filesystem:
    445603
    446604@itemize @bullet
     
    478636
    479637The is intended to contain a string that identifies the device that contains
    480 the file system information. The file systems that are currently implemented
     638the filesystem information. The filesystems that are currently implemented
    481639are memory based and don't require a device specification.
    482640
     
    492650The node's name will be a null string.
    493651
    494 A file system information structure(fs_info) will be allocated and
    495 initialized for the IMFS file system. The fs_info pointer in the mount table
    496 entry will be set to point the file system information structure.
     652A filesystem information structure(fs_info) will be allocated and
     653initialized for the IMFS filesystem. The fs_info pointer in the mount table
     654entry will be set to point the filesystem information structure.
    497655
    498656The pathconf_info element of the mount table will be set to the appropriate
     
    503661@itemize @bullet
    504662
    505 @item pointer to the allocated root node of the file system
    506 
    507 @item directory handlers for a directory node under the IMFS file system
     663@item pointer to the allocated root node of the filesystem
     664
     665@item directory handlers for a directory node under the IMFS filesystem
    508666
    509667@item OPS table functions for the IMFS
     
    518676@c
    519677@c
    520 
    521 @page
    522 
    523 @subsection unmount()
    524 
    525 @subheading Slot Function:
    526 
    527 XXX
    528 
    529 @subheading Arguments:
    530 
    531 XXX
    532 
    533 @subheading File:
    534 
    535 XXX
    536 
    537 @subheading Development Comments:
     678@page
     679
     680@subsubsection IMFS_unmount()
     681
     682@subheading Corresponding Structure Element:
     683
     684XXX
     685
     686@subheading Arguments:
     687
     688XXX
     689
     690@subheading File:
     691
     692XXX
     693
     694@subheading Description:
    538695
    539696XXX
     
    543700@c
    544701@c
    545 
    546 @page
    547 
    548 @subsection fsunmount_me()
    549 
    550 @subheading Slot Function:
     702@page
     703
     704@subsubsection IMFS_fsunmount_me()
     705
     706@subheading Corresponding Structure Element:
    551707
    552708imfs_fsunmount_me()
     
    562718imfs_fsunmount_me.c
    563719
    564 @subheading Development Comments:
     720@subheading Description:
    565721
    566722XXX
     
    570726@c
    571727@c
    572 
    573 @page
    574 
    575 @subsection utime()
    576 
    577 @subheading Slot Function:
    578 
    579 XXX
    580 
    581 @subheading Arguments:
    582 
    583 XXX
    584 
    585 @subheading File:
    586 
    587 XXX
    588 
    589 @subheading Development Comments:
     728@page
     729
     730@subsubsection IMFS_utime()
     731
     732@subheading Corresponding Structure Element:
     733
     734XXX
     735
     736@subheading Arguments:
     737
     738XXX
     739
     740@subheading File:
     741
     742XXX
     743
     744@subheading Description:
    590745
    591746XXX
     
    595750@c
    596751@c
    597 
    598 @page
    599 
    600 @subsection eval_link()
    601 
    602 @subheading Slot Function:
    603 
    604 XXX
    605 
    606 @subheading Arguments:
    607 
    608 XXX
    609 
    610 @subheading File:
    611 
    612 XXX
    613 
    614 @subheading Development Comments:
    615 
    616 XXX
    617 
    618 @c
    619 @c
    620 @c
    621 @page
    622 @section Regular File Handler Table Functions
     752@page
     753
     754@subsubsection IMFS_eval_link()
     755
     756@subheading Corresponding Structure Element:
     757
     758XXX
     759
     760@subheading Arguments:
     761
     762XXX
     763
     764@subheading File:
     765
     766XXX
     767
     768@subheading Description:
     769
     770XXX
     771
     772@c
     773@c
     774@c
     775@page
     776@subsection Regular File Handler Table Functions
    623777
    624778Handler table functions are defined in a rtems_filesystem_file_handlers_r
    625779structure. It defines functions that are specific to a node type in a given
    626 file system. One table exists for each of the file system's node types. The
     780filesystem. One table exists for each of the filesystem's node types. The
    627781structure definition appears below. It is followed by general developmental
    628782information on each of the functions associated with regular files contained
     
    630784
    631785@example
    632 typedef struct @{
    633     rtems_filesystem_open_t           open;
    634     rtems_filesystem_close_t          close;
    635     rtems_filesystem_read_t           read;
    636     rtems_filesystem_write_t          write;
    637     rtems_filesystem_ioctl_t          ioctl;
    638     rtems_filesystem_lseek_t          lseek;
    639     rtems_filesystem_fstat_t          fstat;
    640     rtems_filesystem_fchmod_t         fchmod;
    641     rtems_filesystem_ftruncate_t      ftruncate;
    642     rtems_filesystem_fpathconf_t      fpathconf;
    643     rtems_filesystem_fsync_t          fsync;
    644     rtems_filesystem_fdatasync_t      fdatasync;
    645 @} rtems_filesystem_file_handlers_r;
    646 @end example
    647 
    648 
    649 @c
    650 @c
    651 @c
    652 
    653 @page
    654 
    655 @subsection open() for Regular Files
    656 
    657 @subheading Slot Function:
     786rtems_filesystem_file_handlers_r IMFS_memfile_handlers = @{
     787  memfile_open,
     788  memfile_close,
     789  memfile_read,
     790  memfile_write,
     791  memfile_ioctl,
     792  memfile_lseek,
     793  IMFS_stat,
     794  IMFS_fchmod,
     795  memfile_ftruncate,
     796  NULL,                /* fpathconf */
     797  NULL,                /* fsync */
     798  IMFS_fdatasync,
     799  IMFS_fcntl
     800@};
     801@end example
     802
     803
     804@c
     805@c
     806@c
     807@page
     808
     809@subsubsection memfile_open() for Regular Files
     810
     811@subheading Corresponding Structure Element:
    658812
    659813memfile_open()
     
    672826memfile.c
    673827
    674 @subheading Development Comments:
     828@subheading Description:
    675829
    676830Currently this function is a shell. No meaningful processing is performed and
     
    680834@c
    681835@c
    682 
    683 @page
    684 
    685 @subsection close() for Regular Files
    686 
    687 @subheading Slot Function:
     836@page
     837
     838@subsubsection memfile_close() for Regular Files
     839
     840@subheading Corresponding Structure Element:
    688841
    689842memfile_close()
     
    699852memfile.c
    700853
    701 @subheading Development Comments:
    702 
    703 This routine is a dummy for regular files under the base file system. It
     854@subheading Description:
     855
     856This routine is a dummy for regular files under the base filesystem. It
    704857performs a capture of the IMFS_jnode_t pointer from the file control block
    705858and then immediately returns a success status.
     
    709862@c
    710863@c
    711 
    712 @page
    713 
    714 @subsection read() for Regular Files
    715 
    716 @subheading Slot Function:
     864@page
     865
     866@subsubsection memfile_read() for Regular Files
     867
     868@subheading Corresponding Structure Element:
    717869
    718870memfile_read()
     
    730882memfile.c
    731883
    732 @subheading Development Comments:
     884@subheading Description:
    733885
    734886This routine will determine the @code{jnode} that is associated with this file.
     
    756908@c
    757909@c
    758 
    759 @page
    760 
    761 @subsection write() for Regular Files
    762 
    763 @subheading Slot Function:
    764 
    765 XXX
    766 
    767 @subheading Arguments:
    768 
    769 XXX
    770 @subheading File:
    771 
    772 XXX
    773 
    774 @subheading Development Comments:
    775 
    776 XXX
    777 
    778 @c
    779 @c
    780 @c
    781 
    782 @page
    783 
    784 @subsection ioctl() for Regular Files
    785 
    786 @subheading Slot Function:
     910@page
     911
     912@subsubsection memfile_write() for Regular Files
     913
     914@subheading Corresponding Structure Element:
     915
     916XXX
     917
     918@subheading Arguments:
     919
     920XXX
     921@subheading File:
     922
     923XXX
     924
     925@subheading Description:
     926
     927XXX
     928
     929@c
     930@c
     931@c
     932@page
     933
     934@subsubsection memfile_ioctl() for Regular Files
     935
     936@subheading Corresponding Structure Element:
    787937
    788938XXX
     
    800950memfile.c
    801951
    802 @subheading Development Comments:
     952@subheading Description:
    803953
    804954The current code is a placeholder for future development. The routine returns
     
    808958@c
    809959@c
    810 
    811 @page
    812 
    813 @subsection lseek() for Regular Files
    814 
    815 @subheading Slot Function:
     960@page
     961
     962@subsubsection memfile_lseek() for Regular Files
     963
     964@subheading Corresponding Structure Element:
    816965
    817966Memfile_lseek()
     
    829978memfile.c
    830979
    831 @subheading Development Comments:
     980@subheading Description:
    832981
    833982This routine make sure that the memory based file is sufficiently large to
     
    841990@c
    842991@c
    843 
    844 @page
    845 
    846 @subsection fstat() for Regular Files
    847 
    848 @subheading Slot Function:
     992@page
     993
     994@subsubsection IMFS_stat() for Regular Files
     995
     996@subheading Corresponding Structure Element:
    849997
    850998IMFS_stat()
     
    8611009imfs_stat.c
    8621010
    863 @subheading Development Comments:
     1011@subheading Description:
    8641012
    8651013This routine actually performs status processing for both devices and regular
     
    8671015
    8681016The IMFS_jnode_t structure is referenced to determine the type of node under
    869 the file system.
     1017the filesystem.
    8701018
    8711019If the node is associated with a device, node information is extracted and
     
    9031051@c
    9041052@c
    905 
    906 @page
    907 
    908 @subsection fchmod() for Regular Files
    909 
    910 @subheading Slot Function:
     1053@page
     1054
     1055@subsubsection IMFS_fchmod() for Regular Files
     1056
     1057@subheading Corresponding Structure Element:
    9111058
    9121059IMFS_fchmod()
     
    9231070imfs_fchmod.c
    9241071
    925 @subheading Development Comments:
     1072@subheading Description:
    9261073
    9271074This routine will obtain the pointer to the IMFS_jnode_t structure from the
     
    9441091@c
    9451092@c
    946 
    947 @page
    948 
    949 @subsection ftruncate() for Regular Files
    950 
    951 @subheading Slot Function:
    952 
    953 XXX
    954 
    955 @subheading Arguments:
    956 
    957 XXX
    958 @subheading File:
    959 
    960 XXX
    961 
    962 @subheading Development Comments:
    963 
    964 XXX
    965 
    966 @c
    967 @c
    968 @c
    969 
    970 @page
    971 
    972 @subsection fpathconf() for Regular Files
    973 
    974 @subheading Slot Function:
     1093@page
     1094
     1095@subsubsection memfile_ftruncate() for Regular Files
     1096
     1097@subheading Corresponding Structure Element:
     1098
     1099XXX
     1100
     1101@subheading Arguments:
     1102
     1103XXX
     1104@subheading File:
     1105
     1106XXX
     1107
     1108@subheading Description:
     1109
     1110XXX
     1111
     1112
     1113@subsubsection No pathconf() for Regular Files
     1114
     1115@subheading Corresponding Structure Element:
    9751116
    9761117NULL
     
    9841125Not Implemented
    9851126
    986 @subheading Development Comments:
     1127@subheading Description:
    9871128
    9881129Not Implemented
     
    9921133@c
    9931134@c
    994 
    995 @page
    996 
    997 @subsection fsync() for Regular Files
    998 
    999 @subheading Slot Function:
    1000 
    1001 XXX
    1002 
    1003 @subheading Arguments:
    1004 
    1005 XXX
    1006 @subheading File:
    1007 
    1008 XXX
    1009 
    1010 @subheading Development Comments:
    1011 
    1012 XXX
    1013 
    1014 
    1015 @c
    1016 @c
    1017 @c
    1018 
    1019 @page
    1020 
    1021 @subsection fdatasync() for Regular Files
    1022 
    1023 @subheading Slot Function:
    1024 
    1025 XXX
    1026 
    1027 @subheading Arguments:
    1028 
    1029 XXX
    1030 @subheading File:
    1031 
    1032 XXX
    1033 
    1034 @subheading Development Comments:
    1035 
    1036 XXX
    1037 
    1038 @c
    1039 @c
    1040 @c
    1041 @page
    1042 @section Directory Handler Table Functions
     1135@page
     1136
     1137@subsubsection No fsync() for Regular Files
     1138
     1139@subheading Corresponding Structure Element:
     1140
     1141XXX
     1142
     1143@subheading Arguments:
     1144
     1145XXX
     1146@subheading File:
     1147
     1148XXX
     1149
     1150@subheading Description:
     1151
     1152XXX
     1153
     1154
     1155@c
     1156@c
     1157@c
     1158@page
     1159
     1160@subsubsection IMFS_fdatasync() for Regular Files
     1161
     1162@subheading Corresponding Structure Element:
     1163
     1164XXX
     1165
     1166@subheading Arguments:
     1167
     1168XXX
     1169@subheading File:
     1170
     1171XXX
     1172
     1173@subheading Description:
     1174
     1175XXX
     1176
     1177@c
     1178@c
     1179@c
     1180@page
     1181@subsection Directory Handler Table Functions
    10431182
    10441183Handler table functions are defined in a rtems_filesystem_file_handlers_r
    10451184structure. It defines functions that are specific to a node type in a given
    1046 file system. One table exists for each of the file system's node types. The
     1185filesystem. One table exists for each of the filesystem's node types. The
    10471186structure definition appears below. It is followed by general developmental
    10481187information on each of the functions associated with directories contained in
     
    10501189
    10511190@example
    1052 typedef struct @{
    1053     rtems_filesystem_open_t           open;
    1054     rtems_filesystem_close_t          close;
    1055     rtems_filesystem_read_t           read;
    1056     rtems_filesystem_write_t          write;
    1057     rtems_filesystem_ioctl_t          ioctl;
    1058     rtems_filesystem_lseek_t          lseek;
    1059     rtems_filesystem_fstat_t          fstat;
    1060     rtems_filesystem_fchmod_t         fchmod;
    1061     rtems_filesystem_ftruncate_t      ftruncate;
    1062     rtems_filesystem_fpathconf_t      fpathconf;
    1063     rtems_filesystem_fsync_t          fsync;
    1064     rtems_filesystem_fdatasync_t      fdatasync;
    1065 @} rtems_filesystem_file_handlers_r;
    1066 @end example
    1067 
    1068 
    1069 @c
    1070 @c
    1071 @c
    1072 
    1073 @page
    1074 
    1075 @subsection open() for Directories
    1076 
    1077 @subheading Slot Function:
     1191rtems_filesystem_file_handlers_r IMFS_directory_handlers = @{
     1192  IMFS_dir_open,
     1193  IMFS_dir_close,
     1194  IMFS_dir_read,
     1195  NULL,             /* write */
     1196  NULL,             /* ioctl */
     1197  IMFS_dir_lseek,
     1198  IMFS_dir_fstat,
     1199  IMFS_fchmod,
     1200  NULL,             /* ftruncate */
     1201  NULL,             /* fpathconf */
     1202  NULL,             /* fsync */
     1203  IMFS_fdatasync,
     1204  IMFS_fcntl
     1205@};
     1206@end example
     1207
     1208
     1209@c
     1210@c
     1211@c
     1212@page
     1213@subsubsection IMFS_dir_open() for Directories
     1214
     1215@subheading Corresponding Structure Element:
    10781216
    10791217imfs_dir_open()
     
    10921230imfs_directory.c
    10931231
    1094 @subheading Development Comments:
     1232@subheading Description:
    10951233
    10961234This routine will look into the file control block to find the @code{jnode} that
     
    11061244@c
    11071245@c
    1108 
    1109 @page
    1110 
    1111 @subsection close() for Directories
    1112 
    1113 @subheading Slot Function:
     1246@page
     1247
     1248@subsubsection IMFS_dir_close() for Directories
     1249
     1250@subheading Corresponding Structure Element:
    11141251
    11151252imfs_dir_close()
     
    11251262imfs_directory.c
    11261263
    1127 @subheading Development Comments:
    1128 
    1129 This routine is a dummy for directories under the base file system. It
     1264@subheading Description:
     1265
     1266This routine is a dummy for directories under the base filesystem. It
    11301267immediately returns a success status.
    11311268
     
    11331270@c
    11341271@c
    1135 
    1136 @page
    1137 
    1138 @subsection read() for Directories
    1139 
    1140 @subheading Slot Function:
     1272@page
     1273
     1274@subsubsection IMFS_dir_read() for Directories
     1275
     1276@subheading Corresponding Structure Element:
    11411277
    11421278imfs_dir_read
     
    11541290imfs_directory.c
    11551291
    1156 @subheading Development Comments:
     1292@subheading Description:
    11571293
    11581294This routine will read a fixed number of directory entries from the current
     
    11641300@c
    11651301@c
    1166 
    1167 @page
    1168 
    1169 @subsection write() for Directories
    1170 
    1171 @subheading Slot Function:
    1172 
    1173 XXX
    1174 
    1175 @subheading Arguments:
    1176 
    1177 XXX
    1178 
    1179 @subheading File:
    1180 
    1181 XXX
    1182 
    1183 @subheading Development Comments:
    1184 
    1185 XXX
    1186 
    1187 @c
    1188 @c
    1189 @c
    1190 
    1191 @page
    1192 
    1193 @subsection ioctl() for Directories
    1194 
    1195 @subheading Slot Function:
     1302@page
     1303
     1304@subsubsection No write() for Directories
     1305
     1306@subheading Corresponding Structure Element:
     1307
     1308XXX
     1309
     1310@subheading Arguments:
     1311
     1312XXX
     1313
     1314@subheading File:
     1315
     1316XXX
     1317
     1318@subheading Description:
     1319
     1320XXX
     1321
     1322@c
     1323@c
     1324@c
     1325@page
     1326
     1327@subsubsection No ioctl() for Directories
     1328
     1329@subheading Corresponding Structure Element:
    11961330
    11971331ioctl
     
    12041338Not supported
    12051339
    1206 @subheading Development Comments:
    1207 
    1208 XXX
    1209 
    1210 @c
    1211 @c
    1212 @c
    1213 
    1214 @page
    1215 
    1216 @subsection lseek() for Directories
    1217 
    1218 @subheading Slot Function:
     1340@subheading Description:
     1341
     1342XXX
     1343
     1344@c
     1345@c
     1346@c
     1347@page
     1348
     1349@subsubsection IMFS_dir_lseek() for Directories
     1350
     1351@subheading Corresponding Structure Element:
    12191352
    12201353imfs_dir_lseek()
     
    12321365imfs_directory.c
    12331366
    1234 @subheading Development Comments:
     1367@subheading Description:
    12351368
    12361369This routine alters the offset in the file control block.
     
    12451378@c
    12461379@c
    1247 
    1248 @page
    1249 
    1250 @subsection fstat() for Directories
    1251 
    1252 @subheading Slot Function:
     1380@page
     1381
     1382@subsubsection IMFS_dir_fstat() for Directories
     1383
     1384@subheading Corresponding Structure Element:
    12531385
    12541386imfs_dir_fstat()
     
    12661398imfs_directory.c
    12671399
    1268 @subheading Development Comments:
     1400@subheading Description:
    12691401
    12701402The node access information in the rtems_filesystem_location_info_t structure
     
    12911423@c
    12921424@c
    1293 
    1294 @page
    1295 
    1296 @subsection fchmod() for Directories
    1297 
    1298 @subheading Slot Function:
     1425@page
     1426
     1427@subsubsection IMFS_fchmod() for Directories
     1428
     1429@subheading Corresponding Structure Element:
    12991430
    13001431IMFS_fchmod()
     
    13111442imfs_fchmod.c
    13121443
    1313 @subheading Development Comments:
     1444@subheading Description:
    13141445
    13151446This routine will obtain the pointer to the IMFS_jnode_t structure from the
     
    13321463@c
    13331464@c
    1334 
    1335 @page
    1336 
    1337 @subsection ftruncate() for Directories
    1338 
    1339 @subheading Slot Function:
    1340 
    1341 XXX
    1342 
    1343 @subheading Arguments:
    1344 
    1345 XXX
    1346 
    1347 @subheading File:
    1348 
    1349 XXX
    1350 
    1351 @subheading Development Comments:
    1352 
    1353 XXX
    1354 
    1355 @c
    1356 @c
    1357 @c
    1358 
    1359 @page
    1360 
    1361 @subsection fpathconf() for Directories
    1362 
    1363 @subheading Slot Function:
     1465@page
     1466
     1467@subsubsection No ftruncate() for Directories
     1468
     1469@subheading Corresponding Structure Element:
     1470
     1471XXX
     1472
     1473@subheading Arguments:
     1474
     1475XXX
     1476
     1477@subheading File:
     1478
     1479XXX
     1480
     1481@subheading Description:
     1482
     1483XXX
     1484
     1485@c
     1486@c
     1487@c
     1488@page
     1489
     1490@subsubsection No fpathconf() for Directories
     1491
     1492@subheading Corresponding Structure Element:
    13641493
    13651494fpathconf
     
    13731502Not Implemented
    13741503
    1375 @subheading Development Comments:
     1504@subheading Description:
    13761505
    13771506Not Implemented
     
    13811510@c
    13821511@c
    1383 
    1384 @page
    1385 
    1386 @subsection fsync() for Directories
    1387 
    1388 @subheading Slot Function:
    1389 
    1390 XXX
    1391 
    1392 @subheading Arguments:
    1393 
    1394 XXX
    1395 @subheading File:
    1396 
    1397 XXX
    1398 
    1399 @subheading Development Comments:
    1400 
    1401 XXX
    1402 
    1403 
    1404 @c
    1405 @c
    1406 @c
    1407 
    1408 @page
    1409 
    1410 @subsection fdatasync() for Directories
    1411 
    1412 @subheading Slot Function:
    1413 
    1414 XXX
    1415 
    1416 @subheading Arguments:
    1417 
    1418 XXX
    1419 
    1420 @subheading File:
    1421 
    1422 XXX
    1423 
    1424 @subheading Development Comments:
    1425 
    1426 XXX
    1427 
    1428 
    1429 @section Device Handler Table Functions
     1512@page
     1513
     1514@subsubsection No fsync() for Directories
     1515
     1516@subheading Corresponding Structure Element:
     1517
     1518XXX
     1519
     1520@subheading Arguments:
     1521
     1522XXX
     1523@subheading File:
     1524
     1525XXX
     1526
     1527@subheading Description:
     1528
     1529XXX
     1530
     1531
     1532@c
     1533@c
     1534@c
     1535@page
     1536
     1537@subsubsection IMFS_fdatasync() for Directories
     1538
     1539@subheading Corresponding Structure Element:
     1540
     1541XXX
     1542
     1543@subheading Arguments:
     1544
     1545XXX
     1546
     1547@subheading File:
     1548
     1549XXX
     1550
     1551@subheading Description:
     1552
     1553XXX
     1554
     1555@c
     1556@c
     1557@c
     1558@page
     1559@subsection Device Handler Table Functions
    14301560
    14311561Handler table functions are defined in a rtems_filesystem_file_handlers_r
    14321562structure. It defines functions that are specific to a node type in a given
    1433 file system. One table exists for each of the file system's node types. The
     1563filesystem. One table exists for each of the filesystem's node types. The
    14341564structure definition appears below. It is followed by general developmental
    14351565information on each of the functions associated with devices contained in
     
    14561586@c
    14571587@c
    1458 
    1459 @page
    1460 
    1461 @subsection open() for Devices
    1462 
    1463 @subheading Slot Function:
     1588@page
     1589
     1590@subsubsection device_open() for Devices
     1591
     1592@subheading Corresponding Structure Element:
    14641593
    14651594device_open()
     
    14781607deviceio.c
    14791608
    1480 @subheading Development Comments:
     1609@subheading Description:
    14811610
    14821611This routine will use the file control block to locate the node structure for
     
    14921621@c
    14931622@c
    1494 
    1495 @page
    1496 
    1497 @subsection close() for Devices
    1498 
    1499 @subheading Slot Function:
     1623@page
     1624
     1625@subsubsection device_close() for Devices
     1626
     1627@subheading Corresponding Structure Element:
    15001628
    15011629device_close()
     
    15111639deviceio.c
    15121640
    1513 @subheading Development Comments:
     1641@subheading Description:
    15141642
    15151643This routine extracts the major and minor device driver numbers from the
     
    15251653@c
    15261654@c
    1527 
    1528 @page
    1529 
    1530 @subsection read() for Devices
    1531 
    1532 @subheading Slot Function:
     1655@page
     1656
     1657@subsubsection device_read() for Devices
     1658
     1659@subheading Corresponding Structure Element:
    15331660
    15341661device_read()
     
    15461673deviceio.c
    15471674
    1548 @subheading Development Comments:
     1675@subheading Description:
    15491676
    15501677This routine will extract the major and minor numbers for the device from the -
     
    15761703@c
    15771704@c
    1578 
    1579 @page
    1580 
    1581 @subsection write() for Devices
    1582 
    1583 @subheading Slot Function:
    1584 
    1585 XXX
    1586 
    1587 @subheading Arguments:
    1588 
    1589 XXX
    1590 @subheading File:
    1591 
    1592 XXX
    1593 
    1594 @subheading Development Comments:
    1595 
    1596 XXX
    1597 
    1598 @c
    1599 @c
    1600 @c
    1601 
    1602 @page
    1603 
    1604 @subsection ioctl() for Devices
    1605 
    1606 @subheading Slot Function:
     1705@page
     1706
     1707@subsubsection device_write() for Devices
     1708
     1709@subheading Corresponding Structure Element:
     1710
     1711XXX
     1712
     1713@subheading Arguments:
     1714
     1715XXX
     1716@subheading File:
     1717
     1718XXX
     1719
     1720@subheading Description:
     1721
     1722XXX
     1723
     1724@c
     1725@c
     1726@c
     1727@page
     1728
     1729@subsubsection device_ioctl() for Devices
     1730
     1731@subheading Corresponding Structure Element:
    16071732
    16081733ioctl
     
    16201745deviceio.c
    16211746
    1622 @subheading Development Comments:
     1747@subheading Description:
    16231748
    16241749This handler will obtain status information about a device.
     
    16451770@c
    16461771@c
    1647 
    1648 @page
    1649 
    1650 @subsection lseek() for Devices
    1651 
    1652 @subheading Slot Function:
     1772@page
     1773
     1774@subsubsection device_lseek() for Devices
     1775
     1776@subheading Corresponding Structure Element:
    16531777
    16541778device_lseek()
     
    16661790deviceio.c
    16671791
    1668 @subheading Development Comments:
     1792@subheading Description:
    16691793
    16701794At the present time this is a placeholder function. It always returns a
     
    16741798@c
    16751799@c
    1676 
    1677 @page
    1678 
    1679 @subsection fstat() for Devices
    1680 
    1681 @subheading Slot Function:
     1800@page
     1801
     1802@subsubsection IMFS_stat() for Devices
     1803
     1804@subheading Corresponding Structure Element:
    16821805
    16831806IMFS_stat()
     
    16941817imfs_stat.c
    16951818
    1696 @subheading Development Comments:
     1819@subheading Description:
    16971820
    16981821This routine actually performs status processing for both devices and regular files.
    16991822
    17001823The IMFS_jnode_t structure is referenced to determine the type of node under the
    1701 file system.
     1824filesystem.
    17021825
    17031826If the node is associated with a device, node information is extracted and
     
    17361859@c
    17371860@c
    1738 
    1739 @page
    1740 
    1741 @subsection fchmod() for Devices
    1742 
    1743 @subheading Slot Function:
     1861@page
     1862
     1863@subsubsection IMFS_fchmod() for Devices
     1864
     1865@subheading Corresponding Structure Element:
    17441866
    17451867IMFS_fchmod()
     
    17561878imfs_fchmod.c
    17571879
    1758 @subheading Development Comments:
     1880@subheading Description:
    17591881
    17601882This routine will obtain the pointer to the IMFS_jnode_t structure from the
     
    17781900@c
    17791901@c
    1780 
    1781 @page
    1782 
    1783 @subsection ftruncate() for Devices
    1784 
    1785 @subheading Slot Function:
    1786 
    1787 XXX
    1788 
    1789 @subheading Arguments:
    1790 
    1791 XXX
    1792 @subheading File:
    1793 
    1794 XXX
    1795 
    1796 @subheading Development Comments:
    1797 
    1798 XXX
    1799 
    1800 @c
    1801 @c
    1802 @c
    1803 
    1804 @page
    1805 
    1806 @subsection fpathconf() for Devices
    1807 
    1808 @subheading Slot Function:
     1902@page
     1903
     1904@subsubsection No ftruncate() for Devices
     1905
     1906@subheading Corresponding Structure Element:
     1907
     1908XXX
     1909
     1910@subheading Arguments:
     1911
     1912XXX
     1913@subheading File:
     1914
     1915XXX
     1916
     1917@subheading Description:
     1918
     1919XXX
     1920
     1921@c
     1922@c
     1923@c
     1924@page
     1925
     1926@subsubsection No fpathconf() for Devices
     1927
     1928@subheading Corresponding Structure Element:
    18091929
    18101930fpathconf
     
    18181938Not Implemented
    18191939
    1820 @subheading Development Comments:
     1940@subheading Description:
    18211941
    18221942Not Implemented
     
    18261946@c
    18271947@c
    1828 
    1829 @page
    1830 
    1831 @subsection fsync() for Devices
    1832 
    1833 @subheading Slot Function:
    1834 
    1835 XXX
    1836 
    1837 @subheading Arguments:
    1838 
    1839 XXX
    1840 
    1841 @subheading File:
    1842 
    1843 XXX
    1844 
    1845 @subheading Development Comments:
    1846 
    1847 XXX
    1848 
    1849 
    1850 @c
    1851 @c
    1852 @c
    1853 
    1854 @page
    1855 
    1856 @subsection fdatasync() for Devices
     1948@page
     1949
     1950@subsubsection No fsync() for Devices
     1951
     1952@subheading Corresponding Structure Element:
     1953
     1954XXX
     1955
     1956@subheading Arguments:
     1957
     1958XXX
     1959
     1960@subheading File:
     1961
     1962XXX
     1963
     1964@subheading Description:
     1965
     1966XXX
     1967
     1968
     1969@c
     1970@c
     1971@c
     1972@page
     1973
     1974@subsubsection No fdatasync() for Devices
    18571975
    18581976Not Implemented
    18591977
    1860 @subheading Slot Function:
    1861 
    1862 XXX
    1863 
    1864 @subheading Arguments:
    1865 
    1866 XXX
    1867 
    1868 @subheading File:
    1869 
    1870 XXX
    1871 
    1872 @subheading Development Comments:
    1873 
    1874 XXX
    1875 
     1978@subheading Corresponding Structure Element:
     1979
     1980XXX
     1981
     1982@subheading Arguments:
     1983
     1984XXX
     1985
     1986@subheading File:
     1987
     1988XXX
     1989
     1990@subheading Description:
     1991
     1992XXX
     1993
  • doc/filesystem/init.t

    r482ffbb2 r7441fe2c  
    1212initialization will be performed. Part of initialization is a call to
    1313rtems_filesystem_initialize(). This routine will mount the `In Memory File
    14 System' as the base file system.  Mounting the base file system consists
     14System' as the base filesystem.  Mounting the base filesystem consists
    1515of the following:
    1616
     
    2525directory handlers and pathconf limits and options.
    2626
    27 @item Allocation of a memory region for file system specific global
     27@item Allocation of a memory region for filesystem specific global
    2828management variables
    2929
    30 @item Creation of first mount table entry for the base file system
     30@item Creation of first mount table entry for the base filesystem
    3131
    3232@item Initialization of the first mount table chain entry to indicate that
    33 the mount point is NULL and the mounted file system is the base file
     33the mount point is NULL and the mounted filesystem is the base file
    3434system
    3535
     
    3737
    3838
    39 After the base file system has been mounted, the following operations are
     39After the base filesystem has been mounted, the following operations are
    4040performed under its directory structure:
    4141
     
    4848@end itemize
    4949
     50@section Base Filesystem
     51
     52RTEMS initially mounts a RAM based file system known as the base file system. 
     53The root directory of this file system tree serves as the logical root of the
     54directory hierarchy (Figure 3). Under the root directory a `/dev' directory
     55is created under which all I/O device directories and files are registered as
     56part of the file system hierarchy.
     57
     58@example
     59Figure of the tree structure goes here.
     60@end example
     61
     62A RAM based file system draws its management resources from memory. File and
     63directory nodes are simply allocated blocks of memory. Data associated with
     64regular files is stored in collections of memory blocks. When the system is
     65turned off or restarted all memory-based components of the file system are
     66lost.
     67
     68The base file system serves as a starting point for the mounting of file
     69systems that are resident on semi-permanent storage media. Examples of such
     70media include non- volatile memory, flash memory and IDE hard disk drives
     71(Figure 3). File systems of other types will be mounted onto mount points
     72within the base file system or other file systems that are subordinate to the
     73base file system. The framework set up under the base file system will allow
     74for these new file system types and the unique data and functionality that is
     75required to manage the future file systems.
     76
     77@subsection Base Filesystem Mounting
     78
     79At present, the first file system to be mounted is the `In Memory File
     80System'. It is mounted using a standard MOUNT() command in which the mount
     81point is NULL.  This flags the mount as the first file system to be
     82registered under the operating system and appropriate initialization of file
     83system management information is performed (See figures 4 and 5). If a
     84different file system type is desired as the base file system, alterations
     85must be made to base_fs.c. This routine handles the mount of the base file
     86system.
     87
     88
     89@example
     90Figure of the mount table chain goes here.
     91@end example
     92
     93
     94Once the root of the base file system has been established and it has been
     95recorded as the mount point of the base file system, devices are integrated
     96into the base file system. For every device that is configured into the
     97system (See ioman.c) a device registration process is performed. Device
     98registration produces a unique dev_t handle that consists of a major and
     99minor device number. In addition, the configuration information for each
     100device contains a text string that represents the fully qualified pathname to
     101that device's place in the base file system's hierarchy. A file system node
     102is created for the device along the specified registration path.
     103
     104
     105@example
     106Figure  of the Mount Table Processing goes here.
     107@end example
     108
     109
     110Note: Other file systems can be mounted but they are mounted onto points
     111(directory mount points) in the base file system.
     112
     113
  • doc/filesystem/mounting.t

    r482ffbb2 r7441fe2c  
    1717@item The mount point must be a directory. It may have files and other
    1818directories under it. These files and directories will be hidden when the
    19 file system is mounted.
     19filesystem is mounted.
    2020
    2121@item The task must have read/write/execute permissions to the mount point
    2222or the mount attempt will be rejected.
    2323
    24 @item Only one file system can be mounted to a single mount point.
     24@item Only one filesystem can be mounted to a single mount point.
    2525
    26 @item The Root of the mountable file system will be referenced by the name
     26@item The Root of the mountable filesystem will be referenced by the name
    2727of the mount point after the mount is complete.
    2828
     
    3030
    3131@section Mount Table Chain
     32
     33The mount table chain is a dynamic list of structures that describe
     34mounted filesystems a specific points in the filesystem hierarchy. It is
     35initialized to an empty state during the base filesystem initialization.
     36The mount operation will add entries to the mount table chain. The
     37un-mount operation will remove entries from the mount table chain.
    3238
    3339Each entry in the mount table chain is of the following type:
     
    5763@section Adding entries to the chain during mount
    5864
    59 When a file system is mounted, its presence and location in the file
     65When a filesystem is mounted, its presence and location in the file
    6066system hierarchy is recorded in a dynamic list structure known as a chain.
    6167A unique rtems_filesystem_mount_table_entry_tt structure is logged for
    62 each file system that is mounted. This includes the base file system.
     68each filesystem that is mounted. This includes the base filesystem.
    6369
    6470@section Removing entries from the chain during unmount
    6571
    66 When a file system is dismounted its entry in the mount table chain is
     72When a filesystem is dismounted its entry in the mount table chain is
    6773extracted and the memory for this entry is freed.
    6874
    69 
    70 
  • doc/filesystem/patheval.t

    r482ffbb2 r7441fe2c  
    2121the new node to be created.
    2222
    23 @item Pathname evaluation is specific to a file system
     23@item Pathname evaluation is specific to a filesystem
    2424
    2525@item Mechanics of crossing a mount point during the evaluation of a path
     
    3030@itemize @bullet
    3131
    32 @item Finding file system node information
     32@item Finding filesystem node information
    3333
    34 @item Finding file system node handlers
     34@item Finding filesystem node handlers
    3535
    36 @item Finding file system node operations table
     36@item Finding filesystem node operations table
    3737
    38 @item Finding mount table entry for the file system that this node is part
     38@item Finding mount table entry for the filesystem that this node is part
    3939of
    4040
  • doc/filesystem/preface.texi

    r482ffbb2 r7441fe2c  
    88
    99@ifinfo
    10 @node Preface, Base Filesystem, Top, Top
     10@node Preface, , Top, Top
    1111@end ifinfo
    1212@unnumbered Preface
    1313
    14 The following file system capabilities have been added to the existing
    15 RTEMS system:
     14This document describes the implementation of the RTEMS filesystem
     15infrastructure.  This infrastructure supports the following
     16capabilities:
    1617
    1718@itemize @bullet
     
    4142@end enumerate
    4243
    43 @item Hard links to files and directories are supported
     44@item Hard links to files and directories
    4445
    45 @item Symbolic links to files and directories are supported
     46@item Symbolic links to files and directories
    4647
    4748@end itemize
    4849
    49 These enhancements have been made to provide the framework for `UNIX like'
    50 file system support. The POSIX file and directory functions have been
    51 implemented to allow a standard method of accessing file, device and
    52 directory information within the file system. The file system concept that
     50This has been implemented to provide the framework for a UNIX-like
     51file system support. POSIX file and directory functions have been
     52implemented that allow a standard method of accessing file, device and
     53directory information within file systems. The file system concept that
    5354has been implemented allows for expansion and adaptation of the file
    5455system to a variety of existing and future data storage devices. To this
     
    5758
    5859This framework slightly alters the manner in which devices are handled
    59 under RTEMS. Devices that are defined under a given RTEMS configuration
    60 will now be registered as files in a mounted file system. Access to these
    61 devices and their associated device handlers will be obtained through the
    62 traditional file system open(), read(), write(), lseek(), fstat() and
    63 ioctl() functions.
     60under RTEMS from that of public release 4.0.0 and earlier.  Devices that
     61are defined under a given RTEMS configuration will now be registered as
     62files in a mounted file system.  Access to these device drivers and their
     63associated devices may now be performed through the traditional file system
     64open(), read(), write(), lseek(), fstat() and ioctl() functions in addition
     65to the interface provided by the IO Manager in the RTEMS Classic API.
    6466
    65 A node structure is maintained for each file, device, and directory in the
    66 file system. The node structure is used to manage ownership, access
    67 rights, access time, modification time, and creation time. A union of
    68 structures within the nodal structure provide for manipulation of file
    69 data, device selection, or directory content as required by the nodal
    70 type. Manipulation of these properties is accomplished through the POSIX
    71 set of file and directory functions.
     67An In-Memory File System (IMFS) is included which provides full POSIX
     68filesystem functionality yet is RAM based.  The IMFS maintains a
     69node structure for each file, device, and directory in each mounted
     70instantiation of its file system. The node structure is used to
     71manage ownership, access rights, access time, modification time,
     72and creation time.  A union of structures within the IMFS nodal
     73structure provide for manipulation of file data, device selection,
     74or directory content as required by the nodal type. Manipulation of
     75these properties is accomplished through the POSIX set of file and
     76directory functions.  In addition to being useful in its own right,
     77the IMFS serves as a full featured example filesystem.
    7278
     79The intended audience for this document is those persons implementing
     80their own filesystem.  Users of the filesystem may find information
     81on the implementation useful.  But the user interface to the filesystem
     82is through the ISO/ANSI C Library and POSIX 1003.1b file and directory
     83APIs.
  • doc/filesystem/syscalls.t

    r482ffbb2 r7441fe2c  
    1010
    1111This set of routines represents the application's interface to files and directories
    12 under the RTEMS file system. All routines are compliant with POSIX standards if a
     12under the RTEMS filesystem. All routines are compliant with POSIX standards if a
    1313specific interface has been established. The list below represents the routines that have
    1414been included as part of the application's interface.
     
    6464This routine is layered on top of the stat() function. As long as the st_mode
    6565element in the returned structure follow the standard UNIX conventions, this
    66 function should support other file systems without alteration.
     66function should support other filesystems without alteration.
    6767
    6868@page
     
    8585
    8686This routine is layered on the rtems_filesystem_evaluate_path() routine and the
    87 file system specific OP table function node_type().
    88 
    89 The routine node_type() must be a routine provided for each file system since it
    90 must access the file systems node information to determine which of the
     87filesystem specific OP table function node_type().
     88
     89The routine node_type() must be a routine provided for each filesystem since it
     90must access the filesystems node information to determine which of the
    9191following types the node is:
    9292
     
    9999
    100100This acknowledges that the form of the node management information can vary
    101 from one file system implementation to another.
     101from one filesystem implementation to another.
    102102
    103103RTEMS has a special global structure that maintains the current directory
     
    119119This routine is layered on the open(), fchmod () and close () functions. As long as
    120120the standard interpretation of the mode_t value is maintained, this routine should
    121 not need modification to support other file systems.
     121not need modification to support other filesystems.
    122122
    123123@subheading Development Comments:
     
    150150actually exists. If it does a rtems_filesystem_location_info_t structure will be
    151151obtained that allows the shell function to locate the OPS table that is to be used
    152 for this file system.
     152for this filesystem.
    153153
    154154It is possible that the chown() function that should be in the OPS table is not
     
    175175invoked.
    176176
    177 If the file descriptor refers to an entry in the file system, the appropriate handler
     177If the file descriptor refers to an entry in the filesystem, the appropriate handler
    178178will be selected using information that has been placed in the file control block for
    179179the device (rtems_libio_t structure).
     
    191191
    192192If none of the upper bits are set in the file descriptor index, the file descriptor
    193 refers to an element of the RTEMS file system.
    194 
    195 The following sequence will be performed for any file system file descriptor:
     193refers to an element of the RTEMS filesystem.
     194
     195The following sequence will be performed for any filesystem file descriptor:
    196196
    197197@enumerate
     
    203203
    204204@item Determine if there is actually a function in the selected handler table that
    205 processes the close() operation for the file system and node type selected.
     205processes the close() operation for the filesystem and node type selected.
    206206This is generally done to avoid execution attempts on functions that have not
    207207been implemented.
     
    230230memory resources that are required to track an open directory. The code is layered
    231231on the close() function and standard memory free () functions. It should not
    232 require alterations to support other file systems.
     232require alterations to support other filesystems.
    233233
    234234@subheading Development Comments:
     
    288288@subheading Processing:
    289289
    290 This routine will alter the permissions of a node in a file system. It is layered on
     290This routine will alter the permissions of a node in a filesystem. It is layered on
    291291the following functions and macros:
    292292
     
    334334This routine currently only interacts with the file control block. If the structure of
    335335the file control block and the associated meanings do not change, the partial
    336 implementation of fcntl() should remain unaltered for other file system
     336implementation of fcntl() should remain unaltered for other filesystem
    337337implementations.
    338338
     
    369369@subheading Processing:
    370370
    371 This routine is a template in the in memory file system that will route us to the
     371This routine is a template in the in memory filesystem that will route us to the
    372372appropriate handler function to carry out the fdatasync() processing. In the in
    373 memory file system this function is not necessary. Its function in a disk based file
     373memory filesystem this function is not necessary. Its function in a disk based file
    374374system that employs a memory cache is to flush all memory based data buffers to
    375375disk. It is layered on the following functions and macros:
     
    431431@end itemize
    432432
    433 When a file system is mounted, a set of constants is specified for the file system.
    434 These constants are stored with the mount table entry for the file system. These
     433When a filesystem is mounted, a set of constants is specified for the filesystem.
     434These constants are stored with the mount table entry for the filesystem. These
    435435constants appear in the POSIX standard and are listed below.
    436436
     
    466466This routine will find the mount table information associated the file control block
    467467for the specified file descriptor parameter. The mount table entry structure
    468 contains a set of file system specific constants that can be accessed by individual
     468contains a set of filesystem specific constants that can be accessed by individual
    469469identifiers.
    470470
     
    482482
    483483Pathinfo in the file control block is used to locate the mount table entry for the
    484 file system associated with the file descriptor.
     484filesystem associated with the file descriptor.
    485485
    486486The mount table entry contains the pathconf_limits_and_options element. This
    487 element is a table of constants that is associated with the file system.
     487element is a table of constants that is associated with the filesystem.
    488488
    489489The name argument is used to reference the desired constant from the
     
    506506routine.
    507507
    508 If the file descriptor is associated with a node under a file system, the fstat()
     508If the file descriptor is associated with a node under a filesystem, the fstat()
    509509routine will map to the fstat() function taken from the node handler table.
    510510
     
    522522system nodes.
    523523
    524 If the file descriptor is associated with a node under a file system, the following
     524If the file descriptor is associated with a node under a filesystem, the following
    525525steps are performed:
    526526
     
    549549Not defined in the POSIX 1003.1b standard but commonly supported in most
    550550UNIX and POSIX system. Ioctl() is a catchall for I/O operations. Routine is
    551 layered on external network handlers and file system specific handlers. The
    552 development of new file systems should not alter the basic processing performed
     551layered on external network handlers and filesystem specific handlers. The
     552development of new filesystems should not alter the basic processing performed
    553553by this routine.
    554554
     
    560560returned by this handler is then returned to the calling program.
    561561
    562 File descriptors that are associated with a file system undergo the following
     562File descriptors that are associated with a filesystem undergo the following
    563563processing:
    564564
     
    591591
    592592This routine will establish a hard link to a file, directory or a device. The target of
    593 the hard link must be in the same file system as the new link being created. A link
     593the hard link must be in the same filesystem as the new link being created. A link
    594594to an existing link is also permitted but the existing link is evaluated before the
    595595new link is made. This implies that links to links are reduced to links to files,
     
    608608evaluation of the new name. This macro examines the first characters of the name
    609609to see if the name of the new link starts with a rtems_filesystem_is_separator. If it
    610 does the search starts from the root of the RTEMS file system; otherwise the
     610does the search starts from the root of the RTEMS filesystem; otherwise the
    611611search will start from the current directory.
    612612
    613 The OPS table evalformake() function for the parent's file system is used to
     613The OPS table evalformake() function for the parent's filesystem is used to
    614614locate the node that will be the parent of the new link. It will also locate the start
    615615of the new path's name. This name will be used to define a child under the parent
     
    617617
    618618If the parent is found, the routine will determine if the hard link that we are trying
    619 to create will cross a file system boundary. This is not permitted for hard-links.
    620 
    621 If the hard-link does not cross a file system boundary, a check is performed to
     619to create will cross a filesystem boundary. This is not permitted for hard-links.
     620
     621If the hard-link does not cross a filesystem boundary, a check is performed to
    622622determine if the OPS table contains an entry for the link() function.
    623623
    624624If a link() function is defined, the OPS table link () function will be called to
    625 establish the actual link within the file system.
     625establish the actual link within the filesystem.
    626626
    627627The return code from the OPS table link() function is returned to the calling
     
    637637@subheading Processing:
    638638
    639 This routine is layered on both external handlers and file system / node type
    640 specific handlers. This routine should allow for the support of new file systems
     639This routine is layered on both external handlers and filesystem / node type
     640specific handlers. This routine should allow for the support of new filesystems
    641641without modification.
    642642
     
    649649
    650650If the file descriptor is not associated with a network connection, it is associated
    651 with a node in a file system. The following steps will be performed for file system nodes:
     651with a node in a filesystem. The following steps will be performed for filesystem nodes:
    652652
    653653@enumerate
     
    682682@subheading Processing:
    683683
    684 This routine attempts to create a directory node under the file system. The routine
     684This routine attempts to create a directory node under the filesystem. The routine
    685685is layered the mknod() function.
    686686
     
    698698@subheading Processing:
    699699
    700 This routine attempts to create a FIFO node under the file system. The routine is
     700This routine attempts to create a FIFO node under the filesystem. The routine is
    701701layered the mknod() function.
    702702
     
    715715
    716716This function will allow for the creation of the following types of nodes under the
    717 file system:
     717filesystem:
    718718
    719719@itemize @bullet
     
    732732
    733733At the present time, an attempt to create a FIFO will result in an ENOTSUP error
    734 to the calling function. This routine is layered the file system specific routines
    735 evalformake and mknod. The introduction of a new file system must include its
     734to the calling function. This routine is layered the filesystem specific routines
     735evalformake and mknod. The introduction of a new filesystem must include its
    736736own evalformake and mknod function to support the generic mknod() function.
    737737Under this condition the generic mknod() function should accommodate other
    738 file system types without alteration.
     738filesystem types without alteration.
    739739
    740740@subheading Development Comments:
     
    768768creation of a node.
    769769
    770 If the pathname is a valid location to create a node, verify that a file system
     770If the pathname is a valid location to create a node, verify that a filesystem
    771771specific mknod() function exists.
    772772
    773 If the mknod() function exists, call the file system specific mknod () function.
     773If the mknod() function exists, call the filesystem specific mknod () function.
    774774Pass the name, mode, device type and the location information associated with the
    775775directory under which the node will be created.
     
    797797system type without keeping a dynamic database of all possible file
    798798system types that are valid for the mount operation. Using this method, it
    799 is only necessary to configure the file systems that we wish to use into the
    800 RTEMS build. Unused file systems types will not be drawn into the build.
     799is only necessary to configure the filesystems that we wish to use into the
     800RTEMS build. Unused filesystems types will not be drawn into the build.
    801801
    802802char                      *fsoptions,
     
    808808
    809809This argument is reserved for the name of a device that will be used to
    810 access the file system information. Current file system implementations
    811 are memory based and do not require a device to access file system
     810access the filesystem information. Current filesystem implementations
     811are memory based and do not require a device to access filesystem
    812812information.
    813813
    814814char                      *mount_point
    815815
    816 This is a pathname to a directory in a currently mounted file system that
     816This is a pathname to a directory in a currently mounted filesystem that
    817817allows read, write and execute permissions.
    818818
    819819@subheading Processing:
    820820
    821 This routine will handle the mounting of a file system on a mount point. If the
     821This routine will handle the mounting of a filesystem on a mount point. If the
    822822operation is successful, a pointer to the mount table chain entry associated with
    823 the mounted file system will be returned to the calling function. The specifics
    824 about the processing required at the mount point and within the file system being
    825 mounted is isolated in the file system specific mount() and fsmount_me ()
     823the mounted filesystem will be returned to the calling function. The specifics
     824about the processing required at the mount point and within the filesystem being
     825mounted is isolated in the filesystem specific mount() and fsmount_me ()
    826826functions. This allows the generic mount() function to remain unaltered even if
    827 new file system types are introduced.
     827new filesystem types are introduced.
    828828
    829829
     
    834834are valid ("RO" or "RW").
    835835
    836 It confirms that a file system ops-table has been selected.
     836It confirms that a filesystem ops-table has been selected.
    837837
    838838Space is allocated for a mount table entry and selective elements of the temporary
     
    841841If a mount point is specified:
    842842The mount point is examined to determine that it is a directory and also
    843 has the appropriate permissions to allow a file system to be mounted.
     843has the appropriate permissions to allow a filesystem to be mounted.
    844844
    845845The current mount table chain is searched to determine that there is not
    846 another file system mounted at the mount point we are trying to mount
     846another filesystem mounted at the mount point we are trying to mount
    847847onto.
    848848
    849 If a mount function is defined in the ops table for the file system
     849If a mount function is defined in the ops table for the filesystem
    850850containing the mount point, it is called at this time.
    851851
    852852If no mount point is specified:
    853853Processing if performed to set up the mount table chain entry as the base
    854 file system.
    855 
    856 If the fsmount_me() function is specified for ops-table of the file system being
    857 mounted, that function is called to initialize for the new file system.
     854filesystem.
     855
     856If the fsmount_me() function is specified for ops-table of the filesystem being
     857mounted, that function is called to initialize for the new filesystem.
    858858
    859859On successful completion, the temporary mount table entry will be placed on the
    860 mount table chain to record the presence of the mounted file system.
     860mount table chain to record the presence of the mounted filesystem.
    861861
    862862@page
     
    869869@subheading Processing:
    870870
    871 This routine is layered on both RTEMS calls and file system specific
     871This routine is layered on both RTEMS calls and filesystem specific
    872872implementations of the open() function. These functional interfaces should not
    873 change for new file systems and therefore this code should be stable as new file
     873change for new filesystems and therefore this code should be stable as new file
    874874systems are introduced.
    875875
     
    881881It will then test to see if the pathname exists. If it does a
    882882rtems_filesystem_location_info_t data structure will be filled out. This structure
    883 contains information that associates node information, file system specific
     883contains information that associates node information, filesystem specific
    884884functions and mount table chain information with the pathname.
    885885
    886886If the create option has been it will attempt to create a node for a regular file along
    887887the specified path. If a file already exists along this path, an error will be
    888 generated; otherwise, a node will be allocated for the file under the file system
     888generated; otherwise, a node will be allocated for the file under the filesystem
    889889that contains the pathname. When a new node is created, it is also evaluated so
    890890that an appropriate rtems_filesystem_location_info_t data structure can be filled
     
    894894structure will be initialized with handler table information, node information and
    895895the rtems_filesystem_location_info_t data structure that describes the node and
    896 file system data in detail.
    897 
    898 If an open() function exists in the file system specific handlers table for the node
     896filesystem data in detail.
     897
     898If an open() function exists in the filesystem specific handlers table for the node
    899899that we are trying to open, it will be called at this time.
    900900
     
    917917This routine will attempt to open a directory for read access. It will setup a DIR
    918918control structure that will be used to access directory information. This routine is
    919 layered on the generic open() routine and file system specific directory
     919layered on the generic open() routine and filesystem specific directory
    920920processing routines.
    921921
     
    935935This routine will obtain the value of one of the path configuration parameters and
    936936return it to the calling routine. It is layered on the generic open() and fpathconf ()
    937 functions. These interfaces should not change with the addition of new file system
     937functions. These interfaces should not change with the addition of new filesystem
    938938types.
    939939
     
    956956@subheading Processing:
    957957
    958 This routine is layered on a set of RTEMS calls and file system specific read
     958This routine is layered on a set of RTEMS calls and filesystem specific read
    959959operations. The functions are layered in such a way as to isolate them from
    960 change as new file systems are introduced.
     960change as new filesystems are introduced.
    961961
    962962@subheading Development Comments:
     
    968968will then be sent as the return code from generic read() function.
    969969
    970 For file descriptors that are associated with the file system the following sequence
     970For file descriptors that are associated with the filesystem the following sequence
    971971will be performed:
    972972
     
    10081008
    10091009The routine calls a customized getdents() function that is provided by the user.
    1010 This routine provides the file system specific aspects of reading a directory.
     1010This routine provides the filesystem specific aspects of reading a directory.
    10111011
    10121012It is layered on the read() function in the directory handler table. This function
     
    10221022@subheading Processing:
    10231023
    1024 This routine will attempt to dismount a mounted file system and then free all
    1025 resources that were allocated for the management of that file system.
     1024This routine will attempt to dismount a mounted filesystem and then free all
     1025resources that were allocated for the management of that filesystem.
    10261026
    10271027@subheading Development Comments:
     
    10291029@itemize @bullet
    10301030
    1031 @item This routine will determine if there are any file systems currently mounted
    1032 under the file system that we are trying to dismount. This would prevent the
    1033 dismount of the file system.
    1034 
    1035 @item It will test to see if the current directory is in the file system that we are
    1036 attempting to dismount. This would prevent the dismount of the file system.
     1031@item This routine will determine if there are any filesystems currently mounted
     1032under the filesystem that we are trying to dismount. This would prevent the
     1033dismount of the filesystem.
     1034
     1035@item It will test to see if the current directory is in the filesystem that we are
     1036attempting to dismount. This would prevent the dismount of the filesystem.
    10371037
    10381038@item It will scan all the currently open file descriptors to determine is there is an
    1039 open file descriptor to a file in the file system that we are attempting to
     1039open file descriptor to a file in the filesystem that we are attempting to
    10401040unmount().
    10411041
     
    10461046@enumerate
    10471047
    1048 @item Call the file system specific unmount() function for the file system that
     1048@item Call the filesystem specific unmount() function for the filesystem that
    10491049contains the mount point. This routine should indicate that the mount point
    1050 no longer has a file system mounted below it.
    1051 
    1052 @item Call the file system specific fsunmount_me() function for the mounted
    1053 file system that we are trying to unmount(). This routine should clean up
     1050no longer has a filesystem mounted below it.
     1051
     1052@item Call the filesystem specific fsunmount_me() function for the mounted
     1053filesystem that we are trying to unmount(). This routine should clean up
    10541054any resources that are no longer needed for the management of the file
    10551055system being un-mounted.
    10561056
    1057 @item Extract the mount table entry for the file system that was just dismounted
     1057@item Extract the mount table entry for the filesystem that was just dismounted
    10581058from the mount table chain.
    10591059
Note: See TracChangeset for help on using the changeset viewer.