From nobody Thu Jul 25 06:11:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WV0r46VWpz5RNqw; Thu, 25 Jul 2024 06:11:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WV0r4645tz4gt1; Thu, 25 Jul 2024 06:11:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721887860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SsjsCg/3nsYuCRr5WOTsUrOYPcoqBFdZJlj7V7mlpYQ=; b=R4TGLocj+CEpNU/HZnQRugnAksVpQ4EGNt6UbAIbDM8bG1E5QnerBauhO5345zjohfVQ4v gEI+8kfjL17m5YYE5Qx0wGNp6cRGhpN8r45YgtPKbZENNhLblA1P67pVSakkqMPIqWK6xf arfATftTR7aFiCl2KnOaDBzcxCBjWZxwo0f9GwrdymEQwxuGeCA/ggJ8QrHu4y9VH8W/xm 7hdGg20DrGi6fL5ZugsZP49Zp7rtf4Zjp61n6We8C7H3VZN4kJX1LBLFJXoVfUsYfxC8M3 Q5SV+mRB9vj5t1FUsxZXnThcY1twUzDuhU5r9G8KMM6MiD0dfR2FmdVbu3PpTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721887860; a=rsa-sha256; cv=none; b=I9rIna7TGjzGEhRM8xPE9VbLRdnEicxS9ZQZ1nhFKrK7S8usjyR7ZjED9daUh29egWX4g1 mtr7T6VaHSgZ5fcOc8daClZ9yl5vVOPOENGkWNCAcDN9Vq1msebBOZGoUJSXr3Lr4DOA/z NMAuTm6Zyg+g0ybspQI2h7xZxagW3TVnh4Z+sVz1/regKQ00aCuGrBQ1t6fSwY4la0ILfg TcXEfTpSXTNCRy+jVWSnVVBQez4hOwgOfUcgh1pnDW4YVlfjBsXeEpN4Tw/ScAChwNVz4y 7JUyX4K9r4OBN/fQMQ3vB6m5VVjHn6n9TKWNSCvl90BmJJoWpl6o2f4VHQXBWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721887860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SsjsCg/3nsYuCRr5WOTsUrOYPcoqBFdZJlj7V7mlpYQ=; b=Qdq+qAvkNjTrmIXZXuWf3GHFZHDM29hz6jXbRLNqESwY/ONh8GuQoXGgRUtTiwO4abPFAX UBmj3t4CeKI7OmFS3qy5gMh9fwDpwwtBF+oJqw90ic2UQFMYmC3OdluknR/HvyCjK8ykqp YdDbkhFAzoJYi2ctiRfmLovs2a1Z0r86IxT8QMjHK5Jp6NT877sl8mGvxPJWCEzzaFoVTP FNWNl+sZGCqimP0Psu55fKaqiRFNndUMKEkhGPjE3mBeKR9BF4kPFl7FH61WASN7v1Pxqj jAPTPoNMMuQCNLDIr7/z1oA3TzFzEmlfKz6r/5UJErNl7Xy69CbbldIvjkRawQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WV0r45gYtzk3B; Thu, 25 Jul 2024 06:11:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46P6B0q5080946; Thu, 25 Jul 2024 06:11:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46P6B0dT080943; Thu, 25 Jul 2024 06:11:00 GMT (envelope-from git) Date: Thu, 25 Jul 2024 06:11:00 GMT Message-Id: <202407250611.46P6B0dT080943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: cab41e0dd31d - main - Do not allow snapshots on UFS filesystems using gjournal. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cab41e0dd31d184bdb0d14403ca71a0f6c9a5e83 Auto-Submitted: auto-generated The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=cab41e0dd31d184bdb0d14403ca71a0f6c9a5e83 commit cab41e0dd31d184bdb0d14403ca71a0f6c9a5e83 Author: Kirk McKusick AuthorDate: 2024-07-25 06:09:58 +0000 Commit: Kirk McKusick CommitDate: 2024-07-25 06:10:47 +0000 Do not allow snapshots on UFS filesystems using gjournal. The gjournal implementation does not properly handle the freeing of blocks that may be part of a snapshot. Adding this support to gjournal would require considerable effort. For now we simply do not allow snapshots to be taken on filesystems using gjournal. Reported by: ant_mail@inbox.ru PR: 280216 MFC after: 1 week --- sys/ufs/ffs/ffs_snapshot.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index e0f87223942a..b0adb6c033c7 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -222,6 +222,15 @@ ffs_snapshot(struct mount *mp, char *snapfile) ump = VFSTOUFS(mp); fs = ump->um_fs; sn = NULL; + /* + * At the moment, filesystems using gjournal cannot support + * taking snapshots. + */ + if ((mp->mnt_flag & MNT_GJOURNAL) != 0) { + vfs_mount_error(mp, "%s: Snapshots are not yet supported when " + "using gjournal", fs->fs_fsmnt); + return (EOPNOTSUPP); + } MNT_ILOCK(mp); flag = mp->mnt_flag; MNT_IUNLOCK(mp);