projects
/
deliverable
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50f7c4c
)
rbd: protect read of snapshot sequence number
author
Josh Durgin
<josh.durgin@dreamhost.com>
Mon, 5 Dec 2011 18:47:13 +0000
(10:47 -0800)
committer
Alex Elder
<elder@dreamhost.com>
Mon, 14 May 2012 17:12:46 +0000
(12:12 -0500)
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>
Reviewed-by: Yehuda Sadeh <yehuda@hq.newdream.net>
drivers/block/rbd.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/block/rbd.c
b/drivers/block/rbd.c
index a75fe93a25b173db342f033b2697e86638506f39..5ab9f55d3e0cb08ea4323fdc74159e5d9899dccb 100644
(file)
--- a/
drivers/block/rbd.c
+++ b/
drivers/block/rbd.c
@@
-1684,7
+1684,9
@@
static int rbd_header_add_snap(struct rbd_device *dev,
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:
This page took
0.026422 seconds
and
5
git commands to generate.