From: Sunil Mushran <sunil.mushran@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 2/2] ocfs2 patch to track delayed orphan scan timer statistics
Date: Tue, 02 Jun 2009 11:30:30 -0700 [thread overview]
Message-ID: <4A256FC6.3090106@oracle.com> (raw)
In-Reply-To: <1243923105-3339-3-git-send-email-srinivas.eeda@oracle.com>
Srinivas Eeda wrote:
> Patch to track delayed orphan scan timer statistics.
>
> Modifies ocfs2_osb_dump to print the following:
> Orphan Scan=> Local: 10 Global: 21 Last Scan: 67 seconds ago
>
> Signed-off-by: Srinivas Eeda <srinivas.eeda@oracle.com>
> ---
> fs/ocfs2/journal.c | 2 ++
> fs/ocfs2/ocfs2.h | 4 +++-
> fs/ocfs2/super.c | 7 +++++++
> 3 files changed, 12 insertions(+), 1 deletions(-)
>
> diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
> index cee42ed..81b5885 100644
> --- a/fs/ocfs2/journal.c
> +++ b/fs/ocfs2/journal.c
> @@ -1907,6 +1907,8 @@ void ocfs2_queue_delayed_orphan_scan(struct ocfs2_super *osb)
> * number and update LVB so other node will skip the scan for a while
> */
> seqno++;
> + ds->ds_count++;
> + ds->ds_scantime = CURRENT_TIME;
> unlock:
> ocfs2_orphan_scan_unlock(osb, seqno, level);
> out:
> diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
> index 7dc23de..4eea45e 100644
> --- a/fs/ocfs2/ocfs2.h
> +++ b/fs/ocfs2/ocfs2.h
> @@ -156,7 +156,9 @@ struct ocfs2_delayed_orphan_scan {
> struct ocfs2_super *ds_osb;
> struct ocfs2_lock_res ds_lockres; /* lock to synchronize scans */
> struct delayed_work ds_delayed_orphan_scan_work;
> - u64 ds_seqno; /* incremented on every scan */
> + struct timespec ds_scantime; /* time this node ran the scan */
> + u64 ds_count; /* tracks node specific scans */
> + u64 ds_seqno; /* tracks cluster wide scans */
>
u32 should be enough.
> };
>
> struct ocfs2_dlm_debug {
> diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
> index 06e139e..d2320a0 100644
> --- a/fs/ocfs2/super.c
> +++ b/fs/ocfs2/super.c
> @@ -208,6 +208,7 @@ static int ocfs2_osb_dump(struct ocfs2_super *osb, char *buf, int len)
> int i;
> struct ocfs2_cluster_connection *cconn = osb->cconn;
> struct ocfs2_recovery_map *rm = osb->recovery_map;
> + struct ocfs2_delayed_orphan_scan *ds;
>
> out += snprintf(buf + out, len - out,
> "%10s => Id: %-s Uuid: %-s Gen: 0x%X Label: %-s\n",
> @@ -309,6 +310,12 @@ static int ocfs2_osb_dump(struct ocfs2_super *osb, char *buf, int len)
> i, osb->slot_recovery_generations[i]);
> }
>
> + ds = &osb->osb_delayed_scan;
> + out += snprintf(buf + out, len - out, "Orphan Scan=> ");
> + out += snprintf(buf + out, len - out, "Local: %llu Global: %llu ",
> + ds->ds_count, ds->ds_seqno);
> + out += snprintf(buf + out, len - out, " Last Scan: %lu seconds ago\n",
> + (get_seconds() - ds->ds_scantime.tv_sec));
> return out;
> }
>
>
next prev parent reply other threads:[~2009-06-02 18:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-02 6:11 [Ocfs2-devel] Patches that adds delayed orphan scan timer Srinivas Eeda
2009-06-02 6:11 ` [Ocfs2-devel] [PATCH 1/2] OCFS2: timer to queue scan of all orphan slots Srinivas Eeda
2009-06-02 18:26 ` Sunil Mushran
2009-06-02 18:34 ` Sunil Mushran
2009-06-02 6:11 ` [Ocfs2-devel] [PATCH 2/2] ocfs2 patch to track delayed orphan scan timer statistics Srinivas Eeda
2009-06-02 18:30 ` Sunil Mushran [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-06-02 23:37 [Ocfs2-devel] Patches that adds delayed orphan scan timer (rev 2) Srinivas Eeda
2009-06-02 23:37 ` [Ocfs2-devel] [PATCH 2/2] ocfs2 patch to track delayed orphan scan timer statistics Srinivas Eeda
2009-06-03 0:28 ` Sunil Mushran
2009-06-04 0:02 [Ocfs2-devel] Patches that adds delayed orphan scan timer (rev 3) Srinivas Eeda
2009-06-04 0:02 ` [Ocfs2-devel] [PATCH 2/2] ocfs2 patch to track delayed orphan scan timer statistics Srinivas Eeda
2009-06-04 6:40 [Ocfs2-devel] Backport that adds delayed orphan scan timer to 1.4 Srinivas Eeda
2009-06-04 6:40 ` [Ocfs2-devel] [PATCH 2/2] ocfs2 patch to track delayed orphan scan timer statistics Srinivas Eeda
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=4A256FC6.3090106@oracle.com \
--to=sunil.mushran@oracle.com \
--cc=ocfs2-devel@oss.oracle.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.