Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp176228ybh; Tue, 21 Jul 2020 20:09:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZ8I5SsM1bHgoq5SjYc4qEFInorTnobmbj1MjFTfvTVZcqc/zSn+3JKon9KujzQz87Jq7s X-Received: by 2002:a17:906:6852:: with SMTP id a18mr21162627ejs.348.1595387343410; Tue, 21 Jul 2020 20:09:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595387343; cv=none; d=google.com; s=arc-20160816; b=JHh1p20FfCkTm5Tv+eJ6FoR92Yh6y06oo9yQQwbdLzTtL5qInrac42jZz2GBmsrk0D 3HllQcN+IvyAQ2reca3rMh+r9kpedi+6BXbCZ0KIuVFlpe6Eih/woUcepc/0S5c3xCXk HSl6wOlmoOkcLzgsS4SriNX2vkTl9clCYQuvtDQHU+OjGgW5YAJ6SG0dnfbln8K4MIZa Ffbp0+MlYFd/DAiZJIUaml+KQUv2sw7YJ0MLI4g7xXTfiLZ3WkWAwzvuFQImHqesydRc Y6V62qaAkttOeBkhmr4xtnHs+rcBC0NpP3Td55FbMsBsqoL/tG82Yp0gJtfddS3JsB9u UsEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:in-reply-to:date:references :message-id:organization:from:subject:cc:to:dkim-signature; bh=01BXubBTTggiGme5bAGTUB+IF85y9Gt5mJRvOB950ac=; b=WvO7Tk6SPBgMiQKsNs4Q/iX8IetudhxLVkOgAlYcxQCvIU7uy8ckda0FW9/bs7RH7P 3YAtk6zmmYFz+T4K50tZ75AeqRIlbrGutAScmDnWQygLOK9OZS+3JhJcNrMRZB691X01 RGxmLW0e4f0ADTdLV8KPic8d2TykEJ+oVSW2sydTHI5y66lXjCOxlcPCUiMHuiD9mU9o NA1YNNoq+HI79j9VSddGDFaL32QXzM3P4K2asd3n/78hKnqqCxQnHk2AaYHMz5TJ8Mks fpUDBUU2auLTpq2zuAyHDGn5EBJVOZkwKi9ahDpc8Vv8WMbFDeRAOEOOpHx3QrUN5tvG 9IwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=Ert4ww4q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s27si13304222ejd.181.2020.07.21.20.08.39; Tue, 21 Jul 2020 20:09:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=Ert4ww4q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731897AbgGVDF4 (ORCPT + 99 others); Tue, 21 Jul 2020 23:05:56 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:35800 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731837AbgGVDF4 (ORCPT ); Tue, 21 Jul 2020 23:05:56 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06M2kTjo191446; Wed, 22 Jul 2020 02:55:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=to : cc : subject : from : message-id : references : date : in-reply-to : mime-version : content-type; s=corp-2020-01-29; bh=01BXubBTTggiGme5bAGTUB+IF85y9Gt5mJRvOB950ac=; b=Ert4ww4qHWKQEvayACm71Ls9WksxesZoOaQuXn1rooMPeky0Jrb3Txsjhfab7151opH+ +ba9k2HaDjO+952t0cWNI9dQ5WIUYlfWf21ewpsJhWYjcp3N0pcTJv58VOOiL/rw4ZJ6 iz8Tt3rOrUGPL774E+aOOMdpr1AJ4rPAQVYkJ8tuwulHR8WsPhlqGNhCTMtVwJGZI8Su HIBl9tQrmPPnenq/MvlY3LRHb4yzdgqsGtAjLjY176yMEaePZyb/9GiUf2AUdZxzL18+ SsUZlrUq97Om51YkiNCIV1uh+Ie3EhzxivvOSUhEO/vIHZqNevq4QRm6YstexeMtuoCD CA== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 32brgrgmt4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 22 Jul 2020 02:55:24 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06M2m6rK048369; Wed, 22 Jul 2020 02:55:24 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 32e9usdjva-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Jul 2020 02:55:23 +0000 Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 06M2tDDp005896; Wed, 22 Jul 2020 02:55:13 GMT Received: from ca-mkp.ca.oracle.com (/10.159.214.123) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 22 Jul 2020 02:55:13 +0000 To: Christoph Hellwig Cc: Maxim Levitsky , linux-kernel@vger.kernel.org, Keith Busch , Josef Bacik , "open list:BLOCK LAYER" , Sagi Grimberg , Jens Axboe , "open list:NVM EXPRESS DRIVER" , "open list:SCSI CDROM DRIVER" , Tejun Heo , Bart Van Assche , "Martin K. Petersen" , Damien Le Moal , Jason Wang , Maxim Levitsky , Stefan Hajnoczi , Colin Ian King , "Michael S. Tsirkin" , Paolo Bonzini , Ulf Hansson , Ajay Joshi , Ming Lei , "open list:SONY MEMORYSTICK SUBSYSTEM" , Satya Tangirala , "open list:NETWORK BLOCK DEVICE (NBD)" , Hou Tao , Jens Axboe , "open list:VIRTIO CORE AND NET DRIVERS" , "James E.J. Bottomley" , Alex Dubov Subject: Re: [PATCH 02/10] block: virtio-blk: check logical block size From: "Martin K. Petersen" Organization: Oracle Corporation Message-ID: References: <20200721105239.8270-1-mlevitsk@redhat.com> <20200721105239.8270-3-mlevitsk@redhat.com> <20200721151437.GB10620@lst.de> Date: Tue, 21 Jul 2020 22:55:07 -0400 In-Reply-To: <20200721151437.GB10620@lst.de> (Christoph Hellwig's message of "Tue, 21 Jul 2020 17:14:37 +0200") MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9689 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 phishscore=0 bulkscore=0 malwarescore=0 suspectscore=1 mlxlogscore=999 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007220017 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9689 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 spamscore=0 impostorscore=0 suspectscore=1 adultscore=0 clxscore=1011 mlxlogscore=999 priorityscore=1501 phishscore=0 lowpriorityscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007220017 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christoph, > Hmm, I wonder if we should simply add the check and warning to > blk_queue_logical_block_size and add an error in that case. Then > drivers only have to check the error return, which might add a lot > less boiler plate code. Yep, I agree. -- Martin K. Petersen Oracle Linux Engineering