From: Anand Jain <anand.jain@oracle.com>
To: dsterba@suse.cz
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v4 0/7] Holistic view of device error at commit flush and related cleanup
Date: Thu, 13 Apr 2017 16:42:11 +0800 [thread overview]
Message-ID: <5be86f90-8dcf-ccf2-3dab-0c7ea8fc1e86@oracle.com> (raw)
In-Reply-To: <20170406032253.14631-1-anand.jain@oracle.com>
Hi David,
Just want to bring this patch to your notice. It fixes all
the previously commented issues.
Thanks, Anand
On 04/06/2017 11:22 AM, Anand Jain wrote:
> These patches adds cleanup of device barrier, q and flush codes.
> This was needed for the following reasons..
>
> - First of all, Qu approach on the chunk based degradable check
> wanted to know what devices failed rather than total count of failed
> devices. So the patch 3/7 adds a function check_barrier_error() in
> which Qu can add such a logic. Irrespective whether those Qu patches
> passes through all the reviews, and if it does not, still this patch
> is good to have as it does not change the commit performance since
> check_barrier_error() is only called when there is an error in any of
> the device. However I believe a volume manager when deciding an action
> of the device error, it should rather have a broader view and state of
> other devices instead of action based on just individual device, this
> just a step towards that. (Earlier the patch [1] was also on the similar
> idea, its yet to be separated from the feature patch, as time permits
> and priority rises. [1] https://patchwork.kernel.org/patch/9058361/)
>
> [PATCH v4 3/7] btrfs: cleanup barrier_all_devices() to check dev stat flush error
>
> - However barrier_all_devices() wasn't capable of supporting 3/7
> (above). So clean up of write_dev_flush() is needed, and if it uses
> blkdev_issue_flush() then the way we count the error device especially
> the err_send++ part can be avoided. Patch 1/7 provides this cleanup.
>
> [PATCH v4 1/7] btrfs: use blkdev_issue_flush to flush the device cache
>
> - There are some static error checking in barrier_all_devices(), such
> as !dev->bdev && errors_send++, these errors would remain same before
> or after the flush. As of now we do not have any code which will bring
> a null bdev back, also we are in device_mutex. So consolidated all
> those errors as dropouts at the place after the flush. This clean up is
> in 2/7.
>
> [PATCH v4 2/7] btrfs: cleanup barrier_all_devices() unify dev error count
>
> Now with 1/7 and 2/7 in place, 3/7 can be applied. These 3 are
> dependent patches.
>
> - Patch 4/7 is not related to above 3 patches, however it adds up a
> cleanup around the REQ_PREFLUSH flag. It is found that we do not have
> any bio with the flag REQ_PREFLUSH set. So an end io checking for that
> flag is not required. Concerned what if there is a bio in future which
> will set REQ_PREFLUSH ? I am not too sure about that. However the
> write_dev_flush code with the patch 3/7 (above) is still unaffected
> with or without patch 4/7, thats because 3/7 does not depend on
> BTRFS_DEV_STAT_FLUSH_ERRS, instead it uses a new per device
> last_flush_err member to track the error. But it would have been better
> or the right way if it had checked BTRFS_DEV_STAT_FLUSH_ERRS instead.
> But as it seeks much bigger change, it can be optimized to use
> BTRFS_DEV_STAT_FLUSH_ERRS at a later point
> of time.
>
> [PATCH v4 4/7] btrfs: REQ_PREFLUSH does not use btrfs_end_bio() completion callback
>
> And rest of the patches are completely a cleanup patches which are
> found good to have when around these parts of the code. They are -
>
> [PATCH v4 5/7] btrfs: use q which is already obtained from bdev_get_queue
> [PATCH v4 6/7] btrfs: delete unused member nobarriers
> [PATCH v4 7/7] btrfs: check if the device is flush capable
>
> Anand Jain (7):
> btrfs: use blkdev_issue_flush to flush the device cache
> btrfs: cleanup barrier_all_devices() unify dev error count
> btrfs: cleanup barrier_all_devices() to check dev stat flush error
> btrfs: REQ_PREFLUSH does not use btrfs_end_bio() completion callback
> btrfs: use q which is already obtained from bdev_get_queue
> btrfs: delete unused member nobarriers
> btrfs: check if the device is flush capable
>
> fs/btrfs/disk-io.c | 112 +++++++++++++++++++++++++----------------------------
> fs/btrfs/volumes.c | 10 ++---
> fs/btrfs/volumes.h | 4 +-
> 3 files changed, 58 insertions(+), 68 deletions(-)
>
next prev parent reply other threads:[~2017-04-13 8:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 3:22 [PATCH v4 0/7] Holistic view of device error at commit flush and related cleanup Anand Jain
2017-04-06 3:22 ` [PATCH v4 1/7] btrfs: use blkdev_issue_flush to flush the device cache Anand Jain
2017-04-13 18:41 ` Liu Bo
2017-04-19 4:29 ` Anand Jain
2017-04-18 13:54 ` David Sterba
2017-04-19 4:29 ` Anand Jain
2017-04-25 9:25 ` Anand Jain
2017-04-06 3:22 ` [PATCH v4 2/7] btrfs: cleanup barrier_all_devices() unify dev error count Anand Jain
2017-04-06 3:22 ` [PATCH v4 3/7] btrfs: cleanup barrier_all_devices() to check dev stat flush error Anand Jain
2017-04-06 3:22 ` [PATCH v4 4/7] btrfs: REQ_PREFLUSH does not use btrfs_end_bio() completion callback Anand Jain
2017-04-06 3:22 ` [PATCH v4 5/7] btrfs: use q which is already obtained from bdev_get_queue Anand Jain
2017-04-18 14:01 ` David Sterba
2017-04-06 3:22 ` [PATCH v4 6/7] btrfs: delete unused member nobarriers Anand Jain
2017-04-18 14:03 ` David Sterba
2017-04-06 3:22 ` [PATCH v4 7/7] btrfs: check if the device is flush capable Anand Jain
2017-04-18 14:04 ` David Sterba
2017-04-13 8:42 ` Anand Jain [this message]
2017-04-13 12:13 ` [PATCH v4 0/7] Holistic view of device error at commit flush and related cleanup David Sterba
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=5be86f90-8dcf-ccf2-3dab-0c7ea8fc1e86@oracle.com \
--to=anand.jain@oracle.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).