All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shaohua Li <shli@kernel.org>
To: "Jens-U. Mozdzen" <jmozdzen@nde.ag>
Cc: NeilBrown <nfbrown@novell.com>, linux-raid@vger.kernel.org
Subject: Re: deprecating /proc/mdstat (was: Re: mdadm bad blocks list)
Date: Thu, 28 Jan 2016 10:21:02 -0800	[thread overview]
Message-ID: <20160128182102.GA23378@kernel.org> (raw)
In-Reply-To: <20160128124121.Horde.YKtbZL0CUYKTuEkxLcmmhQ4@www3.nde.ag>

On Thu, Jan 28, 2016 at 12:41:21PM +0100, Jens-U. Mozdzen wrote:
> Hello Neil & *,
> 
> Zitat von NeilBrown <nfbrown@novell.com>:
> >[...]
> >I'd like to deprecate /proc/mdstat.  It is not really easy to extend.
> 
> while I understand that /proc/mdstat's format might be considered "frozen"
> as in "do not confuse old scripts by new formats", I'd hate to see
> /proc/mdstat go away without a similar replacement: calling "mdadm" (or any
> other CLI) to gather that information is unruly expensive when all you have
> to do is "watch cat /proc/mdstat" to manually monitor critical operations.

That will not happen soon. Deprecating an interface takes years.
 
> >I'd recommend using "mdadm" to get status of an array, or examine file
> >in /sys.
> 
> If there's to be a "new mdstat" in /sys, I'd be fine with that. That would
> help migration for those "old scripts grep'ing /proc/mdstat" you rightfully
> care about.
> 
> I suggest to include a file format version information on line 1
> "/sys/.../mdstat", that way any client parsing such an interface could
> verify the file format first, and bail out if it doesn't support the
> currently presented format.

All the info you can get from /proc/mdstat can be found in /sys/xxx. There
isn't a central mdstat file in sysfs entry, each sysfs entry only export single
type info. Version info is uncessary, if we need add new info, we'd just add a
new sysfs entry.

though the /proc/mdstat will not be deprecated soon, it's highly encouraged app
switches to /sys. sysfs entry is easy to parse. And as Neil said, /proc/mdstat
is hard to extend, so new info will likely only appear in sysfs.

Thanks,
Shaohua

  reply	other threads:[~2016-01-28 18:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 18:45 mdadm bad blocks list Sarah Newman
2016-01-28  3:19 ` NeilBrown
2016-01-28  3:55   ` Sarah Newman
2016-01-28  4:45     ` NeilBrown
2016-01-30 18:22     ` Sarah Newman
2016-01-28 11:41   ` deprecating /proc/mdstat (was: Re: mdadm bad blocks list) Jens-U. Mozdzen
2016-01-28 18:21     ` Shaohua Li [this message]
2016-02-02 14:33       ` deprecating /proc/mdstat Jes Sorensen
2016-02-02  2:40   ` mdadm bad blocks list Sarah Newman
2016-02-11  4:15     ` NeilBrown

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=20160128182102.GA23378@kernel.org \
    --to=shli@kernel.org \
    --cc=jmozdzen@nde.ag \
    --cc=linux-raid@vger.kernel.org \
    --cc=nfbrown@novell.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.