From: Shaohua Li <shli@kernel.org>
To: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Cc: shli@fb.com, linux-raid@vger.kernel.org
Subject: Re: [PATCH] raid5-ppl: two minor improvements
Date: Fri, 10 Mar 2017 10:16:20 -0800 [thread overview]
Message-ID: <20170310181620.dzwuj6d3ya3s2zpm@kernel.org> (raw)
In-Reply-To: <20170310154044.11198-1-artur.paszkiewicz@intel.com>
On Fri, Mar 10, 2017 at 04:40:44PM +0100, Artur Paszkiewicz wrote:
> - Remove 'page_result' parameter from ppl_xor() and always write result
> to 'page1'.
> - Use blkdev_issue_flush() instead of open coding the flush bio
> submission.
merged to original patch
> Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
> ---
> drivers/md/raid5-ppl.c | 18 +++++-------------
> 1 file changed, 5 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/md/raid5-ppl.c b/drivers/md/raid5-ppl.c
> index ca1ef644351a..2419fbc6f684 100644
> --- a/drivers/md/raid5-ppl.c
> +++ b/drivers/md/raid5-ppl.c
> @@ -524,8 +524,7 @@ void ppl_stripe_write_finished(struct stripe_head *sh)
> ppl_io_unit_finished(io);
> }
>
> -static void ppl_xor(int size, struct page *page1, struct page *page2,
> - struct page *page_result)
> +static void ppl_xor(int size, struct page *page1, struct page *page2)
> {
> struct async_submit_ctl submit;
> struct dma_async_tx_descriptor *tx;
> @@ -533,7 +532,7 @@ static void ppl_xor(int size, struct page *page1, struct page *page2,
>
> init_async_submit(&submit, ASYNC_TX_ACK|ASYNC_TX_XOR_DROP_DST,
> NULL, NULL, NULL, NULL);
> - tx = async_xor(page_result, xor_srcs, 0, 2, size, &submit);
> + tx = async_xor(page1, xor_srcs, 0, 2, size, &submit);
>
> async_tx_quiesce(&tx);
> }
> @@ -724,7 +723,7 @@ static int ppl_recover_entry(struct ppl_log *log, struct ppl_header_entry *e,
> goto out;
> }
>
> - ppl_xor(block_size, page1, page2, page1);
> + ppl_xor(block_size, page1, page2);
>
> indent -= 2;
> }
> @@ -747,7 +746,7 @@ static int ppl_recover_entry(struct ppl_log *log, struct ppl_header_entry *e,
> goto out;
> }
>
> - ppl_xor(block_size, page1, page2, page1);
> + ppl_xor(block_size, page1, page2);
> }
>
> /* map raid sector to parity disk */
> @@ -846,14 +845,7 @@ static int ppl_recover(struct ppl_log *log, struct ppl_header *pplhdr)
> }
>
> /* flush the disk cache after recovery if necessary */
> - if (test_bit(QUEUE_FLAG_WC, &bdev_get_queue(rdev->bdev)->queue_flags)) {
> - struct bio *bio = bio_alloc_bioset(GFP_KERNEL, 0, ppl_conf->bs);
> -
> - bio->bi_bdev = rdev->bdev;
> - bio->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH;
> - ret = submit_bio_wait(bio);
> - bio_put(bio);
> - }
> + ret = blkdev_issue_flush(rdev->bdev, GFP_KERNEL, NULL);
> out:
> __free_page(page);
> return ret;
> --
> 2.11.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2017-03-10 18:16 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-09 8:59 [PATCH v5 0/7] Partial Parity Log for MD RAID 5 Artur Paszkiewicz
2017-03-09 8:59 ` [PATCH v5 1/7] md: superblock changes for PPL Artur Paszkiewicz
2017-03-09 8:59 ` [PATCH v5 2/7] raid5: separate header for log functions Artur Paszkiewicz
2017-03-09 8:59 ` [PATCH v5 3/7] raid5-ppl: Partial Parity Log write logging implementation Artur Paszkiewicz
2017-03-09 23:24 ` Shaohua Li
2017-03-10 15:16 ` Artur Paszkiewicz
2017-03-10 18:15 ` Shaohua Li
2017-03-10 18:42 ` Dan Williams
2017-03-21 22:00 ` NeilBrown
2017-03-24 16:46 ` Shaohua Li
2017-03-28 14:12 ` Artur Paszkiewicz
2017-03-28 16:16 ` Shaohua Li
2017-04-16 22:58 ` Greg Thelen
2017-04-19 8:48 ` [PATCH] uapi: fix linux/raid/md_p.h userspace compilation error Artur Paszkiewicz
2017-04-19 16:59 ` Greg Thelen
2017-04-20 16:41 ` Shaohua Li
2017-03-09 9:00 ` [PATCH v5 4/7] md: add sysfs entries for PPL Artur Paszkiewicz
2017-03-09 9:00 ` [PATCH v5 5/7] raid5-ppl: load and recover the log Artur Paszkiewicz
2017-03-09 23:30 ` Shaohua Li
2017-03-10 15:23 ` Artur Paszkiewicz
2017-03-09 9:00 ` [PATCH v5 6/7] raid5-ppl: support disk hot add/remove with PPL Artur Paszkiewicz
2017-03-09 9:00 ` [PATCH v5 7/7] raid5-ppl: runtime PPL enabling or disabling Artur Paszkiewicz
2017-03-09 23:32 ` [PATCH v5 0/7] Partial Parity Log for MD RAID 5 Shaohua Li
2017-03-10 15:40 ` [PATCH] raid5-ppl: two minor improvements Artur Paszkiewicz
2017-03-10 18:16 ` Shaohua Li [this message]
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=20170310181620.dzwuj6d3ya3s2zpm@kernel.org \
--to=shli@kernel.org \
--cc=artur.paszkiewicz@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=shli@fb.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.