lkml.org 
[lkml]   [2001]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] VFS interface for extended attributes

[Cc'd to Linus since API changes on that level definitely require his
approval]

On Mon, 12 Nov 2001, Nathan Scott wrote:

> +static long
> +extattr_inode(struct inode *i, int cmd, char *name, void *value, size_t size)

Broken.
a) passing inode is an obvious mistake. dentry or vfsmount/dentry.

b) for crying out loud, what's that with SGI and ioctl-like abortions?

Rule of the tumb: if your function got a "cmd" argument - it's broken.
ioctl(2). fcntl(2). prctl(2). quotactl(2). sysfs(2). Missed'em'V IPC
syscalls. Enough, already.

Folks, it's not a rocket science. Let a function do _one_ thing,
don't turn it into a multiplexed monstrosity. Yes, you've used only 3
syscalls. But actually you've managed to hide ~20 of them in that code
and the fact that you've spent only 3 syscall table entries doesn't make
the things better.

Please, come up with a decent API.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.098 / U:3.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site