summaryrefslogtreecommitdiffstats
path: root/block/blk-integrity.c
Commit message (Collapse)AuthorAgeFilesLines
* block: fix improper kobject release in blk_integrity_unregisterXiaotian Feng2009-07-281-0/+1
| | | | | | | | blk_integrity_unregister should use kobject_put to release the kobject, otherwise after bi is freed, memory of bi->kobj->name is leaked. Signed-off-by: Xiaotian Feng <dfeng@redhat.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* block: Do away with the notion of hardsect_sizeMartin K. Petersen2009-05-221-1/+1
| | | | | | | | | | | | | | Until now we have had a 1:1 mapping between storage device physical block size and the logical block sized used when addressing the device. With SATA 4KB drives coming out that will no longer be the case. The sector size will be 4KB but the logical block size will remain 512-bytes. Hence we need to distinguish between the physical block size and the logical ditto. This patch renames hardsect_size to logical_block_size. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* block: Allow empty integrity profileMartin K. Petersen2009-01-301-11/+14
| | | | | | | | | Allow a block device to allocate and register an integrity profile without providing a template. This allows DM to preallocate a profile to avoid deadlocks during table reconfiguration. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* block: Switch blk_integrity_compare from bdev to gendiskMartin K. Petersen2008-10-091-14/+14
| | | | | | | | | | | | The DM and MD integrity support now depends on being able to use gendisks instead of block_devices when comparing integrity profiles. Change function parameters accordingly. Also update comparison logic so that two NULL profiles are a valid configuration. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* block: Fix double put in blk_integrity_unregisterMartin K. Petersen2008-10-091-1/+1
| | | | | | | | | - kobject_del already puts the parent. - Set integrity profile to NULL to prevent stale data. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* block: implement and use {disk|part}_to_dev()Tejun Heo2008-10-091-2/+3
| | | | | | | | | | | | Implement {disk|part}_to_dev() and use them to access generic device instead of directly dereferencing {disk|part}->dev. To make sure no user is left behind, rename generic devices fields to __dev. This is in preparation of unifying partition 0 handling with other partitions. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* Add some block/ source files to the kernel-api docbook. Fix kernel-doc ↵Randy Dunlap2008-10-091-2/+2
| | | | | | | notation in them as needed. Fix changed function parameter names. Fix typos/spellos. In comments, change REQ_SPECIAL to REQ_TYPE_SPECIAL and REQ_BLOCK_PC to REQ_TYPE_BLOCK_PC. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* block: integrity flags can't use bit ops on unsigned shortJens Axboe2008-07-031-10/+7
| | | | | | | Just use normal open coded bit operations instead, they need not be atomic. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* block: integrity checkpatch cleanupsJens Axboe2008-07-031-3/+5
| | | | | | > 80 char lines and that sort of thing. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* block: Block layer data integrity supportMartin K. Petersen2008-07-031-0/+382
Some block devices support verifying the integrity of requests by way of checksums or other protection information that is submitted along with the I/O. This patch implements support for generating and verifying integrity metadata, as well as correctly merging, splitting and cloning bios and requests that have this extra information attached. See Documentation/block/data-integrity.txt for more information. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>