Re: [PATCH 00/11] [GIT PULL] more updates for the tag format

From: Theodore Tso
Date: Thu Jun 11 2009 - 11:48:22 EST


On Thu, Jun 11, 2009 at 09:03:18AM -0400, Christoph Hellwig wrote:
> On Wed, Jun 10, 2009 at 12:03:03PM -0400, Theodore Tso wrote:
> > Yes, another approach for handling this case would be to take my
> > "jbd2_dev_to_name" function and support it as a first-class tagged
> > type; after all, I'm sure ext4 won't be the only place that would like
> > to take a dev_t and print the device name. So this could certainly be
> > fixed by adding some kind of "<dev:xxx>" sort of tagged name.
>
> We should absolutely agree on one way to represent block device for
> tracers. At this point xfs, gfs2 and the block tracer all use
> major/minor. I agree that having a name would be nicer for text output,
> but I really want to keep the dev_t for the binary output. We should
> also make sure we agree on a field name so that filtering will work
> the same for all block-related tracers (especially important if we want
> to trace something from the filesystem down to the block layer).

And I want to keep the dev_t as what stored in the ring buffer for
space reasons; but the text name is far more convient in terms of
being human-readable, *especially* given there are some crazy people
out there wanting to make major/minor numbers be completely random.
The problem with that is that a log trace file might not be useful
after a reboot, unless someone had enough foresight to save the device
mappings which were in effect at the that the trace was taken.

So if we store the dev_t in the ring buffer, and have a way of
translating the dev_t into a human-friendly name at printk happen, I
think that meets both of our goals. That would imply that filtering
would be using a device number, which would certainly be more
efficient than doing a string compare.

- Ted

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