All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: dsterba@suse.cz
Cc: linux-btrfs@vger.kernel.org, quwenruo@cn.fujitsu.com
Subject: Re: [PATCH 1/4] btrfs: REQ_PREFLUSH does not use btrfs_end_bio() completion callback
Date: Thu, 30 Mar 2017 18:57:01 +0800	[thread overview]
Message-ID: <a63dcb1f-8261-fefe-1759-70892c3e56f2@oracle.com> (raw)
In-Reply-To: <7dab96d3-51d5-e738-6305-1a470675caf7@oracle.com>



On 03/29/2017 06:00 PM, Anand Jain wrote:
>
>
> On 03/28/2017 11:19 PM, David Sterba wrote:
>> On Mon, Mar 13, 2017 at 03:42:11PM +0800, Anand Jain wrote:
>>> REQ_PREFLUSH bio to flush dev cache uses btrfs_end_empty_barrier()
>>> completion callback only, as of now, and there it accounts for dev
>>> stat flush errors BTRFS_DEV_STAT_FLUSH_ERRS, so remove it from the
>>> btrfs_end_bio().
>>
>> Can you please be more specific? I was trying to find the code path that
>> does the supposedly duplicate accounting for BTRFS_DEV_STAT_FLUSH_ERRS,
>> but still not there after half an hour.
>>
>> submit_stripe_bio
>>   btrfsic_submit_bio
>>     btrfs_end_bio
>>       -> stats accounting
>>
>> write_dev_flush
>>   btrfsic_submit_bio
>>     btrfs_end_empty_barrier
>>       complete
>>
>> now here it wakes up flush_wait, that is only waited for in
>> write_dev_flush, there the FLUSH_ERRS accounting happens, but ... I'm
>> not sure if I haven't lost in the bio handling maze.



>  As I am checking again, we aren't using REQ_PREFLUSH flag for
>  any other bio and would suffice for its correctness IMO.

  I mean for this patch correctness.

> Thanks, Anand
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-03-30 10:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-13  7:42 [PATCH 0/4] cleanup barrier_all_devices() Anand Jain
2017-03-13  7:42 ` [PATCH 1/4] btrfs: REQ_PREFLUSH does not use btrfs_end_bio() completion callback Anand Jain
2017-03-28 15:19   ` David Sterba
2017-03-29 10:00     ` Anand Jain
2017-03-30 10:57       ` Anand Jain [this message]
2017-03-13  7:42 ` [PATCH 2/4] btrfs: Communicate back ENOMEM when it occurs Anand Jain
2017-03-14  8:49   ` Qu Wenruo
2017-03-28 15:38   ` David Sterba
2017-03-29 10:00     ` Anand Jain
2017-03-13  7:42 ` [PATCH 3/4] btrfs: cleanup barrier_all_devices() unify dev error count Anand Jain
2017-03-14  8:53   ` Qu Wenruo
2017-03-13  7:42 ` [PATCH 4/4] btrfs: cleanup barrier_all_devices() to check dev stat flush error Anand Jain
2017-03-13  9:05   ` Qu Wenruo
2017-03-13 16:21     ` Anand Jain
2017-03-14  0:28       ` Qu Wenruo
2017-03-14  3:36         ` Anand Jain
2017-03-14  8:26   ` [PATCH V2 " Anand Jain
2017-03-14  8:47     ` Qu Wenruo
2017-03-28 16:19     ` David Sterba
2017-03-29 10:00       ` Anand Jain
2017-03-31 11:36   ` [PATCH 4/4 V2] " Anand Jain
2017-04-05  4:07   ` [PATCH 4/4 V3] " Anand Jain

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=a63dcb1f-8261-fefe-1759-70892c3e56f2@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo@cn.fujitsu.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.