Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp399845rdh; Tue, 13 Feb 2024 23:27:02 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUgq+wBxAeXPpjdLbxy/Nf/FRAXB4EPwPqYYgi/HnG2DQO/1lmIKXcoDSqYMRIP6Vlwz90yHMNn5+Qn7OBtle90DtYmCrLcLENYkuIIlA== X-Google-Smtp-Source: AGHT+IGjKuJyfqd7LMPzr65qhhYr0Q9L0+BJLpuouwrnZ+jAuOkcOMdgZuw9bD6GhXHV5yipbGlh X-Received: by 2002:a17:906:f8ce:b0:a38:3f63:1ae4 with SMTP id lh14-20020a170906f8ce00b00a383f631ae4mr1035734ejb.27.1707895621978; Tue, 13 Feb 2024 23:27:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707895621; cv=pass; d=google.com; s=arc-20160816; b=aJ03y3VUKtLOWgs7qjAMFlCAqOCBn5h96ZSMUlWkTqgsaL2xr0VKGR6BVX8yJwhKba X/CJiEtdyJOcDgu6WT0LjpgUxD8nMcgnFC7dAQCM3fkEUvl2np5rwXg/GGUeXPRZ4mpc 8Yl1lTkrnZrWTpSXxE3RZXZCFZKqvDk0B29omwGeVKK5RQIw996RgvI1jQPx5VHniIWJ UdRHnsxODjuJERpGCN0a5LDBQQUMOjt8o4vAr4CIfmY8ejee3+q3qhNKVotTN9qAPFzf VRsBBa2sNKczz6JzCwKnLSdzlDNjOS+AVBHiUGW4kxSlkK4HNukqO+BwZA/mxDS+Jr1S DkLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=+RJUMaQwvclUiG3Yzr4BSVgkgBJgMpbFKrfpIupa2sI=; fh=4tEh+Hk+ClmJzf/ZnWHPKA6yXFlQXJ9XlrAdpFccVaw=; b=fSYMzA4V3gSvI9Fem2it8d2wl7AvmqiGnznh7KTAB7PNdglQRcb7nUZwcQdUsKUBOg bW58NCXFRq1WrjHqWEeLlhLz6FZ0Hr3tfv6VaKiVeWExr3FZhYIsv0xyIAhNWwcHxfyN T7XbUDWULLhHP/SK08C8TG5SIU30j5G+QpEjhHBqQ3KF22+H2abHv20LXS5nnsAh7mrQ HWbPCMOxeZRAVRG3szvsyCUz0zHzBUgb9bXJ0s56ENG+4wk1PM302Dt0qH6VCvsZjeI7 o2gQW4sdzGfpcHB6PXqblZBUIKX7myblWf33c0WeoURtJj+bfZbSgkgFBbeJsxDbjnDX pEPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-64833-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64833-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCXCEp5LHLcGAWfp6/y8xEp7okl8nvblWE9iZLIwHkTJddJ8uKFIuiwstjANwO0h9Hnx1p7uZyZQFkRGMWuo0Skv/UrRGjjxzcjR5bNHYA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ch25-20020a170906c2d900b00a385c0b0a49si1949581ejb.836.2024.02.13.23.27.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 23:27:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64833-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-64833-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64833-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5510C1F26229 for ; Wed, 14 Feb 2024 07:26:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 320C1125AD; Wed, 14 Feb 2024 07:26:24 +0000 (UTC) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CADA0111B5; Wed, 14 Feb 2024 07:26:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707895583; cv=none; b=FS+9VmPhUWs7gCmnH2qYD0xpxMMfobVgu9+VyjSCVgkW7Z5BQGw5cA+BHCbi70zvrFPplF/EO11ajnfRx/UiRJ+g37JLzmrwYwhyw57ZyXd88BtWZsuwWfspU8zl7AoNMl1L9DtELgXHvNUmw4Mns8MZxjnoIOZT3uf7vrJu+gY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707895583; c=relaxed/simple; bh=juFBNMubKn9gMBWcEFowWNCBKZXHfuauU6CXERbbJHM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=h2s4VZ57vLD1VvTuk7DNMNfO6ap1bur2+lZeaVv7Hp26aT0iC48v3QiFym8GQ5l3qzIW5ZHmRZKav13RvhDdH+WnRvmElqjZ9c7mS3PgclahMB2QSA1emADCOM6HvmhLgYnv2hExCGAvRhNepfNWb43a0LDy8U/rqWXi/dVx1hQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 54133227A87; Wed, 14 Feb 2024 08:26:10 +0100 (CET) Date: Wed, 14 Feb 2024 08:26:10 +0100 From: Christoph Hellwig To: John Garry Cc: Christoph Hellwig , axboe@kernel.dk, kbusch@kernel.org, sagi@grimberg.me, jejb@linux.ibm.com, martin.petersen@oracle.com, djwong@kernel.org, viro@zeniv.linux.org.uk, brauner@kernel.org, dchinner@redhat.com, jack@suse.cz, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, tytso@mit.edu, jbongio@google.com, linux-scsi@vger.kernel.org, ming.lei@redhat.com, ojaswin@linux.ibm.com, bvanassche@acm.org Subject: Re: [PATCH v3 07/15] block: Limit atomic write IO size according to atomic_write_max_sectors Message-ID: <20240214072610.GA9881@lst.de> References: <20240124113841.31824-1-john.g.garry@oracle.com> <20240124113841.31824-8-john.g.garry@oracle.com> <20240213062620.GD23128@lst.de> <749e8de5-8bbb-4fb5-a0c0-82937a9dfa38@oracle.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <749e8de5-8bbb-4fb5-a0c0-82937a9dfa38@oracle.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Tue, Feb 13, 2024 at 08:15:08AM +0000, John Garry wrote: > I'm note sure if that would be better in the fops.c patch (or not added) We'll need the partition check. If you want to get fancy you could also add the atomic boundary offset thing there as a partitions would make devices with that "feature" useful again, although I'd prefer to only deal with that if the need actually arises. The right place is in the core infrastructure, the bdev patch is just a user of the block infrastructure. bdev really are just another file system and a consumer of the block layer APIs.