Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp397756lqc; Fri, 8 Mar 2024 00:10:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWvkv/l4gBh63lucP4ODumuPteOumOYmcax2Rq/n+Rsx1PzdCKK+P+neO60iN9h+1bl7BrZ+bh4eyrHTP8HX1NE9shkTpsZGAobktxaVA== X-Google-Smtp-Source: AGHT+IGN/TvKg8XCHJDi+tRPjTTYhU7ipJcil2LQo1OV+sqHC7bRqe9lZZyuufbU13/7iI5H54gc X-Received: by 2002:a50:8d1a:0:b0:567:fb30:9e39 with SMTP id s26-20020a508d1a000000b00567fb309e39mr1419985eds.11.1709885434555; Fri, 08 Mar 2024 00:10:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709885434; cv=pass; d=google.com; s=arc-20160816; b=fTu0ILAuiX6evPY5itFXvjEtAj5xv3Gzb9YFs44ygprClqEaLrdaSVeUyxnMuG/hYL KAitpitrs/X9uZ/fSmmZ3TXisarJS2RTlbcLyXoopeHftUJcl39IwTCuCBObAtUuCmTT /f7rH9OVI7T2fBTS18DtdfpDrBzjlnHvzbhXxPh+3gJHAYeKqGjDSJP/PLHvYhzWrTEC 0EvVUZRBfacg8GPCLbDDse9/XQHLMNr07NhyRbOwFewj94z73wdLZsPpK49WxO/D7hu9 YRezniNOsawF1qVNy1EBBV0GUvasOO+0CKafTHVSJcvSX2bsZyrojIDUF9VAIX+k7U1g fllw== 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=hcM7FrNQHVQGFhkrY8ckS/fCn/8FtV3DNgN4UpFrLKE=; fh=YjZMvc+R0XbV9wn3+C80YlkcEZbdmIjs6sBKdnbjr4U=; b=iM65imgnIHWmMiwdf+om1ogcwrvhIbiCVibFB8IOC2NvoJlBUY2WnzCC7itfYpecgB q2MTX3YnZcbttE2SzemcH8UiC2DNitIvjGZx07ahRuqYUsDPrUrbgWC92gTiZir4EQ5B Yvw2cF3zZP08FBw9uWl3croYeleavHM6n/Og/2YkeqAISEFiEdUU/YwAOkrwNL8rM27P 2hBKYRCzL4BPMgs7HGWCk+Wq4Jku9YBsQnaLBsBdBMqTDLHVF9f4dKkdaupyi0TByh+a B9Rpg8sb2TrC/jvWFZmzRBDljJ2tNs8UaoHHSZVhGJIT+BbOEmsj+rzNmTY4O9WaWYcZ HU7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mCRR1Bsf; 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-1569-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1569-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. [147.75.80.249]) by mx.google.com with ESMTPS id p9-20020a05640243c900b005682a497407si445375edc.472.2024.03.08.00.10.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 00:10:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1569-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=@gmail.com header.s=20230601 header.b=mCRR1Bsf; 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-1569-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1569-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 4CF571F21E91 for ; Fri, 8 Mar 2024 08:10:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C8E6351021; Fri, 8 Mar 2024 08:10:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mCRR1Bsf" X-Original-To: linux-ext4@vger.kernel.org Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (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 EEFFE50A64; Fri, 8 Mar 2024 08:10:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709885427; cv=none; b=g7DV5jU4f1KC9Y6nGuTdz1Mu/5WcvDaCi6mR+PpC7BrZWZBPxOGjWy5vvT/d66HVlhIXVqPVsUncYVOdUlmu3ohc4Os3JC1vddsqebh5JP8jzpuRui2jOTuwM+yZIzNw8ZmzMmV8OB3h9Mw4T5XRvMHQ9ORX/8Y9BcXsMZdFMbE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709885427; c=relaxed/simple; bh=QjZEM1MYYmI+IOq2vcxJk/pRuJdvqllvHwDZJOPw12A=; h=Date:Message-Id:From:To:Cc:Subject:In-Reply-To; b=nZLM7TNIyLJ5TtqDQSIjiZTvb3g7Z/vJ073FzWkAaOwzMmuGNUprHEYPC7/HQhVZtCuseBEmDESt+Imv3eJ+RiSF3LvEzSS8STGn44I0TAguIaJbHr5lIBRUXCys1GxML2VCw4hLIhrQzUA8Mb1BO4xEJ6EuwUkN0hxpXdKu9H8= 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=mCRR1Bsf; arc=none smtp.client-ip=209.85.214.173 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-f173.google.com with SMTP id d9443c01a7336-1dcc7f4717fso4793975ad.0; Fri, 08 Mar 2024 00:10:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709885424; x=1710490224; 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=hcM7FrNQHVQGFhkrY8ckS/fCn/8FtV3DNgN4UpFrLKE=; b=mCRR1Bsf/OP3MzNpufC9OjgT8kP5rXBIs/lHwa0nhYRGNLd+w9VQj6A05hDRGPSzTe D/f+ZUiyGFcBgJFtAZ9JtHRyEASljabTqO9H3rXun5nfZlAMSQqPPNVQWIt7dr9++NAi +D6VdfU7ulWgOVZLnesu4isGFD/iEZqgeJpwQSUxuliI2jtt2ZvQuS92F9Zx/E9bh5PS JFJlfn8cZvDC7Bcmyx/cpFahcE26PkDV6cKdVtrPswRVGDazcYv0wwezCIyrzAgv9Wm+ 0D4e7T0MC2AadWm3MFm48YPWor/bpZyvUNsnOkeVqJQd+CV/Hxow3QmhGQwR956LXygb Ou3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709885424; x=1710490224; 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=hcM7FrNQHVQGFhkrY8ckS/fCn/8FtV3DNgN4UpFrLKE=; b=dVsWAtpLx1Rsj//zukwoffKOKNhTXUuMqvFG2HJO9mStyK+NNyTr3rtYkxx/Beapu5 jvYlSIv1Spqg+klkGQeEYDSkJv7Io/j53jpmlb79IFnTzSHq7SpnKUTEl3G0umWxll43 Aid+i3A0k6cjxQ4oJmMI496XXQ4MahKwOmziuB5WiTuYWMST0Rnb620Q4TKJ2ixkkBrw hpr6iIBbBWF8VxsYQSBPG6c29QEzpAzeAxjWShblfvjagTX2Ni7yPK6HVXjf8Qwra1h0 LcxNVyI3C6f62oeLW4T8MWEZ6Jp2cmmf2EkVt7yGyTM9LM84smWQ4Mzoxp4ZDX0RciXl 9vQQ== X-Forwarded-Encrypted: i=1; AJvYcCWV4iYJb8r4GEvTpbphO+Gm9ShHWo35qrkr46SHq7jYjD4L0oVAZQqBjTdFTGuUuo+LsN2GIxANY/4oh//8of4PuZbHERK4H9AG+3aHSXsodl1tpwJME5+EVeZEx5LGtPpGX3AanpUFvNF3lP4KWRA2+NvsaTX0JP7lgqXf+iYsHgsOK5Me3rw= X-Gm-Message-State: AOJu0YziyaOsJTdImpaTwfKpaHOgtcRqWzfsQ8mJZyx2/5rPx/Yb6x0S UOnMBNGMNsYdgTeyiQfsKOnSvVYCqhAGgui55Mzhst8fhNjsLidWfRe+WtlP X-Received: by 2002:a17:903:1104:b0:1dc:cbc0:1971 with SMTP id n4-20020a170903110400b001dccbc01971mr11852309plh.49.1709885424308; Fri, 08 Mar 2024 00:10:24 -0800 (PST) Received: from dw-tp ([49.205.218.89]) by smtp.gmail.com with ESMTPSA id x1-20020a170902a38100b001dd1bdee6d9sm8857439pla.31.2024.03.08.00.10.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 00:10:23 -0800 (PST) Date: Fri, 08 Mar 2024 13:40:19 +0530 Message-Id: <87r0glp2j8.fsf@doe.com> From: Ritesh Harjani (IBM) To: John Garry , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org Cc: Ojaswin Mujoo , Jan Kara , Theodore Ts'o , Matthew Wilcox , "Darrick J . Wong" , Luis Chamberlain , linux-kernel@vger.kernel.org Subject: Re: [RFC 4/8] ext4: Add statx and other atomic write helper routines In-Reply-To: Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: John Garry writes: > On 02/03/2024 07:42, Ritesh Harjani (IBM) wrote: >> } >> >> + if (request_mask & STATX_WRITE_ATOMIC) { >> + unsigned int fsawu_min = 0, fsawu_max = 0; >> + >> + /* >> + * Get fsawu_[min|max] value which we can advertise to userspace >> + * in statx call, if we support atomic writes using >> + * EXT4_MF_ATOMIC_WRITE_FSAWU. >> + */ >> + if (ext4_can_atomic_write_fsawu(inode->i_sb)) { > > To me, it does not make sense to fill this in unless > EXT4_INODE_ATOMIC_WRITE is also set for the inode. > I was thinking advertising filesystem atomic write unit on an inode could still be advertized. But I don't have any strong objection either. We can advertize this values only when the inode has the atomic write attribute enabled. I think this makes more sense. Thanks -ritesh >> + ext4_atomic_write_fsawu(inode->i_sb, &fsawu_min, >> + &fsawu_max); >> + } >> + >> + generic_fill_statx_atomic_writes(stat, fsawu_min, fsawu_max); >> + } >> + >> flags = ei->i_flags & EXT4_FL_USER_VISIBLE;