Bug 221112 - zfs(8)/zpool(8) backward compatibility broken
Summary: zfs(8)/zpool(8) backward compatibility broken
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-fs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-31 05:40 UTC by Xin LI
Modified: 2017-08-05 08:45 UTC (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xin LI freebsd_committer 2017-07-31 05:40:36 UTC
Previously, it's possible to run zfs(8)/zpool(8) binary on older kernels, which is implemented in sys/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c, but it was not updated for some time.

We need to make essential operations like zpool import, zfs mount, etc., to work.
Comment 1 Alexander Motin freebsd_committer 2017-07-31 08:45:57 UTC
Could you please be more specific?  Between what versions you found compatibility broken?

I've tried to put zfs/zpool/libraries from FreeBSD 9 and 10 to 12 and with quick tests haven't noticed issues.  Looking on code, I found only one commit affecting IOCTL interface -- r317414, adding compressed send/receive, but it does not look to me as breaking ABI.
Comment 2 Xin LI freebsd_committer 2017-08-02 08:34:16 UTC
(In reply to Alexander Motin from comment #1)
Doing 'zpool import' with 11.1-RELEASE binary set on 11.0-RELEASE kernel would cause zpool to crash (also zfs mount -a) with invalid argument.
Comment 3 commit-hook freebsd_committer 2017-08-02 10:34:24 UTC
A commit references this bug:

Author: mav
Date: Wed Aug  2 10:33:47 UTC 2017
New revision: 321921
URL: https://svnweb.freebsd.org/changeset/base/321921

Log:
  Add compat shim part missed at r305197.

  This fixes compatibility between old kernel and new ZFS tools.
  It seems to be tradition to forget it. :(

  PR:		221112
  MFC after:	3 days

Changes:
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c
Comment 4 Alexander Motin freebsd_committer 2017-08-02 10:35:04 UTC
Oh, I found missed part of compat shim.
Comment 5 commit-hook freebsd_committer 2017-08-05 08:35:41 UTC
A commit references this bug:

Author: mav
Date: Sat Aug  5 08:35:13 UTC 2017
New revision: 322078
URL: https://svnweb.freebsd.org/changeset/base/322078

Log:
  MFC r321921: Add compat shim part missed at r305197.

  This fixes compatibility between old kernel and new ZFS tools.
  It seems to be tradition to forget it.

  PR:		221112

Changes:
_U  stable/11/
  stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c
Comment 6 commit-hook freebsd_committer 2017-08-05 08:36:44 UTC
A commit references this bug:

Author: mav
Date: Sat Aug  5 08:36:04 UTC 2017
New revision: 322079
URL: https://svnweb.freebsd.org/changeset/base/322079

Log:
  MFC r321921: Add compat shim part missed at r305197.

  This fixes compatibility between old kernel and new ZFS tools.
  It seems to be tradition to forget it.

  PR:		221112

Changes:
_U  stable/10/
  stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c