linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Lukas Czerner <lczerner@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Alexander Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH 1/5] fs: add netlink notification interface
Date: Fri, 19 Aug 2011 11:15:28 -0400	[thread overview]
Message-ID: <20110819151528.GB4602@thunk.org> (raw)
In-Reply-To: <1313669906-14931-2-git-send-email-lczerner@redhat.com>

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

  parent reply	other threads:[~2011-08-19 15:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-18 12:18 [RFC][PATCH 0/5] Add netlink file system notification interface Lukas Czerner
2011-08-18 12:18 ` [PATCH 1/5] fs: add netlink " Lukas Czerner
2011-08-18 15:00   ` Randy Dunlap
2011-08-18 15:42     ` Lukas Czerner
2011-08-19 15:15   ` Ted Ts'o [this message]
2011-08-23  9:03     ` Lukas Czerner
2011-08-18 12:18 ` [PATCH 2/5] ext3: use fs netlink interface for ENOSPC conditions Lukas Czerner
2011-08-18 12:18 ` [PATCH 3/5] ext4: " Lukas Czerner
2011-08-18 12:18 ` [PATCH 4/5] xfs: " Lukas Czerner
2011-08-25  5:16   ` Christoph Hellwig
2011-08-25  8:58     ` Lukas Czerner
2011-08-18 12:18 ` [PATCH 5/5] btrfs: " Lukas Czerner
2011-08-18 18:22   ` David Sterba
2011-08-18 19:03     ` Lukas Czerner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110819151528.GB4602@thunk.org \
    --to=tytso@mit.edu \
    --cc=lczerner@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).