lkml.org 
[lkml]   [2013]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH for-next] dm: fix missing bi_remaining accounting
On Mon, Nov 04 2013 at 10:25am -0500,
Mikulas Patocka <mpatocka@redhat.com> wrote:

>
>
> On Mon, 4 Nov 2013, Mike Snitzer wrote:
>
> > On Mon, Nov 04 2013 at 10:06am -0500,
> > Mikulas Patocka <mpatocka@redhat.com> wrote:
> > >
> > > The code uses atomic_inc for restoration of bi_remaining. This patch
> > > changes it to atomic_set(1) to avoid an interlocked instruction. In the
> > > target's bi_endio routine we are sure that bi_remaining is zero
> > > (otherwise, the bi_endio routine wouldn't be called) and there are no
> > > concurrent users of the bio, so we can replace atomic_inc with
> > > atomic_set(1).
> >
> > This isn't DM-specific. Shouldn't the other places in the tree that use
> > atomic_inc on bi_remaining should really be converted at the same time?
>
> There is no 'atomic_inc.*bi_remaining' in other drivers.

Wrong. I know btrfs has at least one. As does bcache afaik.


\
 
 \ /
  Last update: 2013-11-04 17:21    [W:3.487 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site