OSDN Git Service

nvme-fabrics: check more command sizes
authorMinwoo Im <minwoo.im.dev@gmail.com>
Thu, 11 Apr 2019 15:18:31 +0000 (00:18 +0900)
committerChristoph Hellwig <hch@lst.de>
Wed, 1 May 2019 13:17:27 +0000 (09:17 -0400)
struct common_command provides a common structure for NVMe-oF command
format.  It also needs to be checked for unintended size growth.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fabrics.c

index d4cb826..592d1e6 100644 (file)
@@ -1188,6 +1188,7 @@ static void __exit nvmf_exit(void)
        class_destroy(nvmf_class);
        nvmf_host_put(nvmf_default_host);
 
+       BUILD_BUG_ON(sizeof(struct nvmf_common_command) != 64);
        BUILD_BUG_ON(sizeof(struct nvmf_connect_command) != 64);
        BUILD_BUG_ON(sizeof(struct nvmf_property_get_command) != 64);
        BUILD_BUG_ON(sizeof(struct nvmf_property_set_command) != 64);