qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: atp exp <atp.exp@gmail.com>
Cc: qemu-devel@nongnu.org, hreitz@redhat.com
Subject: Re: [PATCH v3] qemu-img: Fix Column Width and Improve Formatting in snapshot list
Date: Mon, 22 Jan 2024 16:59:03 +0100	[thread overview]
Message-ID: <Za6Qx4tIMOp-fcic@redhat.com> (raw)
In-Reply-To: <CAFgBtdFpRmdFiPYChzxPEDWHCe=o_2FXhQAXy8W_OPPs6gfz-A@mail.gmail.com>

Am 22.01.2024 um 14:26 hat atp exp geschrieben:
> Alright, right now there are 10 digits for ID, don't think a billion
> snapshots are feasible anyway.

Indeed.

> > Maybe what we should also do is decreasing the width of each field by
> > one and instead writing a space character into the format string.
> 
> I'm assuming  you are talking about adding spaces between DATE, VM_CLOCK
> and ICOUNT, because spaces already exist for ID and TAGS.

Yes, exactly.

Kevin

> On Fri, 19 Jan 2024 at 01:13, Kevin Wolf <kwolf@redhat.com> wrote:
> 
> > Am 11.01.2024 um 18:25 hat Abhiram Tilak geschrieben:
> > > When running the command `qemu-img snapshot -l SNAPSHOT` the output of
> > > VM_CLOCK (measures the offset between host and VM clock) cannot to
> > > accommodate values in the order of thousands (4-digit).
> > >
> > > This line [1] hints on the problem. Additionally, the column width for
> > > the VM_CLOCK field was reduced from 15 to 13 spaces in commit b39847a5
> > > in line [2], resulting in a shortage of space.
> > >
> > > [1]:
> > https://gitlab.com/qemu-project/qemu/-/blob/master/block/qapi.c?ref_type=heads#L753
> > > [2]:
> > https://gitlab.com/qemu-project/qemu/-/blob/master/block/qapi.c?ref_type=heads#L763
> > >
> > > This patch restores the column width to 15 spaces and makes adjustments
> > > to the affected iotests accordingly. Furthermore, addresses a potential
> > source
> > > of confusion by removing whitespace in column headers. Example, VM CLOCK
> > > is modified to VM_CLOCK. Additionally a '--' symbol is introduced when
> > > ICOUNT returns no output for clarity.
> > >
> > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2062
> > > Fixes: b39847a50553 (migration: introduce icount field for snapshots )
> > > Signed-off-by: Abhiram Tilak <atp.exp@gmail.com>
> >
> > We can tweak the format a bit, but then we need to save those two
> > characters somewhere else so that the output still fits in 80
> > characters. We can probably reduce the size of the ID column.
> >
> > Maybe what we should also do is decreasing the width of each field by
> > one and instead writing a space character into the format string. So if
> > we ever use up the space for one of the fields again, we would lose the
> > nice column alignment, but you could still recognise the individual
> > fields.
> >
> > Kevin
> >
> >



      reply	other threads:[~2024-01-22 16:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11 17:25 [PATCH v3] qemu-img: Fix Column Width and Improve Formatting in snapshot list Abhiram Tilak
2024-01-18 19:43 ` Kevin Wolf
2024-01-22 13:26   ` atp exp
2024-01-22 15:59     ` Kevin Wolf [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=Za6Qx4tIMOp-fcic@redhat.com \
    --to=kwolf@redhat.com \
    --cc=atp.exp@gmail.com \
    --cc=hreitz@redhat.com \
    --cc=qemu-devel@nongnu.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).