From 4fb4de5401bf47557dcb00ef0011e4fea7e71037 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 15 Sep 2015 05:20:11 +0000 Subject: [PATCH] scst_vdisk: Kernel 2.6.30 build fix git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6502 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index f66e9cfdd..939cc3afc 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -5063,6 +5063,17 @@ out: return CMD_SUCCEEDED; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31) +/* + * See also patch "block: Export I/O topology for block devices and partitions" + * (commit ID c72758f33784). + */ +static inline unsigned int queue_physical_block_size(struct request_queue *q) +{ + return 4096; +} +#endif + static enum compl_status_e vdisk_exec_read_capacity16(struct vdisk_cmd_params *p) { struct scst_cmd *cmd = p->cmd;