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).
  */
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to