Re: [PATCH 1/5] fs: add netlink notification interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 18, 2011 at 02:18:22PM +0200, Lukas Czerner wrote:
> +void fs_nl_send_warning(dev_t dev, unsigned int warntype)
> +{

I'm pretty sure this interface isn't going to be sufficient in the
long run.  I can imagine that people might want to pass in a struct
inode *, or a struct file * if available, so we could pass back the
inode number involved, or even the pathname.

Also, I'd suggesting changing "warning" to "error", since that's what
most of the things we are sending really are...

> +	ret = nla_put_u32(skb, FS_NL_A_WARNING, warntype);
> +	if (ret)
> +		goto attr_err_out;

Why not make the warning type to be a string instead of an integer?
This would make it easier to extend the protocol in the future.

> +	ret = nla_put_u64(skb, FS_NL_A_CAUSED_ID, current_uid());
> +	if (ret)
> +		goto attr_err_out;

I'd also suggest passing back the process id that requested the I/O if
that's known...

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux