aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2015-10-21 13:19:38 -0400
committerJens Axboe <axboe@fb.com>2015-10-21 14:42:39 -0600
commita48f041d91bf1aee599fa2adb53b780ed20c2ee5 (patch)
treec1cb66965f987d782c5c6bc63826d2250caf8d18 /include/linux/blkdev.h
parentblock: Consolidate static integrity profile properties (diff)
downloadlinux-dev-a48f041d91bf1aee599fa2adb53b780ed20c2ee5.tar.xz
linux-dev-a48f041d91bf1aee599fa2adb53b780ed20c2ee5.zip
block: Reduce the size of struct blk_integrity
The per-device properties in the blk_integrity structure were previously unsigned short. However, most of the values fit inside a char. The only exception is the data interval size and we can work around that by storing it as a power of two. This cuts the size of the dynamic portion of blk_integrity in half. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Reported-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index f36c6476f1c7..4f1968f15e30 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1470,10 +1470,10 @@ struct blk_integrity_profile {
struct blk_integrity {
struct blk_integrity_profile *profile;
- unsigned short flags;
- unsigned short tuple_size;
- unsigned short interval;
- unsigned short tag_size;
+ unsigned char flags;
+ unsigned char tuple_size;
+ unsigned char interval_exp;
+ unsigned char tag_size;
};
extern bool blk_integrity_is_initialized(struct gendisk *);