On Tue, Mar 19, 2024 at 02:32:04PM -0700, Christoph Hellwig wrote: > On Tue, Mar 19, 2024 at 10:29:09AM -0700, Darrick J. Wong wrote: > > So.... does that mean a 128K folio for a 68k xattr remote value buffer? > > I though 64k was the maximum xattr size? 64k is the maximum xattr value size, yes. But remote xattr value blocks now have block headers complete with owner/uuid/magic/etc. Each block can only store $blksz-56 bytes now. Hence that 64k value needs ceil(65536 / 4040) == 17 blocks on a 4k fsb filesystem. (On a 64k fsb filesystem, that bloats up to 128k.) Luckily we bwrite remote blocks to disk directly, which is why we've never blown out the buffer log item bitmap. > > I've been noticing the 4k merkle tree blobs consume 2 fsb in the xattr > > tree, which isn't awesome. > > Maybe that's a question for the fsverity thread, but how do we end > up with these weird sizes? Same reason. Merkle tree blocks are $blksz by default, but storing a 4096 blob in the xattrs requires ceil(4096 / 4040) == 2 blocks. Most of that second block is wasted. --D