Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754213AbZBAC4s (ORCPT ); Sat, 31 Jan 2009 21:56:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752572AbZBAC43 (ORCPT ); Sat, 31 Jan 2009 21:56:29 -0500 Received: from hera.kernel.org ([140.211.167.34]:34840 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752369AbZBAC42 (ORCPT ); Sat, 31 Jan 2009 21:56:28 -0500 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 Cc: Tejun Heo Subject: [PATCH 2/3] scsi: add scsi_device->alt_capacity Date: Sun, 1 Feb 2009 11:55:50 +0900 Message-Id: <1233456951-992-3-git-send-email-tj@kernel.org> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1233456951-992-1-git-send-email-tj@kernel.org> References: <1233456951-992-1-git-send-email-tj@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) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1445 Lines: 42 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; -- 1.6.0.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/