Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) (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 38A262D0635 for ; Wed, 11 Mar 2026 19:11:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773256300; cv=none; b=pEAbvHwOKatxerd5aVQoP2gNIaXlMNko7xBa7VRdJVxgLIxanu+2EJseZ0nMC9g2Fht+g5hDXDDnMQHQM+rnrFBjFDCMZtKgUyJ/43AnRnurEDpnrx6Qe2NYYfua+ACTnrj43d3ILKPMfRD5r4QuNYsucfvjGonYBOcjZt2UWcg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773256300; c=relaxed/simple; bh=vf7ji3Xbh3TGdqVjcMYTNLOANo5VMt5hdZx4zSwFiQg=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=uuFQJAE1gvnB3DZmKWBruZbaoAdv/u6kp+oM/jCSRjRB58YnLubIvMRrEaSGmHxzh7m3Qz/bGtR/PgENT4RCiZVzK+t8T9fqKWuyAaUWNaLf/igpE+wv9dGa0fuN0jws896Q5XEW9H9Ic4GcZ7KwGpa1+4a2NuTGJO3l0HoFPkU= 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=fEOY97W6; arc=none smtp.client-ip=209.85.219.49 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="fEOY97W6" Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-89a1d7cc7f0so1972876d6.1 for ; Wed, 11 Mar 2026 12:11:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zabbo.net; s=google; t=1773256298; x=1773861098; 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=HLCbksuBZsV+9kd5KFzD7bztE4cH9iIvsjOFLgReO0w=; b=fEOY97W6AHyaJg4U5mnAlFo6fgMGXDgwVwfMY3/yf7BCeyeDKXww8rCwcvzFDJ3IOb qOYFeXvJnVlTMXGaFWO9MRn7SHYaW1vN2L9Mlvfq65rsjvgG3y1w2BVp4eu8FPTUcOV7 MvLqImRr9yn9MvqXpJkNqPteCXPIdUP7dJYws= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773256298; x=1773861098; 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=HLCbksuBZsV+9kd5KFzD7bztE4cH9iIvsjOFLgReO0w=; b=VvXV/qtSvNM/vMtgbzVwspZmRZNSJr09VmcZOxouSg+OqmnWwLSUqcqEXVIxIhV2g6 MIjeFQFPfXQyTApX/NmBeKf/TL6B3mEkZM9gjQgoWBp/fe/tx9R/LJ8yEon89A48IziI cxe/T/yN6rYc6olf9+iMHWIwu3WwXsCfvSN0ezZlohbQQreqfxOPachmUPQmtTKx9of2 b+59YugGn336vC6A9y0EXXUGQ+njUwHg1E8kS+Q340l0A6xRjaN4rdkiVkWqyOQxij3Z OJU3SbgERXhfc1eYr1ixIzmMFH7p68QWU9kJom8VzGDnYufklW1gaGa0t85xDGfpOFs8 MO1w== X-Gm-Message-State: AOJu0YyXOSMRvePxf8Vnei8rpZAtn3oFFFegK0F/TaUXFC7O2PhOPyqC T68qzBVYx8sBv2brZtweZS/jZQ7I/Tskif9N3Y/mkn/odlc9obqfkJIEauIXgDwaMmFTHo7bOkM crycF X-Gm-Gg: ATEYQzy8iA34sPRt5dMagcQfT5FIQ+APLiGbPa4F+08wuNkuBinYuCZjXbv6+aDe1C0 ncw+Cv2OyGOyJuZrWdY3Ann3VqYX/tUgjDJpVjTSzW29c2Zu/mbrZ08abepR9ISC6BnctU24Ptr CMa3ywt58L18k8ro1JNOMOOmn7nrfj3AxcOsuIyjRcXnecSHhJNOLQldrgUuSSRkn4UKNDqAgbq q1Z8Yp2p8CO64t6hK11BhcTVFSSAhnw4r+BFXHS7wWd+raUufA/HGLvaa1qQj4axVwJ/x6rSkII IjgYsH2vE7JqCJ6OZB/YN9G72fu+P+AxAT2PP/tMkgFyZyAGBxcekI7IocnprydkHPbwAsnZOgs YFrmjkCMTnlsY7YdN8CTFApwg88dq8V0M3NarQStJ9+dplpFVQ3c7P1fWSqXEVaZSNkY7uG+WRQ BK+ZgsnKhcUg== X-Received: by 2002:a05:6214:21ed:b0:89a:116b:e67f with SMTP id 6a1803df08f44-89a669e47e6mr45751126d6.22.1773256297987; Wed, 11 Mar 2026 12:11:37 -0700 (PDT) Received: from localhost ([50.39.133.72]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-89a65d2ab43sm19526676d6.53.2026.03.11.12.11.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2026 12:11:37 -0700 (PDT) Date: Wed, 11 Mar 2026 12:11:36 -0700 From: Zach Brown To: rpdfs-devel@lists.linux.dev Subject: initial block allocation pushed Message-ID: <20260311191136.GA4063379@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 just landed the initial implementation of block allocation. The quickest operational summary is: - devd now requires -n and -p for its place amongst devds - hard disk and net format break, don't mix new/old and reformat devs - mount can now talk to multiple devds with -o devd_addr=addr:port Allocation is now derived from block metadata in the devds. It should now be possible to mount and write without the goofy internal free block number hack in each mount resetting and clobbering previous allocations. While it seems to work well enough, I'm sure there's bugs and weird corners. As ever, keep an eye out. The gory details are always in the commits and I'll share some quick commentary: Zach Brown (18): Add lk _le bitop variants Simplify compatible_modes Comment updates Track client cache modes in an rbtree Add devd free-map Add alloc_ctr to block details and over the wire Add free_stripe request message Have devd track free blocks per detail block Remove the summary_tree Have devd track cached blocks per stripe Add bstore_get_free_details() Add cache_mode_grant_bulk_uncached() Add free_stripe_request processing Add devd options for free stripe init Clamp devd storage blocks to details count Handle requests for lower mode than granted Have devd map its fs bnrs to contig lbas Show more details in format device output Over in devd, it's all about handling the new _FREE_STRIPE_REQUEST message. In the block store we change the summary blocks so that their entries can track the number of free blocks in stripes. The cache-mode engine is reworked so it's easier to grant a contiguous region of uncached blocks to a client. With those together we can quickly grant write mode to regions of free blocks to clients in response to their free stripe requests. Zach Brown (9): rpdfs: Add ht rcu hash table entry helper rpdfs: share while_read_seqretry macro rpdfs: Add rpdfs_map_alloc_stripe_geom rpdfs: Add free stripe request and grant messages rpdfs: Add block alloc core rpdfs: Add block allocation to the block cache rpdfs: Add block allocation to transactions rpdfs: update alloc callers to txn from balloc rpdfs: Add a devd_addr mount option In the kernel client the changes establish the pipeline of requests for free blocks, the arrival of free stripes, and the combination of the incoming free stripes into free regions. Transaction callers have the block cache send requests and assemble regions, the block cache combines the incoming stripes into contigious regions, and finally hands the regions off to the block alloc core which works with transactions to perform allocations. Happy hacking! - z