Skip to contentSkip to conversation

have ioctls changed?

DISCUSSION Marc Lehmann 2 participants 3 messages Nov 17, 2015

lore
Share & tools
lore
#0 lore raw

Hi!

While trying the new f2fs snapshot (3.18 branch from yesterday), I found that my GC script does no longer work:

ioctl(0, 0xf506, 0x1741810) = -1 ENOTTY (Inappropriate ioctl for device)

fd#0 is from open ("/mountpoint",...). I didn't upgrade kernels or anything else - the script works with the module I previously used.

So, have the ioctls changed recently, or some detail about them?

Signature · 8 lines
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\

------------------------------------------------------------------------------
#1 lore raw

Hi,

Quoted 8 lines

-----Original Message-----
From: Marc Lehmann [mailto:[email protected]]
Sent: Tuesday, November 17, 2015 9:37 AM
To: [email protected]
Subject: [f2fs-dev] have ioctls changed?

Hi!

Quoted 7 lines

While trying the new f2fs snapshot (3.18 branch from yesterday), I found that my GC script does no longer work:

   ioctl(0, 0xf506, 0x1741810)             = -1 ENOTTY (Inappropriate ioctl for device)

fd#0 is from open ("/mountpoint",...). I didn't upgrade kernels or anything else - the script works with the module I previously used.

We didn't change the main interface (0xf506) of ioctl for GC, but did change the usage of parameter passed of it.

So, firstly, could you please check whether below commits exist in your branch:
- c1c1b58359d4 ("f2fs: add new ioctl F2FS_IOC_GARBAGE_COLLECT")
- d530d4d8e237 ("f2fs: support synchronous gc in ioctl")

Then, if it exists, I think it's better to check the real file opened which fd#0 points to since I'm not sure this file is belong to f2fs.

Thanks,

Quoted 11 lines

So, have the ioctls changed recently, or some detail about them?

--

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\
Quoted 5 lines

------------------------------------------------------------------------------
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

------------------------------------------------------------------------------

#2 lore raw
In reply to Marc Lehmann
Quoted 4 lines · Marc Lehmann

While trying the new f2fs snapshot (3.18 branch from yesterday), I found that my GC script does no longer work:

   ioctl(0, 0xf506, 0x1741810)             = -1 ENOTTY (Inappropriate ioctl for device)

Very strange, after much experimenting I deleted my f2fs checkout again (I did "git pull" before and git log showed the correct changes, also the ioctls were defined in the header files) and did a fresh checkout, and that kernel module works.

Signature · 8 lines
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\

------------------------------------------------------------------------------