Re: [PATCH 1/2] rbd: define flags field, use it for exists flag

2013-01-30 Thread Josh Durgin
Reviewed-by: Josh Durgin josh.dur...@inktank.com On 01/28/2013 02:09 PM, Alex Elder wrote: Define a new rbd device flags field, manipulated using bit operations. Replace the use of the current exists flag with a bit in this new flags field. Add a little commentary about the exists flag, which

[PATCH 1/2] rbd: define flags field, use it for exists flag

2013-01-28 Thread Alex Elder
Define a new rbd device flags field, manipulated using bit operations. Replace the use of the current exists flag with a bit in this new flags field. Add a little commentary about the exists flag, which does not need to be manipulated atomically. Signed-off-by: Alex Elder el...@inktank.com ---

Re: [PATCH 1/2] rbd: define flags field, use it for exists flag

2013-01-15 Thread Dan Mick
Reviewed-by: Dan Mick dan.m...@inktank.com On 01/14/2013 10:50 AM, Alex Elder wrote: Define a new rbd device flags field, manipulated using atomic bit operations. Replace the use of the current exists flag with a bit in this new flags field. Signed-off-by: Alex Elder el...@inktank.com ---

Re: [PATCH 1/2] rbd: define flags field, use it for exists flag

2013-01-15 Thread Josh Durgin
On 01/14/2013 01:23 PM, Alex Elder wrote: On 01/14/2013 02:32 PM, Dan Mick wrote: I see that set_bit is atomic, but I don't see that test_bit is. Am I missing a subtlety? That's an interesting observation. I'm certain it's safe, but I needed to research it a bit, and I still haven't

[PATCH 1/2] rbd: define flags field, use it for exists flag

2013-01-14 Thread Alex Elder
Define a new rbd device flags field, manipulated using atomic bit operations. Replace the use of the current exists flag with a bit in this new flags field. Signed-off-by: Alex Elder el...@inktank.com --- drivers/block/rbd.c | 17 - 1 file changed, 12 insertions(+), 5

Re: [PATCH 1/2] rbd: define flags field, use it for exists flag

2013-01-14 Thread Dan Mick
I see that set_bit is atomic, but I don't see that test_bit is. Am I missing a subtlety? On 01/14/2013 10:50 AM, Alex Elder wrote: Define a new rbd device flags field, manipulated using atomic bit operations. Replace the use of the current exists flag with a bit in this new flags field.

Re: [PATCH 1/2] rbd: define flags field, use it for exists flag

2013-01-14 Thread Alex Elder
On 01/14/2013 02:32 PM, Dan Mick wrote: I see that set_bit is atomic, but I don't see that test_bit is. Am I missing a subtlety? That's an interesting observation. I'm certain it's safe, but I needed to research it a bit, and I still haven't verified it to my satisfaction. I *think* (but

Re: [PATCH 1/2] rbd: define flags field, use it for exists flag

2013-01-14 Thread Dan Mick
I think I agree that the claim is that the onus is on the set, and so I think the proposed code is safe. On 01/14/2013 01:23 PM, Alex Elder wrote: On 01/14/2013 02:32 PM, Dan Mick wrote: I see that set_bit is atomic, but I don't see that test_bit is. Am I missing a subtlety? That's an