Date: Thu, 10 Nov 2022 02:31:22 +0000 From: Glen Barber <gjb@freebsd.org> To: Kirk McKusick <mckusick@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 460ed6106cf0 - main - Add support for managing UFS/FFS snapshots to fsck_ffs(8). Message-ID: <20221110023122.GC52121@FreeBSD.org> In-Reply-To: <202211091846.2A9IkpA1013071@gitrepo.freebsd.org> References: <202211091846.2A9IkpA1013071@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--JgQwtEuHJzHdouWu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 09, 2022 at 06:46:51PM +0000, Kirk McKusick wrote: > The branch main has been updated by mckusick: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D460ed6106cf0854caff62e4eeb= a8ffcd00ab0690 >=20 > commit 460ed6106cf0854caff62e4eeba8ffcd00ab0690 > Author: Kirk McKusick <mckusick@FreeBSD.org> > AuthorDate: 2022-11-09 18:44:03 +0000 > Commit: Kirk McKusick <mckusick@FreeBSD.org> > CommitDate: 2022-11-09 18:46:31 +0000 >=20 > Add support for managing UFS/FFS snapshots to fsck_ffs(8). > =20 > The kernel handles the managment of UFS/FFS snapshots. Since UFS/FFS > updates filesystem data (rather than always writing changes to new > locations like ZFS), the kernel must check every filesystem write > to see if the block being written is part of a snapshot. If it is > part of a snapshot, then the kernel must make a copy of the old > block value into a newly allocated block for the snapshot before > allowing the write to be done. Similarly, if a block is being freed, > the kernel must check to see if it is part of a snapshot and let > the snapshot claim the block rather than freeing it for future use. > When a snapshot is freed, its blocks need to be offered to older > snapshots and freed only if no older snapshots wish to claim them. > =20 > When snapshots were added to UFS/FFS they were integrated into soft > updates and just a small part of the management of snapshots needed > to be added to fsck_ffs(8) as soft updates minimized the set of > snapshot changes that might need correction. When journaling was > added to soft updates a much more complete knowledge of snapshots > needed to be added to fsck_ffs(8) for it to be able to properly > handle the filesystem changes that a journal rollback needs to do > (specifically the freeing and allocation of blocks). Since this > functionality was unavailable, the use of snapshots was disabled > when running with journaled soft updates. > =20 > This set of changes imports the kernel code for the management of > snapshots to fsck_ffs(8). With this code in place it will become > possible to enable snapshots when running with journalled soft > updates. The most immediate benefit will be the ability to use > snapshots to take consistent filesystem dumps on live filesystems. > Future work will be done to update fsck_ffs(8) to be able to use > snapshots to run in background on live filesystems running with > journaled soft updates. > =20 I think this broke the main build. Notably: % @@ -483,11 +507,38 @@ flush(int fd, struct bufarea *bp) % } % /* FALLTHROUGH */ % default: % + copyonwrite(&sblock, bp, std_checkblkavail); % blwrite(fd, bp->b_un.b_buf, bp->b_bno, bp->b_size); % break; https://ci.freebsd.org/job/FreeBSD-main-i386-build/24590/console Glen --JgQwtEuHJzHdouWu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAmNsYnMACgkQAxRYpUeP 4pNo/g//WG+ZugkV/cjjtGh5P7M9F5QBHNXTbNOOru6k9CYL+/H1wwaje1nQbemO 33bbkB+1IpEHaJ1mqM1Ch3OYleFYFFJN7pujjbPLg/M23x7AHjMvB3NLjVjr7pxp Vxch7DC6VFNooBDI5N9QOUHx3XKCRAej6lar3zu+JPsdDfss2qBds8lrxGEW/RRy 0Xt/8yVPFVPpyRBH+ORFJL4cbki5KDWmPf4bo5mtQEOzZl9kQMhQqHqm29X6yHS2 8ubB2iZkP0HRDgoynm1woZDg18JtV5RisQrZmvvwWc16olTM+emqURmGC8zk2fJy nVLEJn/SCED0KBUkGQrw302EsHxG+6QItUnvH2Vd0VDTlbai/QGN7NEbmRwkOLmB 5rxzOo7kReZq0E9DmYGBTIf1tf4iMVRSTmTIO3OZsFP/w9nruPcRMcfYT4cXJS+n A8Jo9+Dq9LasfEiOs/19ahHFxlhSUtKzoYKhbbKwvA1cikW+zthyIRW+Tw7BO1KF hwDkkCqa5COQc2vQPCsWLjkD/Q4vJ4tkOEDqBene7YehU4A+j9xfIJKWXNIGb6iJ +kbNQG94m5+uwwxo6GXi3FBKHuWPNo/v3yBKte6KgDyUe13je0ylFvEEZ2mUXkrD HrSa0z8zWwIK/ReVzwDgjEC+Z0kjBenRK7KiH5EqHkqRU6HAQtc= =cXyw -----END PGP SIGNATURE----- --JgQwtEuHJzHdouWu--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20221110023122.GC52121>