From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 08A21C04A94 for ; Wed, 9 Aug 2023 08:23:12 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1qTeTF-0002HJ-K8; Wed, 09 Aug 2023 08:23:10 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qTeTD-0002H0-SF for linux-f2fs-devel@lists.sourceforge.net; Wed, 09 Aug 2023 08:23:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=fun65h1R4diSDJnLTZ/cxzR1ILC0j7wzISUUtC+n2VQ=; b=DtuyWZAPMW4F7gK45GDQdmXQnQ DD+d4qnNJ30wyBwlEHBQ+13I4Tp8PNZeE+4yjc68KxsFN2/1FYgynlZEDguoLHNdNX04xnpHwvUmC aqkCDTGoCoCXm1wy/1ZavlI1ZPju5lMIsjPIKVDDm/rwhd5+iMjQKAmqDwsnNJKuEqlw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=fun65h1R4diSDJnLTZ/cxzR1ILC0j7wzISUUtC+n2VQ=; b=MG6RCsCBf2eZTSqNjSSq/4AUjt GSMhsEoSdp/zmBV+K9gKMHLOkOQrhmaNgt3hlZ/ml2MOH1wDDilQ2Vxj7AnpI5cfwekF1EspUxrpe GFUStFZlDVJfwZELS2i/bafboRqwL8Rdz6y6EwFhJapuTs1A+k7BG3e7gFZG69a/jfFM=; Received: from smtp-out2.suse.de ([195.135.220.29]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1qTeTE-000Mjd-15 for linux-f2fs-devel@lists.sourceforge.net; Wed, 09 Aug 2023 08:23:08 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 3A8C41F388; Wed, 9 Aug 2023 08:23:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1691569381; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fun65h1R4diSDJnLTZ/cxzR1ILC0j7wzISUUtC+n2VQ=; b=g4FDCoxrnA/p+GYB2SAgg9FCsHDC8xx9oZ/+5lp2F0zXGltHAWDKRIOtF8gm878iBpKXUt roN9QLxvxxz/hruPD50xpPKd1EJgyufH1Q9BSATz9Nc8CpHpABXAhB63acjBhnT8R1dzx/ osOyq4rFMxe4W2YvEs3BmnQMVSN/P5A= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1691569381; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fun65h1R4diSDJnLTZ/cxzR1ILC0j7wzISUUtC+n2VQ=; b=YP+i5WCgxaDO0MJwnfKAGmomKqp+nrgJtNPAsBPZzyeBoI4TdjLxb1qRz8dnXxGoUZwRPp ye7wBZnxxnt9gbCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2633E13251; Wed, 9 Aug 2023 08:23:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id kWhPCeVM02RBbwAAMHmgww (envelope-from ); Wed, 09 Aug 2023 08:23:01 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 9D476A0769; Wed, 9 Aug 2023 10:23:00 +0200 (CEST) Date: Wed, 9 Aug 2023 10:23:00 +0200 From: Jan Kara To: Christian Brauner Message-ID: <20230809082300.veczantamvcpinxu@quack3> References: <20230807-mgctime-v7-0-d1dec143a704@kernel.org> <20230807-mgctime-v7-6-d1dec143a704@kernel.org> <20230808093701.ggyj7tyqonivl7tb@quack3> <20230809-handreichung-umgearbeitet-951eebed4d61@brauner> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230809-handreichung-umgearbeitet-951eebed4d61@brauner> X-Headers-End: 1qTeTE-000Mjd-15 Subject: Re: [f2fs-dev] [PATCH v7 06/13] ubifs: have ubifs_update_time use inode_update_timestamps X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Latchesar Ionkov , Martin Brandenburg , Konstantin Komarov , Jan Kara , linux-xfs@vger.kernel.org, "Darrick J. Wong" , Dominique Martinet , Christian Schoenebeck , ecryptfs@vger.kernel.org, linux-unionfs@vger.kernel.org, David Howells , Chris Mason , Andreas Dilger , Hans de Goede , Marc Dionne , samba-technical@lists.samba.org, codalist@coda.cs.cmu.edu, linux-afs@lists.infradead.org, linux-mtd@lists.infradead.org, Mike Marshall , Paulo Alcantara , linux-cifs@vger.kernel.org, Eric Van Hensbergen , Andreas Gruenbacher , Miklos Szeredi , Richard Weinberger , Mark Fasheh , Hugh Dickins , Benjamin Coddington , Tyler Hicks , cluster-devel@redhat.com, coda@cs.cmu.edu, linux-mm@kvack.org, Ilya Dryomov , Iurii Zaikin , Namjae Jeon , Trond Myklebust , Shyam Prasad N , Amir Goldstein , Kees Cook , ocfs2-devel@lists.linux.dev, Josef Bacik , Tom Talpey , Tejun Heo , Yue Hu , Alexander Viro , Ronnie Sahlberg , David Sterba , Jaegeuk Kim , ceph-devel@vger.kernel.org, Xiubo Li , Gao Xiang , OGAWA Hirofumi , Jan Harkes , linux-nfs@vger.kernel.org, linux-ext4@vger.kernel.org, Theodore Ts'o , Joseph Qi , Greg Kroah-Hartman , v9fs@lists.linux.dev, ntfs3@lists.linux.dev, Jeff Layton , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Steve French , Sergey Senozhatsky , Luis Chamberlain , Jeffle Xu , devel@lists.orangefs.org, Anna Schumaker , Jan Kara , Bob Peterson , linux-fsdevel@vger.kernel.org, Andrew Morton , Sungjong Seo , linux-erofs@lists.ozlabs.org, linux-btrfs@vger.kernel.org, Joel Becker Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Wed 09-08-23 09:06:34, Christian Brauner wrote: > On Tue, Aug 08, 2023 at 11:37:01AM +0200, Jan Kara wrote: > > On Mon 07-08-23 15:38:37, Jeff Layton wrote: > > > In later patches, we're going to drop the "now" parameter from the > > > update_time operation. Prepare ubifs for this, by having it use the new > > > inode_update_timestamps helper. > > > > > > Signed-off-by: Jeff Layton > > > > One comment below: > > > > > diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c > > > index df9086b19cd0..2d0178922e19 100644 > > > --- a/fs/ubifs/file.c > > > +++ b/fs/ubifs/file.c > > > @@ -1397,15 +1397,9 @@ int ubifs_update_time(struct inode *inode, struct timespec64 *time, > > > return err; > > > > > > mutex_lock(&ui->ui_mutex); > > > - if (flags & S_ATIME) > > > - inode->i_atime = *time; > > > - if (flags & S_CTIME) > > > - inode_set_ctime_to_ts(inode, *time); > > > - if (flags & S_MTIME) > > > - inode->i_mtime = *time; > > > - > > > - release = ui->dirty; > > > + inode_update_timestamps(inode, flags); > > > __mark_inode_dirty(inode, I_DIRTY_SYNC); > > > + release = ui->dirty; > > > mutex_unlock(&ui->ui_mutex); > > > > I think this is wrong. You need to keep sampling ui->dirty before calling > > __mark_inode_dirty(). Otherwise you could release budget for inode update > > you really need... > > Fixed in-tree. Thanks. With that feel free to add: Reviewed-by: Jan Kara Honza -- Jan Kara SUSE Labs, CR _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel