Bug 220086 - linux compat layer statfs implementation should present zfs as ext2
Summary: linux compat layer statfs implementation should present zfs as ext2
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.0-STABLE
Hardware: amd64 Any
: --- Affects Some People
Assignee: Ed Maste
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-17 22:03 UTC by Brad Ackerman
Modified: 2018-05-28 19:56 UTC (History)
2 users (show)

See Also:
emaste: mfc-stable11+
emaste: mfc-stable10?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brad Ackerman 2017-06-17 22:03:09 UTC
The statfs implementation in sys/compat/linux/linux_stats.c (function bsd_to_linux_ftype) does not currently handle zfs filesystems. Some proprietary software (e.g. Splunk) expects a sane value for statfs.f_type and will refuse to function when that's 0L.

SmartOS solved this issue (https://smartos.org/bugview/OS-3932) by presenting zfs as ext2; the same solution should work for FreeBSD.
Comment 1 Conrad Meyer freebsd_committer freebsd_triage 2017-06-17 22:23:21 UTC
What value does ZFS on Linux present?
Comment 2 Conrad Meyer freebsd_committer freebsd_triage 2017-06-17 23:20:51 UTC
FWIW, a Linux user reports ZFS on Linux shows 2fc12fc1 for statfs f_type.

I don't think pretending to be ext2 makes much sense.
Comment 3 Ed Maste freebsd_committer freebsd_triage 2017-06-18 01:14:11 UTC
Can you try the patch in https://reviews.freebsd.org/D11252
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-06-18 11:51:37 UTC
A commit references this bug:

Author: emaste
Date: Sun Jun 18 11:51:04 UTC 2017
New revision: 320069
URL: https://svnweb.freebsd.org/changeset/base/320069

Log:
  Add ZFS to Linux statfs ftype

  PR:		220086
  Reviewed by:	cem
  MFC after:	3 weeks
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D11252

Changes:
  head/sys/compat/linux/linux_stats.c
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-07-09 00:25:48 UTC
A commit references this bug:

Author: emaste
Date: Sun Jul  9 00:24:52 UTC 2017
New revision: 320821
URL: https://svnweb.freebsd.org/changeset/base/320821

Log:
  MFC r320069: Add ZFS to Linux statfs ftype

  PR:		220086
  Sponsored by:	The FreeBSD Foundation

Changes:
_U  stable/11/
  stable/11/sys/compat/linux/linux_stats.c
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-09-09 14:30:44 UTC
A commit references this bug:

Author: emaste
Date: Sat Sep  9 14:30:17 UTC 2017
New revision: 323366
URL: https://svnweb.freebsd.org/changeset/base/323366

Log:
  MFC r320069: Add ZFS to Linux statfs ftype

  PR:		220086
  Approved by:	re (gjb)
  Sponsored by:	The FreeBSD Foundation

Changes:
_U  stable/10/
  stable/10/sys/compat/linux/linux_stats.c
Comment 7 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:41:56 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
AND
- Untouched since 2018-01-01.
AND
- Affects Base System OR Documentation

DO:

Reset to open status.


Note:
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
Comment 8 Ed Maste freebsd_committer freebsd_triage 2018-05-28 19:56:37 UTC
Thank you for the bug report - fix committed to HEAD and merged to stable/11 and stable/10.

If this issue persists please reopen this PR.