Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp532845rdb; Fri, 6 Oct 2023 10:22:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRouYR3djkMylZLPINW6uxb5OIqXwgncIo5lU3kT0AbRiVwf9YtcmrYUyGRr/fUxLKsOTw X-Received: by 2002:a17:902:7084:b0:1b6:649b:92cc with SMTP id z4-20020a170902708400b001b6649b92ccmr7250082plk.69.1696612954291; Fri, 06 Oct 2023 10:22:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696612954; cv=none; d=google.com; s=arc-20160816; b=OUC2QL75Ye3BRvF/V+d4aHMAA93oSlYYwTNnOOm/ih0lg3ZMDdwUiIZlm1Vanm1VFM qMZYR120b+C4EPnpLseBXdfhwPI93OUaVMAIOSBTXj7InHHocuP3khnReMHi3TozxO7t 56CX3310gWQqg3+kNJlsnAqb5u7IdO2FvzrsPhNsruBXMztv/dBP6YHr7ugQrygXoyL7 DnbBoqdoduGcRwnx05Lft1awokyLlPYJ7+Y44bKnDT5RLUZyY9AAZ2IzHkKWceNKn7NU xnOVu1Cb7z/VX6U6bJ2Cu30r/eAMOvPa10gmZog2Ej83WwWI89LoPdNW5u04GF6AU8fO ZnDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=UEjTiQOqZq/tiyoM37CeUZKubVviy0Hfhp5dRvbPE0c=; fh=G3Cb300pH8Ma8ms9cwr5vDSNR9WoxyVAmGM9ycPUyDY=; b=d1aylWuV+Dhta7uK4lPKJnVpPu3IQM7/Oj9fl9IseHFJtnD81dImkGxO5hPLYPcdEQ L7lGC2feasT3bVCzC/botIf7I2lAcd7tSp3GEewcNXY/22pLk4VSmnKSgiHVxtmhqZMN 5HRw2qU+MIe2gzyLoNsAWD2trl+1dvvA7ERtZPpdBWoOfVXOd2srev7vY0N9hFxlw2fd EQzXEOKODtCTkbCq8TbLvBQq2kuJgCqQbwb59GSXZXhPOahz3gmw7RFsIvVOWZ/VDsbs CHwzDWRfDzdC4jiCnOYM7oVir8U3huJjCI9fs7m/Xup46Kjk8JgFruK2ZBxKtNfCVE9Z wpxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id j17-20020a170902da9100b001c3a06b4fd7si4251407plx.561.2023.10.06.10.22.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 10:22:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 1B60A839DC26; Fri, 6 Oct 2023 10:22:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233018AbjJFRWR (ORCPT + 99 others); Fri, 6 Oct 2023 13:22:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233011AbjJFRWO (ORCPT ); Fri, 6 Oct 2023 13:22:14 -0400 Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D321DFB; Fri, 6 Oct 2023 10:22:12 -0700 (PDT) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-68bed2c786eso2040948b3a.0; Fri, 06 Oct 2023 10:22:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696612932; x=1697217732; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UEjTiQOqZq/tiyoM37CeUZKubVviy0Hfhp5dRvbPE0c=; b=YsNctJ0/shhjWo097m9U0+Axz93l4J8ST/Kf8XoiTiRB3dg1Vnna5RVXyySMpcjyfx mGN2Ml1p9qPflgFDEDeH9sAqTyFp4+AzWGhl4kUGC3L9icHYEYQB7WnYRnBLNXR0FOnm W5nIa6bVRuHecrHmavjx9azWy8TXSA75mJ7FwVrINtW0GfEz6IVVzXsRYgihvLITmm+m 8YyuamQcLUngN8XoG7XlSAwruJC8xwx3PDZtdYMaQ91sAgm0WZ6syqlya61aWiqw7e+5 9Y/95fbENTwSRe9geoSPOXhq7prhwKuzts7xYofCYgBvhQNw51uRXeLsGDXmqL7QIauq NC0w== X-Gm-Message-State: AOJu0YwwhP/Ngd9CyNIYC7TI1+B4xEx+vhpH4t29MdZ8I2DEzYe888J6 6iHb6CT6kZq0p4Vu+4CvSko= X-Received: by 2002:a05:6a20:12d6:b0:153:4ea6:d127 with SMTP id v22-20020a056a2012d600b001534ea6d127mr10425406pzg.18.1696612931891; Fri, 06 Oct 2023 10:22:11 -0700 (PDT) Received: from ?IPV6:2620:15c:211:201:ebdb:ae30:148c:2f33? ([2620:15c:211:201:ebdb:ae30:148c:2f33]) by smtp.gmail.com with ESMTPSA id q17-20020a62e111000000b0069327d0b491sm1719291pfh.195.2023.10.06.10.22.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Oct 2023 10:22:10 -0700 (PDT) Message-ID: <2bb2a4d0-4f1f-45f1-9196-f5d0d8ee1878@acm.org> Date: Fri, 6 Oct 2023 10:22:08 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 10/21] block: Add fops atomic write support Content-Language: en-US To: Dave Chinner Cc: "Martin K. Petersen" , John Garry , axboe@kernel.dk, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me, jejb@linux.ibm.com, djwong@kernel.org, viro@zeniv.linux.org.uk, brauner@kernel.org, chandan.babu@oracle.com, dchinner@redhat.com, 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-api@vger.kernel.org References: <5d26fa3b-ec34-bc39-ecfe-4616a04977ca@oracle.com> <34c08488-a288-45f9-a28f-a514a408541d@acm.org> From: Bart Van Assche In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 06 Oct 2023 10:22:31 -0700 (PDT) X-Spam-Level: ** On 10/5/23 21:31, Dave Chinner wrote: > Then I don't see what your concern is. > > Single sector writes are guaranteed atomic and have been for as long > as I've worked in this game. OTOH, multi-sector writes are not > guaranteed to be atomic - they can get torn on sector boundaries, but > the individual sectors within that write are guaranteed to be > all-or-nothing. > > Any hardware device that does not guarantee single sector write > atomicity (i.e. tears in the middle of a sector) is, by definition, > broken. And we all know that broken hardware means nothing in the > storage stack works as it should, so I just don't see what point you > are trying to make... Do you agree that the above implies that it is not useful in patch 01/21 of this series to track atomic_write_unit_min_bytes in the block layer nor to export this information to user space? The above implies that this parameter will always be equal to the logical block size. Writes to a single physical block happen atomically. If there are multiple logical blocks per physical block, the block device must serialize read/modify/write cycles internally. Thanks, Bart.