Thread (17 messages) 17 messages, 4 authors, 2018-10-16

Re: [PATCH v7 1/6] mm: split SWP_FILE into SWP_ACTIVATED and SWP_FS

From: Johannes Weiner <hannes@cmpxchg.org>
Date: 2018-09-19 18:02:40
Also in: linux-mm

On Tue, Sep 11, 2018 at 03:34:44PM -0700, Omar Sandoval wrote:
quoted hunk ↗ jump to hunk
@@ -2411,8 +2412,10 @@ static int setup_swap_extents(struct swap_info_struct *sis, sector_t *span)
 
 	if (mapping->a_ops->swap_activate) {
 		ret = mapping->a_ops->swap_activate(sis, swap_file, span);
+		if (ret >= 0)
+			sis->flags |= SWP_ACTIVATED;
 		if (!ret) {
-			sis->flags |= SWP_FILE;
+			sis->flags |= SWP_FS;
 			ret = add_swap_extent(sis, 0, sis->max, 0);
Won't this single, linear extent be in conflict with the discontiguous
extents you set up in your swap_activate callback in the last patch?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help