diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-18 14:53:51 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-18 14:53:51 -0400 |
| commit | d3dc366bbaf07c125561e90d6da4bb147741101a (patch) | |
| tree | 6eb7e79a8ec9df1fa705393c6d15ccea3d104661 | |
| parent | 511c41d9e6665a07aca94eb00983cf6d77dd87ff (diff) | |
| parent | e19a8a0ad2d255316830ead05b59c5a704434cbb (diff) | |
Merge branch 'for-3.18/core' of git://git.kernel.dk/linux-block
Pull core block layer changes from Jens Axboe:
"This is the core block IO pull request for 3.18. Apart from the new
and improved flush machinery for blk-mq, this is all mostly bug fixes
and cleanups.
- blk-mq timeout updates and fixes from Christoph.
- Removal of REQ_END, also from Christoph. We pass it through the
->queue_rq() hook for blk-mq instead, freeing up one of the request
bits. The space was overly tight on 32-bit, so Martin also killed
REQ_KERNEL since it's no longer used.
- blk integrity updates and fixes from Martin and Gu Zheng.
- Update to the flush machinery for blk-mq from Ming Lei. Now we
have a per hardware context flush request, which both cleans up the
code should scale better for flush intensive workloads on blk-mq.
- Improve the error printing, from Rob Elliott.
- Backing device improvements and cleanups from Tejun.
- Fixup of a misplaced rq_complete() tracepoint from Hannes.
- Make blk_get_request() return error pointers, fixing up issues
where we NULL deref when a device goes bad or missing. From Joe
Lawrence.
- Prep work for drastically reducing the memory consumption of dm
devices from Junichi Nomura. This allows creating clone bio sets
without preallocating a lot of memory.
- Fix a blk-mq hang on certain combinations of queue depths and
hardware queues from me.
- Limit memory consumption for blk-mq devices for crash dump
scenarios and drivers that use crazy high depths (certain SCSI
shared tag setups). We now just use a single queue and limited
depth for that"
* 'for-3.18/core' of git://git.kernel.dk/linux-block: (58 commits)
block: Remove REQ_KERNEL
blk-mq: allocate cpumask on the home node
bio-integrity: remove the needless fail handle of bip_slab creating
block: include func name in __get_request prints
block: make blk_update_request print prefix match ratelimited prefix
blk-merge: don't compute bi_phys_segments from bi_vcnt for cloned bio
block: fix alignment_offset math that assumes io_min is a power-of-2
blk-mq: Make bt_clear_tag() easier to read
blk-mq: fix potential hang if rolling wakeup depth is too high
block: add bioset_create_nobvec()
block: use bio_clone_fast() in blk_rq_prep_clone()
block: misplaced rq_complete tracepoint
sd: Honor block layer integrity handling flags
block: Replace strnicmp with strncasecmp
block: Add T10 Protection Information functions
block: Don't merge requests if integrity flags differ
block: Integrity checksum flag
block: Relocate bio integrity flags
block: Add a disk flag to block integrity profile
block: Add prefix to block integrity profile flags
...
65 files changed, 1210 insertions, 1172 deletions
diff --git a/Documentation/ABI/testing/sysfs-block b/Documentation/ABI/testing/sysfs-block index 279da08f7541..8df003963d99 100644 --- a/Documentation/ABI/testing/sysfs-block +++ b/Documentation/ABI/testing/sysfs-block | |||
| @@ -53,6 +53,14 @@ Description: | |||
| 53 | 512 bytes of data. | 53 | 512 bytes of data. |
| 54 | 54 | ||
| 55 | 55 | ||
| 56 | What: /sys/block/<disk>/integrity/device_is_integrity_capable | ||
| 57 | Date: July 2014 | ||
| 58 | Contact: Martin K. Petersen <martin.petersen@oracle.com> | ||
| 59 | Description: | ||
| 60 | Indicates whether a storage device is capable of storing | ||
| 61 | integrity metadata. Set if the device is T10 PI-capable. | ||
| 62 | |||
| 63 | |||
| 56 | What: /sys/block/<disk>/integrity/write_generate | 64 | What: /sys/block/<disk>/integrity/write_generate |
| 57 | Date: June 2008 | 65 | Date: June 2008 |
| 58 | Contact: Martin K. Petersen <martin.petersen@oracle.com> | 66 | Contact: Martin K. Petersen <martin.petersen@oracle.com> |
diff --git a/Documentation/block/data-integrity.txt b/Documentation/block/data-integrity.txt index 2d735b0ae383..f56ec97f0d14 100644 --- a/Documentation/block/data-integrity.txt +++ b/Documentation/block/data-integrity.txt | |||
| @@ -129,11 +129,11 @@ interface for this is being worked on. | |||
| 129 | 4.1 BIO | 129 | 4.1 BIO |
| 130 | 130 | ||
| 131 | The data integrity patches add a new field to struct bio when | 131 | The data integrity patches add a new field to struct bio when |
| 132 | CONFIG_BLK_DEV_INTEGRITY is enabled. bio->bi_integrity is a pointer | 132 | CONFIG_BLK_DEV_INTEGRITY is enabled. bio_integrity(bio) returns a |
| 133 | to a struct bip which contains the bio integrity payload. Essentially | 133 | pointer to a struct bip which contains the bio integrity payload. |
| 134 | a bip is a trimmed down struct bio which holds a bio_vec containing | 134 | Essentially a bip is a trimmed down struct bio which holds a bio_vec |
| 135 | the integrity metadata and the required housekeeping information (bvec | 135 | containing the integrity metadata and the required housekeeping |
| 136 | pool, vector count, etc.) | 136 | information (bvec pool, vector count, etc.) |
| 137 | 137 | ||
| 138 | A kernel subsystem can enable data integrity protection on a bio by | 138 | A kernel subsystem can enable data integrity protection on a bio by |
| 139 | calling bio_integrity_alloc(bio). This will allocate and attach the | 139 | calling bio_integrity_alloc(bio). This will allocate and attach the |
| @@ -192,16 +192,6 @@ will require extra work due to the application tag. | |||
| 192 | supported by the block device. | 192 | supported by the block device. |
| 193 | 193 | ||
| 194 | 194 | ||
| 195 | int bdev_integrity_enabled(block_device, int rw); | ||
| 196 | |||
| 197 | bdev_integrity_enabled() will return 1 if the block device | ||
| 198 | supports integrity metadata transfer for the data direction | ||
| 199 | specified in 'rw'. | ||
| 200 | |||
| 201 | bdev_integrity_enabled() honors the write_generate and | ||
| 202 | read_verify flags in sysfs and will respond accordingly. | ||
| 203 | |||
| 204 | |||
| 205 | int bio_integrity_prep(bio); | 195 | int bio_integrity_prep(bio); |
| 206 | 196 | ||
| 207 | To generate IMD for WRITE and to set up buffers for READ, the | 197 | To generate IMD for WRITE and to set up buffers for READ, the |
| @@ -216,36 +206,6 @@ will require extra work due to the application tag. | |||
| 216 | bio_integrity_enabled() returned 1. | 206 | bio_integrity_enabled() returned 1. |
| 217 | 207 | ||
| 218 | 208 | ||
| 219 | int bio_integrity_tag_size(bio); | ||
| 220 | |||
| 221 | If the filesystem wants to use the application tag space it will | ||
| 222 | first have to find out how much storage space is available. | ||
| 223 | Because tag space is generally limited (usually 2 bytes per | ||
| 224 | sector regardless of sector size), the integrity framework | ||
| 225 | supports interleaving the information between the sectors in an | ||
| 226 | I/O. | ||
| 227 | |||
| 228 | Filesystems can call bio_integrity_tag_size(bio) to find out how | ||
| 229 | many bytes of storage are available for that particular bio. | ||
| 230 | |||
| 231 | Another option is bdev_get_tag_size(block_device) which will | ||
| 232 | return the number of available bytes per hardware sector. | ||
| 233 | |||
