linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
To: Jeff Moyer <jmoyer@redhat.com>, Christoph Hellwig <hch@infradead.org>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [RFC PATCH 02/18] blktrace: add more definitions for BLK_TC_ACT
Date: Thu, 2 May 2019 03:48:04 +0000	[thread overview]
Message-ID: <SN6PR04MB4527EAAA4A15EA59EB8134D786340@SN6PR04MB4527.namprd04.prod.outlook.com> (raw)
In-Reply-To: x49sgtyxrhv.fsf@segfault.boston.devel.redhat.com

Thanks for the reply Jeff.

On 5/1/19 5:56 AM, Jeff Moyer wrote:
> Christoph Hellwig <hch@infradead.org> writes:
> 
>> On Tue, Apr 30, 2019 at 09:28:15PM -0700, Chaitanya Kulkarni wrote:
>>> @@ -104,7 +120,12 @@ struct blk_io_trace {
>>>   	__u64 time;		/* in nanoseconds */
>>>   	__u64 sector;		/* disk offset */
>>>   	__u32 bytes;		/* transfer length */
>>> +
>>> +#ifdef CONFIG_BLKTRACE_EXT
>>> +	__u64 action;		/* what happened */
>>> +#else
>>>   	__u32 action;		/* what happened */
>>> +#endif /* CONFIG_BLKTRACE_EXT */
>>
>> You can't use CONFIG_ symbols in UAPI headers, as userspace
>> applications won't set it.  You also can't ever change the layout of an
>> existing structure in UAPI headers in not backward compatible way.
> 
> Right.  The blk_io_trace->magic has the lower 8 bits reserved for a
> version number which is checked by userspace.  There's no way to
> negotiate a supported version between userspace and the kernel,
> unfortunately.  The version number is checked for each trace event.
> 
> What you *could* do is to add another trace event with a higher version
> number that includes only the extra data.  So each event would be split
> into two: the original event with original content and the new event
> that only contains the new fields.  That way the old userspace would
> continue to work, as it would discard the trace events it doesn't
> recognize.  Newer userspace could handle both types of events, and merge
> them back together.
> 
> There would be a ton of warnings spewed on stderr, unfortunately, but it
> would at least work.  I don't see a lot of value in the kernel config
> option, no matter which way we go with this.
>
As you have mentioned this approach will have a lot of stderr, I was 
trying to avoid this scenario. If everyone is okay with this will make 
this change and resend the series.

> -Jeff
> 



  reply	other threads:[~2019-05-02  3:48 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-01  4:28 [RFC PATCH 00/18] blktrace: add blktrace extension support Chaitanya Kulkarni
2019-05-01  4:28 ` [RFC PATCH 01/18] blktrace: increase the size of action mask Chaitanya Kulkarni
2019-05-01 15:48   ` Bart Van Assche
2019-05-02  3:43     ` Chaitanya Kulkarni
2019-05-02 15:12       ` Bart Van Assche
2019-05-01  4:28 ` [RFC PATCH 02/18] blktrace: add more definitions for BLK_TC_ACT Chaitanya Kulkarni
2019-05-01 12:31   ` Christoph Hellwig
2019-05-01 12:56     ` Jeff Moyer
2019-05-02  3:48       ` Chaitanya Kulkarni [this message]
2019-05-02  3:49     ` Chaitanya Kulkarni
2019-05-01  4:28 ` [RFC PATCH 03/18] blktrace: update trace to track more actions Chaitanya Kulkarni
2019-05-01  4:28 ` [RFC PATCH 04/18] kernel/trace: add KConfig to enable blktrace_ext Chaitanya Kulkarni
2019-05-01  4:28 ` [RFC PATCH 05/18] blktrace: add iopriority mask Chaitanya Kulkarni
2019-05-01  4:28 ` [RFC PATCH 06/18] " Chaitanya Kulkarni
2019-05-01  4:28 ` [RFC PATCH 07/18] blktrace: allow user to track iopriority Chaitanya Kulkarni
2019-05-01  4:28 ` [RFC PATCH 08/18] blktrace: add sysfs ioprio mask Chaitanya Kulkarni
2019-05-01  4:28 ` [RFC PATCH 09/18] blktrace: add debug support for extension Chaitanya Kulkarni
2019-05-01  4:28 ` [RFC PATCH 10/18] block: set ioprio for write-zeroes, discard etc Chaitanya Kulkarni
2019-05-01  4:28 ` [RFC PATCH 11/18] block: set ioprio for zone-reset Chaitanya Kulkarni
2019-05-01  4:28 ` [RFC PATCH 12/18] block: set ioprio for flush bio Chaitanya Kulkarni
2019-05-01  4:28 ` [RFC PATCH 13/18] drivers: set bio iopriority field Chaitanya Kulkarni
2019-05-01  6:23   ` Javier González
2019-05-01  4:28 ` [RFC PATCH 14/18] fs: " Chaitanya Kulkarni
2019-05-01  4:28 ` [RFC PATCH 15/18] power/swap: " Chaitanya Kulkarni
2019-05-01  4:28 ` [RFC PATCH 16/18] mm: " Chaitanya Kulkarni
2019-05-01  4:28 ` [RFC PATCH 17/18] null_blk: add write-zeroes flag to nullb_device Chaitanya Kulkarni
2019-05-01  4:28 ` [RFC PATCH 18/18] null_blk: add module param discard/write-zeroes Chaitanya Kulkarni

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=SN6PR04MB4527EAAA4A15EA59EB8134D786340@SN6PR04MB4527.namprd04.prod.outlook.com \
    --to=chaitanya.kulkarni@wdc.com \
    --cc=hch@infradead.org \
    --cc=jmoyer@redhat.com \
    --cc=linux-block@vger.kernel.org \
    /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).