| To: | Vishal Verma <vishal.l.verma@xxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 4/5] dax: use sb_issue_zerout instead of calling dax_clear_sectors |
| From: | Dan Williams <dan.j.williams@xxxxxxxxx> |
| Date: | Fri, 25 Mar 2016 11:47:26 -0700 |
| Cc: | "linux-nvdimm@xxxxxxxxxxxx" <linux-nvdimm@xxxxxxxxxxxx>, linux-fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>, linux-block@xxxxxxxxxxxxxxx, XFS Developers <xfs@xxxxxxxxxxx>, linux-ext4 <linux-ext4@xxxxxxxxxxxxxxx>, Linux MM <linux-mm@xxxxxxxxx>, Matthew Wilcox <matthew.r.wilcox@xxxxxxxxx>, Ross Zwisler <ross.zwisler@xxxxxxxxxxxxxxx>, Dave Chinner <david@xxxxxxxxxxxxx>, Jan Kara <jack@xxxxxxx>, Jens Axboe <axboe@xxxxxx>, Al Viro <viro@xxxxxxxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> |
| Delivered-to: | xfs@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=vUZ1MMUHVfRqchKN8xxIqKfDMbZZN3IEX7A91jJwqOE=; b=XVV1uaQQ8PuS3BWAHIK0Od98V+5lQUHtDf0fEvESULM1tRGxPuJr4PemBgrbek27qs h3EyX/TEffkKEHnsqheA5+G36evFmvhT+f0Soob4wW84o0VZb9s+KBM7PCfpMJMRvotr /+7HUzBcTB3U25EOTnpA/wI7QsQINGyIrOcJ5tdAJWN9IhUtw4/dvZtK2zNz8a9nV1VX JdBFgmDhDMHmGEfyBgdiVYG9Eg03nRexrpnN/osUTY9nMxV3B7Q+K1HZ/DCG9CAnOykL lXlPwllj9dPHP+Y66oHTsdnDqa6BZ18hBC/V5/i5CvGg44eS1z6E2giBFVCKgqaaKUIB vDKA== |
| In-reply-to: | <1458861450-17705-5-git-send-email-vishal.l.verma@xxxxxxxxx> |
| References: | <1458861450-17705-1-git-send-email-vishal.l.verma@xxxxxxxxx> <1458861450-17705-5-git-send-email-vishal.l.verma@xxxxxxxxx> |
On Thu, Mar 24, 2016 at 4:17 PM, Vishal Verma <vishal.l.verma@xxxxxxxxx> wrote:
> From: Matthew Wilcox <matthew.r.wilcox@xxxxxxxxx>
>
> dax_clear_sectors() cannot handle poisoned blocks. These must be
> zeroed using the BIO interface instead. Convert ext2 and XFS to use
> only sb_issue_zerout().
>
> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@xxxxxxxxx>
> [vishal: Also remove the dax_clear_sectors function entirely]
> Signed-off-by: Vishal Verma <vishal.l.verma@xxxxxxxxx>
> ---
> fs/dax.c | 32 --------------------------------
> fs/ext2/inode.c | 7 +++----
> fs/xfs/xfs_bmap_util.c | 9 ---------
> include/linux/dax.h | 1 -
> 4 files changed, 3 insertions(+), 46 deletions(-)
>
> diff --git a/fs/dax.c b/fs/dax.c
> index bb7e9f8..a30481e 100644
> --- a/fs/dax.c
> +++ b/fs/dax.c
> @@ -78,38 +78,6 @@ struct page *read_dax_sector(struct block_device *bdev,
> sector_t n)
> return page;
> }
>
> -/*
> - * dax_clear_sectors() is called from within transaction context from XFS,
> - * and hence this means the stack from this point must follow GFP_NOFS
> - * semantics for all operations.
> - */
> -int dax_clear_sectors(struct block_device *bdev, sector_t _sector, long
> _size)
> -{
> - struct blk_dax_ctl dax = {
> - .sector = _sector,
> - .size = _size,
> - };
> -
> - might_sleep();
> - do {
> - long count, sz;
> -
> - count = dax_map_atomic(bdev, &dax);
> - if (count < 0)
> - return count;
> - sz = min_t(long, count, SZ_128K);
> - clear_pmem(dax.addr, sz);
> - dax.size -= sz;
> - dax.sector += sz / 512;
> - dax_unmap_atomic(bdev, &dax);
> - cond_resched();
> - } while (dax.size);
> -
> - wmb_pmem();
> - return 0;
> -}
> -EXPORT_SYMBOL_GPL(dax_clear_sectors);
What about the other unwritten extent conversions in the dax path?
Shouldn't those be converted to block-layer zero-outs as well?
|
| Previous by Date: | Re: [PATCH] xfs: mute some sparse warnings, Christoph Hellwig |
|---|---|
| Next by Date: | Re: [PATCH 5/5] dax: handle media errors in dax_do_io, Verma, Vishal L |
| Previous by Thread: | Re: [PATCH 4/5] dax: use sb_issue_zerout instead of calling dax_clear_sectors, Verma, Vishal L |
| Next by Thread: | Re: [PATCH 4/5] dax: use sb_issue_zerout instead of calling dax_clear_sectors, Verma, Vishal L |
| Indexes: | [Date] [Thread] [Top] [All Lists] |