linux kernel struct 之 fscache_operation

linux-4.9.37/include/linux/fscache-cache.h

表示异步操作。
FS-Cache是一个用于缓存网络文件系统的数据存储和检索的机制,它通过异步操作来处理数据。

struct fscache_operation {
    struct work_struct    work;        /* record for async ops */
    struct list_head    pend_link;    /* link in object->pending_ops */
    struct fscache_object    *object;    /* object to be operated upon */

    unsigned long        flags;
#define FSCACHE_OP_TYPE        0x000f    /* operation type */
#define FSCACHE_OP_ASYNC    0x0001    /* - async op, processor may sleep for disk */
#define FSCACHE_OP_MYTHREAD    0x0002    /* - processing is done be issuing thread, not pool */
#define FSCACHE_OP_WAITING    4    /* cleared when op is woken */
#define FSCACHE_OP_EXCLUSIVE    5    /* exclusive op, other ops must wait */
#define FSCACHE_OP_DEC_READ_CNT    6    /* decrement object->n_reads on destruction */
#define FSCACHE_OP_UNUSE_COOKIE    7    /* call fscache_unuse_cookie() on completion */
#define FSCACHE_OP_KEEP_FLAGS    0x00f0    /* flags to keep when repurposing an op */

    enum fscache_operation_state state;
    atomic_t        usage;
    unsigned        debug_id;    /* debugging ID */

    /* operation processor callback
     * - can be NULL if FSCACHE_OP_WAITING is going to be used to perform
     *   the op in a non-pool thread */
    fscache_operation_processor_t processor;

    /* Operation cancellation cleanup (optional) */
    fscache_operation_cancel_t cancel;

    /* operation releaser */
    fscache_operation_release_t release;
};

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值