linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Dan Williams <dan.j.williams@intel.com>, Jens Axboe <axboe@kernel.dk>
Cc: Linux-Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Christoph Hellwig <hch@lst.de>
Subject: linux-next: manual merge of the nvdimm tree with the block tree
Date: Mon, 24 Apr 2017 15:50:25 +1000	[thread overview]
Message-ID: <20170424155025.2075aaf8@canb.auug.org.au> (raw)

Hi Dan,

Today's linux-next merge of the nvdimm tree got a conflict in:

  fs/dax.c

between commit:

  ee472d835c26 ("block: add a flags argument to (__)blkdev_issue_zeroout")

from the block tree and commit:

  52d52d6f1178 ("filesystem-dax: convert to dax_direct_access()")

from the nvdimm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/dax.c
index 6433650be833,5b7ee1bc74d0..000000000000
--- a/fs/dax.c
+++ b/fs/dax.c
@@@ -979,24 -956,36 +965,36 @@@ static bool dax_range_is_aligned(struc
  	return true;
  }
  
- int __dax_zero_page_range(struct block_device *bdev, sector_t sector,
- 		unsigned int offset, unsigned int length)
+ int __dax_zero_page_range(struct block_device *bdev,
+ 		struct dax_device *dax_dev, sector_t sector,
+ 		unsigned int offset, unsigned int size)
  {
- 	struct blk_dax_ctl dax = {
- 		.sector		= sector,
- 		.size		= PAGE_SIZE,
- 	};
- 
- 	if (dax_range_is_aligned(bdev, offset, length)) {
- 		sector_t start_sector = dax.sector + (offset >> 9);
+ 	if (dax_range_is_aligned(bdev, offset, size)) {
+ 		sector_t start_sector = sector + (offset >> 9);
  
  		return blkdev_issue_zeroout(bdev, start_sector,
- 				length >> 9, GFP_NOFS, 0);
 -				size >> 9, GFP_NOFS, true);
++				size >> 9, GFP_NOFS, 0);
  	} else {
- 		if (dax_map_atomic(bdev, &dax) < 0)
- 			return PTR_ERR(dax.addr);
- 		clear_pmem(dax.addr + offset, length);
- 		dax_unmap_atomic(bdev, &dax);
+ 		pgoff_t pgoff;
+ 		long rc, id;
+ 		void *kaddr;
+ 		pfn_t pfn;
+ 
+ 		rc = bdev_dax_pgoff(bdev, sector, size, &pgoff);
+ 		if (rc)
+ 			return rc;
+ 
+ 		id = dax_read_lock();
+ 		rc = dax_direct_access(dax_dev, pgoff, PHYS_PFN(size), &kaddr,
+ 				&pfn);
+ 		if (rc < 0) {
+ 			dax_read_unlock(id);
+ 			return rc;
+ 		}
+ 		memset(kaddr + offset, 0, size);
+ 		if (test_bit(QUEUE_FLAG_WC, &bdev->bd_queue->queue_flags))
+ 			dax_flush(dax_dev, pgoff, kaddr + offset, size);
+ 		dax_read_unlock(id);
  	}
  	return 0;
  }

             reply	other threads:[~2017-04-24  5:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-24  5:50 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-03-15  8:18 linux-next: manual merge of the nvdimm tree with the block tree Stephen Rothwell
2022-03-15  8:21 ` Christoph Hellwig
2017-04-24  5:45 Stephen Rothwell
2016-07-11  7:59 Stephen Rothwell

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=20170424155025.2075aaf8@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=axboe@kernel.dk \
    --cc=dan.j.williams@intel.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@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).