linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the xarray tree with the ext4 tree
@ 2018-08-02  7:48 Stephen Rothwell
  0 siblings, 0 replies; only message in thread
From: Stephen Rothwell @ 2018-08-02  7:48 UTC (permalink / raw)
  To: Matthew Wilcox, Theodore Ts'o
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Ross Zwisler

[-- Attachment #1: Type: text/plain, Size: 2657 bytes --]

Hi all,

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

  fs/dax.c

between commit:

  cdbf8897cb09 ("dax: dax_layout_busy_page() warn on !exceptional")

from the ext4 tree and commits:

  49520d317715 ("xarray: Replace exceptional entries")
  cc9f1fb1672f ("dax: Convert dax_layout_busy_page to XArray")

from the xarray 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 f32d7125ad0f,1914e4e24615..000000000000
--- a/fs/dax.c
+++ b/fs/dax.c
@@@ -662,44 -556,26 +556,26 @@@ struct page *dax_layout_busy_page(struc
  	 */
  	unmap_mapping_range(mapping, 0, 0, 1);
  
- 	while (index < end && pagevec_lookup_entries(&pvec, mapping, index,
- 				min(end - index, (pgoff_t)PAGEVEC_SIZE),
- 				indices)) {
- 		for (i = 0; i < pagevec_count(&pvec); i++) {
- 			struct page *pvec_ent = pvec.pages[i];
- 			void *entry;
- 
- 			index = indices[i];
- 			if (index >= end)
- 				break;
- 
- 			if (WARN_ON_ONCE(
- 			     !radix_tree_exceptional_entry(pvec_ent)))
- 				continue;
- 
- 			xa_lock_irq(&mapping->i_pages);
- 			entry = get_unlocked_mapping_entry(mapping, index, NULL);
- 			if (entry)
- 				page = dax_busy_page(entry);
- 			put_unlocked_mapping_entry(mapping, index, entry);
- 			xa_unlock_irq(&mapping->i_pages);
- 			if (page)
- 				break;
- 		}
- 
- 		/*
- 		 * We don't expect normal struct page entries to exist in our
- 		 * tree, but we keep these pagevec calls so that this code is
- 		 * consistent with the common pattern for handling pagevecs
- 		 * throughout the kernel.
- 		 */
- 		pagevec_remove_exceptionals(&pvec);
- 		pagevec_release(&pvec);
- 		index++;
- 
+ 	xas_lock_irq(&xas);
+ 	xas_for_each(&xas, entry, ULONG_MAX) {
 -		if (!xa_is_value(entry))
++		if (WARN_ON_ONCE(!xa_is_value(entry)))
+ 			continue;
+ 		if (unlikely(dax_is_locked(entry)))
+ 			entry = get_unlocked_entry(&xas);
+ 		if (entry)
+ 			page = dax_busy_page(entry);
+ 		put_unlocked_entry(&xas, entry);
  		if (page)
  			break;
+ 		if (++scanned % XA_CHECK_SCHED)
+ 			continue;
+ 
+ 		xas_pause(&xas);
+ 		xas_unlock_irq(&xas);
+ 		cond_resched();
+ 		xas_lock_irq(&xas);
  	}
+ 	xas_unlock_irq(&xas);
  	return page;
  }
  EXPORT_SYMBOL_GPL(dax_layout_busy_page);

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-08-02  7:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-02  7:48 linux-next: manual merge of the xarray tree with the ext4 tree Stephen Rothwell

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).