Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (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 9EB28304BDF for ; Mon, 6 Apr 2026 21:50:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775512234; cv=none; b=JGlUGRw/CtqJTK2hI7+GTROGHd43msdNh69f9nwHR1ub2YOHG+MZtZ6VbhrkO3YKR0FG5KxlfS7nOoIr7Z/QIfe90jAAf1eqXqYqbvp9OzAt8TPeTgnD5gYMt3/Zpv3rGsPs8fcue7elO4jokVPHW+ab4QFJ0oo26lhzoVlFyX0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775512234; c=relaxed/simple; bh=XnujkDIXa9WsAHLXOE4QuGBEORj+IziNBH2zEcQ8RjI=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=TMZ2PAdE3H4haANKFd4F9MR0D3DFuZRBALj9Rv9N5hv3s2t1vwSIwQT65lxJEhzrQZZqYcMWHbz8aCkzCgGN9VBwNurIDLMwRVdu9VGbfu8WQrPlkYf3jHr5BG2OYOTp2ERBKt8sUiq5u7vP3hUMvhub9uprHReddR1Qan/KZ7A= 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=dq2lkmPF; arc=none smtp.client-ip=209.85.216.41 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="dq2lkmPF" Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-35c206f0481so4237255a91.0 for ; Mon, 06 Apr 2026 14:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zabbo.net; s=google; t=1775512232; x=1776117032; darn=lists.linux.dev; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=my2MapzbW7hTBOTU3wR16K1foovHu4FcD8U0eP9dQDI=; b=dq2lkmPFx8iL6pQQx2Epw/xrvEVjXj63FTgzyRhW6dkTVoIJIDoO/1q+tlHQ41SGg/ NdLOWg0Sn6+I79YiKbNCZAq8UHRjDi0g/XEzeu53fXLEBYuWRBX9EIlEjg+NWo4UYUDt 6+ZJuNe1aarviBMKmENQ7OgZrK5PW2/Kbuk90= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775512232; x=1776117032; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=my2MapzbW7hTBOTU3wR16K1foovHu4FcD8U0eP9dQDI=; b=G4msVCLvGQgozGv08uH0Zc6lAlIonp7NISAMcg6IZgOEhEkn1kqU6AMi0pzZw8C3KF eAqfyPsemFZyT6fe0Mh5L25NsEksHJueZHiEVuQwuQNGtDuMVBsbALg3K32407CywI0d eBvIeI8xlxyLQiCNJSoU8WKKJ4HJFYLfaZBjtSy4NNcwRBJFOwso0H9Nu5n7ooC/r0i7 a+xoumS0xqe75WcnTXni4yUiWcdmvHiJfYSPzukpfEyU2cNZSbmHjh5GlqWyuuExWX9u FKCL9RhjmqoBLV3FRBTP0mUkGiExK++C2YFaDGZCajr4Y563xWpDp9CyhNaMuNWj/itY n84Q== X-Gm-Message-State: AOJu0YzRAd7ZKkUPynyxuptnrfZCJkBxIDNo4TpmBYFcQP3Ib/20H3Dr 3JFP4gjTgcYRNTl11+LYGUoijL3GaWI7FHIPbSJHL4IzHkqsoTTfcdKScB65gDDDJJuw600Owqf y1Mod X-Gm-Gg: AeBDievZx+gCtddpdRxwlFjVSAtnjBVGIgPnKyaPQBCSJB3OYY9ykrFoP0HiQ2aZF0T OKWpXV8krvpBmJ3c1lCYue10RECymn+T/NokTGEHqshkL64InHqBeVaLTa5EtkLbSVPTBArhAa4 dOcMEeShDcAJ59C8pC4qg7NSrJxuGVOKsc4aCEU88yi6gvCQe6yxXDIkPfToWZELT1RxYXq+hq4 l7Q01GoTb3n+4sr2ERaQBTTxjNxShSos1PvKWKTvpUYehObh8FdMtibdHZzD17yWZy0qSrEog6z okHbGurVHq53JNfmY+JR8GwYRcuWFmrWXF9np6/c+EfPaDAkwlIzIa2COgzI7gO/8e1i8QyAzzF lJOyzXbsRL1Yz5LsT0Rc36VCEBvFyWCE8k+VGtuZlgWWfs3om5LG78q0RkzPANHZKzNIdYT5Cx8 xCzgmszRKFwnib2LL2DpDD X-Received: by 2002:a17:90b:3bd0:b0:35b:e529:7089 with SMTP id 98e67ed59e1d1-35de67f0e5emr12085296a91.10.1775512231842; Mon, 06 Apr 2026 14:50:31 -0700 (PDT) Received: from localhost ([50.39.133.72]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-35dd36a0595sm15237170a91.16.2026.04.06.14.50.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2026 14:50:31 -0700 (PDT) Date: Mon, 6 Apr 2026 14:50:30 -0700 From: Zach Brown To: rpdfs-devel@lists.linux.dev Subject: block locking and tx changes landed Message-ID: <20260406215030.GA1818946@localhost.localdomain> 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 I landed the changes to move from the prepare/apply transaction model to acquiring and modifying blocks sequentially. The quickest way to see the impact of the new model is probably to look at rename before and after the change. Do browse through the commits that lead us here, though. It will make the resulting system make a lot more sense. Some supporting functionality was brought up to support modifying blocks individually. The most interesting, perhaps, is the "place" block detail. It describes where a block is in the namespace. The block ordering across the network is defined by the place value increasing. We add functions for working with it, send it over the wire, and store it in devd's per-block storage. Flushing starts writes on blocks in place order to avoid deadlocks with transactions being modified. This is pretty cool because it keeps sharing/contention at the block level. Writers and flushers only block each other when they're working with the same blocks. Block freeing advances a bit with a function to free by updating the dirty block's details to indicate that it's free. That's all freeing is, fundamentally. We need to not send the block data over the wire when writing the freed block details, though. And as a practical matter we'll want to add some bulk requests for write grants to the blocks being freed. Until then large frees are a bunch of sequential round trip write mode request delays. The gory summary of the kernel commits: Zach Brown (24): rpdfs: remove spaces before tabs in dir rpdfs: alloc in one call instead of find/clear rpdfs: add rpdfs_names_match rpdfs: add _ALREADY_DIRTY block acquire flag rpdfs: dirty transaction blocks individually rpdfs: refresh and update inodes with handles rpdfs: dramatically simplify the transaction rpdfs: update mkfs to use block handles rpdfs: use block handles in [gs]etattr rpdfs: simplify btree api and structure rpdfs: update btree io/txn layer rpdfs: access dirents with block handles rpdfs: access xattrs with block handles rpdfs: add place details metadata rpdfs: add rpdfs_block_is_dirty rpdfs: set place as blocks are allocated rpdfs: serialize write handles and flushing rpdfs: clean up block acquire conditions rpdfs: update blocks per free stripe message rpdfs: add block free that updates details rpdfs: warn on attempts to acquire bnr 0 rpdfs: mark blocks dirty as acquired rpdfs: add simple btree block checking rpdfs: getattr gets crtime from inode info Over in devd things are a lot more tame. Mostly it's the addition of the place metadata. But then while stressing things I hit problems in devd's weird implementation of journal replay. So that's fixed up a bit. Along some misc fixes :). Zach Brown (6): rpdfs-progs: add place and message details rpdfs-progs: set TCP_NODELAY on connected sockets rpdfs-progs: utask block uses caller's dirty lists rpdfs-progs: replay journal blocks without commit rpdfs-progs: add DECLARE_FLEX_ARRAY lk helper rpdfs-progs: update format headers - z