From: Alex Elder <elder@dreamhost.com>
To: ceph-devel@vger.kernel.org
Subject: [PATCH 1/6] rbd: protect read of snapshot sequence number
Date: Wed, 18 Apr 2012 09:40:59 -0500 [thread overview]
Message-ID: <4F8ED27B.7050105@dreamhost.com> (raw)
In-Reply-To: <4F8ED154.6050500@dreamhost.com>
This is updated whenever a snapshot is added or deleted, and the
snapc pointer is changed with every refresh of the header.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Reviewed-by: Alex Elder <elder@dreamhost.com>
---
drivers/block/rbd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: b/drivers/block/rbd.c
===================================================================
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1685,7 +1685,9 @@
if (ret < 0)
return ret;
- dev->header.snapc->seq = new_snapid;
+ down_write(&dev->header_rwsem);
+ dev->header.snapc->seq = new_snapid;
+ up_write(&dev->header_rwsem);
return 0;
bad:
next prev parent reply other threads:[~2012-04-18 14:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-18 14:36 [PATCH 0/6] rbd: updates from Josh Durgin Alex Elder
2012-04-18 14:40 ` Alex Elder [this message]
2012-04-19 17:35 ` [PATCH 1/6] rbd: protect read of snapshot sequence number Yehuda Sadeh Weinraub
2012-04-18 14:41 ` [PATCH 2/6] rbd: store snapshot id instead of index Alex Elder
2012-04-19 17:41 ` Yehuda Sadeh Weinraub
2012-04-18 14:41 ` [PATCH 3/6] rbd: remove conditional snapid parameters Alex Elder
2012-04-19 17:58 ` Yehuda Sadeh Weinraub
2012-04-18 14:41 ` [PATCH 4/6] rbd: fix snapshot size type Alex Elder
2012-04-19 18:04 ` Yehuda Sadeh Weinraub
2012-04-18 14:41 ` [PATCH 5/6] rbd: rename __rbd_update_snaps to __rbd_refresh_header Alex Elder
2012-04-19 18:06 ` Yehuda Sadeh Weinraub
2012-04-18 14:41 ` [PATCH 6/6] rbd: correct sysfs snap attribute documentation Alex Elder
2012-04-19 18:07 ` Yehuda Sadeh Weinraub
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=4F8ED27B.7050105@dreamhost.com \
--to=elder@dreamhost.com \
--cc=ceph-devel@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