Changes between Version 5 and Version 6 of file_system


Ignore:
Timestamp:
Jan 12, 2020, 12:45:03 AM (4 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • file_system

    v5 v6  
    99To support various File System types, ALMOS-MKH defines a generic Virtual File System API defined in the [https://www-soc.lip6.fr/trac/almos-mkh/browser/trunk/kernel/fs/vfs.c  almos-mkh/kernel/fs/vfs.c], and [https://www-soc.lip6.fr/trac/almos-mkh/browser/trunk/kernel/fs/vfs.h almos-mkh/kernel/fs/vfs.h] files.
    1010
    11 All supported fille systems are supposed to have a hierarchical tree_based structure, where some special ''directory'' files contain ''links''  to other files that can be ''directory'' files, or ''terminal'' files. Therefore, any file X in the file system can be unambiguously defined by a ''pathname'' describing the path from the VFS root to the X file. A ''directory'' file has only on single path name, but a ''terminal'' file can have several ''parent'' directories, defining several path names for one single file.
     11All supported file systems are supposed to have a hierarchical tree_based structure, where some special ''directory'' files contain ''links''  to other files that can be ''directory'' files, or ''terminal'' files. Therefore, any file X in the file system can be unambiguously defined by a ''pathname'' describing the path from the VFS root to the X file. A ''directory'' file has only on single path name, but a ''terminal'' file can have several ''parent'' directories, defining several pathnames for one single file.
    1212
    13 The ''directory'' file format is specific for each file system type.
     13Any ''cluster_id'' can be allocated to any file (terminal or directory). For all supported file systems, the ordered set of clusters allocated to a given file is supposed to be registered in a structure called ''File Allocation Table'' (FAT).
    1414
    15 Any ''cluster_id'' can be allocated to any file (terminal or directory), and for all supported file systems, the ordered set of clusters allocated to a given file is registered in a structure called ''File Allocation Table'' (FAT).
     15As a general rule, the file system makes no assumption on a ''terminal'' file, but each file system defines its own ''directory'' file format, and its own ''FAT'' format.
    1616
    17 The ''FAT'' format is specific for each file system type.
    18 
    19 Any file system stores three types of informations:
     17Therefore, any file system stores three types of informations:
    2018 1. some clusters are used to store the '''terminal files''',
    2119 1. other clusters are used to store the '''directory files''',
    2220 1. specific clusters are used to store the ''FAT''.
    2321
    24 As all UNIX or Microsoft operating systems ALMOS-MKH implements a File System Cache, that is a partial copy, in kernel memory, of the file system on device. The VFS is actually the implementation of this generic File System Cache.
     22As all UNIX or Microsoft operating systems ALMOS-MKH implements a File System Cache, that is a partial copy - in kernel memory - of the file system on device. The VFS is actually the implementation of this generic File System Cache.
    2523
    2624The file systems currently supported by ALMOS-MKH are
     
    4543The main information registered in the ''vfs_dentry_t'' structure are a local name identifying the linked file. Two dentries in the same directory cannot have the same name, because the pathname identifying a file X is defined by the sequence of local names in the path from the root inode to the inode repesenting the X file. It contains a pointer on the child (linked) inode, and another pointer on the parent directory.
    4644
    47 === B.2 The Mapper ===
     45=== B.2 The Mappers ===
    4846
    4947A ''mapper_t'' structure is attached to each inode. This structure implements an expandable file cache, and contains a partial copy in kernel memory of the file content on device. As a file is stored on device as an ordered set of 4 Kbytes pages, this cache is implemented as a 3 levels radix-tree, indexed by the page index in file. Each entry in this radix-tree is a pointer on a physical page.
     
    5755 * for a '''terminal''' mapper, the device in not immediately updated. It is only updated when the mapper is destroyed, or after an explicit sync() user sys call (write-back policy).
    5856
    59 === B.3 The File Descriptor ===
     57=== B.3 The File Descriptors ===
    6058
    61 
     59TBD...