[lkml]   [2008]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [fuse-devel] [PATCHSET] FUSE: extend FUSE to support more operations
On Tue, 14 Oct 2008, Matt Craighead wrote:
> > The other is that I really
> > really don't want people to start implementing new custom ioctls for
> > their filesystems, as I think that way lies madness.
> Do you have a proposed alternative for file systems that need complex
> non-standard file system operations? I think the suggestion on the web site
> was to use get/setxattr. I tried that and found two problems:
> 1. there's no bidirectional version that both sends arguments to the
> operation and receives more than just a status back in a single API call --
> you can get, you can set, but you can't set and get extra info back
> 2. xattr's are limited in size by the kernel; large ones get truncated

Another alternative is to use some sort of out-of-band communication
with the server (socket, shared memory, etc). Doesn't suffer from
either of the above issues and does not have the limitations and
implementation problems (having to access another process's address
space directly) of ioctls.

OTOH if you can solve it with standard file operations within the same
namespace as the regular files, that's the best solution. Like you
said you get network transparency, and you also let normal tools
operate on the special control files, which can be a very powerful
thing (think scripting). You'd never get that with ioctls, and that's
one of the reasons why ioctls suck.


 \ /
  Last update: 2008-10-14 23:07    [W:0.153 / U:9.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site