source: rtems-docs/filesystem/mounting_and_unmounting.rst @ 30c32cb

4.115
Last change on this file since 30c32cb was 30c32cb, checked in by Joel Sherrill <joel@…>, on 10/28/16 at 18:13:13

in-memory.rst, mounting_and_unmounting.rst: Remove unnecessary backslash

  • Property mode set to 100644
File size: 3.7 KB
Line 
1.. comment SPDX-License-Identifier: CC-BY-SA-4.0
2
3.. COMMENT: COPYRIGHT (c) 1988-2002.
4.. COMMENT: On-Line Applications Research Corporation (OAR).
5.. COMMENT: All rights reserved.
6
7Mounting and Unmounting Filesystems
8###################################
9
10Mount Points
11============
12
13The following is the list of the characteristics of a mount point:
14
15- The mount point must be a directory. It may have files and other directories
16  under it. These files and directories will be hidden when the filesystem is
17  mounted.
18
19- The task must have read/write/execute permissions to the mount point or the
20  mount attempt will be rejected.
21
22- Only one filesystem can be mounted to a single mount point.
23
24- The Root of the mountable filesystem will be referenced by the name of the
25  mount point after the mount is complete.
26
27Mount Table Chain
28=================
29
30The mount table chain is a dynamic list of structures that describe mounted
31filesystems a specific points in the filesystem hierarchy. It is initialized to
32an empty state during the base filesystem initialization.  The mount operation
33will add entries to the mount table chain. The un-mount operation will remove
34entries from the mount table chain.
35
36Each entry in the mount table chain is of the following type:
37
38.. code-block:: c
39
40    struct rtems_filesystem_mount_table_entry_tt
41    {
42        Chain_Node                             Node;
43        rtems_filesystem_location_info_t       mt_point_node;
44        rtems_filesystem_location_info_t       mt_fs_root;
45        int                                    options;
46        void                                  *fs_info;
47        rtems_filesystem_limits_and_options_t  pathconf_limits_and_options;
48        /*
49         *  When someone adds a mounted filesystem on a real device,
50         *  this will need to be used.
51         *
52         *  The best option long term for this is probably an
53         *  open file descriptor.
54         */
55         char                                  *dev;
56    };
57
58*Node*
59    The Node is used to produce a linked list of mount table entry nodes.
60
61*mt_point_node*
62    The mt_point_node contains all information necessary to access the
63    directory where a filesystem is mounted onto.  This element may contain
64    memory that is allocated during a path evaluation of the filesystem
65    containing the mountpoint directory.  The generic code allows this memory
66    to be returned by unmount when the filesystem identified by mt_fs_root is
67    unmounted.
68
69*mt_fs_root*
70    The mt_fs_root contains all information necessary to identify the root of
71    the mounted filesystem. The user is never allowed access to this node by
72    the generic code, but it is used to identify to the mounted filesystem
73    where to start evaluation of pathnames at.
74
75*options*
76    XXX
77
78*fs_info*
79    The fs_info element is a location available for use by the mounted file
80    system to identify unique things applicable to this instance of the file
81    system.  For example the IMFS uses this space to provide node
82    identification that is unique for each instance (mounting) of the
83    filesystem.
84
85*pathconf_limits_and_options*
86    XXX
87
88*dev*
89    This character string represents the device where the filesystem will reside.
90
91Adding entries to the chain during mount
92========================================
93
94When a filesystem is mounted, its presence and location in the file system
95hierarchy is recorded in a dynamic list structure known as a chain.  A unique
96rtems_filesystem_mount_table_entry_tt structure is logged for each filesystem
97that is mounted. This includes the base filesystem.
98
99Removing entries from the chain during unmount
100==============================================
101
102When a filesystem is dismounted its entry in the mount table chain is extracted
103and the memory for this entry is freed.
Note: See TracBrowser for help on using the repository browser.