Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp394403lqc; Fri, 8 Mar 2024 00:03:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV+G56L9GmG5B037hVLgB1LtCKEDuY3hAKY/exmpEYYm2ETDPiL8AP5rF/z2Ce0/b2z6oouZpDpm/sKqtEBZLKf9rJMkEjkxIxX0ssykw== X-Google-Smtp-Source: AGHT+IHBRQJU9nrGYN5/GQ6DWkTygYRTXpZ6U0h7e/y6P+vsbbG7GVaSwkNAmOC3xSf0HddNec/b X-Received: by 2002:a17:906:9c8d:b0:a45:f209:d2cb with SMTP id fj13-20020a1709069c8d00b00a45f209d2cbmr841215ejc.28.1709885005972; Fri, 08 Mar 2024 00:03:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709885005; cv=pass; d=google.com; s=arc-20160816; b=WrBxbAb+l1IhjCJ5y7Opbn5yTJuo2djEVhDSYgiXJal6ShCoVGm+3wtHnhqP8tfwm5 0rIdLwTWpz82S3VF4veaa+BIYpjj7wvlgkGS/J7FaZ5xvV/4oz+dS6RUoSlcel4DWEoB tDBpW/q+nF/5vrrSxtT96Umyq6Xv1DXX/GJFYpK+H04cQcg46/VijWvD83OZGDSFnHl0 wqeu/HI29pH7DVJxXsGkJDhSbq7SgK70wa+8PsrENIaLcpOiHdIzzw94taL8L06PVdy3 wNz4Jg9p1phR5xFBrWNTzEEcUsPpEAP0SjcwNvIw2RqNrgRsMtInnG+pvxBsSdZys1p1 H9dA== 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=CGH+NkVk0LWmirWv8vjWVUIOa6iKMn0cG0JNRFIGUDA=; fh=eSQCn69j4RLqDt0qi2OpimtQcmyV3pN+6WEmUSXG9GQ=; b=E5VGbcY5d+1hiPKM7EamEebcozpSlsZBIOqCBZF11l27CNQxhuZnJuVtKjr0quoaTy sr2obBTg87dQZpUC20QirHAzKAFWyr1D73owaNAz6D7xLAeh7bynBiWixuSRVV7+XBwq GktEd0XWyVgwKb638T+FaAZ9k9oBlBWp5Z+R2+Mcdt0RL8JSOMz5KmKIuwgp9bt5soWz 6eGsigGq/GyigGiuRkxHRbj9sbas8/gGLG6JCGF+hJeiG0TV73eLdB/+yciJePU+PXxJ 5FMYwYv3kEYn2WOtouvJIOH5mTU02J4PHyMTBSpNdHksGRlLBgeMFkZzbk3ei6Ez2Naj Il6g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gQhEdWpk; 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-ext4+bounces-1568-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1568-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gl12-20020a170906e0cc00b00a440fb646b3si7552329ejb.791.2024.03.08.00.03.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 00:03:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1568-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gQhEdWpk; 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-ext4+bounces-1568-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1568-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 am.mirrors.kernel.org (Postfix) with ESMTPS id B3D451F21CF0 for ; Fri, 8 Mar 2024 08:03:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1540852F6C; Fri, 8 Mar 2024 08:02:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gQhEdWpk" X-Original-To: linux-ext4@vger.kernel.org Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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 42FE1524B2; Fri, 8 Mar 2024 08:02:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709884970; cv=none; b=RZB4nmYXdpwlUbDw6mirWU3Vcx1n6KaQPZ4hLCuCINR2NZLInJyG9PzlrxrRDKVGZJokHC4/02Tp/A1eL8s1HnB1dEO6eU9LbjPijDGDoz9+aYODALe4DwI/9X2fMmtUe9TRxtk/80s5FJpCbQeWKIw/CIUkLs7QUbcStwdDmqg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709884970; c=relaxed/simple; bh=DD2OjHZao1PKvEiW6v7muNX5dGWw4TSeaWSciZ5xlDE=; h=Date:Message-Id:From:To:Cc:Subject:In-Reply-To; b=fYfzkNNLljE3GdksOZC87ehofeJiif6Ku1fVbBu8szxfilo2vSjX/wmtPU+tkAN8PzX40ZB0K3ZwpduHY/jislrbMNIVranuJmpk9i/lQ/669Ebd0AyDI8r1JeCjLsT5ZXK727DkpLeIx/cXtpIzUZ9ojeWAxDs4/5zfMqzvRH0= 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=gQhEdWpk; arc=none smtp.client-ip=209.85.214.177 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-pl1-f177.google.com with SMTP id d9443c01a7336-1dc1ff3ba1aso14482565ad.3; Fri, 08 Mar 2024 00:02:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709884967; x=1710489767; 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=CGH+NkVk0LWmirWv8vjWVUIOa6iKMn0cG0JNRFIGUDA=; b=gQhEdWpkVkq7eqsKA2dSHBUpqFHuODdLLrvPDgSWmrbi6m9MKoyoZSJr3cy9OBm45n 2D7/WJwrm4wsLrGQenDQMsWZgl3+XIqfCSKdNwjUwBZjp89JkEhZt62l6TI9GpGM/0SH qUEQt2cvWTnADVaRTdppfXqNCycnm+bLVSer8zWvYRe3/DeRIfI666wmwN/RKZX9BjLi AHX6JFXQU8i6olo6cOnroN48pv3xrzJy8+p7Aua/Lgldyf5oVdnDdu0kqpk818/Y6mH0 jLNKnby+Q9EAvPu1BO6ez5lrVoFbHZc6RCpfzg7wWmU83HRLLCWrBsKLkuJPL8FL7Vu/ oB+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709884967; x=1710489767; 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=CGH+NkVk0LWmirWv8vjWVUIOa6iKMn0cG0JNRFIGUDA=; b=ceueGBYMGMDPdSussTGOFEZBXKQD3FR+Oqyr9FFwHUlKfkAMoFURvZprrnZ363vjnf 74+V86VXgsAosHS7y56XUYt5y6JsgtVpJTCv0BQE5WES1UGKw8OW77z4psn0N5G5JlBb ourNOjaXxiEWy3CdiGU3aIvKyKg2G8Pni+/042IgsAMIP7DTbLOjXS0LWQFP3qLCy16D u7AtjsAf6aNFw9mbvKSwlGPIf9RdT6cM+StGM1T4meS8eCExcINu6U16RWCcid+yYZrW uG5zsWxpNXkc3XCLX3b0SFJfXjT97InYBHT5/3iDEyMYreQb2Rca74hnlTYYNx3u0zKs dUdQ== X-Forwarded-Encrypted: i=1; AJvYcCVmsepUhlEi4w1HNAXNYITdFF3iU2mg5vk/9CEo9jec8XMoOzOEyrTSjv+pLgjYpck1uZ3QO8qPQZhvoinRdWNwjU7JQERiMYM1kHVTunS9Ouxu5RZCgwhi+p5FCmQecmom5f1oQjMyaQ== X-Gm-Message-State: AOJu0YxhJpdlqI5f5fHITgm9DcGB1hOihelPLyO0KwGMyUFZ0hnLJCAe M9opGwtQPvGcMIsZhiQch3ChJAnDoH2htW1lEFqJfQ9zBWCt9gzKlIPWyw0b X-Received: by 2002:a17:903:1c7:b0:1dc:a60a:a7c7 with SMTP id e7-20020a17090301c700b001dca60aa7c7mr11987003plh.25.1709884967124; Fri, 08 Mar 2024 00:02:47 -0800 (PST) Received: from dw-tp ([49.205.218.89]) by smtp.gmail.com with ESMTPSA id jy7-20020a17090342c700b001dd621111e2sm1407946plb.194.2024.03.08.00.02.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 00:02:46 -0800 (PST) Date: Fri, 08 Mar 2024 13:32:36 +0530 Message-Id: <87ttlhp2w3.fsf@doe.com> From: Ritesh Harjani (IBM) To: Dave Chinner 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 In-Reply-To: Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Dave Chinner writes: > 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. sure. Make sense. I will hardcode that value. -ritesh > > -Dave. > -- > Dave Chinner > david@fromorbit.com