From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757468AbcCaV6s (ORCPT ); Thu, 31 Mar 2016 17:58:48 -0400 Received: from mail.sigma-star.at ([95.130.255.111]:45996 "EHLO mail.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752003AbcCaV6q (ORCPT ); Thu, 31 Mar 2016 17:58:46 -0400 From: Richard Weinberger To: linux-fsdevel@vger.kernel.org Cc: linux-mtd@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, boris.brezillon@free-electrons.com, maxime.ripard@free-electrons.com, david@sigma-star.at, david@fromorbit.com, dedekind1@gmail.com, alex@nextthing.co, akpm@linux-foundation.org, sasha.levin@oracle.com, iamjoonsoo.kim@lge.com, rvaswani@codeaurora.org, tony.luck@intel.com, shailendra.capricorn@gmail.com, kirill.shutemov@linux.intel.com, hch@infradead.org, hughd@google.com, mgorman@techsingularity.net, vbabka@suse.cz Subject: UBIFS and page migration (take 2) Date: Thu, 31 Mar 2016 23:58:31 +0200 Message-Id: <1459461513-31765-1-git-send-email-richard@nod.at> X-Mailer: git-send-email 1.8.4.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org During page migrations UBIFS gets confused. We triggered this by using CMA on two different targets. It turned out that fallback_migrate_page() is not suitable for UBIFS as it does not copy the PagePrivate flag. UBIFS is using this flag among with PageChecked to account free space. One possible solution is implementing a ->migratepage() function in UBIFS which does more or less the same as fallback_migrate_page() but also copies PagePrivate. I'm not at all sure whether this is they way to go. IMHO either page migration should not happen if ->migratepage() is not implement or fallback_migrate_page() has to work for all filesystems. Comments? Flames? :-) Thanks, //richard [PATCH 1/2] mm: Export migrate_page_move_mapping and [PATCH 2/2] UBIFS: Implement ->migratepage()