From patchwork Sun Feb 1 02:55:50 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 4944 Received: from hormel.redhat.com (hormel1.redhat.com [209.132.177.33]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n112uViO018752 for ; Sun, 1 Feb 2009 02:56:31 GMT Received: from listman.util.phx.redhat.com (listman.util.phx.redhat.com [10.8.4.110]) by hormel.redhat.com (Postfix) with ESMTP id 990328E0F18; Sat, 31 Jan 2009 21:56:30 -0500 (EST) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id n112uSuu004255 for ; Sat, 31 Jan 2009 21:56:28 -0500 Received: from mx3.redhat.com (mx3.redhat.com [172.16.48.32]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n112uTun004521; Sat, 31 Jan 2009 21:56:29 -0500 Received: from hera.kernel.org (hera.kernel.org [140.211.167.34]) by mx3.redhat.com (8.13.8/8.13.8) with ESMTP id n112uDNO008456; Sat, 31 Jan 2009 21:56:14 -0500 Received: from htj.dyndns.org (IDENT:U2FsdGVkX1+vWHxyl2BOvm9rFanKFJxuIfUb+V3yUkM@localhost [127.0.0.1]) by hera.kernel.org (8.14.2/8.14.2) with ESMTP id n112tuwS027993 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 1 Feb 2009 02:56:00 GMT Received: by htj.dyndns.org (Postfix, from userid 10000) id 5C21F4094A7B8; Sun, 1 Feb 2009 11:55:51 +0900 (KST) From: Tejun Heo To: jeff@garzik.org, linux-ide@vger.kernel.org, jens.axboe@oracle.com, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, James.Bottomley@HansenPartnership.com, Mauelshagen@redhat.com, dm-devel@redhat.com Date: Sun, 1 Feb 2009 11:55:50 +0900 Message-Id: <1233456951-992-3-git-send-email-tj@kernel.org> In-Reply-To: <1233456951-992-1-git-send-email-tj@kernel.org> References: <1233456951-992-1-git-send-email-tj@kernel.org> X-Virus-Scanned: ClamAV 0.93.3/8932/Sat Jan 31 23:12:16 2009 on hera.kernel.org X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hera.kernel.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (hera.kernel.org [127.0.0.1]); Sun, 01 Feb 2009 02:56:03 +0000 (UTC) X-RedHat-Spam-Score: -3.932 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-Scanned-By: MIMEDefang 2.63 on 172.16.48.32 X-loop: dm-devel@redhat.com Cc: Tejun Heo Subject: [dm-devel] [PATCH 2/3] scsi: add scsi_device->alt_capacity X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.5 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com Add scsi_device->alt_capacity and let sd pass it over to genhd. This is to allow SCSI low level drivers to configure alt_capacity via slave_configure(). Signed-off-by: Tejun Heo --- drivers/scsi/sd.c | 1 + include/scsi/scsi_device.h | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index d57566b..b83d850 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1751,6 +1751,7 @@ static int sd_revalidate_disk(struct gendisk *disk) blk_queue_ordered(sdkp->disk->queue, ordered, sd_prepare_flush); set_capacity(disk, sdkp->capacity); + set_alt_capacity(disk, sdp->alt_capacity); kfree(buffer); out: diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 01a4c58..55be54a 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -92,6 +92,7 @@ struct scsi_device { unsigned int manufacturer; /* Manufacturer of device, for using * vendor-specific cmd's */ unsigned sector_size; /* size in bytes */ + size_t alt_capacity; /* alternative capacity, used by sd */ void *hostdata; /* available to low-level driver */ char type;