Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp2093044lqg; Mon, 4 Mar 2024 12:35:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUW94EMSgT5jM0DtdwRsJrYN+9YYL9uqzYI7Gz5LujE/7MzEIQ/cD1TH0vpqp7Y/giuaB7qh4d1dgYCQMNEDPljXS/wkHmPqalZ13vaTA== X-Google-Smtp-Source: AGHT+IEaYSSKrl4d6349C+edoK95e60D0ZkwCHoW6g3JsxV00nGi6ndHOySdlyAa1C79mD8SCvcM X-Received: by 2002:a17:906:3749:b0:a45:8bf3:6ec6 with SMTP id e9-20020a170906374900b00a458bf36ec6mr970208ejc.25.1709584512282; Mon, 04 Mar 2024 12:35:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709584512; cv=pass; d=google.com; s=arc-20160816; b=uWiv4d5ls7f49dsR66xSH371II6xI3K0Llgnj4mXdLBDiGaVTtDi7tApR7dMcsWWAT BLurLVkOR2peM+ibPedXgofaJMX9zQDUfXapCdSBe2Qs1KZRmmedUy3M5FU+Y0onaVDA utMEibxyWNDfcYqaFw77YAOWTQhk3wP8EYxrlwOFKy+smAzIRJCp648o06D41lKEgzWf VOY38HRJN5sh1mCJ+i7iOEnG4ZWQkAik3SwBsqSklmTHXrWWze17041pGNC6zA9kPsOD zoYvngs/5ihqVpSHCpguSXNpxsy7QIjw/ezI9Bds2kTzhrRty09U3R478HhoQJZn4vbA KdHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=J3svLmy1FnHxrRqHl7m9l07geCiZuJFO6G7O3eYWFJA=; fh=Xna2Vhm5zwVJPTAxeeb4loEgORhUwivS3k2eeC700N8=; b=Q7MXXoKgbnkaWoneeXAKNQtTVbriDraXGQRGUh93eYL9UK6NjW5zTSXmhhgA6bfZla yoQNNckjxzqahmBpB0uNwuZAxpH3mrVV23GhKu7oB/41DH6/H9nwZGdcP9SGRrZuna+d wdUkN9+XwbNL7N1jLUy0RPpt7S2jjQIjJXoL6RXSrFj7B2GrqHX3mZWp/1f67XYJPDiP zuqqNdzhqaefFfoRKWd1cFBS1O8+NJsxg1KMoCfp5TQ3G3WUVLUOGYTJ1SplCNsm3bGd W910Vw2bUmGZBQf7j4zRoeGPXCAIMfStzggRUfQahyLxI/0JNjDxd/XBkiRz92xH/CBt 47sg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fromorbit-com.20230601.gappssmtp.com header.s=20230601 header.b=YyL723Uz; arc=pass (i=1 spf=pass spfdomain=fromorbit.com dkim=pass dkdomain=fromorbit-com.20230601.gappssmtp.com dmarc=pass fromdomain=fromorbit.com); spf=pass (google.com: domain of linux-ext4+bounces-1504-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1504-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=fromorbit.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id dt21-20020a170907729500b00a430b3193dcsi4227419ejc.663.2024.03.04.12.35.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 12:35:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1504-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; dkim=pass header.i=@fromorbit-com.20230601.gappssmtp.com header.s=20230601 header.b=YyL723Uz; arc=pass (i=1 spf=pass spfdomain=fromorbit.com dkim=pass dkdomain=fromorbit-com.20230601.gappssmtp.com dmarc=pass fromdomain=fromorbit.com); spf=pass (google.com: domain of linux-ext4+bounces-1504-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1504-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=fromorbit.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 01E911F2295A for ; Mon, 4 Mar 2024 20:35:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 077CE8F6F; Mon, 4 Mar 2024 20:34:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fromorbit-com.20230601.gappssmtp.com header.i=@fromorbit-com.20230601.gappssmtp.com header.b="YyL723Uz" X-Original-To: linux-ext4@vger.kernel.org Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (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 0BECCFBFC for ; Mon, 4 Mar 2024 20:34:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709584496; cv=none; b=YzM/MSdUO04KCcodMpnRWL+c7GZf/JaRu/AcrUz3W+iBi3kpqfiu1Q60LOc7p0Emh3YvpIBVJRs6aabiQpJKA3W102OM8SrxuLox5DmTFfbG/tcmVQS+D1wV45IYW/LfIWO1camLkjSoN3qrvfECNKAI8T1lsBRuReTusXHNn18= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709584496; c=relaxed/simple; bh=AISBuvAxGxZxAfFf+xblXWDfNNbPWO15tG1J3kLkqyY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MFBjhJEb8HjIY//fuZ4KAmetCljgOYmC3lipw546W91lz0jW4kD5GG0Oca7IEDlFW+D7nBouT+z1mPlwZnP2YouXlinw5l+yaYgCbE23/ANDkM6gVrfstVzT4Lkj9u2CfsnDLkwtXJGwh7CsoQroY7FzqAwmYV3qCP7e+fZS7fQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fromorbit.com; spf=pass smtp.mailfrom=fromorbit.com; dkim=pass (2048-bit key) header.d=fromorbit-com.20230601.gappssmtp.com header.i=@fromorbit-com.20230601.gappssmtp.com header.b=YyL723Uz; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fromorbit.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fromorbit.com Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1dca160163dso47882555ad.3 for ; Mon, 04 Mar 2024 12:34:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fromorbit-com.20230601.gappssmtp.com; s=20230601; t=1709584494; x=1710189294; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=J3svLmy1FnHxrRqHl7m9l07geCiZuJFO6G7O3eYWFJA=; b=YyL723UzjdzfDYC9NIe+ivSJwK0ndfWyuzDHme66MRo0y5FKFRdwgcfeQ78ve0qNYH rhw2+T9QFwc1UsslNWfoLiCAyH/U06y8roB7lopXBzccdQk9xXId2LxdwulobkLLEyCu AnMfsOoYgk1bAeBjr2AAXHvuGcqN3AySvVFL8PUx4IoVgNZ9saySd2tWkmJsLAL4SVCZ 5cLYM0Q58Gf66pXHf1GjjYs/c+p9zzFb8aigGUqNrRp6jbjv8Xot6eC8qBrMuBM37Jbq j6Y8hrehUM5j43ookhsBGw/f+bkpOJ7Pdrayk+IzFzAdLK5KdkeD/DUinrWed7txOd05 77KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709584494; x=1710189294; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=J3svLmy1FnHxrRqHl7m9l07geCiZuJFO6G7O3eYWFJA=; b=eWS48Iyn0EiC/YOuMsWKh5bJ+WeETIxruopPh5QMI1t4JNTG3db/wih/Z+NVwglxl1 iCRvEkC6JNQQ/fOMYNuS35Vr4QLuI3EfuDPhRXALYdd80CvxKnmorA6BZrH+cHjPljoE 5Tkk0KLujz7ees+XPDFvq0yq9NETYG8EgQ9iVRe8pdOSUvlG0pDckiWpefgJyvogW8QB I3iPoyJrVLn1d+0r654pFP6z6StiXlts5+aBmhNi3Zo374ZbsWeUf3/PMx7FGormr1+c dQdY8eBALDq1+pBbAhntO7bSSKfWAMQL0DZ96FAqvsHBKLpu3dKoQSCOLxhl4y6QO+CZ 2ybg== X-Forwarded-Encrypted: i=1; AJvYcCV7oE0OvDuoTt/ly+HSv370XeIcg5LnfxHp+o1/TdUrz6St4Rmw7ehhMiWnyuHl6GDg1gaLyoS8mz/3En19RisUm4CzkbNBO46osQ== X-Gm-Message-State: AOJu0Yw8X70l5nnufydTRiYzJmXulqTwge0GphAG9qodnZ2ewZKWNGx9 5YtNSW+ygeKJrrB5Vhl5KhSkqk8SzIiUT4iy91VwECUuOGqVSoopoKiM35MEvlM= X-Received: by 2002:a17:902:e744:b0:1dc:d722:4c08 with SMTP id p4-20020a170902e74400b001dcd7224c08mr14797300plf.5.1709584494412; Mon, 04 Mar 2024 12:34:54 -0800 (PST) Received: from dread.disaster.area (pa49-181-192-230.pa.nsw.optusnet.com.au. [49.181.192.230]) by smtp.gmail.com with ESMTPSA id im15-20020a170902bb0f00b001dcfae01c63sm5126209plb.43.2024.03.04.12.34.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 12:34:53 -0800 (PST) Received: from dave by dread.disaster.area with local (Exim 4.96) (envelope-from ) id 1rhF1O-00F3YH-2O; Tue, 05 Mar 2024 07:34:50 +1100 Date: Tue, 5 Mar 2024 07:34:50 +1100 From: Dave Chinner To: "Ritesh Harjani (IBM)" Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, Ojaswin Mujoo , Jan Kara , Theodore Ts'o , Matthew Wilcox , "Darrick J . Wong" , Luis Chamberlain , John Garry , linux-kernel@vger.kernel.org Subject: Re: [RFC 6/8] ext4: Add an inode flag for atomic writes Message-ID: References: <555cc3e262efa77ee5648196362f415a1efc018d.1709361537.git.ritesh.list@gmail.com> <33e9dc5cd81f85d86e3b2eb95df4f7831e4f96a6.1709361537.git.ritesh.list@gmail.com> Precedence: bulk X-Mailing-List: linux-ext4@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: <33e9dc5cd81f85d86e3b2eb95df4f7831e4f96a6.1709361537.git.ritesh.list@gmail.com> On Sat, Mar 02, 2024 at 01:12:03PM +0530, Ritesh Harjani (IBM) wrote: > This patch adds an inode atomic writes flag to ext4 > (EXT4_ATOMICWRITES_FL which uses FS_ATOMICWRITES_FL flag). > Also add support for setting of this flag via ioctl. > > Co-developed-by: Ojaswin Mujoo > Signed-off-by: Ojaswin Mujoo > Signed-off-by: Ritesh Harjani (IBM) > --- > fs/ext4/ext4.h | 6 ++++++ > fs/ext4/ioctl.c | 11 +++++++++++ > 2 files changed, 17 insertions(+) > > diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h > index 1d2bce26e616..aa7fff2d6f96 100644 > --- a/fs/ext4/ext4.h > +++ b/fs/ext4/ext4.h > @@ -495,8 +495,12 @@ struct flex_groups { > #define EXT4_EA_INODE_FL 0x00200000 /* Inode used for large EA */ > /* 0x00400000 was formerly EXT4_EOFBLOCKS_FL */ > > +#define EXT4_ATOMICWRITES_FL FS_ATOMICWRITES_FL /* Inode supports atomic writes */ > #define EXT4_DAX_FL 0x02000000 /* Inode is DAX */ Tying the on disk format to the kernel user API is a poor choice. While the flag bits might have the same value, anything parsing the on-disk format should not be required to include kernel syscall API header files just to get all the on-disk format definitions it needs. -Dave. -- Dave Chinner david@fromorbit.com