From patchwork Thu Dec 28 07:55:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 1880718 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=KM8f7B2m; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T116W4zzwz20Rq for ; Thu, 28 Dec 2023 18:56:19 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YnZwpgW+A+U7sHEyEvT+XJdmhYJP2QlSIUrM4OF+rrI=; b=KM8f7B2mXNjGL8HfDbPDH1XT2B qLa/1udG1LfSS3rNee5TvmkaoKJoBRslqLHZm75ZhORb5XBD306svLT9EOgoJWEwXa9SizTUztpRr EGNoxzkDK4C5euCfNNFfmAerAdLqDUowAEcB5nlwVYgg/+X6x+zqPk90ok5MkJ+Gpvqt5oQf06rae HmWddgUl59j3RBK+1gyYmPEoDUAHrGb4JSpDPO6myZXwCAMhbGBUp1w2w4+wxtK1hJyvo+itiyVp+ M9lXdRNfQm1uvwwkInirfU8wS3/7oQCX8oXxxdcrbnYGVUxbJWE8XCK3q2OuqR9GnEOrCP+dvjMpV L/BMrJOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rIlFW-00GMvq-2o; Thu, 28 Dec 2023 07:56:14 +0000 Received: from 213-147-167-209.nat.highway.webapn.at ([213.147.167.209] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1rIlFU-00GMtf-1k; Thu, 28 Dec 2023 07:56:13 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Richard Weinberger , Anton Ivanov , Josef Bacik , Minchan Kim , Sergey Senozhatsky , Coly Li , Miquel Raynal , Vignesh Raghavendra , linux-um@lists.infradead.org, linux-block@vger.kernel.org, nbd@other.debian.org, linux-bcache@vger.kernel.org, linux-mtd@lists.infradead.org Subject: [PATCH 4/9] ubd: use the default discard granularity Date: Thu, 28 Dec 2023 07:55:40 +0000 Message-Id: <20231228075545.362768-5-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231228075545.362768-1-hch@lst.de> References: <20231228075545.362768-1-hch@lst.de> MIME-Version: 1.0 X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The discard granularity now defaults to a single sector, so don't set that value explicitly. Signed-off-by: Christoph Hellwig Acked-by: Richard Weinberger --- arch/um/drivers/ubd_kern.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 50206feac577d5..92ee2697ff3984 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c @@ -798,7 +798,6 @@ static int ubd_open_dev(struct ubd *ubd_dev) ubd_dev->cow.fd = err; } if (ubd_dev->no_trim == 0) { - ubd_dev->queue->limits.discard_granularity = SECTOR_SIZE; blk_queue_max_discard_sectors(ubd_dev->queue, UBD_MAX_REQUEST); blk_queue_max_write_zeroes_sectors(ubd_dev->queue, UBD_MAX_REQUEST); }