Re: [PATCH] fs: direct-io: increase bio refcount as batch

2015-04-02 Thread Jeff Moyer
Ming Lei writes: > Hi, > > On Tue, Mar 31, 2015 at 10:02 PM, Jeff Moyer wrote: >> Ming Lei writes: >> >>> Each bio is always submitted to block device one by one, >>> so it isn't necessary to increase the bio refcount by one >>> each time with holding dio->bio_lock. >> >> This patch opens up a

Re: [PATCH] fs: direct-io: increase bio refcount as batch

2015-04-02 Thread Jeff Moyer
Ming Lei ming@canonical.com writes: Hi, On Tue, Mar 31, 2015 at 10:02 PM, Jeff Moyer jmo...@redhat.com wrote: Ming Lei ming@canonical.com writes: Each bio is always submitted to block device one by one, so it isn't necessary to increase the bio refcount by one each time with

Re: [PATCH] fs: direct-io: increase bio refcount as batch

2015-03-31 Thread Ming Lei
Hi, On Tue, Mar 31, 2015 at 10:02 PM, Jeff Moyer wrote: > Ming Lei writes: > >> Each bio is always submitted to block device one by one, >> so it isn't necessary to increase the bio refcount by one >> each time with holding dio->bio_lock. > > This patch opens up a race where a completion event

Re: [PATCH] fs: direct-io: increase bio refcount as batch

2015-03-31 Thread Jeff Moyer
Ming Lei writes: > Each bio is always submitted to block device one by one, > so it isn't necessary to increase the bio refcount by one > each time with holding dio->bio_lock. This patch opens up a race where a completion event can come in before the refcount for the dio is incremented,

[PATCH] fs: direct-io: increase bio refcount as batch

2015-03-31 Thread Ming Lei
Each bio is always submitted to block device one by one, so it isn't necessary to increase the bio refcount by one each time with holding dio->bio_lock. Signed-off-by: Ming Lei --- fs/direct-io.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git

[PATCH] fs: direct-io: increase bio refcount as batch

2015-03-31 Thread Ming Lei
Each bio is always submitted to block device one by one, so it isn't necessary to increase the bio refcount by one each time with holding dio-bio_lock. Signed-off-by: Ming Lei ming@canonical.com --- fs/direct-io.c | 27 +-- 1 file changed, 17 insertions(+), 10

Re: [PATCH] fs: direct-io: increase bio refcount as batch

2015-03-31 Thread Ming Lei
Hi, On Tue, Mar 31, 2015 at 10:02 PM, Jeff Moyer jmo...@redhat.com wrote: Ming Lei ming@canonical.com writes: Each bio is always submitted to block device one by one, so it isn't necessary to increase the bio refcount by one each time with holding dio-bio_lock. This patch opens up a

Re: [PATCH] fs: direct-io: increase bio refcount as batch

2015-03-31 Thread Jeff Moyer
Ming Lei ming@canonical.com writes: Each bio is always submitted to block device one by one, so it isn't necessary to increase the bio refcount by one each time with holding dio-bio_lock. This patch opens up a race where a completion event can come in before the refcount for the dio is