Chinaunix首页 | 论坛 | 博客
  • 博客访问: 76400
  • 博文数量: 172
  • 博客积分: 2047
  • 博客等级: 大尉
  • 技术积分: 1745
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-19 15:23
文章分类

全部博文(172)

文章存档

2011年(72)

2010年(100)

我的朋友

分类: LINUX

2010-05-20 10:12:12


struct file_lock {
    struct file_lock *fl_next;    /* singly linked list for this inode */
    struct list_head fl_link;    /* doubly linked list of all locks */
    struct list_head fl_block;    /* circular list of blocked processes */
    fl_owner_t fl_owner;
    unsigned char fl_flags;
    unsigned char fl_type;
    unsigned int fl_pid;
    struct pid *fl_nspid;
    wait_queue_head_t fl_wait;
    struct file *fl_file;
    loff_t fl_start;
    loff_t fl_end;

    struct fasync_struct *    fl_fasync; /* for lease break notifications */
    unsigned long fl_break_time;    /* for nonblocking lease breaks */

    const struct file_lock_operations *fl_ops;    /* Callbacks for filesystems */
    const struct lock_manager_operations *fl_lmops;    /* Callbacks for lockmanagers */
    union {
        struct nfs_lock_info    nfs_fl;
        struct nfs4_lock_info    nfs4_fl;
        struct {
            struct list_head link;    /* link in AFS vnode's pending_locks list */
            int state;        /* state of grant or error if -ve */
        } afs;
    } fl_u;
};




struct file_lock_operations {
    void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
    void (*fl_release_private)(struct file_lock *);
};


阅读(1053) | 评论(0) | 转发(0) |
0

上一篇:vfs super_block

下一篇:vfs dentry

给主人留下些什么吧!~~