linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "heming.zhao@suse.com" <heming.zhao@suse.com>
To: "Jorge Fábregas" <jorge.fabregas@gmail.com>, linux-raid@vger.kernel.org
Subject: Re: Events Counter - How it increments
Date: Thu, 19 Nov 2020 00:45:43 +0800	[thread overview]
Message-ID: <567bc78b-cf37-c40b-2e99-b86a80bdfb3e@suse.com> (raw)
In-Reply-To: <819ff80e-10d0-8cc6-b34c-418fdea7b57a@gmail.com>

On 11/10/20 10:24 PM, Jorge Fábregas wrote:
> Hi everyone,
> 
> I'm new to Linux RAID. I've searched for a clear explanation on this but
> couldn't find it.
> 
> How does the "Events" counter (as shown with mdadm --examine) gets
> incremented? On what sort of events?
> 
> I was initially confused about the "Events" (thinking on the different
> events as reported by mdadm --monitor) but I see this is another thing.
> I've seen explanations about it incrementing after performing writes but
> I've done some test writes and I don't see the counters changing at all
> on my RAID1 arrays.  I've also seen explanations that it increments
> whenever there are changes to the superblock?
> 
> Thank you.
> 

The events is related with (struct mddev) mddev->events. 
you can search it in kernel source code.

and the 'events' is also recorded in md metadata area, with struct:
```
struct mdp_superblock_1 {
   ... ...
   __le64  events;     /* incremented when superblock updated */
   ... ...
};
```


  parent reply	other threads:[~2020-11-18 16:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10 14:24 Events Counter - How it increments Jorge Fábregas
2020-11-17 15:50 ` Jorge Fábregas
2020-11-18 16:45 ` heming.zhao [this message]
2020-11-19  2:21   ` Jorge Fábregas
2020-11-19 11:27     ` heming.zhao
2020-11-19 11:46       ` Jorge Fábregas

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=567bc78b-cf37-c40b-2e99-b86a80bdfb3e@suse.com \
    --to=heming.zhao@suse.com \
    --cc=jorge.fabregas@gmail.com \
    --cc=linux-raid@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).