fs/smb/client/compress.h
Source file repositories/reference/linux-study-clean/fs/smb/client/compress.h
File Facts
- System
- Linux kernel
- Corpus path
fs/smb/client/compress.h- Extension
.h- Size
- 1539 bytes
- Lines
- 51
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/uio.hlinux/kernel.h../common/smb2pdu.h../common/compress/compress.hcifsglob.h
Detected Declarations
function smb_compressfunction should_compress
Annotated Snippet
#ifndef _SMB_COMPRESS_H
#define _SMB_COMPRESS_H
#include <linux/uio.h>
#include <linux/kernel.h>
#include "../common/smb2pdu.h"
#include "../common/compress/compress.h"
#include "cifsglob.h"
/* sizeof(smb2_compression_hdr) - sizeof(OriginalPayloadSize) */
#define SMB_COMPRESS_HDR_LEN 16
/* sizeof(smb2_compression_payload_hdr) - sizeof(OriginalPayloadSize) */
#define SMB_COMPRESS_PAYLOAD_HDR_LEN 8
#define SMB_COMPRESS_MIN_LEN PAGE_SIZE
#ifdef CONFIG_CIFS_COMPRESSION
typedef int (*compress_send_fn)(struct TCP_Server_Info *, int, struct smb_rqst *);
int smb_compress(struct TCP_Server_Info *server, struct smb_rqst *rq,
compress_send_fn send_fn);
bool should_compress(const struct cifs_tcon *tcon, const struct smb_rqst *rq);
#else /* !CONFIG_CIFS_COMPRESSION */
static inline int smb_compress(void *unused1, void *unused2, void *unused3)
{
return -EOPNOTSUPP;
}
static inline bool should_compress(void *unused1, void *unused2)
{
return false;
}
#endif /* !CONFIG_CIFS_COMPRESSION */
#endif /* _SMB_COMPRESS_H */
Annotation
- Immediate include surface: `linux/uio.h`, `linux/kernel.h`, `../common/smb2pdu.h`, `../common/compress/compress.h`, `cifsglob.h`.
- Detected declarations: `function smb_compress`, `function should_compress`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- 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.