Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEARCH_V2: Inappropriate ioctl for device #12

Closed
andras-kiss opened this issue Jan 4, 2018 · 3 comments
Closed

SEARCH_V2: Inappropriate ioctl for device #12

andras-kiss opened this issue Jan 4, 2018 · 3 comments

Comments

@andras-kiss
Copy link

andras-kiss commented Jan 4, 2018

I'm not sure if this is the right place to post (possible) bugs. Anyway when I try to run compsize on root or my home folder, I get this error message:

akiss@buster:~$ su
Password:
root@buster:/home/akiss# ./compsize/compsize .
SEARCH_V2: Inappropriate ioctl for device
root@buster:/home/akiss#

When I run it on a subfolder, it works as expected:

root@buster:/home/akiss# ./compsize/compsize .steam
Processed 34050 files, 206016 regular extents (206274 refs), 10770 inline.
Type Perc Disk Usage Uncompressed Referenced
TOTAL 65% 23G 35G 35G
none 100% 12G 12G 12G
zstd 45% 10G 22G 22G
root@buster:/home/akiss#

I have an ext4 boot partition mounted at /boot, and a samba share mounted in my home folder.

root@buster:/home/akiss# uname -a
Linux buster 4.14.0-2-amd64 #1 SMP Debian 4.14.7-1 (2017-12-22) x86_64 GNU/Linux

@kilobyte
Copy link
Owner

kilobyte commented Jan 4, 2018

Yeah, the handling of non-btrfs filesystems is not as good as it should be.

"Inappropriate ioctl for device" still sounds better than "Not a typewriter" this ioctl would say a while ago (its #define is still named ENOTTY), but an expected error should provide a more obvious message.

I still think that failing immediately when given a non-btrfs initial directory is a good idea, as most of the time all the recursive traversal would be pointless. Should probably have an override for your use case, though.

Any advice?

@andras-kiss
Copy link
Author

andras-kiss commented Jan 4, 2018

Thank you for the response. I'm not a developer at all (at least not programmer). I've unmounted the samba share in my home directory (subfolder in home: /home/akiss/share), and compsize produces a report. Yes, maybe it would be useful if compsize ignored any non-brtfs subfolder, or maybe included that in the report. It would help to get compression stats on root even in the common case when there is a separate ext boot partition mounted.

I think it's really cool to see how much smaller data becomes with compression. I hope it will be in the kernel soon as part of brtfs-progs.

@kilobyte
Copy link
Owner

kilobyte commented Jan 4, 2018

The error message is unhelpful enough that it needs fixing.

@kilobyte kilobyte reopened this Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants