From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7184E328629 for ; Wed, 3 Dec 2025 23:08:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764803293; cv=none; b=Nc/6e62GGlvCA0jUKTWXm8oc/QTYNUqjznfAISSDsfo6NfK8bVGVHt5ZPOFbWl79XS8NWLmuC3gJCwVDZ5L7pSt8moLPWSZIyiUwoD1pHpweelPABG5HfvuWPAO6+K9dqnMXpybVsqnXjhJOHMBtTDVPo33EN//BLWPEZeomviA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764803293; c=relaxed/simple; bh=mJKAm8M9p0GWE9hhIEfJBwFPkc3jhYYYYEtVCEWTXFw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d/9UVsukcMKqya/Zl9DBEP6uyRnkF0np3fBzGJ+/M8WQS4cTkohmFV6bTQsLfB/unKFwhxAhApvSfYhuJ+ozx9ylGyEeX12Kk97GBE89u/ZhxpNWh0V3rzB3weUfxxUi9QloQAlLx/G24422UqCpITev+ORYGzrEoZmPxroGkqw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=joE4DYVg; arc=none smtp.client-ip=209.85.210.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="joE4DYVg" Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-7b86e0d9615so424550b3a.0 for ; Wed, 03 Dec 2025 15:08:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764803292; x=1765408092; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FEVPAlc5svJuUSmKl0RqG7MP0hET++VtFf6fF+uMCAw=; b=joE4DYVgR6MX0EmVe9Bco355xXmdBtnH5SIAX8AD3ubH4DT81/e45wFw0N9QxsUuMw oZCJjiSjEqBxdFWmNCXGj4cMHmpv2K0EvaNxvLFYJWM4zYXWDqzEa0YE8RkzCDKXhgTh ywPL0nWKWPdCGUXS7DeMmwmXR1A108FcP7NIi5XZLvSGr+2WtgNJ+PLKSycYZw5SsvPL fY94niFw5IyRwAevNI53UYRUZ239ia5jP4QPlKvlmZdQ6FKphav7HUh4j0D1xDqfqeqL DWeocUHEh+7wU6NQHksrxTqiZA0UZUL1dlI0B8alI/p0TNQgfrvhjoecPuisozH1RiCf uoSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764803292; x=1765408092; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=FEVPAlc5svJuUSmKl0RqG7MP0hET++VtFf6fF+uMCAw=; b=RBOoZVZ5F++khDijei5hxVBXkRrN6YegzMxdhssj3e2IuEZKjnS/mE/mtZwwuE5aTy ynfMK29uyphIkpUYfHPuz17xChz9KEcoeYqnzeod4NA7AgpMg3o0fGF5IJGLD094j4wK 7sGzoQIqSY8bDLOkEgSX89f46UHMv55NTUj4/AdqGieRrlose1ETFyjFPAF6fNJ6Epf3 5lvIrvzYrZcUXcV8KkNIAhlO5G+ZfkreuesKp/Pf96hJCDZmPc2Wt2vLofkdCI0sMscb miJpiOdTKkNrwB/h5WKcsOH32CabKC+wx/YU5S+bPIoArRzZDKgWajk5FEt97Hfl4G/f iebA== X-Gm-Message-State: AOJu0Yw4jk2irr+1r785+3RtIJvWLSNFhretOuyiHTs9lIBo1Qlfka8v ZBpILk3bTD4WApbYxpGlsqYN2l6W28oBfumii1OVfcyKN3w2ItLepveK X-Gm-Gg: ASbGncselI/ii1h4g3RSQmMYiSEcrt3RFYkLqceROSWlvlxfGk9eaUHTpClvNN+kdyU ginBZnDefnvT+k/4GWFZt1HMePnZ9QH3U9JN4TR1BvLCCFfr4vy8qMTIK/9lZOccumR8hoOmxsT SFZOcNtKtx5IZyAkPVHNqwuJ6qet7oMcqFKa6vfx8IACF6/zQmIdeRNBUgK6vUchmX3l8qX8tJu TLOvi4w1wiyJzcETS1O2Oyy0xHDWzhll8FQZp7Pbfy3glaEXHHgE4sO8iAAcadkPW6kEOHSU5XV 07xvHI6n2vOxt+CJmOukdmdGLpBj1SGpWBapgcEY65/qWsEoA1yTpQp+vnEoV7JnK5rDie0V3bH TxBPKLOgClZjnJKPPJeRnHqyBiV7apqF8L3GZt+MxnoQJndv7UklihIGlqFfPOjw0hVjXCTiO4E 64htj1SA60EgD/wBQ466c085RzH0/apeE= X-Google-Smtp-Source: AGHT+IF/KjPtW0QhOpY/Y+ZIh0GhdahqnUzws++tNEX3tQQLOVtZ6KA0TUVPAjq32YWtmRXo8qA3FQ== X-Received: by 2002:a05:7022:ea46:10b0:119:e56b:9590 with SMTP id a92af1059eb24-11df0c740b1mr2585921c88.21.1764803291677; Wed, 03 Dec 2025 15:08:11 -0800 (PST) Received: from deb-101020-bm01.dtc.local ([149.97.161.244]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-11dcb049cdesm91535333c88.8.2025.12.03.15.08.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Dec 2025 15:08:11 -0800 (PST) From: sw.prabhu6@gmail.com To: James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, bvanassche@acm.org Cc: linux-kernel@vger.kernel.org, mcgrof@kernel.org, kernel@pankajraghav.com, Swarna Prabhu , Swarna Prabhu Subject: [RFC v2 2/2] scsi: scsi_debug: enable sdebug_sector_size > PAGE_SIZE Date: Wed, 3 Dec 2025 23:05:47 +0000 Message-ID: <20251203230546.1275683-3-sw.prabhu6@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251203230546.1275683-2-sw.prabhu6@gmail.com> References: <20251203230546.1275683-2-sw.prabhu6@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Swarna Prabhu Now that block layer can support block size > PAGE_SIZE and the issue with WRITE SAME(16) and WRITE SAME(10) are fixed for sector sizes > PAGE_SIZE, enable sdebug_sector_size > PAGE_SIZE in scsi_debug. Signed-off-by: Swarna Prabhu --- drivers/scsi/scsi_debug.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index b2ab97be5db3..b5839e62d3bb 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -8459,13 +8459,8 @@ static int __init scsi_debug_init(void) } else if (sdebug_ndelay > 0) sdebug_jdelay = JDELAY_OVERRIDDEN; - switch (sdebug_sector_size) { - case 512: - case 1024: - case 2048: - case 4096: - break; - default: + if (sdebug_sector_size < 512 || sdebug_sector_size > BLK_MAX_BLOCK_SIZE || + !is_power_of_2(sdebug_sector_size)) { pr_err("invalid sector_size %d\n", sdebug_sector_size); return -EINVAL; } -- 2.51.0