Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1200740rbb; Mon, 26 Feb 2024 01:48:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXBgNZ0AE0zCTkbFrCd2Spoh0k91eYww9rkEWo82UTpisAEqahXH3iNcuszIXCKL0roF4XLG5Cg2TVWqUpimvcdFesoiS6u959i57bqNA== X-Google-Smtp-Source: AGHT+IF4sMwpEYL4zEE7UnNO2jH5ty6ZjZdbIrZoTEZagLb/D72uhdvwNplnV5sB1ejDZF2gALsl X-Received: by 2002:ac8:5a8b:0:b0:42e:81a2:919 with SMTP id c11-20020ac85a8b000000b0042e81a20919mr3139819qtc.58.1708940908821; Mon, 26 Feb 2024 01:48:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708940908; cv=pass; d=google.com; s=arc-20160816; b=UbFFLp/GDGqlw1pQrUiX/6MunrIo/TC676VpQPJK8PPEVm7ven101ZCZiHIGKydy2J WNV9Ley6qkNg99InJByUBDm5U0CJiKJBIC+EUIi6M6Rb1mDrvPXgyJi96Wg2U+Zonzhy CcgjyZXR/HOteMC0m1HIOgzkZBmEY/ZUmz8D97uHLPXTfFrTIRNgn4QBnj1mfrB7NtTZ g6epW9cfv7PQXvGZzmRsbN99X9HA0UPnB4unj//RlYhSGu3slIrGJKHJNPmHdPQhiGpG QqPyGXWyL3CbP2VAZ1mNvFbzHKVoy73LOANPV41e47uh9XdYYrMPlbkfBlOuZr/sB5uM U+XQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=bkZF/uhLnyt4FCiUuL6SqgUagZoNjH2YpVQluDRw2FI=; fh=1DoaUWeXQrjv1HXZ2Oww5WxAgTOnzE5dtTIi5mp1IVM=; b=ZxRh0TpZKaw2Gj786+BpFRV0KriPCoejoUzxIyAjbR1o2b/Ykk88zm1gmXcBYRaP6E Sg/yi8n6+zVRZfJf5MCfsVD+1PXedSi4uBw3tGQg3b8JMrq8df46b0G6E6MeT7jentIu jkzeqc7n3DaWndcnPt1Du4mdV+cT4HpvamuyO/AN41N0YjjktjzxxQvfSzIo/2B0H4m+ rux6Jb2coz2DrZHKk5Gj1eLOYVs+9f0e1rclwYqsPi7p11/4VZ8UuoYzJytejJgcUDLO iOsTbEy7jmlAoZEd9YF69+awDNzO8LRYiPz8Cf8E76YLkNZ6c9lyMoD5+/0DhBUdzrs3 7EdQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=U7mFYZa5; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-81020-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81020-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v20-20020ac87294000000b0042e79196737si3812542qto.90.2024.02.26.01.48.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 01:48:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81020-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=U7mFYZa5; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-81020-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81020-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 938761C24BCE for ; Mon, 26 Feb 2024 09:48:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8CA2E1272D0; Mon, 26 Feb 2024 09:13:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="U7mFYZa5" Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) (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 3DCBA8595D; Mon, 26 Feb 2024 09:13:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708938812; cv=none; b=LA0oId/eqIJkrFqggjxECQ1CEs1YG1GueEpG7tZvhku/Ti2ouP9HBMbazkETWwbkTiDjzK9TEMutzEjkuAktYCT+m6XCDnXZz4ISgwt9vczi2n/u40NVMx6efK2yzwsCz7m/cALLleL/9JyYroFvLR6s4/TWDjht6f7JYGfE9/A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708938812; c=relaxed/simple; bh=pBx7QtVTQeysuDVR/d9EaEwj6txM0TCtiMfoxBmnmgw=; h=Date:Message-Id:From:To:Cc:Subject:In-Reply-To; b=hmR0E4MQDLNGjnD14lA6BQizbFziD6k1FBlQHBIKHBQHqrfxUuhIOQ2bhYhTYbdrEhqcBwo/BeY0yiHFahe+OinpW5/jGPf0/lPtwMsZvZDTOruKRNXgGM1/HEU8iyy65TW0VHSR6y197NsdUlgIWQMlUQhyq+RFjCPXJiUcRZU= 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=U7mFYZa5; arc=none smtp.client-ip=209.85.215.182 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 Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-5cedfc32250so2753635a12.0; Mon, 26 Feb 2024 01:13:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708938810; x=1709543610; darn=vger.kernel.org; h=in-reply-to:subject:cc:to:from:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=bkZF/uhLnyt4FCiUuL6SqgUagZoNjH2YpVQluDRw2FI=; b=U7mFYZa56jx+0arU0VPd/7I9FWm0bVpjTD3Bl2xUnmZrBnfVFX8gPYc0YOQ5FSxZYe XQmZI07fCaimsye7JQnLu6bk0dbFCESLlp+Fyo0uec4tpxe4G6d71LKsu9L//w30x/O4 +7z7iAwgvTiP4PxHcg1u7JnTEEIyAQzhtMv4DkED5/zCVHxDQ1nZVrVZzwXasdoL8pZB AcP7D1JOw5HpQkatu8zA8QBo1xGdjXZcLjRF68M2QXj2eQEuQWLv/67rcZ+zIpUP2lvG xp9TPJAyOXbEWeKmofSDGFP/qIwxXXPew/kLAtji/QT8hhZC8rRVAGBP5JWJxrkNJN/O hioA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708938810; x=1709543610; h=in-reply-to:subject:cc:to:from:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=bkZF/uhLnyt4FCiUuL6SqgUagZoNjH2YpVQluDRw2FI=; b=Yu94GRuJjGF54FMbWQEMkqbAkqidXyApgn0kVZMCovu9G78NMEfYK9yR0/YHRArCS0 jPRS3LgNHP2et+kTu2NjQqScxhizdEyhmEmeiNMPcHwekf0fLTn8rGMbpT5yHbmSPhy+ 5NtQn7DAWeiToexUra4MLaHnCSGWP7kIlSqYoMrXIDjIRChv186I0CZzCEqvx+3O05IQ PnP4OyL3NnpYVixSTYw+mbwfI1/v+lnQ+bIA0wpwSO6j7YpnwxmaTVM7i2gRPsLHZlwM c8fleIR2xXgcjwDqxmSIR9rKaz8R+PAxyC1AdBOzk0I/VFNlK6uqnzlsP2+THTJeU7kT WxQA== X-Forwarded-Encrypted: i=1; AJvYcCVhNwMxxoYF+Z9m/caDQ0UY8nP5aYjPllXi8a7Rzt7eXmGahoFabq+wLLz8gBWF4XiVZsWUT/LvwHQ3Ax88ct9WLKkCv/UuFF7VUewOeucH/YFyXGvyH+3pE2UF+8AYBe7MHjM3L/rDFDWXrFRdLySDVye013RgM3vCveH5ag9fiLTn+YUFYSSseivnTTxo+Qrbd2O2eNZ1HRNx0LESRcVO7vhFoemZk+lqvMtVabspq9xSro/B6uQG8QppX0mw X-Gm-Message-State: AOJu0YzbID3Y0jIwmBie/snANu8eTabg9QFQfVwTRbYKzO5yvCIWjsjv titGk0PMvSQbvM+uglBxmm+mgCwu+tx/R1leVPaCYX1mtLQHf0G8 X-Received: by 2002:a17:90a:6f01:b0:299:75aa:8949 with SMTP id d1-20020a17090a6f0100b0029975aa8949mr3725385pjk.22.1708938810286; Mon, 26 Feb 2024 01:13:30 -0800 (PST) Received: from dw-tp ([129.41.58.19]) by smtp.gmail.com with ESMTPSA id r2-20020a170902c60200b001dc8f8730f3sm2491163plr.285.2024.02.26.01.13.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 01:13:29 -0800 (PST) Date: Mon, 26 Feb 2024 14:43:21 +0530 Message-Id: <878r371tce.fsf@doe.com> From: Ritesh Harjani (IBM) To: John Garry , axboe@kernel.dk, kbusch@kernel.org, hch@lst.de, 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 Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-fsdevel@vger.kernel.org, tytso@mit.edu, jbongio@google.com, linux-scsi@vger.kernel.org, ojaswin@linux.ibm.com, linux-aio@kvack.org, linux-btrfs@vger.kernel.org, io-uring@vger.kernel.org, nilay@linux.ibm.com, Prasad Singamsetty Subject: Re: [PATCH v4 03/11] fs: Initial atomic write support In-Reply-To: <07537871-ab4e-4629-86ff-5559aa88ad17@oracle.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: John Garry writes: > On 24/02/2024 18:20, Ritesh Harjani (IBM) wrote: >>>> Helper function atomic_write_valid() can be used by FSes to verify >>>> compliant writes. >> Minor nit. >> maybe generic_atomic_write_valid()? > > Having "generic" in the name implies that there are other ways in which > we can check if an atomic write is valid, but really this function > should be good to use in scenarios so far considered. It means individual FS can call in a generic atomic write validation helper instead of implementing of their own. Hence generic_atomic_write_valid(). So for e.g. blkdev_atomic_write_valid() function and maybe iomap (or ext4 or xfs) can use a generic_atomic_write_valid() helper routine to validate an atomic write request. -ritesh