Linux Kernel
3.7.1
|
#include <linux/blkdev.h>
#include <linux/mempool.h>
#include <linux/export.h>
#include <linux/bio.h>
#include <linux/workqueue.h>
#include <linux/slab.h>
Go to the source code of this file.
Data Structures | |
struct | integrity_slab |
Macros | |
#define | IS(x) { .nr_vecs = x, .name = "bip-"__stringify(x) } |
Variables | |
struct integrity_slab bip_slab[BIOVEC_NR_POOLS] | __read_mostly |
Definition at line 36 of file bio-integrity.c.
int bio_integrity_add_page | ( | struct bio * | bio, |
struct page * | page, | ||
unsigned int | len, | ||
unsigned int | offset | ||
) |
Definition at line 161 of file bio-integrity.c.
bio_integrity_advance - Advance integrity vector : bio whose integrity vector to update : number of data bytes that have been completed
Description: This function calculates how many integrity bytes the number of completed data bytes correspond to and advances the integrity vector accordingly.
Definition at line 628 of file bio-integrity.c.
|
read |
bio_integrity_alloc - Allocate integrity payload and attach it to bio : bio to attach integrity metadata to : Memory allocation mask : Number of integrity metadata scatter-gather elements
Description: This function prepares a bio for attaching integrity metadata. nr_vecs specifies the maximum number of pages containing integrity metadata that can be attached.
Definition at line 82 of file bio-integrity.c.
bio_integrity_clone - Callback for cloning bios with integrity metadata : New bio : Original bio : Memory allocation mask
Description: Called to allocate a bip when cloning a bio
Definition at line 723 of file bio-integrity.c.
bio_integrity_enabled - Check whether integrity can be passed : bio to check
Description: Determines whether bio_integrity_prep() can be called on this bio or not. bio data direction and target device must be set prior to calling. The functions honors the write_generate and read_verify flags in sysfs.
Definition at line 211 of file bio-integrity.c.
bio_integrity_endio - Integrity I/O completion function : Protected bio : Pointer to errno
Description: Completion for integrity I/O
Normally I/O completion is done in interrupt context. However, verifying I/O integrity is a time-consuming task which must be run in process context. This function postpones completion accordingly.
Definition at line 547 of file bio-integrity.c.
bio_integrity_free - Free bio integrity payload : bio containing bip to be freed
Description: Used to free the integrity portion of a bio. Usually called from bio_free().
Definition at line 128 of file bio-integrity.c.
bio_integrity_get_tag - Retrieve a tag buffer from a bio : bio to retrieve buffer from : Pointer to a buffer for the tag data : Length of the target buffer
Description: Use this function to retrieve the tag buffer from a completed I/O. The size of the integrity buffer must be <= to the size reported by bio_integrity_tag_size().
Definition at line 316 of file bio-integrity.c.
Definition at line 771 of file bio-integrity.c.
bio_integrity_mark_head - Advance bip_vec skip bytes : Integrity vector to advance Number of bytes to advance it
Definition at line 574 of file bio-integrity.c.
bio_integrity_mark_tail - Truncate bip_vec to be len bytes long : Integrity vector to truncate : New length of integrity vector
Definition at line 600 of file bio-integrity.c.
bio_integrity_prep - Prepare bio for integrity I/O : bio to prepare
Description: Allocates a buffer for integrity metadata, maps the pages and attaches them to a bio. The bio must have data direction, target device and start sector set priot to calling. In the WRITE case, integrity metadata will be generated using the block device's integrity function. In the READ case, the buffer will be prepared for DMA and a suitable end_io handler set up.
Definition at line 384 of file bio-integrity.c.
bio_integrity_set_tag - Attach a tag buffer to a bio : bio to attach buffer to : Pointer to a buffer containing tag data : Length of the included buffer
Description: Use this function to tag a bio by leveraging the extra space provided by devices formatted with integrity protection. The size of the integrity buffer must be <= to the size reported by bio_integrity_tag_size().
Definition at line 298 of file bio-integrity.c.
bio_integrity_split - Split integrity metadata : Protected bio : Resulting bio_pair : Offset
Description: Splits an integrity page into a bio_pair.
Definition at line 679 of file bio-integrity.c.
Definition at line 259 of file bio-integrity.c.
bio_integrity_tag_size - Retrieve integrity tag space : bio to inspect
Description: Returns the maximum number of tag bytes that can be attached to this bio. Filesystems can use this to determine how much metadata to attach to an I/O.
Definition at line 249 of file bio-integrity.c.
bio_integrity_trim - Trim integrity vector : bio whose integrity vector to update : offset to first data sector : number of data sectors
Description: Used to trim the integrity vector in a cloned bio. The ivec will be advanced corresponding to 'offset' data sectors and the length will be truncated corresponding to 'len' data sectors.
Definition at line 653 of file bio-integrity.c.
Definition at line 747 of file bio-integrity.c.
Definition at line 764 of file bio-integrity.c.
EXPORT_SYMBOL | ( | bio_integrity_alloc | ) |
EXPORT_SYMBOL | ( | bio_integrity_free | ) |
EXPORT_SYMBOL | ( | bio_integrity_add_page | ) |
EXPORT_SYMBOL | ( | bio_integrity_enabled | ) |
EXPORT_SYMBOL | ( | bio_integrity_tag_size | ) |
EXPORT_SYMBOL | ( | bio_integrity_set_tag | ) |
EXPORT_SYMBOL | ( | bio_integrity_get_tag | ) |
EXPORT_SYMBOL | ( | bio_integrity_prep | ) |
EXPORT_SYMBOL | ( | bio_integrity_endio | ) |
EXPORT_SYMBOL | ( | bio_integrity_advance | ) |
EXPORT_SYMBOL | ( | bio_integrity_trim | ) |
EXPORT_SYMBOL | ( | bio_integrity_split | ) |
EXPORT_SYMBOL | ( | bio_integrity_clone | ) |
EXPORT_SYMBOL | ( | bioset_integrity_create | ) |
EXPORT_SYMBOL | ( | bioset_integrity_free | ) |
struct integrity_slab bip_slab [BIOVEC_NR_POOLS] __read_mostly |