SG_IO IOCTL will break zfs-fuse

180 views
Skip to first unread message

sgheeren

unread,
Mar 10, 2012, 6:33:26 PM3/10/12
to zfs-...@googlegroups.com
I just found out on one system, that kernel.log is spammed with
thousands of these:

Mar 11 00:26:49 mubi kernel: [19855.692004] zfs-fuse: sending ioctl 2285
to a partition!

A quick google (ioctl 2285 partition -scsi_id) learned:

> If I'm not mistaken, the whole point of a series of patches
> titled: "fail SCSI passthrough ioctls on partition devices"
> was to flag and ultimately break any user space code that
> attempted to use the SG_IO ioctl on a partition block
> device (e.g. send a SCSI INQUIRY via SG_IO to /dev/sda2).
>
> This is for security reasons. So when the kernel enforces
> that, zfs-fuse will break. Please alert the zfs-fuse
> maintainers.
>
> Doug Gilbert

I think we should do a little triage/impact analysis?

Cheers,
Seth

sgheeren

unread,
Mar 10, 2012, 6:40:57 PM3/10/12
to zfs-...@googlegroups.com
Damn, just found out the issue was already reported but I didn't get
notification emails anymore. Anyways more background:

http://zfs-fuse.net/issues/143

http://comments.gmane.org/gmane.linux.scsi/72667

Cheers

Emmanuel Anne

unread,
Mar 10, 2012, 8:18:50 PM3/10/12
to zfs-...@googlegroups.com
I had seen that in the logs for a long time, but never took the time to investigate, I actually thought it was a forgotten warning in our code, not in the kernel.

So it seems related to the flush cache ioctl, and maybe zfs-fuse sends that too often, because you can reproduce that just by running "zpool list" with nothing mounted.
The question is : does somebody know how to flush this cache without getting this warning ?
If you want to investigate, it's in lib/libzpool/flushwc.c
From the lkml : https://lkml.org/lkml/2012/2/10/253
they seem to say that the warning will be removed and the function will continue to work, so maybe we should just continue to ignore it !

2012/3/11 sgheeren <sghe...@hotmail.com>

--
To post to this group, send email to zfs-...@googlegroups.com
To visit our Web site, click on http://zfs-fuse.net/



--
my zfs-fuse git repository : http://rainemu.swishparty.co.uk/cgi-bin/gitweb.cgi?p=zfs;a=summary
Reply all
Reply to author
Forward
0 new messages