include/crypto/internal/acompress.h
Source file repositories/reference/linux-study-clean/include/crypto/internal/acompress.h
File Facts
- System
- Linux kernel
- Corpus path
include/crypto/internal/acompress.h- Extension
.h- Size
- 6778 bytes
- Lines
- 247
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
crypto/acompress.hcrypto/algapi.hcrypto/scatterwalk.hlinux/compiler_types.hlinux/cpumask_types.hlinux/spinlock.hlinux/workqueue_types.h
Detected Declarations
struct acomp_algstruct COMP_ALG_COMMONstruct crypto_acomp_streamstruct crypto_acomp_streamsstruct acomp_walkfunction acomp_request_completefunction acomp_request_issgfunction acomp_request_src_isvirtfunction acomp_request_dst_isvirtfunction acomp_request_isvirtfunction acomp_request_src_isnondmafunction acomp_request_dst_isnondmafunction acomp_request_isnondmafunction crypto_acomp_req_virtfunction crypto_acomp_unlock_stream_bhfunction acomp_walk_more_srcfunction acomp_request_flags
Annotated Snippet
struct acomp_alg {
int (*compress)(struct acomp_req *req);
int (*decompress)(struct acomp_req *req);
int (*init)(struct crypto_acomp *tfm);
void (*exit)(struct crypto_acomp *tfm);
union {
struct COMP_ALG_COMMON;
struct comp_alg_common calg;
};
};
struct crypto_acomp_stream {
spinlock_t lock;
void *ctx;
};
struct crypto_acomp_streams {
/* These must come first because of struct scomp_alg. */
void *(*alloc_ctx)(void);
void (*free_ctx)(void *);
struct crypto_acomp_stream __percpu *streams;
struct work_struct stream_work;
cpumask_t stream_want;
};
struct acomp_walk {
union {
/* Virtual address of the source. */
struct {
struct {
const void *const addr;
} virt;
} src;
/* Private field for the API, do not use. */
struct scatter_walk in;
};
union {
/* Virtual address of the destination. */
struct {
struct {
void *const addr;
} virt;
} dst;
/* Private field for the API, do not use. */
struct scatter_walk out;
};
unsigned int slen;
unsigned int dlen;
int flags;
};
/*
* Transform internal helpers.
*/
static inline void *acomp_request_ctx(struct acomp_req *req)
{
return req->__ctx;
}
static inline void *acomp_tfm_ctx(struct crypto_acomp *tfm)
{
return tfm->base.__crt_ctx;
}
static inline void acomp_request_complete(struct acomp_req *req,
int err)
{
crypto_request_complete(&req->base, err);
}
/**
* crypto_register_acomp() -- Register asynchronous compression algorithm
*
* Function registers an implementation of an asynchronous
* compression algorithm
*
* @alg: algorithm definition
*
* Return: zero on success; error code in case of error
*/
int crypto_register_acomp(struct acomp_alg *alg);
/**
Annotation
- Immediate include surface: `crypto/acompress.h`, `crypto/algapi.h`, `crypto/scatterwalk.h`, `linux/compiler_types.h`, `linux/cpumask_types.h`, `linux/spinlock.h`, `linux/workqueue_types.h`.
- Detected declarations: `struct acomp_alg`, `struct COMP_ALG_COMMON`, `struct crypto_acomp_stream`, `struct crypto_acomp_streams`, `struct acomp_walk`, `function acomp_request_complete`, `function acomp_request_issg`, `function acomp_request_src_isvirt`, `function acomp_request_dst_isvirt`, `function acomp_request_isvirt`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.