Bug 255616 - fstyp(8) fails for zfs since OpenZFS 2.0 merge
Summary: fstyp(8) fails for zfs since OpenZFS 2.0 merge
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 13.0-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: Robert Wing
URL: https://forums.freebsd.org/threads/fs...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-05 11:47 UTC by Michael Büker
Modified: 2021-05-21 15:37 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Büker 2021-05-05 11:47:47 UTC
For a partition that's part of a zpool, fstyp(8) reports on 13.0-RELEASE:

# fstyp -u /dev/ada2p1
fstyp: /dev/ada2p1: filesystem not recognized

The same command works as expected on 12.2-RELEASE and below.

As reported on the forums, the problem is apparently a missing
CFLAGS+=  -DHAVE_ZFS
in the Makefile.

(see: https://forums.freebsd.org/threads/fstyp-8-returns-filesystem-not-recognised-for-zfs.80219/post-509903 )
Comment 1 Robert Wing freebsd_committer freebsd_triage 2021-05-12 03:19:50 UTC
https://reviews.freebsd.org/D30221
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-05-14 21:26:19 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=91f251b2ab3ade5de703756873142bfae2573753

commit 91f251b2ab3ade5de703756873142bfae2573753
Author:     Robert Wing <rew@FreeBSD.org>
AuthorDate: 2021-05-12 02:57:24 +0000
Commit:     Robert Wing <rew@FreeBSD.org>
CommitDate: 2021-05-14 21:00:24 +0000

    fstyp(8): define HAVE_ZFS macro when built with zfs

    The HAVE_ZFS macro was dropped from the Makefile during the OpenZFS
    merge, bring it back.

    While here, drop unused WARNS setting.

    PR:             255616
    Reported by:    Michael Büker <freebsd@michael-bueker.de>
    Submitted by:   Michael Büker <freebsd@michael-bueker.de>
    Fixes:          9e5787d2284e187abb5b654d924394a65772e004
    Reviewed by:    markj
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D30221

 usr.sbin/fstyp/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-05-21 15:36:12 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=942e69146ea242e94d1e5486c5d04a96c91e2bd3

commit 942e69146ea242e94d1e5486c5d04a96c91e2bd3
Author:     Robert Wing <rew@FreeBSD.org>
AuthorDate: 2021-05-12 02:57:24 +0000
Commit:     Robert Wing <rew@FreeBSD.org>
CommitDate: 2021-05-21 15:21:00 +0000

    fstyp(8): define HAVE_ZFS macro when built with zfs

    The HAVE_ZFS macro was dropped from the Makefile during the OpenZFS
    merge, bring it back.

    While here, drop unused WARNS setting.

    PR:             255616
    Reported by:    Michael Büker <freebsd@michael-bueker.de>
    Submitted by:   Michael Büker <freebsd@michael-bueker.de>
    Fixes:          9e5787d2284e187abb5b654d924394a65772e004
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D30221

    (cherry picked from commit 91f251b2ab3ade5de703756873142bfae2573753)

 usr.sbin/fstyp/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)