Skip to contentSkip to conversation

xarray-add-xas_split.patch removed from -mm tree

merged [email protected] 1 participant 1 message Oct 16, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: XArray: add xas_split
has been removed from the -mm tree. Its filename was
xarray-add-xas_split.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: "Matthew Wilcox (Oracle)" <[email protected]>
Subject: XArray: add xas_split

In order to use multi-index entries for huge pages in the page cache, we need to be able to split a multi-index entry (eg if a file is truncated in the middle of a huge page entry). This version does not support splitting more than one level of the tree at a time. This is an acceptable limitation for the page cache as we do not expect to support order-12 pages in the near future.

---

 Documentation/core-api/xarray.rst |   14 +-
 include/linux/xarray.h            |   13 ++
 lib/test_xarray.c                 |   44 +++++++
 lib/xarray.c                      |  168 ++++++++++++++++++++++++++--
 4 files changed, 224 insertions(+), 15 deletions(-)
Documentation/core-api/xarray.rst renamed from Documentation/core-api/xarray.rst~xarray-add-xas_split +8 -6
@@ -475,13 +475,15 @@ or iterations will move the index to the
 Each entry will only be returned once, no matter how many indices it
 occupies.
 
-Using xas_next() or xas_prev() with a multi-index xa_state
-is not supported.  Using either of these functions on a multi-index entry
-will reveal sibling entries; these should be skipped over by the caller.
+Using xas_next() or xas_prev() with a multi-index xa_state is not
+supported.  Using either of these functions on a multi-index entry will
+reveal sibling entries; these should be skipped over by the caller.
 
-Storing ``NULL`` into any index of a multi-index entry will set the entry
-at every index to ``NULL`` and dissolve the tie.  Splitting a multi-index
-entry into entries occupying smaller ranges is not yet supported.
+Storing ``NULL`` into any index of a multi-index entry will set the
+entry at every index to ``NULL`` and dissolve the tie.  A multi-index
+entry can be split into entries occupying smaller ranges by calling
+xas_split_alloc() without the xa_lock held, followed by taking the lock
+and calling xas_split().
 
 Functions and structures
 ========================
include/linux/xarray.h renamed from include/linux/xarray.h~xarray-add-xas_split +13 -0
@@ -1507,11 +1507,24 @@ void xas_create_range(struct xa_state *)
 
 #ifdef CONFIG_XARRAY_MULTI
 int xa_get_order(struct xarray *, unsigned long index);
+void xas_split(struct xa_state *, void *entry, unsigned int order);
+void xas_split_alloc(struct xa_state *, void *entry, unsigned int order, gfp_t);
 #else
 static inline int xa_get_order(struct xarray *xa, unsigned long index)
 {
 	return 0;
 }
+
+static inline void xas_split(struct xa_state *xas, void *entry,
+		unsigned int order)
+{
+	xas_store(xas, entry);
+}
+
+static inline void xas_split_alloc(struct xa_state *xas, void *entry,
+		unsigned int order, gfp_t gfp)
+{
+}
 #endif
 
 /**
lib/test_xarray.c renamed from lib/test_xarray.c~xarray-add-xas_split +44 -0

56 lines not on this page · raw message

lib/xarray.c renamed from lib/xarray.c~xarray-add-xas_split +159 -9

211 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are

mm-update-the-documentation-for-vfree.patch