Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (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 A295A23C50A for ; Wed, 11 Mar 2026 17:59:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773251963; cv=none; b=rJ+Q1Q0pvK3w0RH15Vk4plBgJVIUokWLCHZyY75P4cBEOys06v95DRVCY+3+SoRrepVj+/jnmh5nEpSowSMXgO9u/5i0iLEg8T2163W5luM+cjXk4fKPhFw1O6IK3KTmSqWor7lU/sgFTZLpLnwWFVgQAlcaq4lmbBgI86kMZYk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773251963; c=relaxed/simple; bh=J32cW46mAfeZd4UiwZDmQR2W5d/c7Zcl7U1BjlOFYB4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bJe/mS/iv3pyjYxmQC/CCIM2Z3Rp80Y+ign/J23iJD7MZsdATgNO25754M4BTibtTP5IGMZQRuM7ko1r7EiY30qnoQddqNUzGfbQ07af2z+qMyxHglKe+1ryC+6B95tFdruZsBKRjemBt7UUPRhq2bBYowrhH/Be3PjZ6DknGGk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=zabbo.net; spf=pass smtp.mailfrom=zabbo.net; dkim=pass (1024-bit key) header.d=zabbo.net header.i=@zabbo.net header.b=q+1q/8wK; arc=none smtp.client-ip=209.85.160.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=zabbo.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zabbo.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=zabbo.net header.i=@zabbo.net header.b="q+1q/8wK" Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-509061dab77so1310121cf.2 for ; Wed, 11 Mar 2026 10:59:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zabbo.net; s=google; t=1773251960; x=1773856760; darn=lists.linux.dev; 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=YyFCDccDhwCxsY1wvOVprPGd44bKvuk62z0jOzbbSTg=; b=q+1q/8wKEUO9bc/j5jtuMOLorfRKu96J7RVayYiyt55k3bwFvm7Zf61LOs7AK+3s+/ 9DGaW2zWZKTV8oFYh2lMrjFZGBvL4ytU2eyethogZ9CvacBMupTDqPkI00yfXfQTQIzN bdcBdXf/mCFB3GyBi6vehg3v8Bp8Fec2Mne54= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773251960; x=1773856760; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YyFCDccDhwCxsY1wvOVprPGd44bKvuk62z0jOzbbSTg=; b=UtcrY0fSsbMGtPcDoBec9DtnHFvN1/YDWh2rAQ3dkeUe9ttWvugFGgpaISbMGUX/B/ 59MqZHOcYU5OzJhx8APIg6SOnzvqjAcRcOIiXMkqNU6SM3QwLqAh6iFtShBQbi167iDT R2rdRXZfh0z7kylO00Q7Khi0Yj3eHGTAXh4w4A3m/IGvXQOjUJTrEL6jdOQnlHrbSm4q CqTkaB9gAM7LuBgN17cHIyYmYbdOAIEy4QcXe6U4hfFHIlJyXNQTZraXodM0DGc1ZkZU bGAPswEIXbf4PkJBnBj4I++zufzziQuuXp+WptSoew+568k9F1BETEB6xH7O38PQzOTi L1Kg== X-Gm-Message-State: AOJu0Yx3l+ZHUldWmUZvF6hSNzZPYPeMtIVs0fr0tppwbBwGaUilS/Qh w8TcvdN/Wj84ObslYIHNZrf+AUUXWQ9rtYw9QayAsZs4n3bwD1uxGwwqCVMfGHn8qgs= X-Gm-Gg: ATEYQzy1Mv9/u1coNehWdAXuCY8C5Dqy2eJElbDG+riC6mEWuYjHv4d4h3crMD2wPYa 9KQjkpaNp3u69+0OIt+9mEOIc7bjxSeeYaRtvFaIgFwWISGX/lr34TgpDAcGQyzhlJVDA+MxTBY /upIzd4XPw3rXhLeB6m/29+My74Vq/S15Ma0fl4sFdWH/8KrY5mPS9ipHbJ0YW9U7C6n8TQ3Kop N36oAg+vhO2gM97/zazdr/zq++6uG+d8zHvZWy6en3QriDtX5lG1UuUfOtTKt5bzImVYp4Kt7vr ukqm73195B8cPutkScumzP2/BsxwG9mAgdF5G17dul7SIySad9AyOfcTQrsqR1aeUEyrkns+wzP bslp4vq2HD17rL2+IzJjeqggrWcjs+xNJuTiMVxs3aCXPFF2RofkIyQXjr5hAtPU8cvrRV6UgOA tu30H2iN9Kug== X-Received: by 2002:ac8:580b:0:b0:509:cbc:1277 with SMTP id d75a77b69052e-5093a16af68mr45949501cf.41.1773251960528; Wed, 11 Mar 2026 10:59:20 -0700 (PDT) Received: from localhost ([50.39.133.72]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-5093a14791dsm17276501cf.31.2026.03.11.10.59.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2026 10:59:20 -0700 (PDT) Date: Wed, 11 Mar 2026 10:59:17 -0700 From: Zach Brown To: Valerie Aurora Cc: rpdfs-devel@lists.linux.dev Subject: Re: [PATCH 2/2] rpdfs: Set the inode creation time Message-ID: <20260311175917.GA4053706@localhost.localdomain> References: <20260310173140.128230-1-val@versity.com> <20260310173140.128230-3-val@versity.com> Precedence: bulk X-Mailing-List: rpdfs-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260310173140.128230-3-val@versity.com> On Tue, Mar 10, 2026 at 06:31:40PM +0100, Valerie Aurora wrote: > +/* > + * Set the inode creation time. > + */ > +void rpdfs_inode_crtime_set(struct rpdfs_fs_info *rfi, struct rpdfs_transaction *txn, > + struct inode *inode, struct timespec64 ts) > +{ > + struct rpdfs_block_handle *hnd = NULL; > + struct rpdfs_inode *rinode; > + int ret; > + > + ret = rpdfs_txn_use_prepared(rfi, txn, rpdfs_inode_bnr(inode), &hnd, RBAF_WRITE); > + BUG_ON(ret < 0); /* caller must have prepared */ > + > + rinode = hnd->data; > + rinode->crtime_nsec = cpu_ts64_to_le64_ns(ts); > +} The pattern is that the in-memory inode (struct rpdfs_inode_info) is a struct that has private fs stuff along with the storage for the vfs inode. This is the FOO_I() pattern found all over fs/*. Refreshing the inode updates the in-memory version from the current block, and the "txn update" of the inode copies from memory to the block again. So the way to do this is to have a local copy of the crtime in the rpdfs_inode_info. Copy it back and forth in copy_vfs_inode_to_rinode() and vice versa. Then in the apply phase that wants to update crtime it updates the in-memory copy with something like: struct rpdfs_inode_info *ri = RPDFS_I(inode); ri->crtime_nsec = inode_atime_to_u64_nsec_or_whatever(inode); This re-uses the current load from and store to the block and avoids another block hash lookup -- which is a bunch of rcu and spinlock barriers and will be a point of contention. - z