Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Nov 2020 18:45:44 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r367279 - head/sys/compat/linux
Message-ID:  <202011021845.0A2IjiEw098770@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Mon Nov  2 18:45:43 2020
New Revision: 367279
URL: https://svnweb.freebsd.org/changeset/base/367279

Log:
  linux(4): Quiesce unrecognized ioctl warning for F2FS query
  
  On Linux, sqlite probes for underlying F2FS filesystems that support
  certain kinds of atomic update with this ioctl.  The expected result on
  non-F2FS filesystem (i.e., all FreeBSD filesystems) is any error value.
  
  Minimally implement the ioctl and avoid the warning message.
  
  (This shows up in Linux Chrome, which embeds sqlite.)
  
  Reviewed by:	emaste, trasz
  Differential Revision:	https://reviews.freebsd.org/D27050

Modified:
  head/sys/compat/linux/linux_ioctl.c
  head/sys/compat/linux/linux_ioctl.h

Modified: head/sys/compat/linux/linux_ioctl.c
==============================================================================
--- head/sys/compat/linux/linux_ioctl.c	Mon Nov  2 18:45:15 2020	(r367278)
+++ head/sys/compat/linux/linux_ioctl.c	Mon Nov  2 18:45:43 2020	(r367279)
@@ -3631,6 +3631,7 @@ linux_ioctl_fallback(struct thread *td, struct linux_i
 
 	switch (args->cmd & 0xffff) {
 	case LINUX_BTRFS_IOC_CLONE:
+	case LINUX_F2FS_IOC_GET_FEATURES:
 	case LINUX_FS_IOC_FIEMAP:
 		return (ENOTSUP);
 

Modified: head/sys/compat/linux/linux_ioctl.h
==============================================================================
--- head/sys/compat/linux/linux_ioctl.h	Mon Nov  2 18:45:15 2020	(r367278)
+++ head/sys/compat/linux/linux_ioctl.h	Mon Nov  2 18:45:43 2020	(r367279)
@@ -707,6 +707,11 @@
 #define LINUX_IOCTL_VIDEO2_MIN	LINUX_VIDIOC_QUERYCAP
 #define LINUX_IOCTL_VIDEO2_MAX	LINUX_VIDIOC_UNSUBSCRIBE_EVENT
 
+#define	LINUX_F2FS_IOC_GET_FEATURES		0xf50c /* 0x8004f50c */
+
+#define	LINUX_IOCTL_F2FS_MIN			0xf500
+#define	LINUX_IOCTL_F2FS_MAX	LINUX_F2FS_IOC_GET_FEATURES
+
 /*
  * Our libusb(8) calls emulated within linux(4).
  */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011021845.0A2IjiEw098770>