Linux File 结构说明

    技术2022-05-20  86

    http://fxr.watson.org/fxr/source/include/linux/fs.h?v=linux-2.4.22#L563

     

    struct file {564         struct list_head        f_list;565         struct dentry           *f_dentry;566         struct vfsmount         *f_vfsmnt;567         struct file_operations  *f_op;568         atomic_t                f_count;569         unsigned int            f_flags;570         mode_t                  f_mode;571         loff_t                  f_pos;572         unsigned long           f_reada, f_ramax, f_raend, f_ralen, f_rawin;573         struct fown_struct      f_owner;574         unsigned int            f_uid, f_gid;575         int                     f_error;576 577         unsigned long           f_version;578 579         /* needed for tty driver, and maybe others */580         void                    *private_data;581 582         /* preallocated helper kiobuf to speedup O_DIRECT */583         struct kiobuf           *f_iobuf;584         long                    f_iobuf_lock;585 };


    最新回复(0)