From: Al Viro <viro@zeniv.linux.org.uk>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: fsdevel <linux-fsdevel@vger.kernel.org>,
David Howells <dhowells@redhat.com>
Subject: Re: [PATCH V2] fs_parser: remove fs_parameter_description name field
Date: Fri, 20 Dec 2019 18:14:11 +0000 [thread overview]
Message-ID: <20191220181411.GA25833@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20191219232951.GL4203@ZenIV.linux.org.uk>
On Thu, Dec 19, 2019 at 11:29:51PM +0000, Al Viro wrote:
> I wonder if we should do the following:
> * structure with two members - pointer to fc_log and a string
> (prefix) embedded into fs_context, in place of ->log.
> * __logfc() taking pointer to that struct, integer or
> character representing the "log level", then format and vararg part.
> * warnf() being simply __logfc(&fc->log, 'w', fmt, ## __VA_ARGS__)
> * __logfc() using "%c %s%s%pV",
> loglevel,
> prefix?prefix:"",
> prefix ? ":" : "",
> fmt, va
> for kvasprintf() (assuming that %pV *can* be used with it, of course)
> * const char *set_log_prefix(pointer, string) replacing the
> prefix field of the struct and returning the original. fs_context
> allocation would set it to fs_type->name.
> * __fs_parse() would be taking a pointer to that field of
> fs_context instead of the entire thing; ditto for fs_param_is_...()
> * rbd would create a local structure with "rbd" for prefix
> and NULL for log
> * net/ceph would replace the prefix in the thing it has
> been given with "libceph" and revert back to original in the end
>
> The most worrying part in that is kvasprintf interplay with %pV -
> we might need to open-code it, since we need va_copy() not of that
> sucker's arguments, but of the va_list one level deeper.
We won't - va_format() itself does take a copy. So no open-coding
is needed, kasprint() would work. OK, that simplifies things...
prev parent reply other threads:[~2019-12-20 18:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-06 16:31 [PATCH V2] fs_parser: remove fs_parameter_description name field Eric Sandeen
2019-12-06 16:45 ` [PATCH V3] " Eric Sandeen
2019-12-18 3:36 ` [PATCH V2] " Al Viro
2019-12-18 3:43 ` Eric Sandeen
2019-12-18 4:06 ` Al Viro
2019-12-19 23:29 ` Al Viro
2019-12-20 18:14 ` Al Viro [this message]
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=20191220181411.GA25833@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=sandeen@sandeen.net \
/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).