From: zkabelac@sourceware.org <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW lib/device/dev-cache.c
Date: 17 Jan 2011 15:16:56 -0000 [thread overview]
Message-ID: <20110117151656.19868.qmail@sourceware.org> (raw)
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-01-17 15:16:56
Modified files:
. : WHATS_NEW
lib/device : dev-cache.c
Log message:
Do not scan devices unnecessarily for reseting error counter
For reseting error counter use directly btree cached elements and do not
create whole dev_iterator.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1880&r2=1.1881
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/device/dev-cache.c.diff?cvsroot=lvm2&r1=1.62&r2=1.63
--- LVM2/WHATS_NEW 2011/01/13 14:56:17 1.1880
+++ LVM2/WHATS_NEW 2011/01/17 15:16:55 1.1881
@@ -1,5 +1,6 @@
Version 2.02.81 -
===================================
+ Do not scan devices unnecessarily in dev_reset_error_count().
Skip unnecessary lock_vol() call after volume deactivation.
Extend exec_cmd params to specify, when device sync is needed.
Replace fs_unlock by sync_local_dev_names to notify local clvmd. (2.02.80)
--- LVM2/lib/device/dev-cache.c 2010/12/20 13:23:11 1.62
+++ LVM2/lib/device/dev-cache.c 2011/01/17 15:16:55 1.63
@@ -850,18 +850,14 @@
void dev_reset_error_count(struct cmd_context *cmd)
{
- struct dev_iter *iter;
- struct device *dev;
+ struct dev_iter iter;
- if (!(iter = dev_iter_create(cmd->filter, 0))) {
- log_error("Resetting device error count failed");
+ if (!_cache.devices)
return;
- }
- for (dev = dev_iter_get(iter); dev; dev = dev_iter_get(iter))
- dev->error_count = 0;
-
- dev_iter_destroy(iter);
+ iter.current = btree_first(_cache.devices);
+ while (iter.current)
+ _iter_next(&iter)->error_count = 0;
}
int dev_fd(struct device *dev)
next reply other threads:[~2011-01-17 15:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-17 15:16 zkabelac [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-04-11 9:12 LVM2 ./WHATS_NEW lib/device/dev-cache.c prajnoha
2011-12-21 13:21 zkabelac
2011-12-21 13:17 zkabelac
2011-12-21 13:14 zkabelac
2010-05-24 22:53 agk
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=20110117151656.19868.qmail@sourceware.org \
--to=zkabelac@sourceware.org \
--cc=lvm-devel@redhat.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.