[4d771349] | 1 | @c |
---|
| 2 | @c COPYRIGHT (c) 1988-1998. |
---|
| 3 | @c On-Line Applications Research Corporation (OAR). |
---|
| 4 | @c All rights reserved. |
---|
| 5 | @c |
---|
| 6 | @c $Id$ |
---|
| 7 | @c |
---|
[9bc1e52a] | 8 | |
---|
[4d771349] | 9 | @chapter Mounting and Unmounting File Systems |
---|
[9bc1e52a] | 10 | |
---|
[ee6284c] | 11 | @section Mount Points |
---|
| 12 | |
---|
| 13 | The following is the list of the characteristics of a mount point: |
---|
| 14 | |
---|
| 15 | @itemize @bullet |
---|
| 16 | |
---|
| 17 | @item The mount point must be a directory. It may have files and other |
---|
| 18 | directories under it. These files and directories will be hidden when the |
---|
| 19 | file system is mounted. |
---|
| 20 | |
---|
| 21 | @item The task must have read/write/execute permissions to the mount point |
---|
| 22 | or the mount attempt will be rejected. |
---|
| 23 | |
---|
| 24 | @item Only one file system can be mounted to a single mount point. |
---|
| 25 | |
---|
| 26 | @item The Root of the mountable file system will be referenced by the name |
---|
| 27 | of the mount point after the mount is complete. |
---|
| 28 | |
---|
| 29 | @end itemize |
---|
| 30 | |
---|
| 31 | @section Mount Table Chain |
---|
| 32 | |
---|
| 33 | Each entry in the mount table chain is of the following type: |
---|
[9bc1e52a] | 34 | |
---|
| 35 | struct rtems_filesystem_mount_table_entry_tt |
---|
[4d771349] | 36 | @{ |
---|
[ee6284c] | 37 | Chain_Node Node; |
---|
| 38 | rtems_filesystem_location_info_t mt_point_node; |
---|
| 39 | rtems_filesystem_location_info_t mt_fs_root; |
---|
| 40 | int options; |
---|
| 41 | void *fs_info; |
---|
[9bc1e52a] | 42 | |
---|
[ee6284c] | 43 | rtems_filesystem_limits_and_options_t pathconf_limits_and_options; |
---|
[9bc1e52a] | 44 | |
---|
| 45 | /* |
---|
| 46 | * When someone adds a mounted filesystem on a real device, |
---|
| 47 | * this will need to be used. |
---|
| 48 | * |
---|
[ee6284c] | 49 | * The best option long term for this is probably an |
---|
| 50 | * open file descriptor. |
---|
[9bc1e52a] | 51 | */ |
---|
[ee6284c] | 52 | char *dev; |
---|
[4d771349] | 53 | @}; |
---|
[9bc1e52a] | 54 | |
---|
[ee6284c] | 55 | @section Adding entries to the chain during mount |
---|
| 56 | |
---|
| 57 | When a file system is mounted, its presence and location in the file |
---|
| 58 | system hierarchy is recorded in a dynamic list structure known as a chain. |
---|
| 59 | A unique rtems_filesystem_mount_table_entry_tt structure is logged for |
---|
| 60 | each file system that is mounted. This includes the base file system. |
---|
| 61 | |
---|
| 62 | @section Removing entries from the chain during unmount |
---|
[9bc1e52a] | 63 | |
---|
[ee6284c] | 64 | When a file system is dismounted its entry in the mount table chain is |
---|
| 65 | extracted and the memory for this entry is freed. |
---|
[9bc1e52a] | 66 | |
---|
| 67 | |
---|
| 68 | |
---|