OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [include/] [linux/] [umsdos_fs_i.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
#ifndef UMSDOS_FS_I_H
2
#define UMSDOS_FS_I_H
3
 
4
#ifndef _LINUX_TYPES_H
5
#include <linux/types.h>
6
#endif
7
#include <linux/msdos_fs_i.h>
8
#include <linux/pipe_fs_i.h>
9
 
10
/* #Specification: strategy / in memory inode
11
        Here is the information specific to the inode of the UMSDOS file
12
        system. This information is added to the end of the standard struct
13
        inode. Each file system has its own extension to struct inode,
14
        so do the umsdos file system.
15
 
16
        The strategy is to have the umsdos_inode_info as a superset of
17
        the msdos_inode_info, since most of the time the job is done
18
        by the msdos fs code.
19
 
20
        So we duplicate the msdos_inode_info, and add our own info at the
21
        end.
22
 
23
        For all file type (and directory) the inode has a reference to:
24
                the directory which hold this entry: i_dir_owner
25
                The EMD file of i_dir_owner: i_emd_owner
26
                The offset in this EMD file of the entry: pos
27
 
28
        For directory, we also have a reference to the inode of its
29
        own EMD file. Also, we have dir_locking_info to help synchronise
30
        file creation and file lookup. This data is sharing space with
31
        the pipe_inode_info not used by directory. See also msdos_fs_i.h
32
        for more information about pipe_inode_info and msdos_inode_info.
33
 
34
        Special file and fifo do have an inode which correspond to an
35
        empty MSDOS file.
36
 
37
        symlink are processed mostly like regular file. The content is the
38
        link.
39
 
40
        fifos add there own extension to the inode. I have reserved some
41
        space for fifos side by side with msdos_inode_info. This is just
42
        to for the show, because msdos_inode_info already include the
43
        pipe_inode_info.
44
 
45
        The UMSDOS specific extension is placed after the union.
46
*/
47
struct dir_locking_info {
48
        struct wait_queue *p;
49
        short int looking;              /* How many process doing a lookup */
50
        short int creating;             /* Is there any creation going on here */
51
                                                        /* Only one at a time, although one */
52
                                                        /* may recursively lock, so it is a counter */
53
        long pid;                               /* pid of the process owning the creation */
54
                                                        /* lock */
55
};
56
struct umsdos_inode_info {
57
        union {
58
                struct msdos_inode_info msdos_info;
59
                struct pipe_inode_info pipe_info;
60
                struct dir_locking_info dir_info;
61
        }u;     /* Simply a filler, never referenced by fs/umsdos/... */
62
        unsigned long i_dir_owner;      /* Inode of the dir which hold this */
63
                                                                /* entry */
64
        unsigned long i_emd_owner;      /* Inode of the EMD file of i_dir_owner */
65
        off_t pos;                                      /* Entry offset in the emd_owner file */
66
        /* The rest is used only if this inode describe a directory */
67
        unsigned long i_emd_dir;        /* Inode of the EMD file of this inode */
68
};
69
 
70
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.