Shaohua Li <shli@xxxxxxxxxx> writes: > On Thu, Jan 28, 2016 at 12:41:21PM +0100, Jens-U. Mozdzen wrote: >> 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. I think the strong argument for /proc/mdstat is that it's easy for visual inspection, but should not be scripted. I certainly use it quite regularly, but maybe I am just old and lazy :) Cheers, Jes -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html